Skip to content

Commit

Permalink
Reset m_flNextFollowTime before trying to find next target after pr…
Browse files Browse the repository at this point in the history
…evious target death (#712)

* Freelook bug fix

* Update regamedll/dlls/player.cpp

Co-authored-by: Sergey Shorokhov <[email protected]>
  • Loading branch information
etojuice and wopox1337 authored Dec 28, 2021
1 parent b979b5e commit 09a6c61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,11 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib)

pObserver->m_bNightVisionOn = false;
}

#ifdef REGAMEDLL_FIXES
if (pObserver->m_hObserverTarget == this)
pObserver->m_flNextFollowTime = 0.0f;
#endif
}

if (m_pTank)
Expand Down

0 comments on commit 09a6c61

Please sign in to comment.