From 9fb7ba77e4247303900b548b43adef6397d161f1 Mon Sep 17 00:00:00 2001 From: James R <justsomejames2@gmail.com> Date: Thu, 15 Oct 2020 14:47:10 -0700 Subject: [PATCH] Midtexture step up/down --- 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 733adc6ad3..ee1fb5a421 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -437,8 +437,8 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) fixed_t topedge[2] = {0}; fixed_t botedge[2] = {0}; - int hi; - int lo; + int hi = 0; + int lo = 0; if (linedef->sidenum[1] == 0xffff) { @@ -580,12 +580,20 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) if (delta1 > delta2) { // Below if (opentop > texbottom) { + topedge[lo] -= ( opentop - texbottom ); + opentop = texbottom; + openceilingstep = ( thingtop - topedge[lo] ); + openceilingdrop = ( topedge[hi] - topedge[lo] ); } } else { // Above if (openbottom < textop) { + botedge[hi] += ( textop - openbottom ); + openbottom = textop; + openfloorstep = ( botedge[hi] - mobj->z ); + openfloordrop = ( botedge[hi] - botedge[lo] ); } } } -- GitLab