From 39af2dd6a51d5631bb1c95ce2dfc306c7689187f Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 18 Apr 2006 11:19:02 +0000 Subject: [PATCH] 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 --- host.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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) -- 2.39.2