]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
remove cl_alwayssleep, it only does what we want on Windows
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Feb 2008 23:01:28 +0000 (23:01 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Feb 2008 23:01:28 +0000 (23:01 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8096 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 3d8c3dce16518a10a0c1e98fdb0f09454a79fce0..c3c0b64ad77f3e318b38ab5442b16da02798ef79 100644 (file)
--- a/host.c
+++ b/host.c
@@ -67,7 +67,6 @@ cvar_t cl_minfps_qualitypower = {CVAR_SAVE, "cl_minfps_qualitypower", "4", "rais
 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)"};
@@ -218,7 +217,6 @@ static void Host_InitLocal (void)
        Cvar_RegisterVariable (&cl_minfps_qualityscale);
        Cvar_RegisterVariable (&cl_maxfps);
        Cvar_RegisterVariable (&cl_maxidlefps);
-       Cvar_RegisterVariable (&cl_alwayssleep);
 
        Cvar_RegisterVariable (&developer);
        Cvar_RegisterVariable (&developer_loadfile);
@@ -699,7 +697,7 @@ void Host_Main(void)
                        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)
@@ -913,9 +911,6 @@ void Host_Main(void)
                }
 
                host_framecount++;
-
-               if (cl_alwayssleep.integer)
-                       Sys_Sleep(0);
        }
 }