X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=sv_main.c;h=d13bffd05d225c2c154ffc7f521ba51e130c039f;hb=5f6013df0acabebeb17602e8824f4e450d010d9f;hp=91716b8fbcdc4382773189db047cc9e200950e6d;hpb=5769728448bd944410a14a76e7c587d0e147cd8b;p=xonotic%2Fdarkplaces.git diff --git a/sv_main.c b/sv_main.c index 91716b8f..d13bffd0 100644 --- a/sv_main.c +++ b/sv_main.c @@ -3899,10 +3899,10 @@ static int SV_ThreadFunc(void *voiddata) if(host_client->spawned) if(host_client->netconnection) playing = true; - if(!playing) + if(sv.time < 10) { - // Nobody is looking? Then we won't do timing... - // Instead, reset it to zero + // don't accumulate time for the first 10 seconds of a match + // so things can settle svs.perf_acc_realtime = svs.perf_acc_sleeptime = svs.perf_acc_lost = svs.perf_acc_offset = svs.perf_acc_offset_squared = svs.perf_acc_offset_max = svs.perf_acc_offset_samples = 0; } else if(svs.perf_acc_realtime > 5) @@ -3916,7 +3916,8 @@ static int SV_ThreadFunc(void *voiddata) svs.perf_offset_sdev = sqrt(svs.perf_acc_offset_squared / svs.perf_acc_offset_samples - svs.perf_offset_avg * svs.perf_offset_avg); } if(svs.perf_lost > 0 && developer_extra.integer) - Con_DPrintf("Server can't keep up: %s\n", Host_TimingReport(vabuf, sizeof(vabuf))); + if(playing) + Con_DPrintf("Server can't keep up: %s\n", Host_TimingReport(vabuf, sizeof(vabuf))); svs.perf_acc_realtime = svs.perf_acc_sleeptime = svs.perf_acc_lost = svs.perf_acc_offset = svs.perf_acc_offset_squared = svs.perf_acc_offset_max = svs.perf_acc_offset_samples = 0; }