]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
minor cleanup - merged R_UpdateWorld into other places
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Sep 2004 13:23:06 +0000 (13:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Sep 2004 13:23:06 +0000 (13:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4545 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c
gl_rmain.c
host.c

index 59074cc401496b85998b1a5b3a6491e1d9b6c871..7dd9fefb21ac66d1efe9a48ed046bccfd7cd92c2 100644 (file)
@@ -1363,6 +1363,15 @@ void SCR_UpdateScreen (void)
        if (gl_combine.integer && (!gl_combine_extension || r_textureunits.integer < 2))
                Cvar_SetValueQuick(&gl_combine, 0);
 
+       // don't allow cheats in multiplayer
+       if (!cl.islocalgame && cl.worldmodel)
+       {
+               if (r_fullbright.integer != 0)
+                       Cvar_Set ("r_fullbright", "0");
+               if (r_ambient.value != 0)
+                       Cvar_Set ("r_ambient", "0");
+       }
+
        // bound viewsize
        if (scr_viewsize.value < 30)
                Cvar_Set ("viewsize","30");
index 6816a436f5ef56e215767781c27e48ac557d8ba3..2f9d3f31fadc774b256208777ccb9228e84b5e14 100644 (file)
@@ -566,33 +566,6 @@ static void R_BlendView(void)
        R_Mesh_Draw(3, 1, polygonelements);
 }
 
-void R_UpdateWorld(void)
-{
-       if (!r_refdef.entities/* || !cl.worldmodel*/)
-               return; //Host_Error ("R_RenderView: NULL worldmodel");
-
-       /*
-       if (r_shadow_realtime_world.integer && !gl_stencil)
-       {
-               Con_Print("Realtime world lighting requires 32bit color; turning off r_shadow_realtime_world, please type vid_bitsperpixel 32;vid_restart and try again\n");
-               Cvar_SetValueQuick(&r_shadow_realtime_world, 0);
-       }
-       */
-
-       // don't allow cheats in multiplayer
-       if (!cl.islocalgame && cl.worldmodel)
-       {
-               if (r_fullbright.integer != 0)
-                       Cvar_Set ("r_fullbright", "0");
-               if (r_ambient.value != 0)
-                       Cvar_Set ("r_ambient", "0");
-       }
-
-       R_Textures_Frame();
-       R_UpdateFog();
-       R_UpdateLights();
-}
-
 void R_RenderScene(void);
 
 /*
@@ -604,7 +577,7 @@ void R_RenderView(void)
 {
        if (!r_refdef.entities/* || !cl.worldmodel*/)
                return; //Host_Error ("R_RenderView: NULL worldmodel");
-       
+
        r_view_width = bound(0, r_refdef.width, vid.realwidth);
        r_view_height = bound(0, r_refdef.height, vid.realheight);
        r_view_depth = 1;
@@ -627,6 +600,9 @@ void R_RenderView(void)
        GL_ScissorTest(true);
        GL_DepthMask(true);
        R_ClearScreen();
+       R_Textures_Frame();
+       R_UpdateFog();
+       R_UpdateLights();
        R_TimeReport("setup");
 
        qglDepthFunc(GL_LEQUAL);
diff --git a/host.c b/host.c
index 5cd787a9078d0911d229c8015b868a5beda0ee5d..27df77f326dff0d304a499b6aacfa4fa3afc2d6e 100644 (file)
--- a/host.c
+++ b/host.c
@@ -756,7 +756,6 @@ void _Host_Frame (float time)
        if (host_speeds.integer)
                time1 = Sys_DoubleTime();
 
-       R_UpdateWorld();
        CL_UpdateScreen();
 
        if (host_speeds.integer)