From 9db5aaf5f4e95c0345dd18eb33fabfb1535cf5bf Mon Sep 17 00:00:00 2001 From: qndel Date: Tue, 9 Nov 2021 10:38:38 +0100 Subject: [PATCH] make berserked monsters fight each other --- Source/monster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index b79414fc4..5dc35ed74 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -853,7 +853,8 @@ void UpdateEnemy(Monster &monster) continue; if (M_Talker(otherMonster) && otherMonster.mtalkmsg != TEXT_NONE) continue; - if ((monster._mFlags & MFLAG_GOLEM) != 0 && (otherMonster._mFlags & MFLAG_GOLEM) != 0) // prevent golems from fighting each other + bool isBerserked = (monster._mFlags & MFLAG_BERSERK) != 0 || (otherMonster._mFlags & MFLAG_BERSERK) != 0; + if ((monster._mFlags & MFLAG_GOLEM) != 0 && (otherMonster._mFlags & MFLAG_GOLEM) != 0 && !isBerserked) // prevent golems from fighting each other continue; int dist = otherMonster.position.tile.WalkingDistance(position);