From: cloudwalk Date: Mon, 13 Jul 2020 16:00:12 +0000 (+0000) Subject: host: Move server/client-specific frametime limiting code outside of common code X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ccd5652bf115cdb098c5422328e4379ccce92c6;p=xonotic%2Fdarkplaces.git host: Move server/client-specific frametime limiting code outside of common code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12802 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 94618145..050225df 100644 --- 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();