]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
increased minimum cl_maxfps value from 1 to 5 (but removed the value
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Nov 2007 21:19:17 +0000 (21:19 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Nov 2007 21:19:17 +0000 (21:19 +0000)
changing code)
implemented minimum cl_maxidlefps value of 5
tweaked code that snaps very small or negative values of slowmo to 0

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7675 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index e0536ff6505e49ed76052b5595b7da0a056d3b35..db4c9899c68b3a75f4c8bc2d6c255b93b84e4d97 100644 (file)
--- a/host.c
+++ b/host.c
@@ -611,12 +611,10 @@ void Host_Main(void)
                        svs.perf_acc_realtime = svs.perf_acc_sleeptime = svs.perf_acc_lost = svs.perf_acc_offset = svs.perf_acc_offset_squared = svs.perf_acc_offset_max = svs.perf_acc_offset_samples = 0;
                }
 
-               if (slowmo.value < 0)
+               if (slowmo.value < 0.00001 && slowmo.value != 0)
                        Cvar_SetValue("slowmo", 0);
                if (host_framerate.value < 0.00001 && host_framerate.value != 0)
                        Cvar_SetValue("host_framerate", 0);
-               if (cl_maxfps.value < 1)
-                       Cvar_SetValue("cl_maxfps", 1);
 
                // keep the random time dependent, but not when playing demos/benchmarking
                if(!*sv_random_seed.string && !cls.demoplayback)
@@ -793,9 +791,9 @@ void Host_Main(void)
                                }
                        }
                        else if (vid_activewindow)
-                               clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxfps.value);
+                               clframetime = cl.realframetime = max(cl_timer, 1.0 / max(5.0f, cl_maxfps.value));
                        else
-                               clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxidlefps.value);
+                               clframetime = cl.realframetime = max(cl_timer, 1.0 / max(5.0f, cl_maxidlefps.value));
 
                        // apply slowmo scaling
                        clframetime *= cl.movevars_timescale;