]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
attempting to fix a warning about setjmp clobbering variables
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 Apr 2006 11:19:02 +0000 (11:19 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 Apr 2006 11:19:02 +0000 (11:19 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6309 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 6defd6dd63fca685b35b3f02d52afbb7817b255f..f27b90975c5271acd2cab9a8ca3e8cbafb586557 100644 (file)
--- a/host.c
+++ b/host.c
@@ -544,6 +544,9 @@ Runs all active servers
 static void Host_Init(void);
 void Host_Main(void)
 {
+       static double time1 = 0;
+       static double time2 = 0;
+       static double time3 = 0;
        double frameoldtime, framenewtime, frametime, cl_timer, sv_timer;
 
        Host_Init();
@@ -554,9 +557,8 @@ void Host_Main(void)
        framenewtime = Sys_DoubleTime();
        for (;;)
        {
-               static double time1 = 0;
-               static double time2 = 0;
-               static double time3 = 0;
+               if (setjmp(host_abortframe))
+                       continue;                       // something bad happened, or the server disconnected
 
                frameoldtime = framenewtime;
                framenewtime = Sys_DoubleTime();
@@ -573,9 +575,6 @@ void Host_Main(void)
                cl_timer += frametime;
                sv_timer += frametime;
 
-               if (setjmp(host_abortframe))
-                       continue;                       // something bad happened, or the server disconnected
-
                if (slowmo.value < 0)
                        Cvar_SetValue("slowmo", 0);
                if (host_framerate.value < 0.00001 && host_framerate.value != 0)