- fixed: Rendering 2-sided walls with 3D floor light effects had the 'is3dfloor' flag of GetLightLevel inverted.

This commit is contained in:
Christoph Oelckers 2016-02-29 10:26:07 +01:00
parent fadc7de636
commit 7242a0ef94
2 changed files with 7 additions and 7 deletions

View file

@ -978,7 +978,7 @@ struct side_t
BYTE Flags;
int Index; // needed to access custom UDMF fields which are stored in loading order.
int GetLightLevel (bool foggy, int baselight, bool noabsolute=false, int *pfakecontrast_usedbygzdoom=NULL) const;
int GetLightLevel (bool foggy, int baselight, bool is3dlight=false, int *pfakecontrast_usedbygzdoom=NULL) const;
void SetLight(SWORD l)
{

View file

@ -272,17 +272,17 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
if (fixedlightlev < 0)
{
if (!(fake3D & FAKE3D_CLIPTOP))
{
sclipTop = sec->ceilingplane.ZatPoint(viewx, viewy);
}
for (i = frontsector->e->XFloor.lightlist.Size() - 1; i >= 0; i--)
{
if (!(fake3D & FAKE3D_CLIPTOP))
{
sclipTop = sec->ceilingplane.ZatPoint(viewx, viewy);
}
if (sclipTop <= frontsector->e->XFloor.lightlist[i].plane.ZatPoint(viewx, viewy))
if (sclipTop <= frontsector->e->XFloor.lightlist[i].plane.Zat0())
{
lightlist_t *lit = &frontsector->e->XFloor.lightlist[i];
basecolormap = lit->extra_colormap;
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource == NULL) + r_actualextralight);
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource != NULL) + r_actualextralight);
break;
}
}