]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
significant surface renderer optimizations
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 6defd6dd63fca685b35b3f02d52afbb7817b255f..e0883aeb5716e1be59056d202cd2b120f56a79de 100644 (file)
--- a/host.c
+++ b/host.c
@@ -544,7 +544,11 @@ Runs all active servers
 static void Host_Init(void);
 void Host_Main(void)
 {
-       double frameoldtime, framenewtime, frametime, cl_timer, sv_timer;
+       static double time1 = 0;
+       static double time2 = 0;
+       static double time3 = 0;
+       // these are static because of setjmp/longjmp warnings in mingw32 gcc 2.95.3
+       static double frameoldtime, framenewtime, frametime, cl_timer, sv_timer;
 
        Host_Init();
 
@@ -554,9 +558,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 +576,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)