]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
safety checked lightmap access in Mod_Q1BSP_RecursiveLightPoint as one map Sajt uses...
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index f1943a74f3dd380a4688ce81adc9181da3011105..c1657d10f933d862605f1534ba082550613fb133 100644 (file)
--- a/host.c
+++ b/host.c
@@ -577,7 +577,7 @@ qboolean Host_FilterTime (double time)
                {
                        // don't totally hog the CPU
                        if (timeleft >= 0.02)
-                               Sys_Sleep();
+                               Sys_Sleep((int)(timeleft * 1000) - 5);
                        return false;
                }
        }
@@ -757,6 +757,7 @@ void _Host_Frame (float time)
        if (host_speeds.integer)
                time1 = Sys_DoubleTime();
 
+       R_UpdateWorld();
        CL_UpdateScreen();
 
        if (host_speeds.integer)
@@ -878,7 +879,10 @@ void Host_Init (void)
        }
 
        // only cvars are executed when host_initialized == false
-       Cbuf_InsertText("exec quake.rc\n");
+       if (gamemode == GAME_TEU)
+               Cbuf_InsertText("exec teu.rc\n");
+       else
+               Cbuf_InsertText("exec quake.rc\n");
        Cbuf_Execute();
 
        host_initialized = true;
@@ -894,7 +898,10 @@ void Host_Init (void)
 
        // stuff it again so the first host frame will execute it again, this time
        // in its entirety
-       Cbuf_InsertText("exec quake.rc\n");
+       if (gamemode == GAME_TEU)
+               Cbuf_InsertText("exec teu.rc\n");
+       else
+               Cbuf_InsertText("exec quake.rc\n");
        Cbuf_Execute();
 }