mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Fix sprites displaying behind "closed doors" when slopes are present.
For the record, thok barriers count as "closed doors" in SRB2 level contexts
This commit is contained in:
parent
6623a9148e
commit
a82c19adb1
1 changed files with 8 additions and 4 deletions
12
src/r_segs.c
12
src/r_segs.c
|
@ -1947,21 +1947,25 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
ds_p->silhouette |= SIL_TOP;
|
ds_p->silhouette |= SIL_TOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ESLOPE
|
|
||||||
// This causes issues with slopes.
|
|
||||||
if (!(frontsector->f_slope || frontsector->c_slope || backsector->f_slope || backsector->c_slope))
|
|
||||||
#endif
|
|
||||||
//SoM: 3/25/2000: This code fixes an automap bug that didn't check
|
//SoM: 3/25/2000: This code fixes an automap bug that didn't check
|
||||||
// frontsector->ceiling and backsector->floor to see if a door was closed.
|
// frontsector->ceiling and backsector->floor to see if a door was closed.
|
||||||
// Without the following code, sprites get displayed behind closed doors.
|
// Without the following code, sprites get displayed behind closed doors.
|
||||||
{
|
{
|
||||||
|
#ifdef ESLOPE
|
||||||
|
if (doorclosed || (worldhigh <= worldbottom && worldhighslope <= worldbottomslope))
|
||||||
|
#else
|
||||||
if (doorclosed || backsector->ceilingheight <= frontsector->floorheight)
|
if (doorclosed || backsector->ceilingheight <= frontsector->floorheight)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
ds_p->sprbottomclip = negonearray;
|
ds_p->sprbottomclip = negonearray;
|
||||||
ds_p->bsilheight = INT32_MAX;
|
ds_p->bsilheight = INT32_MAX;
|
||||||
ds_p->silhouette |= SIL_BOTTOM;
|
ds_p->silhouette |= SIL_BOTTOM;
|
||||||
}
|
}
|
||||||
|
#ifdef ESLOPE
|
||||||
|
if (doorclosed || (worldlow >= worldtop && worldlowslope >= worldtopslope))
|
||||||
|
#else
|
||||||
if (doorclosed || backsector->floorheight >= frontsector->ceilingheight)
|
if (doorclosed || backsector->floorheight >= frontsector->ceilingheight)
|
||||||
|
#endif
|
||||||
{ // killough 1/17/98, 2/8/98
|
{ // killough 1/17/98, 2/8/98
|
||||||
ds_p->sprtopclip = screenheightarray;
|
ds_p->sprtopclip = screenheightarray;
|
||||||
ds_p->tsilheight = INT32_MIN;
|
ds_p->tsilheight = INT32_MIN;
|
||||||
|
|
Loading…
Reference in a new issue