From: cloudwalk Date: Mon, 13 Jul 2020 16:00:13 +0000 (+0000) Subject: host: Move timer resets to client/server code X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1d39c0cfe42987fa025888843bbe70e46bf9f71d;p=xonotic%2Fdarkplaces.git host: Move timer resets to client/server code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12803 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 050225df..592949c4 100644 --- a/host.c +++ b/host.c @@ -653,6 +653,14 @@ void Host_Main(void) R_TimeReport("servernetwork"); } + // if there is some time remaining from this frame, reset the timer + if (sv_timer >= 0) + { + if (!svs.threaded) + svs.perf_acc_lost += sv_timer; + sv_timer = 0; + } + //------------------- // // client operations @@ -793,6 +801,10 @@ void Host_Main(void) } } + // if there is some time remaining from this frame, reset the timer + if (cl_timer >= 0) + cl_timer = 0; + #if MEMPARANOIA Mem_CheckSentinelsGlobal(); #else @@ -800,16 +812,6 @@ void Host_Main(void) Mem_CheckSentinelsGlobal(); #endif - // if there is some time remaining from this frame, reset the timers - if (cl_timer >= 0) - cl_timer = 0; - if (sv_timer >= 0) - { - if (!svs.threaded) - svs.perf_acc_lost += sv_timer; - sv_timer = 0; - } - host.framecount++; }