]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
cmd: Re-re-re-implement the cbuf. This time using the new generic linked list.
[xonotic/darkplaces.git] / gl_rmain.c
index 19f97cf8e3c6a06c00982b0fbeff30d964f58dae..6a69bdd656eae5b5c9497aaa1ea4a4873a5b242e 100644 (file)
@@ -10088,7 +10088,8 @@ void R_DrawModelSurfaces(entity_render_t *ent, qboolean skysurfaces, qboolean wr
                int updated = 0;
                for (j = model->firstmodelsurface, endj = model->firstmodelsurface + model->nummodelsurfaces;j < endj;j++)
                {
-                       if (update[j])
+                       // Update brush entities even if not visible otherwise they'll render solid black.
+                       if (update[j] && (r_refdef.viewcache.world_surfacevisible[j] || ent != r_refdef.scene.worldentity))
                        {
                                updated++;
                                R_BuildLightMap(ent, surfaces + j);