]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_light.c
renamed q1bsp marksurfaces to leaffaces for consistency with q2bsp and q3bsp naming
[xonotic/darkplaces.git] / r_light.c
index 8f906ef7766a10c738d99a5ce7290e52938eab29..4c4643ca0532dddd41c95685f95f784dc797f4e1 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -200,18 +200,18 @@ static void R_RecursiveMarkLights(entity_render_t *ent, vec3_t lightorigin, dlig
        // check if leaf is visible according to pvs
        leaf = (mleaf_t *)node;
        i = leaf->clusterindex;
-       if (leaf->nummarksurfaces && (i >= pvsbits || CHECKPVSBIT(pvs, i)))
+       if (leaf->numleaffaces && (i >= pvsbits || CHECKPVSBIT(pvs, i)))
        {
                int d, impacts, impactt;
                float sdist, maxdist, dist2, impact[3];
                msurface_t *surf;
                // mark the polygons
                maxdist = light->rtlight.lightmap_cullradius2;
-               for (i = 0;i < leaf->nummarksurfaces;i++)
+               for (i = 0;i < leaf->numleaffaces;i++)
                {
-                       if (ent == r_refdef.worldentity && !r_worldsurfacevisible[leaf->firstmarksurface[i]])
+                       if (ent == r_refdef.worldentity && !r_worldsurfacevisible[leaf->firstleafface[i]])
                                continue;
-                       surf = ent->model->brushq1.surfaces + leaf->firstmarksurface[i];
+                       surf = ent->model->brushq1.surfaces + leaf->firstleafface[i];
                        dist = sdist = PlaneDiff(lightorigin, surf->plane);
                        if (surf->flags & SURF_PLANEBACK)
                                dist = -dist;