Fix mp_forcerespawn bypass

► Fixed an issue where people could hold some keys and not spawn when force respawn was enabled.
This commit is contained in:
speedvoltage 2025-03-12 11:37:00 +01:00
parent a62efecf62
commit 1af5e06720

View file

@ -2152,8 +2152,11 @@ void CBasePlayer::PlayerDeathThink(void)
// wait for all buttons released
if (m_lifeState == LIFE_DEAD)
{
if (fAnyButtonDown)
if ( fAnyButtonDown && ( gpGlobals->curtime > ( m_flDeathTime + 5 ) ) )
{
respawn( this, !IsObserver() );// don't copy a corpse if we're in deathcam.
return;
}
if ( g_pGameRules->FPlayerCanRespawn( this ) )
{