From 5b8d8fbf6ec18e7f72453d2ddab881095a985299 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Thu, 26 Sep 2024 20:02:37 +0800 Subject: [PATCH] [Tank target] Improve position --- src/strategy/actions/MovementActions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strategy/actions/MovementActions.cpp b/src/strategy/actions/MovementActions.cpp index 7bc9a493..07570e2a 100644 --- a/src/strategy/actions/MovementActions.cpp +++ b/src/strategy/actions/MovementActions.cpp @@ -2333,8 +2333,8 @@ bool TankFaceAction::Execute(Event event) if (fabs(deltaAngle) > tolerable) return false; - float goodAngle1 = Position::NormalizeOrientation(averageAngle + M_PI * 5 / 8); - float goodAngle2 = Position::NormalizeOrientation(averageAngle - M_PI * 5 / 8); + float goodAngle1 = Position::NormalizeOrientation(averageAngle + M_PI * 3 / 5); + float goodAngle2 = Position::NormalizeOrientation(averageAngle - M_PI * 3 / 5); // if dist < bot->GetMeleeRange(target) / 2, target will move backward float dist = std::max(bot->GetExactDist(target), bot->GetMeleeRange(target) / 2) - bot->GetCombatReach() - target->GetCombatReach(); @@ -2526,8 +2526,8 @@ bool SetBehindTargetAction::Execute(Event event) if (fabs(deltaAngle) > tolerable) return false; - float goodAngle1 = Position::NormalizeOrientation(target->GetOrientation() + M_PI * 5 / 8); - float goodAngle2 = Position::NormalizeOrientation(target->GetOrientation() - M_PI * 5 / 8); + float goodAngle1 = Position::NormalizeOrientation(target->GetOrientation() + M_PI * 3 / 5); + float goodAngle2 = Position::NormalizeOrientation(target->GetOrientation() - M_PI * 3 / 5); float dist = std::max(bot->GetExactDist(target), bot->GetMeleeRange(target) / 2) - bot->GetCombatReach() - target->GetCombatReach(); std::vector availablePos;