Skip to content

Commit

Permalink
Reset client m_signals on fullupdate (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
etojuice authored Dec 2, 2020
1 parent 3a8b0d1 commit 8d6bf01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7045,7 +7045,11 @@ void EXT_FUNC CBasePlayer::__API_HOOK(UpdateClientData)()
{
m_fInitHUD = FALSE;
gInitHUD = FALSE;
#ifdef REGAMEDLL_FIXES
m_signals.Reset();
#else
m_signals.Update();
#endif

MESSAGE_BEGIN(MSG_ONE, gmsgResetHUD, nullptr, pev);
MESSAGE_END();
Expand Down
9 changes: 7 additions & 2 deletions regamedll/dlls/unisignals.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class CUnifiedSignals
public:
CUnifiedSignals()
{
m_flSignal = 0;
m_flState = 0;
Reset();
}
public:
void Update()
Expand All @@ -52,6 +51,12 @@ class CUnifiedSignals
int GetSignal() const { return m_flSignal; }
int GetState() const { return m_flState; }

void Reset()
{
m_flState = 0;
m_flSignal = 0;
}

private:
int m_flSignal;
int m_flState;
Expand Down

0 comments on commit 8d6bf01

Please sign in to comment.