mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/Movement): ResolveMovePath takes WorldPosition by value (distance() not const-safe)
This commit is contained in:
parent
77feb8ea56
commit
8844a775f4
@ -3067,8 +3067,8 @@ bool MoveAwayFromPlayerWithDebuffAction::isPossible()
|
||||
}
|
||||
|
||||
|
||||
TravelPath MovementAction::ResolveMovePath(WorldPosition const& startPos,
|
||||
WorldPosition const& endPos,
|
||||
TravelPath MovementAction::ResolveMovePath(WorldPosition startPos,
|
||||
WorldPosition endPos,
|
||||
LastMovement& lastMove)
|
||||
{
|
||||
float const totalDistance = startPos.distance(endPos);
|
||||
@ -3098,8 +3098,7 @@ TravelPath MovementAction::ResolveMovePath(WorldPosition const& startPos,
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldPosition mutableStart = startPos;
|
||||
std::vector<WorldPosition> probe = mutableStart.getPathTo(endPos, bot);
|
||||
std::vector<WorldPosition> probe = startPos.getPathTo(endPos, bot);
|
||||
out.addPath(probe);
|
||||
}
|
||||
|
||||
|
||||
@ -94,8 +94,8 @@ protected:
|
||||
// graph (cross-map / >sightDistance) or live mmap probe, regression
|
||||
// guard preferring cached path when no better, fall back to a
|
||||
// single-point path on dest. Stateless — does not dispatch.
|
||||
TravelPath ResolveMovePath(WorldPosition const& startPos,
|
||||
WorldPosition const& endPos,
|
||||
TravelPath ResolveMovePath(WorldPosition startPos,
|
||||
WorldPosition endPos,
|
||||
LastMovement& lastMove);
|
||||
|
||||
// Dispatches the head-of-path special segment (portal interact /
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user