Merge pull request #76 from qudzy/bug/targetPosRecalcDistance-distance-calc

Remove targetPosRecalcDistance from distance calculations
This commit is contained in:
ZhengPeiRu21
2022-06-01 14:59:05 -06:00
committed by GitHub

View File

@@ -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)