mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge pull request #76 from qudzy/bug/targetPosRecalcDistance-distance-calc
Remove targetPosRecalcDistance from distance calculations
This commit is contained in:
@@ -23,12 +23,14 @@ float ServerFacade::GetDistance2d(Unit *unit, float x, float y)
|
|||||||
|
|
||||||
bool ServerFacade::IsDistanceLessThan(float dist1, float dist2)
|
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)
|
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)
|
bool ServerFacade::IsDistanceGreaterOrEqualThan(float dist1, float dist2)
|
||||||
|
|||||||
Reference in New Issue
Block a user