fix(Core/Movement): ResolveMovePath takes WorldPosition by value (distance() not const-safe)

This commit is contained in:
bash 2026-05-30 23:55:23 +02:00
parent 77feb8ea56
commit 8844a775f4
2 changed files with 5 additions and 6 deletions

View File

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

View File

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