diff --git a/src/r_segs.c b/src/r_segs.c index 72315982..9ecb7708 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -1947,21 +1947,25 @@ void R_StoreWallRange(INT32 start, INT32 stop) 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 // frontsector->ceiling and backsector->floor to see if a door was closed. // 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) +#endif { ds_p->sprbottomclip = negonearray; ds_p->bsilheight = INT32_MAX; ds_p->silhouette |= SIL_BOTTOM; } +#ifdef ESLOPE + if (doorclosed || (worldlow >= worldtop && worldlowslope >= worldtopslope)) +#else if (doorclosed || backsector->floorheight >= frontsector->ceilingheight) +#endif { // killough 1/17/98, 2/8/98 ds_p->sprtopclip = screenheightarray; ds_p->tsilheight = INT32_MIN;