]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
host: Move server/client-specific frametime limiting code outside of common code
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jul 2020 16:00:12 +0000 (16:00 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jul 2020 16:00:12 +0000 (16:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12802 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 9461814595f74152ae94c56cd3f1f758da50fff3..050225dfb4172e70ec4b28485e6a9adf3c2d3be7 100644 (file)
--- a/host.c
+++ b/host.c
@@ -550,16 +550,6 @@ void Host_Main(void)
                        continue;
                }
 
-               // limit the frametime steps to no more than 100ms each
-               if (cl_timer > 0.1)
-                       cl_timer = 0.1;
-               if (sv_timer > 0.1)
-               {
-                       if (!svs.threaded)
-                               svs.perf_acc_lost += (sv_timer - 0.1);
-                       sv_timer = 0.1;
-               }
-
                R_TimeReport("---");
 
        //-------------------
@@ -569,6 +559,13 @@ void Host_Main(void)
        //-------------------
 
                // limit the frametime steps to no more than 100ms each
+               if (sv_timer > 0.1)
+               {
+                       if (!svs.threaded)
+                               svs.perf_acc_lost += (sv_timer - 0.1);
+                       sv_timer = 0.1;
+               }
+
                if (sv.active && sv_timer > 0 && !svs.threaded)
                {
                        // execute one or more server frames, with an upper limit on how much
@@ -662,6 +659,10 @@ void Host_Main(void)
        //
        //-------------------
 
+               // limit the frametime steps to no more than 100ms each
+               if (cl_timer > 0.1)
+                       cl_timer = 0.1;
+
                // get new key events
                Key_EventQueue_Unblock();
                SndSys_SendKeyEvents();