From 34b2d0b21a39922b22504371fa633df97286bda0 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 21 Mar 2013 02:28:07 +0000 Subject: [PATCH] - Fixed: Putting a lightlist in a sector caused that sector's floorlight and ceilinglight to be ignored. SVN r4193 (trunk) --- src/r_bsp.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index 163b0e296..4fe0ef03b 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -1072,7 +1072,12 @@ void R_Subsector (subsector_t *sub) { light = P_GetPlaneLight(frontsector, &frontsector->ceilingplane, false); basecolormap = light->extra_colormap; - ceilinglightlevel = *light->p_lightlevel; + // If this is the real ceiling, don't discard plane lighting R_FakeFlat() + // accounted for. + if (light->p_lightlevel != &frontsector->lightlevel) + { + ceilinglightlevel = *light->p_lightlevel; + } } else { @@ -1103,7 +1108,12 @@ void R_Subsector (subsector_t *sub) { light = P_GetPlaneLight(frontsector, &frontsector->floorplane, false); basecolormap = light->extra_colormap; - floorlightlevel = *light->p_lightlevel; + // If this is the real floor, don't discard plane lighting R_FakeFlat() + // accounted for. + if (light->p_lightlevel != &frontsector->lightlevel) + { + floorlightlevel = *light->p_lightlevel; + } } else {