mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-22 01:47:45 +01:00
Fix death animation loop.
This commit is contained in:
parent
7bbc2cf4d7
commit
c949e02e4e
@ -1296,7 +1296,7 @@ void CBasePlayer::PlayerDeathThink( void )
|
||||
PackDeadPlayerItems();
|
||||
}
|
||||
|
||||
if( pev->modelindex && ( !m_fSequenceFinished ) && ( pev->deadflag == DEAD_DYING ) )
|
||||
if( pev->modelindex && ( !m_fSequenceFinished ) && ( pev->deadflag == DEAD_DYING ))
|
||||
{
|
||||
StudioFrameAdvance();
|
||||
|
||||
@ -1305,14 +1305,9 @@ void CBasePlayer::PlayerDeathThink( void )
|
||||
return;
|
||||
}
|
||||
|
||||
// once we're done animating our death and we're on the ground, we want to set movetype to None so our dead body won't do collisions and stuff anymore
|
||||
// this prevents a bug where the dead body would go to a player's head if he walked over it while the dead player was clicking their button to respawn
|
||||
if( pev->movetype != MOVETYPE_NONE && FBitSet( pev->flags, FL_ONGROUND ) )
|
||||
pev->movetype = MOVETYPE_NONE;
|
||||
|
||||
if( pev->deadflag == DEAD_DYING )
|
||||
{
|
||||
if( g_pGameRules->IsMultiplayer() && pev->movetype == MOVETYPE_NONE )
|
||||
if( g_pGameRules->IsMultiplayer() && m_fSequenceFinished && pev->movetype == MOVETYPE_NONE )
|
||||
{
|
||||
CopyToBodyQue( pev );
|
||||
pev->modelindex = 0;
|
||||
@ -1320,6 +1315,11 @@ void CBasePlayer::PlayerDeathThink( void )
|
||||
pev->deadflag = DEAD_DEAD;
|
||||
}
|
||||
|
||||
// once we're done animating our death and we're on the ground, we want to set movetype to None so our dead body won't do collisions and stuff anymore
|
||||
// this prevents a bug where the dead body would go to a player's head if he walked over it while the dead player was clicking their button to respawn
|
||||
if( pev->movetype != MOVETYPE_NONE && FBitSet( pev->flags, FL_ONGROUND ) )
|
||||
pev->movetype = MOVETYPE_NONE;
|
||||
|
||||
StopAnimation();
|
||||
|
||||
pev->effects |= EF_NOINTERP;
|
||||
|
@ -226,7 +226,7 @@ static void InitBodyQue( void )
|
||||
//
|
||||
void CopyToBodyQue( entvars_t *pev )
|
||||
{
|
||||
if( pev->effects & EF_NODRAW )
|
||||
if( ( pev->effects & EF_NODRAW ) || !pev->modelindex )
|
||||
return;
|
||||
|
||||
entvars_t *pevHead = VARS( g_pBodyQueueHead );
|
||||
|
Loading…
Reference in New Issue
Block a user