]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/darkplaces-src/host.c
Update the prebuilt engines to latest version of darkplaces. Also put Linux rebrand...
[voretournament/voretournament.git] / misc / source / darkplaces-src / host.c
index 2e5030350f4f8a40e2c26189c8cbf7a77cc4eb58..a8c8bf2ec6f591c59cb915760a5ea22c134c93e2 100644 (file)
@@ -97,6 +97,7 @@ Host_AbortCurrentFrame
 aborts the current host frame and goes on with the next one
 ================
 */
+void Host_AbortCurrentFrame(void) DP_FUNC_NORETURN;
 void Host_AbortCurrentFrame(void)
 {
        // in case we were previously nice, make us mean again
@@ -672,7 +673,6 @@ void Host_Main(void)
        Host_Init();
 
        realtime = 0;
-       dirtytime = Sys_DirtyTime();
        for (;;)
        {
                if (setjmp(host_abortframe))
@@ -709,7 +709,7 @@ void Host_Main(void)
                        // Look for clients who have spawned
                        playing = false;
                        for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++)
-                               if(host_client->spawned)
+                               if(host_client->begun)
                                        if(host_client->netconnection)
                                                playing = true;
                        if(sv.time < 10)
@@ -899,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");
                        }
@@ -961,13 +961,15 @@ void Host_Main(void)
                                if (cls.demopaused)
                                        clframetime = 0;
                        }
+                       else
+                       {
+                               // host_framerate overrides all else
+                               if (host_framerate.value)
+                                       clframetime = host_framerate.value;
 
-                       // host_framerate overrides all else
-                       if (host_framerate.value)
-                               clframetime = host_framerate.value;
-
-                       if (cl.paused || (cl.islocalgame && (key_dest != key_game || key_consoleactive || cl.csqc_paused)))
-                               clframetime = 0;
+                               if (cl.paused || (cl.islocalgame && (key_dest != key_game || key_consoleactive || cl.csqc_paused)))
+                                       clframetime = 0;
+                       }
 
                        if (cls.timedemo)
                                clframetime = cl.realframetime = cl_timer;
@@ -1104,7 +1106,7 @@ void Host_LockSession(void)
        if(locksession_run)
                return;
        locksession_run = true;
-       if(locksession.integer != 0)
+       if(locksession.integer != 0 && !COM_CheckParm("-readonly"))
        {
                char vabuf[1024];
                char *p = va(vabuf, sizeof(vabuf), "%slock%s", *fs_userdir ? fs_userdir : fs_basedir, sessionid.string);