From: havoc Date: Tue, 18 Apr 2006 11:19:02 +0000 (+0000) Subject: attempting to fix a warning about setjmp clobbering variables X-Git-Tag: xonotic-v0.1.0preview~4056 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=39af2dd6a51d5631bb1c95ce2dfc306c7689187f;p=xonotic%2Fdarkplaces.git attempting to fix a warning about setjmp clobbering variables git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6309 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 6defd6dd..f27b9097 100644 --- 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)