]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
Store the data pointer and free it on Font_UnloadFont
[xonotic/darkplaces.git] / gl_rsurf.c
index 4316c3385972c044ee909ce7a5e297bb37278948..ca7ade0b8923e2f77e79c00cd0861844842d2802 100644 (file)
@@ -737,7 +737,7 @@ static void R_Q1BSP_RecursiveGetLightInfo(r_q1bsp_getlightinfo_t *info, mnode_t
                        if (SVBSP_AddPolygon(&r_svbsp, portal->numpoints, points[0], false, NULL, NULL, 0) & 2)
                                break;
                }
-               if (portal == NULL)
+               if (leaf->portals && portal == NULL)
                        return; // no portals of this leaf visible
        }
        if (info->svbsp_insertoccluder)
@@ -840,7 +840,7 @@ static void R_Q1BSP_RecursiveGetLightInfo(r_q1bsp_getlightinfo_t *info, mnode_t
                                                                if (castshadow)
                                                                        SETPVSBIT(info->outshadowtrispvs, t);
                                                        }
-#if 0
+#if 1
                                                        else if (r_shadow_frontsidecasting.integer)
                                                        {
                                                                // front side casting occludes backfaces,
@@ -1199,10 +1199,8 @@ void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surface
        const msurface_t *surface;
        int i, k, kend, l, endsurface, batchnumsurfaces, texturenumsurfaces;
        const msurface_t **texturesurfacelist;
-       const int *element3i;
        texture_t *tex;
        CHECKGLERROR
-       element3i = rsurface.modelelement3i;
        // this is a double loop because non-visible surface skipping has to be
        // fast, and even if this is not the world model (and hence no visibility
        // checking) the input surface list and batch buffer are different formats
@@ -1270,8 +1268,7 @@ void R_ReplaceWorldTexture (void)
        skinframe_t *skinframe;
        if (!r_refdef.scene.worldmodel)
        {
-               if (gamemode != GAME_BLOODOMNICIDE)
-                       Con_Printf("There is no worldmodel\n");
+               Con_Printf("There is no worldmodel\n");
                return;
        }
        m = r_refdef.scene.worldmodel;
@@ -1284,8 +1281,7 @@ void R_ReplaceWorldTexture (void)
        }
        if(!cl.islocalgame || !cl.worldmodel)
        {
-               if (gamemode != GAME_BLOODOMNICIDE)
-                       Con_Print("This command works only in singleplayer\n");
+               Con_Print("This command works only in singleplayer\n");
                return;
        }
        r = Cmd_Argv(1);
@@ -1301,13 +1297,11 @@ void R_ReplaceWorldTexture (void)
 //                             t->skinframes[0] = skinframe;
                                t->currentskinframe = skinframe;
                                t->currentskinframe = skinframe;
-                               if (gamemode != GAME_BLOODOMNICIDE)
-                                       Con_Printf("%s replaced with %s\n", r, newt);
+                               Con_Printf("%s replaced with %s\n", r, newt);
                        }
                        else
                        {
-                               if (gamemode != GAME_BLOODOMNICIDE)
-                                       Con_Printf("%s was not found\n", newt);
+                               Con_Printf("%s was not found\n", newt);
                                return;
                        }
                }