Reset client m_signals on fullupdate (#588)

This commit is contained in:
Juice 2020-12-02 13:46:12 +03:00 committed by GitHub
parent 3a8b0d1330
commit 8d6bf017f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -7045,7 +7045,11 @@ void EXT_FUNC CBasePlayer::__API_HOOK(UpdateClientData)()
{ {
m_fInitHUD = FALSE; m_fInitHUD = FALSE;
gInitHUD = FALSE; gInitHUD = FALSE;
#ifdef REGAMEDLL_FIXES
m_signals.Reset();
#else
m_signals.Update(); m_signals.Update();
#endif
MESSAGE_BEGIN(MSG_ONE, gmsgResetHUD, nullptr, pev); MESSAGE_BEGIN(MSG_ONE, gmsgResetHUD, nullptr, pev);
MESSAGE_END(); MESSAGE_END();

View File

@ -39,8 +39,7 @@ class CUnifiedSignals
public: public:
CUnifiedSignals() CUnifiedSignals()
{ {
m_flSignal = 0; Reset();
m_flState = 0;
} }
public: public:
void Update() void Update()
@ -52,6 +51,12 @@ public:
int GetSignal() const { return m_flSignal; } int GetSignal() const { return m_flSignal; }
int GetState() const { return m_flState; } int GetState() const { return m_flState; }
void Reset()
{
m_flState = 0;
m_flSignal = 0;
}
private: private:
int m_flSignal; int m_flSignal;
int m_flState; int m_flState;