Merge branch 'fix-double-bombs' into v1.2-frankeinstein

This commit is contained in:
Latapostrophe 2020-03-10 20:34:47 +01:00
commit d993bce8b6
1 changed files with 12 additions and 0 deletions

View File

@ -3929,6 +3929,9 @@ static inline boolean PIT_GrenadeRing(mobj_t *thing)
if (!grenade)
return false;
if (grenade->flags2 & MF2_DEBRIS)
return false;
if (thing->type != MT_PLAYER) // Don't explode for anything but an actual player.
return true;
@ -3977,6 +3980,9 @@ void A_GrenadeRing(mobj_t *actor)
return;
#endif
if (actor->flags2 & MF2_DEBRIS)
return;
if (actor->state == &states[S_SSMINE_DEPLOY8])
explodedist = (3*explodedist)/2;
@ -4001,6 +4007,9 @@ static inline boolean PIT_MineExplode(mobj_t *thing)
if (!grenade || P_MobjWasRemoved(grenade))
return false; // There's the possibility these can chain react onto themselves after they've already died if there are enough all in one spot
if (grenade->flags2 & MF2_DEBRIS) // don't explode twice
return false;
if (thing == grenade || thing->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
return true;
@ -4045,6 +4054,9 @@ void A_MineExplode(mobj_t *actor)
return;
#endif
if (actor->flags2 & MF2_DEBRIS)
return;
type = (mobjtype_t)locvar1;
// Use blockmap to check for nearby shootables