mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-sealed-star-emerald-die' into 'master'
Fix UFO Catcher Emerald dying on death pits -- also a general fix to death pits Closes #608 See merge request KartKrew/Kart!1497
This commit is contained in:
commit
a0a1ef41e2
1 changed files with 6 additions and 7 deletions
13
src/p_mobj.c
13
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->subsector->sector->floorheight
|
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->subsector->sector->ceilingheight
|
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;
|
||||||
|
|
@ -2312,7 +2311,7 @@ boolean P_ZMovement(mobj_t *mo)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MT_EMERALD:
|
case MT_EMERALD:
|
||||||
if (P_CheckDeathPitCollide(mo))
|
if (!(mo->flags & MF_NOCLIPHEIGHT) && P_CheckDeathPitCollide(mo))
|
||||||
{
|
{
|
||||||
P_RemoveMobj(mo);
|
P_RemoveMobj(mo);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue