From: Rudolf Polzer Date: Thu, 10 Oct 2013 05:08:30 +0000 (+0200) Subject: Fixup! Instead, run additional client network frames after every select() sleep. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FdivVerent%2Ffix-checkforpacketsduringsleep;p=xonotic%2Fdarkplaces.git Fixup! Instead, run additional client network frames after every select() sleep. --- diff --git a/host.c b/host.c index 6102ffec..7e7bc56a 100644 --- a/host.c +++ b/host.c @@ -804,8 +804,12 @@ void Host_Main(void) wait = 1; // because we cast to int time0 = Sys_DirtyTime(); - if (sv_checkforpacketsduringsleep.integer && !sys_usenoclockbutbenchmark.integer && !svs.threaded) + if (sv_checkforpacketsduringsleep.integer && !sys_usenoclockbutbenchmark.integer && !svs.threaded) { NetConn_SleepMicroseconds((int)wait); + if (cls.state != ca_dedicated) + NetConn_ClientFrame(); // helps server browser get good ping values + // TODO can we do the same for ServerFrame? Probably not. + } else Sys_Sleep((int)wait); delta = Sys_DirtyTime() - time0; @@ -1049,10 +1053,6 @@ void Host_Main(void) pass1+pass2+pass3, pass1, pass2, pass3); } } - else if (cls.state != ca_dedicated) - { - NetConn_ClientFrame(); - } #if MEMPARANOIA Mem_CheckSentinelsGlobal();