Midtexture step up/down

This commit is contained in:
James R 2020-10-15 14:47:10 -07:00
parent 0bf00aad35
commit 9fb7ba77e4

View file

@ -437,8 +437,8 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
fixed_t topedge[2] = {0}; fixed_t topedge[2] = {0};
fixed_t botedge[2] = {0}; fixed_t botedge[2] = {0};
int hi; int hi = 0;
int lo; int lo = 0;
if (linedef->sidenum[1] == 0xffff) if (linedef->sidenum[1] == 0xffff)
{ {
@ -580,12 +580,20 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
if (delta1 > delta2) { // Below if (delta1 > delta2) { // Below
if (opentop > texbottom) if (opentop > texbottom)
{ {
topedge[lo] -= ( opentop - texbottom );
opentop = texbottom; opentop = texbottom;
openceilingstep = ( thingtop - topedge[lo] );
openceilingdrop = ( topedge[hi] - topedge[lo] );
} }
} else { // Above } else { // Above
if (openbottom < textop) if (openbottom < textop)
{ {
botedge[hi] += ( textop - openbottom );
openbottom = textop; openbottom = textop;
openfloorstep = ( botedge[hi] - mobj->z );
openfloordrop = ( botedge[hi] - botedge[lo] );
} }
} }
} }