From 0ccd5652bf115cdb098c5422328e4379ccce92c6 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Mon, 13 Jul 2020 16:00:12 +0000 Subject: [PATCH] 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 --- host.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) 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(); -- 2.39.2