Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions core/TimerSys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include "ConVarManager.h"
#include "logic_bridge.h"

#define TIMER_MIN_ACCURACY 0.1

TimerSystem g_Timers;
double g_fUniversalTime = 0.0f;
float g_fGameStartTime = 0.0f; /* Game game start time, non-universal */
Expand Down Expand Up @@ -146,7 +144,7 @@ class DefaultMapTimer :
*/
inline double CalcNextThink(double last, float interval)
{
if (g_fUniversalTime - last - interval <= TIMER_MIN_ACCURACY)
if (g_fUniversalTime - last - interval <= gpGlobals->interval_per_tick)
{
return last + interval;
}
Expand Down Expand Up @@ -238,7 +236,7 @@ void TimerSystem::GameFrame(bool simulating)
{
RunFrame();

g_fTimerThink = CalcNextThink(g_fTimerThink, TIMER_MIN_ACCURACY);
g_fTimerThink = CalcNextThink(g_fTimerThink, gpGlobals->interval_per_tick);
}

RunFrameHooks(simulating);
Expand Down
Loading