]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
an attempt at optimizing msurface_t dlight_cache checks by moving them
[xonotic/darkplaces.git] / gl_rsurf.c
index d14cc1fb540bfdda417f86840eb0a7e4f09d562a..39982495dd2174fc5558183bdcbd7cef98a6e34b 100644 (file)
@@ -69,7 +69,7 @@ void R_BuildLightMap (const entity_render_t *ent, msurface_t *surface)
        templight = (unsigned char *)cl.buildlightmapmemory;
 
        // update cached lighting info
-       surface->cached_dlight = 0;
+       model->brushq1.lightmapupdateflags[surface - model->data_surfaces] = false;
 
        lightmap = surface->lightmapinfo->samples;
 
@@ -259,7 +259,7 @@ loc0:
                        }
                        // force lightmap upload
                        if (stained)
-                               surface->cached_dlight = true;
+                               model->brushq1.lightmapupdateflags[surface - model->data_surfaces] = true;
                }
        }