cvar_t cl_minfps_qualityscale = {CVAR_SAVE, "cl_minfps_qualityscale", "0.5", "multiplier for quality"};
cvar_t cl_maxfps = {CVAR_SAVE, "cl_maxfps", "1000000", "maximum fps cap, if game is running faster than this it will wait before running another frame (useful to make cpu time available to other programs)"};
cvar_t cl_maxidlefps = {CVAR_SAVE, "cl_maxidlefps", "20", "maximum fps cap when the game is not the active window (makes cpu time available to other programs"};
-cvar_t cl_alwayssleep = {CVAR_SAVE, "cl_alwayssleep", "0", "calls operating system Sleep function at the end of each frame with 0 milliseconds, even if not hitting framerate cap - can make gameplay smoother"};
cvar_t developer = {0, "developer","0", "prints additional debugging messages and information (recommended for modders and level designers)"};
cvar_t developer_loadfile = {0, "developer_loadfile","0", "prints name and size of every file loaded via the FS_LoadFile function (which is almost everything)"};
Cvar_RegisterVariable (&cl_minfps_qualityscale);
Cvar_RegisterVariable (&cl_maxfps);
Cvar_RegisterVariable (&cl_maxidlefps);
- Cvar_RegisterVariable (&cl_alwayssleep);
Cvar_RegisterVariable (&developer);
Cvar_RegisterVariable (&developer_loadfile);
wait = max(cl_timer, sv_timer) * -1000000.0;
wait = bound(0, wait, 100000);
- if (!cls.timedemo && wait > 0)
+ if (!cls.timedemo && wait >= 1)
{
double time0 = Sys_DoubleTime();
if (sv_checkforpacketsduringsleep.integer)
}
host_framecount++;
-
- if (cl_alwayssleep.integer)
- Sys_Sleep(0);
}
}