make berserked monsters fight each other

This commit is contained in:
qndel 2021-11-09 10:38:38 +01:00 committed by Anders Jenbo
commit 1110927057

View file

@ -849,7 +849,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);