From f411849ae86f17e04b441323f1adc442a52904be Mon Sep 17 00:00:00 2001 From: qudzy <102037134+qudzy@users.noreply.github.com> Date: Wed, 1 Jun 2022 22:36:15 +0200 Subject: [PATCH] Remove targetPosRecalcDistance from distance calcucations --- src/ServerFacade.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ServerFacade.cpp b/src/ServerFacade.cpp index 9c9febb7..5367384e 100644 --- a/src/ServerFacade.cpp +++ b/src/ServerFacade.cpp @@ -23,12 +23,14 @@ float ServerFacade::GetDistance2d(Unit *unit, float x, float y) bool ServerFacade::IsDistanceLessThan(float dist1, float dist2) { - return dist1 - dist2 < sPlayerbotAIConfig->targetPosRecalcDistance; + //return dist1 - dist2 < sPlayerbotAIConfig->targetPosRecalcDistance; + return dist1 < dist2; } bool ServerFacade::IsDistanceGreaterThan(float dist1, float dist2) { - return dist1 - dist2 > sPlayerbotAIConfig->targetPosRecalcDistance; + //return dist1 - dist2 > sPlayerbotAIConfig->targetPosRecalcDistance; + return dist1 > dist2; } bool ServerFacade::IsDistanceGreaterOrEqualThan(float dist1, float dist2)