]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
use CFLAGS_ODE on prvm_cmd.c because it checks ODE_DYNAMIC and ODE_STATIC defines
[xonotic/darkplaces.git] / sv_main.c
index 91716b8fbcdc4382773189db047cc9e200950e6d..d13bffd05d225c2c154ffc7f521ba51e130c039f 100644 (file)
--- 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;
                }