diff --git a/src/r_segs.c b/src/r_segs.c
index 3f11bb3649db4739441f98ad2aec7c6ff1cfe1cf..24c01f167523a6ef825cbf311584c649250542af 100644
--- a/src/r_segs.c
+++ b/src/r_segs.c
@@ -2046,13 +2046,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
 			markceiling = false;
 		}
 
-#ifdef ESLOPE
-		if ((worldhigh <= worldbottom && worldhighslope <= worldbottomslope)
-		|| (worldlow >= worldtop && worldlowslope >= worldtopslope))
-#else
 		if (backsector->ceilingheight <= frontsector->floorheight ||
 		    backsector->floorheight >= frontsector->ceilingheight)
-#endif
 		{
 			// closed door
 			markceiling = markfloor = true;