]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
speed gain in lightmap updates
[xonotic/darkplaces.git] / gl_rsurf.c
index c4ececd69f391c30983336b6a524683b1e766b27..86502d13469676c2c0604a7077f607cbb778c582 100644 (file)
@@ -1929,9 +1929,8 @@ void R_SurfMarkLights (entity_render_t *ent)
 
        if (!r_vertexsurfaces.integer)
        {
-               for (i = 0;i < ent->model->nummodelsurfaces;i++)
+               for (i = 0, surf = ent->model->surfaces + ent->model->firstmodelsurface;i < ent->model->nummodelsurfaces;i++, surf++)
                {
-                       surf = ent->model->modelsortedsurfaces[i];
                        if (surf->visframe == r_framecount && surf->lightmaptexture != NULL)
                        {
                                if (surf->cached_dlight