diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index b0533ceb56..78d9b44bd5 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -546,7 +546,7 @@ void GLFlat::ProcessSector(sector_t * frontsector) if (x.ffloors.Size()) { light = P_GetPlaneLight(sector, &frontsector->floorplane, false); - if ((!(sector->GetFlags(sector_t::floor)&PLANEF_ABSLIGHTING) || light!=&x.lightlist[0]) + if ((!(sector->GetFlags(sector_t::floor)&PLANEF_ABSLIGHTING) || !light->fromsector) && (light->p_lightlevel != &frontsector->lightlevel)) { lightlevel = *light->p_lightlevel; diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index cad1f16fa6..da72bc1711 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -584,6 +584,7 @@ void P_Recalculate3DFloors(sector_t * sector) lightlist[0].extra_colormap = sector->ColorMap; lightlist[0].blend = 0; lightlist[0].flags = 0; + lightlist[0].fromsector = true; maxheight = sector->CenterCeiling(); minheight = sector->CenterFloor(); @@ -605,6 +606,7 @@ void P_Recalculate3DFloors(sector_t * sector) newlight.extra_colormap = rover->GetColormap(); newlight.blend = rover->GetBlend(); newlight.flags = rover->flags; + newlight.fromsector = false; lightlist.Push(newlight); } else if (i==0) @@ -619,6 +621,7 @@ void P_Recalculate3DFloors(sector_t * sector) lightlist[0].extra_colormap = rover->GetColormap(); lightlist[0].blend = rover->GetBlend(); lightlist[0].flags = rover->flags; + lightlist[0].fromsector = false; } } if (rover->flags&FF_DOUBLESHADOW) @@ -643,6 +646,7 @@ void P_Recalculate3DFloors(sector_t * sector) newlight.blend = 0; } newlight.flags = rover->flags; + newlight.fromsector = false; lightlist.Push(newlight); } } diff --git a/src/p_3dfloors.h b/src/p_3dfloors.h index 8d42560af0..4321ad0e5d 100644 --- a/src/p_3dfloors.h +++ b/src/p_3dfloors.h @@ -123,6 +123,7 @@ struct lightlist_t int flags; F3DFloor* lightsource; F3DFloor* caster; + bool fromsector; };