cap cl_maxfps and gl_maxfps to sane values

gl_maxfps > 1000 breaks things, and cl_maxfps starts to behave weird
at >90, and while up to 125 or so you get the bugfeature of higher
jumping, beyond that things just get even buggier, at some point causing
bugs like #261
This commit is contained in:
Daniel Gibson 2017-12-02 16:36:50 +01:00
parent e30f824944
commit c105117d41

View file

@ -293,6 +293,22 @@ Qcommon_Frame(int msec)
c_pointcontents = 0;
}
// gl_maxfps > 1000 breaks things, and so does <= 0
// so cap to 1000 and treat <= 0 as "as fast as possible", which is 1000
if (gl_maxfps->value > 1000 || gl_maxfps->value < 1)
{
Cvar_SetValue("gl_maxfps", 1000);
}
if(cl_maxfps->value > 250)
{
Cvar_SetValue("cl_maxfps", 130);
}
else if(cl_maxfps->value < 1)
{
Cvar_SetValue("cl_maxfps", 60);
}
// Save global time for network- und input code.
curtime = Sys_Milliseconds();