Add exception to let Lightning Shield destroy SPB

This commit is contained in:
James R 2023-02-17 16:34:11 -08:00
parent c118b3cff1
commit afec876f01
2 changed files with 11 additions and 5 deletions

View file

@ -632,10 +632,13 @@ static inline BlockItReturn_t PIT_LightningShieldAttack(mobj_t *thing)
return BMIT_CONTINUE;
}
if (!(thing->flags & MF_SHOOTABLE) || (thing->flags & MF_SCENERY))
if (thing->type != MT_SPB)
{
// Not shootable
return BMIT_CONTINUE;
if (!(thing->flags & MF_SHOOTABLE) || (thing->flags & MF_SCENERY))
{
// Not shootable
return BMIT_CONTINUE;
}
}
if (thing->player && thing->player->spectator)

View file

@ -2058,8 +2058,11 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (!force)
{
if (!(target->flags & MF_SHOOTABLE))
return false; // shouldn't happen...
if (!(target->type == MT_SPB && (damagetype & DMG_TYPEMASK) == DMG_VOLTAGE))
{
if (!(target->flags & MF_SHOOTABLE))
return false; // shouldn't happen...
}
if (!(damagetype & DMG_DEATHMASK) && (target->eflags & MFE_PAUSED))
return false;