X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=host.c;h=7e7bc56a7f2950de8df0e6c6a9ffa52273338326;hb=14dd9c4cd8bff104cf7d5fab1c3aa7a5e648f10b;hp=3a7965e1d2e5dc6e7464ae225be8486a4b29ca98;hpb=fafd7b1f67cdd7e571fd37c31e60da50be07c677;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;