mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_CheckDeathPitCollide: Use P_GetSpecialBottomZ/P_GetSpecialTopZ instead of floorz, ceilingz
Fixes a nasty ledge/FOF touch oversight
This commit is contained in:
parent
2fd9976102
commit
e1a4f615b9
1 changed files with 5 additions and 6 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
|
@ -2194,12 +2194,11 @@ boolean P_CheckDeathPitCollide(mobj_t *mo)
|
|||
const boolean flipped = (mo->eflags & MFE_VERTICALFLIP);
|
||||
const sectorflags_t flags = mo->subsector->sector->flags;
|
||||
|
||||
return (
|
||||
(mo->z <= mo->floorz
|
||||
&& ((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || !flipped) && (flags & MSF_FLIPSPECIAL_FLOOR))
|
||||
|| (mo->z + mo->height >= mo->ceilingz
|
||||
&& ((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || flipped) && (flags & MSF_FLIPSPECIAL_CEILING))
|
||||
);
|
||||
if (((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || !flipped) && (flags & MSF_FLIPSPECIAL_FLOOR))
|
||||
return (mo->z <= P_GetSpecialBottomZ(mo, mo->subsector->sector, mo->subsector->sector));
|
||||
|
||||
if (((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || flipped) && (flags & MSF_FLIPSPECIAL_CEILING))
|
||||
return (mo->z + mo->height >= P_GetSpecialTopZ(mo, mo->subsector->sector, mo->subsector->sector));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue