]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix dedicated server timing, now sleeps less than the full amount of time (like liste...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 1 Nov 2005 09:52:47 +0000 (09:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 1 Nov 2005 09:52:47 +0000 (09:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5784 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 97b51e240bf6fd5e8c9ca56f24f974abcd99e304..05bcd3ed8f4afde90eac8aa65ff6110971fd7a1b 100644 (file)
--- a/host.c
+++ b/host.c
@@ -588,20 +588,9 @@ qboolean Host_FilterTime (double time)
        {
                int msleft;
                // don't totally hog the CPU
-               if (cls.state == ca_dedicated)
-               {
-                       // if dedicated, try to use as little cpu as possible by waiting
-                       // just a little longer than necessary
-                       // (yes this means it doesn't quite keep up with the framerate)
-                       msleft = (int)ceil(timeleft * 1000);
-               }
-               else
-               {
-                       // if not dedicated, try to hit exactly a steady framerate by not
-                       // sleeping the full amount
-                       msleft = (int)floor(timeleft * 1000);
-               }
-               if (msleft > 0)
+               // try to hit exactly a steady framerate by not sleeping the full amount
+               msleft = (int)floor(timeleft * 1000);
+               if (msleft >= 10)
                        Sys_Sleep(msleft);
                return false;
        }