mirror of https://github.com/FWGS/hlsdk-xash3d
Fix bot respawn
This commit is contained in:
parent
70c633706a
commit
8fb9b07720
|
@ -164,6 +164,9 @@ void CHLBot::Killed(entvars_t *pevAttacker, int iGib)
|
||||||
|
|
||||||
// extend
|
// extend
|
||||||
CBasePlayer::Killed(pevAttacker, iGib);
|
CBasePlayer::Killed(pevAttacker, iGib);
|
||||||
|
|
||||||
|
ClearMovement();
|
||||||
|
//respawn( pev, !( m_afPhysicsFlags & PFLAG_OBSERVER ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if line segment intersects rectagular volume
|
// Return true if line segment intersects rectagular volume
|
||||||
|
|
|
@ -1279,7 +1279,7 @@ void CBasePlayer::PlayerDeathThink( void )
|
||||||
// wait for all buttons released
|
// wait for all buttons released
|
||||||
if( pev->deadflag == DEAD_DEAD )
|
if( pev->deadflag == DEAD_DEAD )
|
||||||
{
|
{
|
||||||
if( fAnyButtonDown )
|
if( !IsBot() && fAnyButtonDown )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( g_pGameRules->FPlayerCanRespawn( this ) )
|
if( g_pGameRules->FPlayerCanRespawn( this ) )
|
||||||
|
@ -1301,7 +1301,7 @@ void CBasePlayer::PlayerDeathThink( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for any button down, or mp_forcerespawn is set and the respawn time is up
|
// wait for any button down, or mp_forcerespawn is set and the respawn time is up
|
||||||
if( !fAnyButtonDown && !( g_pGameRules->IsMultiplayer() && forcerespawn.value > 0 && ( gpGlobals->time > ( m_fDeadTime + 5 ) ) ) )
|
if( !fAnyButtonDown && !( g_pGameRules->IsMultiplayer() && ( IsBot() || forcerespawn.value ) && ( gpGlobals->time > ( m_fDeadTime + 5 ) ) ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pev->button = 0;
|
pev->button = 0;
|
||||||
|
|
Loading…
Reference in New Issue