X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=host.c;h=9b717993a938187a989c26f5f98585c2a2c66df3;hb=add1a1b0abc10b8e720d74aeac52ad8276ee9fe0;hp=3d98c0f38cacb118d32edcbd14d6e6939f59b762;hpb=0941085d2f009adeb0f7ce7419074ba2f07ef9cf;p=xonotic%2Fdarkplaces.git diff --git a/host.c b/host.c index 3d98c0f3..9b717993 100644 --- a/host.c +++ b/host.c @@ -667,6 +667,7 @@ void Host_Main(void) double wait; int pass1, pass2, pass3, i; char vabuf[1024]; + qboolean playing; Host_Init(); @@ -711,7 +712,13 @@ void Host_Main(void) if(host_client->spawned) if(host_client->netconnection) playing = true; - if(svs.perf_acc_realtime > 5) + if(sv.time < 10) + { + // 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) { svs.perf_cpuload = 1 - svs.perf_acc_sleeptime / svs.perf_acc_realtime; svs.perf_lost = svs.perf_acc_lost / svs.perf_acc_realtime; @@ -892,7 +899,7 @@ void Host_Main(void) SV_SendClientMessages(); if (sv.paused == 1 && realtime > sv.pausedstart && sv.pausedstart > 0) { - prog->globals.generic[OFS_PARM0] = realtime - sv.pausedstart; + prog->globals.fp[OFS_PARM0] = realtime - sv.pausedstart; PRVM_serverglobalfloat(time) = sv.time; prog->ExecuteProgram(prog, PRVM_serverfunction(SV_PausedTic), "QC function SV_PausedTic is missing"); } @@ -1293,7 +1300,7 @@ static void Host_Init (void) } // put up the loading image so the user doesn't stare at a black screen... - SCR_BeginLoadingPlaque(); + SCR_BeginLoadingPlaque(true); if (cls.state != ca_dedicated) {