From 1eb2c753288a8baf61535aed4c5d25f39013de7e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 27 Jan 2017 16:14:53 +0100 Subject: [PATCH] - explode bouncing objects directly inside P_BounceActor if the bounce count expired. The calling code is too messed up to handle this cleanly. --- src/p_map.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index ac5ca10a7c..4e5cc31fd5 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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)) || ((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_HITMASTER) mo->master = BlockingMobj;