From 3a62ebbe3edbae3eacdadb0392a62412e25f089d Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 19 May 2024 18:56:14 -0300 Subject: [PATCH] Set correct slope for solid midtextures --- src/p_maputl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/p_maputl.c b/src/p_maputl.c index 242bc559e..18a15a928 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -539,11 +539,19 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) delta2 = abs(thingtop - texmid); if (delta1 > delta2) { // Below - if (opentop > texbottom) + if (opentop > texbottom) { opentop = texbottom; + if ((linedef->flags & ML_MIDPEG) != 0) { + opentopslope = openbottomslope; + } + } } else { // Above - if (openbottom < textop) + if (openbottom < textop) { openbottom = textop; + if ((linedef->flags & ML_MIDPEG) == 0) { + openbottomslope = opentopslope; + } + } } } }