Reset m_flNextFollowTime before trying to find next target after previous target death (#712)

* Freelook bug fix

* Update regamedll/dlls/player.cpp

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
This commit is contained in:
Juice 2021-12-28 03:07:43 +03:00 committed by GitHub
parent b979b5e84f
commit 09a6c61898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2102,6 +2102,11 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib)
pObserver->m_bNightVisionOn = false; pObserver->m_bNightVisionOn = false;
} }
#ifdef REGAMEDLL_FIXES
if (pObserver->m_hObserverTarget == this)
pObserver->m_flNextFollowTime = 0.0f;
#endif
} }
if (m_pTank) if (m_pTank)