From 148e7cd361950b199853af6e149aa2027b9e166a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 24 Oct 2020 12:57:41 +0200 Subject: [PATCH] - fixed edge case where both Mancubus and Arachnotron have the same replacement and trigger a boss action. --- src/playsim/p_enemy.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/playsim/p_enemy.cpp b/src/playsim/p_enemy.cpp index ee3b9ed14..337052d6f 100644 --- a/src/playsim/p_enemy.cpp +++ b/src/playsim/p_enemy.cpp @@ -3153,13 +3153,17 @@ void A_BossDeath(AActor *self) } if (Level->flags & LEVEL_MAP07SPECIAL) { - if (type == NAME_Fatso) + PClassActor * fatso = PClass::FindActor(NAME_Fatso); + PClassActor * arachnotron = PClass::FindActor(NAME_Arachnotron); + bool samereplacement = (type == NAME_Fatso || type == NAME_Arachnotron) && fatso && arachnotron && fatso->GetReplacement(Level) == arachnotron->GetReplacement(Level); + + if (type == NAME_Fatso || samereplacement) { Level->EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, 1., 0, -1, 0, false); return; } - if (type == NAME_Arachnotron) + if (type == NAME_Arachnotron || samereplacement) { Level->EV_DoFloor (DFloor::floorRaiseByTexture, NULL, 667, 1., 0, -1, 0, false); return;