mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
fix for #300 bots no longer hang around stables indefinately
This commit is contained in:
parent
826153781f
commit
66b6d8a157
@ -3333,7 +3333,7 @@ bool BGTactics::selectObjective(bool reset)
|
|||||||
((!defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._state == BG_AB_NODE_STATE_ALLY_OCCUPIED) ||
|
((!defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._state == BG_AB_NODE_STATE_ALLY_OCCUPIED) ||
|
||||||
((defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._state == BG_AB_NODE_STATE_ALLY_CONTESTED))
|
((defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._state == BG_AB_NODE_STATE_ALLY_CONTESTED))
|
||||||
{
|
{
|
||||||
if (GameObject* pGO = bg->GetBGObject(objective))
|
if (GameObject* pGO = bg->GetBGObject(objective * BG_AB_OBJECTS_PER_NODE))
|
||||||
{
|
{
|
||||||
float const distance = sqrt(bot->GetDistance(pGO));
|
float const distance = sqrt(bot->GetDistance(pGO));
|
||||||
if (attackObjectiveDistance > distance)
|
if (attackObjectiveDistance > distance)
|
||||||
@ -3375,11 +3375,11 @@ bool BGTactics::selectObjective(bool reset)
|
|||||||
|
|
||||||
for (const auto& objective : AB_AttackObjectives)
|
for (const auto& objective : AB_AttackObjectives)
|
||||||
{
|
{
|
||||||
if (arathiBasinBG->GetCapturePointInfo(objective)._ownerTeamId == BG_AB_NODE_STATE_NEUTRAL ||
|
if (arathiBasinBG->GetCapturePointInfo(objective)._state == BG_AB_NODE_STATE_NEUTRAL ||
|
||||||
((!defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._ownerTeamId == BG_AB_NODE_STATE_HORDE_OCCUPIED) ||
|
((!defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._state == BG_AB_NODE_STATE_HORDE_OCCUPIED) ||
|
||||||
((defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._ownerTeamId == BG_AB_NODE_STATE_HORDE_CONTESTED))
|
((defender || !objectives.size()) && arathiBasinBG->GetCapturePointInfo(objective)._state == BG_AB_NODE_STATE_HORDE_CONTESTED))
|
||||||
{
|
{
|
||||||
if (GameObject* pGO = bg->GetBGObject(objective))
|
if (GameObject* pGO = bg->GetBGObject(objective * BG_AB_OBJECTS_PER_NODE))
|
||||||
{
|
{
|
||||||
float const distance = sqrt(bot->GetDistance(pGO));
|
float const distance = sqrt(bot->GetDistance(pGO));
|
||||||
if (attackObjectiveDistance > distance)
|
if (attackObjectiveDistance > distance)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user