]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
added PRVM_64 define which upgrades the QC VM to double precision
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 3d98c0f38cacb118d32edcbd14d6e6939f59b762..9b717993a938187a989c26f5f98585c2a2c66df3 100644 (file)
--- 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)
        {