mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
ACS: Fix enter triggers on intangible FOFs
This commit is contained in:
parent
2cba1b7820
commit
ce712ae68d
1 changed files with 13 additions and 2 deletions
15
src/p_spec.c
15
src/p_spec.c
|
|
@ -5730,6 +5730,9 @@ static void P_CheckMobj3DFloorAction(mobj_t *mo, sector_t *sec, boolean continuo
|
|||
|
||||
for (rover = sec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t top = INT32_MIN;
|
||||
fixed_t bottom = INT32_MAX;
|
||||
|
||||
roversec = rover->master->frontsector;
|
||||
|
||||
if (P_SectorActionIsContinuous(roversec) != continuous)
|
||||
|
|
@ -5744,6 +5747,14 @@ static void P_CheckMobj3DFloorAction(mobj_t *mo, sector_t *sec, boolean continuo
|
|||
continue;
|
||||
}
|
||||
|
||||
top = P_GetSpecialTopZ(mo, roversec, roversec);
|
||||
bottom = P_GetSpecialBottomZ(mo, roversec, roversec);
|
||||
|
||||
if (mo->z > top || mo->z + mo->height < bottom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (P_AllowSpecialEnter(roversec, mo) == false)
|
||||
{
|
||||
boolean floor = false;
|
||||
|
|
@ -5751,12 +5762,12 @@ static void P_CheckMobj3DFloorAction(mobj_t *mo, sector_t *sec, boolean continuo
|
|||
|
||||
if (P_AllowSpecialFloor(roversec, mo) == true)
|
||||
{
|
||||
floor = (P_GetMobjFeet(mo) == P_GetSpecialTopZ(mo, roversec, roversec));
|
||||
floor = (P_GetMobjFeet(mo) == top);
|
||||
}
|
||||
|
||||
if (P_AllowSpecialCeiling(roversec, mo) == true)
|
||||
{
|
||||
ceiling = (P_GetMobjHead(mo) == P_GetSpecialBottomZ(mo, roversec, roversec));
|
||||
ceiling = (P_GetMobjHead(mo) == bottom);
|
||||
}
|
||||
|
||||
if (floor == false && ceiling == false)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue