X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=host.c;h=7e7bc56a7f2950de8df0e6c6a9ffa52273338326;hb=4fa4227c4cadd099125636f085183062a50acf7d;hp=3a7965e1d2e5dc6e7464ae225be8486a4b29ca98;hpb=01f19c6c3ff8d4645b8589b3c8274d08a5775af6;p=xonotic%2Fdarkplaces.git diff --git a/host.c b/host.c index 3a7965e1..7e7bc56a 100644 --- a/host.c +++ b/host.c @@ -679,6 +679,7 @@ void Host_Main(void) Host_Init(); realtime = 0; + host_dirtytime = Sys_DirtyTime(); for (;;) { if (setjmp(host_abortframe)) @@ -803,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;