This commit is contained in:
James R 2020-10-13 21:43:37 -07:00
parent 0d116b39c5
commit dab116a0bd

View file

@ -467,6 +467,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
else else
{ // Set open and high/low values here { // Set open and high/low values here
fixed_t frontheight, backheight; fixed_t frontheight, backheight;
sector_t * sector;
frontheight = P_GetCeilingZ(mobj, front, tmx, tmy, linedef); frontheight = P_GetCeilingZ(mobj, front, tmx, tmy, linedef);
backheight = P_GetCeilingZ(mobj, back, tmx, tmy, linedef); backheight = P_GetCeilingZ(mobj, back, tmx, tmy, linedef);
@ -475,15 +476,18 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{ {
opentop = frontheight; opentop = frontheight;
highceiling = backheight; highceiling = backheight;
opentopslope = front->c_slope; sector = front;
} }
else else
{ {
opentop = backheight; opentop = backheight;
highceiling = frontheight; highceiling = frontheight;
opentopslope = back->c_slope; sector = back;
} }
opentopslope = sector->c_slope;
openceilingdiff = ( mobj->z + mobj->height - P_GetSectorCeilingZAt(sector, cross.x, cross.y) );
frontheight = P_GetFloorZ(mobj, front, tmx, tmy, linedef); frontheight = P_GetFloorZ(mobj, front, tmx, tmy, linedef);
backheight = P_GetFloorZ(mobj, back, tmx, tmy, linedef); backheight = P_GetFloorZ(mobj, back, tmx, tmy, linedef);
@ -491,26 +495,17 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
{ {
openbottom = frontheight; openbottom = frontheight;
lowfloor = backheight; lowfloor = backheight;
openbottomslope = front->f_slope; sector = front;
} }
else else
{ {
openbottom = backheight; openbottom = backheight;
lowfloor = frontheight; lowfloor = frontheight;
openbottomslope = back->f_slope; sector = back;
} }
openfloordiff = openbottomslope = sector->f_slope;
abs( openfloordiff = ( P_GetSectorFloorZAt(sector, cross.x, cross.y) - mobj->z );
P_GetSectorFloorZAt(front, cross.x, cross.y) -
P_GetSectorFloorZAt(back, cross.x, cross.y)
);
openceilingdiff =
abs(
P_GetSectorCeilingZAt(front, cross.x, cross.y) -
P_GetSectorCeilingZAt(back, cross.x, cross.y)
);
} }
if (mobj) if (mobj)