Skip to content

Commit 1eb2c75

Browse files
committed
- explode bouncing objects directly inside P_BounceActor if the bounce count expired. The calling code is too messed up to handle this cleanly.
1 parent 08c2522 commit 1eb2c75

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/p_map.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3532,7 +3532,14 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
35323532
|| ((mo->flags6 & MF6_NOBOSSRIP) && (BlockingMobj->flags2 & MF2_BOSS))) && (BlockingMobj->flags2 & MF2_REFLECTIVE))
35333533
|| ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER)))))
35343534
{
3535-
if (mo->bouncecount > 0 && --mo->bouncecount == 0) return false;
3535+
if (mo->bouncecount>0 && --mo->bouncecount == 0)
3536+
{
3537+
if (mo->flags & MF_MISSILE)
3538+
P_ExplodeMissile(mo, nullptr, nullptr);
3539+
else
3540+
mo->CallDie(nullptr, nullptr);
3541+
return true;
3542+
}
35363543

35373544
if (mo->flags7 & MF7_HITTARGET) mo->target = BlockingMobj;
35383545
if (mo->flags7 & MF7_HITMASTER) mo->master = BlockingMobj;

0 commit comments

Comments
 (0)