mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-06 16:31:47 +00:00
Add openfloorrover and openceilingrover vars so that PIT_CheckLine can update tmfloorrover and tmceilingrover properly via P_LineOpening
...which should hopefully stop that issue where you just teleport back to the ground. Assuming this works as expected. Also this is untested lol.
This commit is contained in:
parent
b77780e1e7
commit
0821f7fb21
2 changed files with 14 additions and 0 deletions
|
@ -311,6 +311,7 @@ fixed_t opentop, openbottom, openrange, lowfloor, highceiling;
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
pslope_t *opentopslope, *openbottomslope;
|
pslope_t *opentopslope, *openbottomslope;
|
||||||
#endif
|
#endif
|
||||||
|
ffloor_t *openfloorrover, *openceilingrover;
|
||||||
|
|
||||||
// P_CameraLineOpening
|
// P_CameraLineOpening
|
||||||
// P_LineOpening, but for camera
|
// P_LineOpening, but for camera
|
||||||
|
@ -517,6 +518,8 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
I_Assert(front != NULL);
|
I_Assert(front != NULL);
|
||||||
I_Assert(back != NULL);
|
I_Assert(back != NULL);
|
||||||
|
|
||||||
|
openfloorrover = openceilingrover = NULL;
|
||||||
|
|
||||||
{ // Set open and high/low values here
|
{ // Set open and high/low values here
|
||||||
fixed_t frontheight, backheight;
|
fixed_t frontheight, backheight;
|
||||||
|
|
||||||
|
@ -641,6 +644,8 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
pslope_t *ceilingslope = opentopslope;
|
pslope_t *ceilingslope = opentopslope;
|
||||||
pslope_t *floorslope = openbottomslope;
|
pslope_t *floorslope = openbottomslope;
|
||||||
#endif
|
#endif
|
||||||
|
ffloor_t *floorrover = NULL;
|
||||||
|
ffloor_t *ceilingrover = NULL;
|
||||||
|
|
||||||
// Check for frontsector's fake floors
|
// Check for frontsector's fake floors
|
||||||
for (rover = front->ffloors; rover; rover = rover->next)
|
for (rover = front->ffloors; rover; rover = rover->next)
|
||||||
|
@ -668,6 +673,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
ceilingslope = *rover->b_slope;
|
ceilingslope = *rover->b_slope;
|
||||||
#endif
|
#endif
|
||||||
|
ceilingrover = rover;
|
||||||
}
|
}
|
||||||
else if (bottomheight < highestceiling)
|
else if (bottomheight < highestceiling)
|
||||||
highestceiling = bottomheight;
|
highestceiling = bottomheight;
|
||||||
|
@ -680,6 +686,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
floorslope = *rover->t_slope;
|
floorslope = *rover->t_slope;
|
||||||
#endif
|
#endif
|
||||||
|
floorrover = rover;
|
||||||
}
|
}
|
||||||
else if (topheight > lowestfloor)
|
else if (topheight > lowestfloor)
|
||||||
lowestfloor = topheight;
|
lowestfloor = topheight;
|
||||||
|
@ -712,6 +719,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
ceilingslope = *rover->b_slope;
|
ceilingslope = *rover->b_slope;
|
||||||
#endif
|
#endif
|
||||||
|
ceilingrover = rover;
|
||||||
}
|
}
|
||||||
else if (bottomheight < highestceiling)
|
else if (bottomheight < highestceiling)
|
||||||
highestceiling = bottomheight;
|
highestceiling = bottomheight;
|
||||||
|
@ -724,6 +732,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
floorslope = *rover->t_slope;
|
floorslope = *rover->t_slope;
|
||||||
#endif
|
#endif
|
||||||
|
floorrover = rover;
|
||||||
}
|
}
|
||||||
else if (topheight > lowestfloor)
|
else if (topheight > lowestfloor)
|
||||||
lowestfloor = topheight;
|
lowestfloor = topheight;
|
||||||
|
@ -743,6 +752,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
ceilingslope = NULL;
|
ceilingslope = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
ceilingrover = NULL;
|
||||||
}
|
}
|
||||||
else if (polysec->floorheight < highestceiling && delta1 >= delta2)
|
else if (polysec->floorheight < highestceiling && delta1 >= delta2)
|
||||||
highestceiling = polysec->floorheight;
|
highestceiling = polysec->floorheight;
|
||||||
|
@ -752,6 +762,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
floorslope = NULL;
|
floorslope = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
floorrover = NULL;
|
||||||
}
|
}
|
||||||
else if (polysec->ceilingheight > lowestfloor && delta1 < delta2)
|
else if (polysec->ceilingheight > lowestfloor && delta1 < delta2)
|
||||||
lowestfloor = polysec->ceilingheight;
|
lowestfloor = polysec->ceilingheight;
|
||||||
|
@ -765,6 +776,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
openbottomslope = floorslope;
|
openbottomslope = floorslope;
|
||||||
#endif
|
#endif
|
||||||
|
openfloorrover = floorrover;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lowestceiling < opentop) {
|
if (lowestceiling < opentop) {
|
||||||
|
@ -772,6 +784,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
opentopslope = ceilingslope;
|
opentopslope = ceilingslope;
|
||||||
#endif
|
#endif
|
||||||
|
openceilingrover = floorrover;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lowestfloor > lowfloor)
|
if (lowestfloor > lowfloor)
|
||||||
|
|
|
@ -58,6 +58,7 @@ extern fixed_t opentop, openbottom, openrange, lowfloor, highceiling;
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
extern pslope_t *opentopslope, *openbottomslope;
|
extern pslope_t *opentopslope, *openbottomslope;
|
||||||
#endif
|
#endif
|
||||||
|
extern ffloor_t *openfloorrover, *openceilingrover;
|
||||||
|
|
||||||
void P_LineOpening(line_t *plinedef, mobj_t *mobj);
|
void P_LineOpening(line_t *plinedef, mobj_t *mobj);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue