diff --git a/cl_dll/input_goldsource.cpp b/cl_dll/input_goldsource.cpp index bf029639..a11d26b1 100644 --- a/cl_dll/input_goldsource.cpp +++ b/cl_dll/input_goldsource.cpp @@ -158,7 +158,6 @@ bool isMouseRelative = false; #if _WIN32 #include "progdefs.h" -extern globalvars_t *gpGlobals; #endif int CL_IsDead( void ); @@ -781,9 +780,10 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY) #if _WIN32 // update m_bRawInput occasionally: - if ( gpGlobals && gpGlobals->time - s_flRawInputUpdateTime > 1.0f ) + const float currentTime = gEngfuncs.GetClientTime(); + if ( currentTime - s_flRawInputUpdateTime > 1.0f || s_flRawInputUpdateTime == 0.0f ) { - s_flRawInputUpdateTime = gpGlobals->time; + s_flRawInputUpdateTime = currentTime; bool lockEntered = MouseThread_ActiveLock_Enter();