]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
Move a part of r_refdef_t into a new r_refdef_scene_t struct and refactor the code...
[xonotic/darkplaces.git] / model_brush.c
index 9ddbae8ecbcec4d3ae5b91c4cd03e565fd7d4625..465f662fd2d2eed82fe965ddce80daa22d419865 100644 (file)
@@ -1194,7 +1194,7 @@ loc0:
                                        // bilinear filter each lightmap style, and sum them
                                        for (maps = 0;maps < MAXLIGHTMAPS && surface->lightmapinfo->styles[maps] != 255;maps++)
                                        {
-                                               scale = r_refdef.lightstylevalue[surface->lightmapinfo->styles[maps]];
+                                               scale = r_refdef.scene.lightstylevalue[surface->lightmapinfo->styles[maps]];
                                                w = w00 * scale;VectorMA(ambientcolor, w, lightmap            , ambientcolor);
                                                w = w01 * scale;VectorMA(ambientcolor, w, lightmap + 3        , ambientcolor);
                                                w = w10 * scale;VectorMA(ambientcolor, w, lightmap + line3    , ambientcolor);
@@ -5235,7 +5235,7 @@ static void Mod_Q3BSP_LightPoint(model_t *model, const vec3_t p, vec3_t ambientc
        q3dlightgrid_t *a, *s;
 
        // scale lighting by lightstyle[0] so that darkmode in dpmod works properly
-       stylescale = r_refdef.rtlightstylevalue[0];
+       stylescale = r_refdef.scene.rtlightstylevalue[0];
 
        if (!model->brushq3.num_lightgrid)
        {