mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +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 boolean flipped = (mo->eflags & MFE_VERTICALFLIP);
|
||||||
const sectorflags_t flags = mo->subsector->sector->flags;
|
const sectorflags_t flags = mo->subsector->sector->flags;
|
||||||
|
|
||||||
return (
|
if (((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || !flipped) && (flags & MSF_FLIPSPECIAL_FLOOR))
|
||||||
(mo->z <= mo->floorz
|
return (mo->z <= P_GetSpecialBottomZ(mo, mo->subsector->sector, mo->subsector->sector));
|
||||||
&& ((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || !flipped) && (flags & MSF_FLIPSPECIAL_FLOOR))
|
|
||||||
|| (mo->z + mo->height >= mo->ceilingz
|
if (((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || flipped) && (flags & MSF_FLIPSPECIAL_CEILING))
|
||||||
&& ((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;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue