mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Follow master instead of group master in formation
This commit is contained in:
parent
a5787a0200
commit
9293e5b1dd
@ -23,7 +23,7 @@ bool Formation::IsNullLocation(WorldLocation const& loc) { return IsSameLocation
|
|||||||
|
|
||||||
WorldLocation MoveAheadFormation::GetLocation()
|
WorldLocation MoveAheadFormation::GetLocation()
|
||||||
{
|
{
|
||||||
Player* master = botAI->GetGroupMaster();
|
Player* master = GetMaster();
|
||||||
if (!master || master == bot)
|
if (!master || master == bot)
|
||||||
return WorldLocation();
|
return WorldLocation();
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ public:
|
|||||||
|
|
||||||
WorldLocation GetLocationInternal() override
|
WorldLocation GetLocationInternal() override
|
||||||
{
|
{
|
||||||
Player* master = botAI->GetGroupMaster();
|
Player* master = GetMaster();
|
||||||
if (!master)
|
if (!master)
|
||||||
return WorldLocation();
|
return WorldLocation();
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ public:
|
|||||||
time_t now = time(nullptr);
|
time_t now = time(nullptr);
|
||||||
if (!lastChangeTime || now - lastChangeTime >= 3)
|
if (!lastChangeTime || now - lastChangeTime >= 3)
|
||||||
{
|
{
|
||||||
Player* master = botAI->GetGroupMaster();
|
Player* master = GetMaster();
|
||||||
if (!master)
|
if (!master)
|
||||||
return WorldLocation();
|
return WorldLocation();
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
float range = 2.0f;
|
float range = 2.0f;
|
||||||
|
|
||||||
Unit* target = AI_VALUE(Unit*, "current target");
|
Unit* target = AI_VALUE(Unit*, "current target");
|
||||||
Player* master = botAI->GetGroupMaster();
|
Player* master = GetMaster();
|
||||||
if (!target && target != bot)
|
if (!target && target != bot)
|
||||||
target = master;
|
target = master;
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ public:
|
|||||||
|
|
||||||
float range = 2.0f;
|
float range = 2.0f;
|
||||||
|
|
||||||
Player* master = botAI->GetGroupMaster();
|
Player* master = GetMaster();
|
||||||
if (!master)
|
if (!master)
|
||||||
return Formation::NullLocation;
|
return Formation::NullLocation;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user