From: divverent Date: Thu, 10 Oct 2013 16:53:28 +0000 (+0000) Subject: sv_checkforpacketsduringsleep: perform a netconn master server frame X-Git-Tag: xonotic-v0.8.0~118 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=61ce515b21c42f8b94bed19141d134a49b728048;p=xonotic%2Fdarkplaces.git sv_checkforpacketsduringsleep: perform a netconn master server frame immediately. Fixes ping view in server browser. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12019 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=84faeab78cc37a17bd009d784031602eb8d51932 --- diff --git a/host.c b/host.c index 0f19632a..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;