]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
host: Move timer resets to client/server code
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jul 2020 16:00:13 +0000 (16:00 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jul 2020 16:00:13 +0000 (16:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12803 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 050225dfb4172e70ec4b28485e6a9adf3c2d3be7..592949c4de81dd98ce65283a02f90225d7ba91d5 100644 (file)
--- 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++;
        }