]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
reorganized a lot of renderer variables into r_refdef, and split some things out...
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index e0883aeb5716e1be59056d202cd2b120f56a79de..0623c1ac3a579ce1e4fdd68d0466b218f7d32057 100644 (file)
--- a/host.c
+++ b/host.c
@@ -653,8 +653,15 @@ void Host_Main(void)
                                // don't allow simulation to run too fast or too slow or logic glitches can occur
 
                                // stop running server frames if the wall time reaches this value
-                               if (sys_ticrate.value <= 0 || (cl.islocalgame && !sv_fixedframeratesingleplayer.integer))
+                               if (sys_ticrate.value <= 0)
                                        advancetime = sv_timer;
+                               else if (cl.islocalgame && !sv_fixedframeratesingleplayer.integer)
+                               {
+                                       // synchronize to the client frametime, but no less than 10ms and no more than sys_ticrate
+                                       advancetime = bound(0.01, cl_timer, sys_ticrate.value);
+                                       framelimit = 10;
+                                       aborttime = Sys_DoubleTime() + 0.1;
+                               }
                                else
                                {
                                        advancetime = sys_ticrate.value;
@@ -786,7 +793,7 @@ void Host_Main(void)
                                        csqc_usecsqclistener = false;
                                }
                                else
-                                       S_Update(&r_refdef.viewentitymatrix);
+                                       S_Update(&r_view.matrix);
 
                                CDAudio_Update();
                        }