X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=host.c;h=62dcf4748b19881b8832c6eaf4e6142e2f0ca2cd;hb=ab2e285e252663c0b7ab9128eb5ef753419f276e;hp=3a7965e1d2e5dc6e7464ae225be8486a4b29ca98;hpb=01f19c6c3ff8d4645b8589b3c8274d08a5775af6;p=xonotic%2Fdarkplaces.git diff --git a/host.c b/host.c index 3a7965e1..62dcf474 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; @@ -1016,6 +1021,7 @@ void Host_Main(void) R_TimeReport("client"); CL_UpdateScreen(); + CL_MeshEntities_Reset(); R_TimeReport("render"); if (host_speeds.integer)