From 1ccd41c3dbb3132ce7467edf0c12c9d420b189f9 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 7 Mar 2023 19:32:52 +0000 Subject: [PATCH] R_RenderThickSideRange: Compilation fix It seems `lighteffect` was not a comprehensive enough blockade to referencing an uninitialised `xwalllights` for my strictly-warning compiler. --- src/r_segs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index 0dee4fae3..11bac628c 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -967,14 +967,13 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) fixed_t height; fixed_t bheight = 0; INT32 solid = 0; - INT32 lighteffect = 0; for (i = 0; i < dc_numlights; i++) { // Check if the current light effects the colormap/lightlevel rlight = &dc_lightlist[i]; - lighteffect = !(dc_lightlist[i].flags & FOF_NOSHADE); - if (lighteffect) + xwalllights = NULL; + if (!(dc_lightlist[i].flags & FOF_NOSHADE)) { lightnum = R_AdjustLightLevel(rlight->lightnum); @@ -1037,7 +1036,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) if (height <= windowtop) { - if (lighteffect) + if (xwalllights) { dc_colormap = rlight->rcolormap; dc_lightmap = xwalllights[pindex]; @@ -1074,7 +1073,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) windowtop = bheight; else windowtop = windowbottom + 1; - if (lighteffect) + if (xwalllights) { dc_colormap = rlight->rcolormap; dc_lightmap = xwalllights[pindex];