From ef32d47d233bfcc736e3dc49a8dff78afa211f6f Mon Sep 17 00:00:00 2001 From: staphen Date: Tue, 29 Oct 2024 21:48:35 -0400 Subject: [PATCH 1/2] Revert "Wake up the whole pack of Gargoyles when disturbed" This reverts commit 7edd88457efc9782bb162c3fb2a4ddf488e8d615. --- Source/monster.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index d0bee084ee9..01055fcbd2a 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1582,17 +1582,11 @@ void FollowTheLeader(Monster &monster) if (leader == nullptr) return; - if (leader->activeForTicks > monster.activeForTicks) { - monster.position.last = leader->position.tile; - monster.activeForTicks = leader->activeForTicks - 1; - } - - if (monster.ai != MonsterAIID::Gargoyle || (monster.flags & MFLAG_ALLOW_SPECIAL) == 0) - return; - if (leader->mode == MonsterMode::SpecialMeleeAttack && (leader->flags & MFLAG_ALLOW_SPECIAL) != 0) + if (monster.activeForTicks >= leader->activeForTicks) return; - monster.flags &= ~MFLAG_ALLOW_SPECIAL; - monster.mode = MonsterMode::SpecialMeleeAttack; + + monster.position.last = leader->position.tile; + monster.activeForTicks = leader->activeForTicks - 1; } void GroupUnity(Monster &monster) From e336bc0a1390349e15a7d975a89d9bc71e05f16b Mon Sep 17 00:00:00 2001 From: staphen Date: Tue, 1 Oct 2024 00:57:53 -0400 Subject: [PATCH 2/2] Wake up the whole pack of Gargoyles when disturbed --- Source/monster.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index 01055fcbd2a..2608accac60 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1582,11 +1582,17 @@ void FollowTheLeader(Monster &monster) if (leader == nullptr) return; - if (monster.activeForTicks >= leader->activeForTicks) - return; + if (leader->activeForTicks > monster.activeForTicks) { + monster.position.last = leader->position.tile; + monster.activeForTicks = leader->activeForTicks - 1; + } - monster.position.last = leader->position.tile; - monster.activeForTicks = leader->activeForTicks - 1; + if (monster.ai != MonsterAIID::Gargoyle || (monster.flags & MFLAG_ALLOW_SPECIAL) == 0) + return; + if (leader->mode == MonsterMode::SpecialMeleeAttack) + return; + monster.flags &= ~MFLAG_ALLOW_SPECIAL; + monster.mode = MonsterMode::SpecialMeleeAttack; } void GroupUnity(Monster &monster)