]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
cleaned up R_RenderView setup code a bit, and shuffled SCR_CalcRefdef stuff to SCR_Up...
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 89e5dab93e4f1ba2296262eb3a8d4b68850623e0..299ecad647d35f18df6ac0686fade1dcb23977de 100644 (file)
--- a/host.c
+++ b/host.c
@@ -564,17 +564,20 @@ qboolean Host_FilterTime (double time)
                // default to sys_ticrate (server framerate - presumably low) unless we
                // have a good reason to run faster
                timecap = sys_ticrate.value;
-               if (cl_avidemo.value >= 0.1f)
-                       timecap = 1.0 / (double)cl_avidemo.value;
-               else if (vid_activewindow)
-                       timecap = 1.0 / host_maxfps.value;
+               if (cls.state != ca_dedicated)
+               {
+                       if (cl_avidemo.value >= 0.1f)
+                               timecap = 1.0 / (double)cl_avidemo.value;
+                       else if (vid_activewindow)
+                               timecap = 1.0 / host_maxfps.value;
+               }
 
                timeleft = oldrealtime + timecap - realtime;
                if (timeleft > 0)
                {
                        // don't totally hog the CPU
                        if (timeleft >= 0.02)
-                               Sys_Sleep();
+                               Sys_Sleep((int)(timeleft * 1000) - 5);
                        return false;
                }
        }
@@ -754,6 +757,7 @@ void _Host_Frame (float time)
        if (host_speeds.integer)
                time1 = Sys_DoubleTime();
 
+       R_UpdateWorld();
        CL_UpdateScreen();
 
        if (host_speeds.integer)