P_CheckDeathPitCollide: handle slopes

This commit is contained in:
James R. 2023-09-13 04:18:31 -07:00 committed by toaster
parent b71a8bc5b4
commit 0bfee3176f

View file

@ -2195,9 +2195,9 @@ boolean P_CheckDeathPitCollide(mobj_t *mo)
const sectorflags_t flags = mo->subsector->sector->flags;
return (
(mo->z <= mo->subsector->sector->floorheight
(mo->z <= mo->floorz
&& ((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || !flipped) && (flags & MSF_FLIPSPECIAL_FLOOR))
|| (mo->z + mo->height >= mo->subsector->sector->ceilingheight
|| (mo->z + mo->height >= mo->ceilingz
&& ((flags & MSF_TRIGGERSPECIAL_HEADBUMP) || flipped) && (flags & MSF_FLIPSPECIAL_CEILING))
);
}