From 9293e5b1dd2151541a15603a47d98c66d2b3c609 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 4 Jan 2025 23:43:59 +0800 Subject: [PATCH] Follow master instead of group master in formation --- src/strategy/values/Formations.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/strategy/values/Formations.cpp b/src/strategy/values/Formations.cpp index 4628c506..5503460f 100644 --- a/src/strategy/values/Formations.cpp +++ b/src/strategy/values/Formations.cpp @@ -23,7 +23,7 @@ bool Formation::IsNullLocation(WorldLocation const& loc) { return IsSameLocation WorldLocation MoveAheadFormation::GetLocation() { - Player* master = botAI->GetGroupMaster(); + Player* master = GetMaster(); if (!master || master == bot) return WorldLocation(); @@ -110,7 +110,7 @@ public: WorldLocation GetLocationInternal() override { - Player* master = botAI->GetGroupMaster(); + Player* master = GetMaster(); if (!master) return WorldLocation(); @@ -120,7 +120,7 @@ public: time_t now = time(nullptr); if (!lastChangeTime || now - lastChangeTime >= 3) { - Player* master = botAI->GetGroupMaster(); + Player* master = GetMaster(); if (!master) return WorldLocation(); @@ -185,7 +185,7 @@ public: float range = 2.0f; Unit* target = AI_VALUE(Unit*, "current target"); - Player* master = botAI->GetGroupMaster(); + Player* master = GetMaster(); if (!target && target != bot) target = master; @@ -239,7 +239,7 @@ public: float range = 2.0f; - Player* master = botAI->GetGroupMaster(); + Player* master = GetMaster(); if (!master) return Formation::NullLocation;