mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- Fixed: Disable absolute wall lighting when in the shadow of a 3D floor.
SVN r3499 (trunk)
This commit is contained in:
parent
f6f8d74635
commit
d9f7a250ba
3 changed files with 22 additions and 15 deletions
|
@ -930,9 +930,9 @@ CUSTOM_CVAR(Int, r_fakecontrast, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int side_t::GetLightLevel (bool foggy, int baselight, int *pfakecontrast) const
|
||||
int side_t::GetLightLevel (bool foggy, int baselight, bool noabsolute, int *pfakecontrast) const
|
||||
{
|
||||
if (Flags & WALLF_ABSLIGHTING)
|
||||
if (!noabsolute && (Flags & WALLF_ABSLIGHTING))
|
||||
{
|
||||
baselight = Light;
|
||||
}
|
||||
|
|
|
@ -783,7 +783,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, int *fake = NULL) const;
|
||||
int GetLightLevel (bool foggy, int baselight, bool noabsolute=false, int *pfakecontrast_usedbygzdoom=NULL) const;
|
||||
|
||||
void SetLight(SWORD l)
|
||||
{
|
||||
|
|
|
@ -265,8 +265,9 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
|
|||
}
|
||||
if (sclipTop <= frontsector->e->XFloor.lightlist[i].plane.ZatPoint(viewx, viewy))
|
||||
{
|
||||
basecolormap = frontsector->e->XFloor.lightlist[i].extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *frontsector->e->XFloor.lightlist[i].p_lightlevel) + r_actualextralight);
|
||||
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);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -786,8 +787,9 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
|
|||
{
|
||||
if (sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
basecolormap = backsector->e->XFloor.lightlist[j].extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *backsector->e->XFloor.lightlist[j].p_lightlevel) + r_actualextralight);
|
||||
lightlist_t *lit = &backsector->e->XFloor.lightlist[i];
|
||||
basecolormap = lit->extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource == NULL) + r_actualextralight);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -798,8 +800,9 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
|
|||
{
|
||||
if (sclipTop <= frontsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
basecolormap = frontsector->e->XFloor.lightlist[j].extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *frontsector->e->XFloor.lightlist[j].p_lightlevel) + r_actualextralight);
|
||||
lightlist_t *lit = &frontsector->e->XFloor.lightlist[j];
|
||||
basecolormap = lit->extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource == NULL) + r_actualextralight);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -959,8 +962,9 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
|
|||
{
|
||||
if (sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
basecolormap = backsector->e->XFloor.lightlist[j].extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *backsector->e->XFloor.lightlist[j].p_lightlevel) + r_actualextralight);
|
||||
lightlist_t *lit = &backsector->e->XFloor.lightlist[j];
|
||||
basecolormap = lit->extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource != NULL) + r_actualextralight);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -971,8 +975,9 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
|
|||
{
|
||||
if(sclipTop <= frontsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
basecolormap = frontsector->e->XFloor.lightlist[j].extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *frontsector->e->XFloor.lightlist[j].p_lightlevel) + r_actualextralight);
|
||||
lightlist_t *lit = &frontsector->e->XFloor.lightlist[j];
|
||||
basecolormap = lit->extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource != NULL) + r_actualextralight);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1198,9 +1203,11 @@ void wallscan_striped (int x1, int x2, short *uwal, short *dwal, fixed_t *swal,
|
|||
up = down;
|
||||
down = (down == most1) ? most2 : most1;
|
||||
}
|
||||
basecolormap = frontsector->e->XFloor.lightlist[i].extra_colormap;
|
||||
|
||||
lightlist_t *lit = &frontsector->e->XFloor.lightlist[i];
|
||||
basecolormap = lit->extra_colormap;
|
||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(fogginess,
|
||||
*frontsector->e->XFloor.lightlist[i].p_lightlevel) + r_actualextralight);
|
||||
*lit->p_lightlevel, lit->lightsource != NULL) + r_actualextralight);
|
||||
}
|
||||
|
||||
wallscan (x1, x2, up, dwal, swal, lwal, yrepeat);
|
||||
|
|
Loading…
Reference in a new issue