mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 16:41:09 +00:00
- fixed: The flat drawing code assumed that the first element of the light list originated from the sector itself. This had been true formerly but in some situations it no longer is.
This commit is contained in:
parent
00639121c0
commit
a5a53c51e6
3 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ struct lightlist_t
|
|||
int flags;
|
||||
F3DFloor* lightsource;
|
||||
F3DFloor* caster;
|
||||
bool fromsector;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue