]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
properly handle the case that the touch fucntion teleported the player
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 02e1b72be4a7f972de5e4c32305bc1e360825fbd..e16d75d383e4842e9e56f4d695267829ce116fe4 100644 (file)
--- a/host.c
+++ b/host.c
@@ -858,6 +858,9 @@ void Host_Main(void)
                        if (host_framerate.value)
                                clframetime = host_framerate.value;
 
+                       if (cl.paused || (cl.islocalgame && (key_dest != key_game || key_consoleactive)))
+                               clframetime = 0;
+
                        if (cls.timedemo)
                                clframetime = cl.realframetime = cl_timer;
 
@@ -922,6 +925,10 @@ void Host_Main(void)
                                Sys_Sleep((int)wait);
                }
 
+#if MEMPARANOIA
+               Mem_CheckSentinelsGlobal();
+#endif
+
                // if there is some time remaining from this frame, reset the timers
                if (cl_timer >= 0)
                        cl_timer = 0;
@@ -1212,10 +1219,12 @@ void Host_Shutdown(void)
        }
 
        Cmd_Shutdown();
+       Key_Shutdown();
        CL_Shutdown();
        Sys_Shutdown();
        Log_Close();
        FS_Shutdown();
+       Con_Shutdown();
        Memory_Shutdown();
 }