- explode bouncing objects directly inside P_BounceActor if the bounce count expired. The calling code is too messed up to handle this cleanly.

This commit is contained in:
Christoph Oelckers 2017-01-27 16:14:53 +01:00
parent 08c252274a
commit 1eb2c75328

View file

@ -3532,7 +3532,14 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
|| ((mo->flags6 & MF6_NOBOSSRIP) && (BlockingMobj->flags2 & MF2_BOSS))) && (BlockingMobj->flags2 & MF2_REFLECTIVE)) || ((mo->flags6 & MF6_NOBOSSRIP) && (BlockingMobj->flags2 & MF2_BOSS))) && (BlockingMobj->flags2 & MF2_REFLECTIVE))
|| ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER))))) || ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER)))))
{ {
if (mo->bouncecount > 0 && --mo->bouncecount == 0) return false; if (mo->bouncecount>0 && --mo->bouncecount == 0)
{
if (mo->flags & MF_MISSILE)
P_ExplodeMissile(mo, nullptr, nullptr);
else
mo->CallDie(nullptr, nullptr);
return true;
}
if (mo->flags7 & MF7_HITTARGET) mo->target = BlockingMobj; if (mo->flags7 & MF7_HITTARGET) mo->target = BlockingMobj;
if (mo->flags7 & MF7_HITMASTER) mo->master = BlockingMobj; if (mo->flags7 & MF7_HITMASTER) mo->master = BlockingMobj;