From c78305f1f1eb4e75fb6d0424fbab48821f26511b Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 7 Jun 2025 20:31:14 +0200 Subject: [PATCH] attempt at fixing software skywalls --- src/r_segs.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index dc59ade65..b4de2c53f 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -1863,6 +1863,14 @@ void R_StoreWallRange(INT32 start, INT32 stop) worldlow -= viewz; worldlowslope -= viewz; + if (frontsector->ceilingpic != skyflatnum + && backsector->ceilingpic == skyflatnum) + { + if ((worldhigh <= worldtop && worldhighslope <= worldtopslope) // Assuming ESLOPE is always on with my changes + && (worldhigh != worldtop || worldhighslope != worldtopslope)) + worldtop = worldhigh; + } + // hack to allow height changes in outdoor areas // This is what gets rid of the upper textures if there should be sky if (frontsector->ceilingpic == skyflatnum