Skip to content

Commit

Permalink
undo force push
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphonie committed Jul 26, 2023
1 parent 2e697c6 commit 01f6cb3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 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 @@ -234,15 +232,13 @@ void TimerSystem::GameFrame(bool simulating)
m_fLastTickedTime = gpGlobals->curtime;
m_bHasMapTickedYet = true;

RunFrame();
/*
if (g_fUniversalTime >= g_fTimerThink)
{
RunFrame();

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

RunFrameHooks(simulating);

if (m_pOnGameFrame->GetFunctionCount())
Expand Down

0 comments on commit 01f6cb3

Please sign in to comment.