From 17a71cc151fb5d33da24c9a6914a8856fd8f94d4 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Thu, 12 Sep 2002 20:49:40 +0000 Subject: [PATCH] Allow float cl_maxfps settings, clean up code a bit. --- qw/source/cl_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 394ef8bfb..1c611bd50 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -1313,7 +1313,7 @@ CL_Init_Cvars (void) cl_hudswap = Cvar_Get ("cl_hudswap", "0", CVAR_ARCHIVE, cl_hudswap_f, "new HUD on left side?"); cl_maxfps = Cvar_Get ("cl_maxfps", "0", CVAR_ARCHIVE, NULL, - "maximum frames rendered in one second. 0 == 32"); + "maximum frames rendered in one second. 0 == 72"); cl_timeout = Cvar_Get ("cl_timeout", "60", CVAR_ARCHIVE, NULL, "server " "connection timeout (since last packet received)"); host_speeds = Cvar_Get ("host_speeds", "0", CVAR_NONE, NULL, @@ -1486,10 +1486,10 @@ Host_SimulationTime (float time) if (cls.timedemo) return 0; - if (!cl_maxfps->int_val) - return 0; - - fps = bound (1, cl_maxfps->value, 72); + if (cl_maxfps->value <= 0) + fps = 72; + else + fps = max (cl_maxfps->value, 72); timedifference = (timescale / fps) - (realtime - oldrealtime);