mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- fixed: 3D lights should override the sidedef's regular light completely, that includes relative light added by UDMF's 'light' property.
- Renamed the 'noabsolute' parameter in side_t::GetLightLevel to 'is3dlight', what it actually is, to avoid the confusion that caused the abovementioned error. - fixed: The Down2Up render path for sides of 3D floors had the 'is3dlight' check inverted.
This commit is contained in:
parent
c6c15fe83c
commit
a41dc24086
2 changed files with 5 additions and 5 deletions
|
@ -1024,9 +1024,9 @@ CUSTOM_CVAR(Int, r_fakecontrast, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int side_t::GetLightLevel (bool foggy, int baselight, bool noabsolute, int *pfakecontrast) const
|
int side_t::GetLightLevel (bool foggy, int baselight, bool is3dlight, int *pfakecontrast) const
|
||||||
{
|
{
|
||||||
if (!noabsolute && (Flags & WALLF_ABSLIGHTING))
|
if (!is3dlight && (Flags & WALLF_ABSLIGHTING))
|
||||||
{
|
{
|
||||||
baselight = Light;
|
baselight = Light;
|
||||||
}
|
}
|
||||||
|
@ -1066,7 +1066,7 @@ int side_t::GetLightLevel (bool foggy, int baselight, bool noabsolute, int *pfak
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(Flags & WALLF_ABSLIGHTING) && (!foggy || (Flags & WALLF_LIGHT_FOG)))
|
if (!is3dlight && !(Flags & WALLF_ABSLIGHTING) && (!foggy || (Flags & WALLF_LIGHT_FOG)))
|
||||||
{
|
{
|
||||||
baselight += this->Light;
|
baselight += this->Light;
|
||||||
}
|
}
|
||||||
|
|
|
@ -829,7 +829,7 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
|
||||||
{
|
{
|
||||||
lightlist_t *lit = &backsector->e->XFloor.lightlist[j];
|
lightlist_t *lit = &backsector->e->XFloor.lightlist[j];
|
||||||
basecolormap = lit->extra_colormap;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -842,7 +842,7 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
|
||||||
{
|
{
|
||||||
lightlist_t *lit = &frontsector->e->XFloor.lightlist[j];
|
lightlist_t *lit = &frontsector->e->XFloor.lightlist[j];
|
||||||
basecolormap = lit->extra_colormap;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue