From f7daf547a94af3c1d9f7b3dc108b0976147199af Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 9 Nov 2007 21:19:17 +0000 Subject: [PATCH] increased minimum cl_maxfps value from 1 to 5 (but removed the value 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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/host.c b/host.c index e0536ff6..db4c9899 100644 --- 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; -- 2.39.2