mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-17 09:32:15 +00:00
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:
parent
e30f824944
commit
c105117d41
1 changed files with 16 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue