fix(Core/Movement): Take WorldPosition by value in MoveTo2 (IsValid is non-const)

This commit is contained in:
bash 2026-05-31 18:01:15 +02:00
parent 7f7cfb33d8
commit 32b687f00a
2 changed files with 2 additions and 2 deletions

View File

@ -2870,7 +2870,7 @@ bool MovementAction::BoardTransport(Transport* transport)
return true; return true;
} }
bool MovementAction::MoveTo2(WorldPosition const& endPos, bool MovementAction::MoveTo2(WorldPosition endPos,
bool idle, [[maybe_unused]] bool react, bool idle, [[maybe_unused]] bool react,
[[maybe_unused]] bool noPath, [[maybe_unused]] bool noPath,
bool ignoreEnemyTargets, bool ignoreEnemyTargets,

View File

@ -69,7 +69,7 @@ protected:
// MoveTo(mapId,...) delegates here unless an intentional bypass // MoveTo(mapId,...) delegates here unless an intentional bypass
// (exact_waypoint / disableMoveSplinePath / flying / swimming / // (exact_waypoint / disableMoveSplinePath / flying / swimming /
// backwards) routes the move straight to DoMovePoint. // backwards) routes the move straight to DoMovePoint.
bool MoveTo2(WorldPosition const& endPos, bool MoveTo2(WorldPosition endPos,
bool idle = false, bool react = false, bool idle = false, bool react = false,
bool noPath = false, bool ignoreEnemyTargets = false, bool noPath = false, bool ignoreEnemyTargets = false,
MovementPriority priority = MovementPriority::MOVEMENT_NORMAL, MovementPriority priority = MovementPriority::MOVEMENT_NORMAL,