MF_BOSS should be immune to deathpits by default

Makes some arena design considerations easier
This commit is contained in:
toaster 2023-10-26 23:54:22 +01:00
parent c5f7f93e20
commit 926c9dbec9

View file

@ -2388,16 +2388,14 @@ boolean P_ZMovement(mobj_t *mo)
break;
}
if (!mo->player && P_CheckDeathPitCollide(mo))
if (!mo->player && P_CheckDeathPitCollide(mo) && mo->health)
{
if (mo->flags & MF_ENEMY || mo->flags & MF_BOSS || mo->type == MT_MINECART)
if ((mo->flags & (MF_ENEMY|MF_BOSS)) == MF_ENEMY)
{
// Kill enemies, bosses and minecarts that fall into death pits.
if (mo->health)
{
P_KillMobj(mo, NULL, NULL, DMG_NORMAL);
}
return false;
// Kill enemies that fall into death pits.
P_KillMobj(mo, NULL, NULL, DMG_NORMAL);
if (P_MobjWasRemoved(mo))
return false;
}
}
@ -10545,13 +10543,6 @@ void P_MobjThinker(mobj_t *mobj)
P_SquishThink(mobj);
K_UpdateTerrainOverlay(mobj);
if (mobj->flags & (MF_ENEMY|MF_BOSS) && mobj->health
&& P_CheckDeathPitCollide(mobj)) // extra pit check in case these didn't have momz
{
P_KillMobj(mobj, NULL, NULL, DMG_DEATHPIT);
return;
}
// Crush enemies!
if (mobj->ceilingz - mobj->floorz < mobj->height)
{