From 75bdc26df13fe94cadf7d9a9a10cb7e92761a140 Mon Sep 17 00:00:00 2001 From: Shorohov Sergey Date: Mon, 8 Jul 2019 21:17:20 +0300 Subject: [PATCH] Fix dead players kick for idle (#389) --- regamedll/dlls/player.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 0f89bf96..c691173f 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -4218,7 +4218,11 @@ void EXT_FUNC CBasePlayer::__API_HOOK(PreThink)() m_flVelocityModifier = 1; } - if (m_flIdleCheckTime <= (double)gpGlobals->time || m_flIdleCheckTime == 0.0f) + if ( +#ifdef REGAMEDLL_FIXES + IsAlive() && +#endif + m_flIdleCheckTime <= (double)gpGlobals->time || m_flIdleCheckTime == 0.0f) { // check every 5 seconds m_flIdleCheckTime = gpGlobals->time + 5.0;