From c9166213f9433e92be65de882d7ba76d312e23bd Mon Sep 17 00:00:00 2001 From: qudzy <102037134+qudzy@users.noreply.github.com> Date: Sun, 22 May 2022 15:33:56 +0200 Subject: [PATCH] Remove sightDistance from attack angle calculation --- src/strategy/actions/AttackAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/actions/AttackAction.cpp b/src/strategy/actions/AttackAction.cpp index 7c8cf77e..02704f39 100644 --- a/src/strategy/actions/AttackAction.cpp +++ b/src/strategy/actions/AttackAction.cpp @@ -120,7 +120,7 @@ bool AttackAction::Attack(Unit* target) botAI->PlayEmote(sounds[urand(0, sounds.size() - 1)]); } - if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target, sPlayerbotAIConfig->sightDistance)) + if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target)) bot->SetFacingToObject(target); bool attacked = bot->Attack(target, !botAI->IsRanged(bot));