]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
eliminated use of node bounding box when recursing collision traces and lights throug...
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 97b51e240bf6fd5e8c9ca56f24f974abcd99e304..ae8f61bee8b61e84efa16cb1a7fb531fa4975cb4 100644 (file)
--- a/host.c
+++ b/host.c
@@ -586,23 +586,17 @@ qboolean Host_FilterTime (double time)
        timeleft = timecap - (realtime - oldrealtime);
        if (timeleft > 0)
        {
+#if 1
+               if (timeleft * 1000 >= 10)
+                       Sys_Sleep(1);
+#else
                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);
+#endif
                return false;
        }