Skip to content

Commit

Permalink
CalcNextThink should use gpGlobals->interval_per_tick, remove TIMER_M…
Browse files Browse the repository at this point in the history
…IN_ACC define
  • Loading branch information
sapphonie authored Jul 11, 2023
1 parent 1b8d130 commit c5f4f67
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 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

0 comments on commit c5f4f67

Please sign in to comment.