Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/snippets/other.7155.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- (#7155) Annotate `SetNavigatorPersonalPosMaxDistance` and check it exists before calling it.
13 changes: 13 additions & 0 deletions engine/Sim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,19 @@ end
function SetIgnorePlayableRect(army, ignore)
end

--- Changes the distance at which the default navigator switches to a lower resolution
--- pathfinding grid, typically resulting in units moving in columns over large distances
--- instead of maintaining their formation.
---
--- Default engine value is 50.
---
--- Useful console commands for debugging: "dbg navwaypoints", "dbg navpath", "dbg navsteering"
---
--- Introduced by https://github.com/FAForever/FA-Binary-Patches/pull/132
---@param distance number
function SetNavigatorPersonalPosMaxDistance(distance)
end

--- sets the playable area of a map
---@param minX number
---@param minZ number
Expand Down
4 changes: 3 additions & 1 deletion lua/simInit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,9 @@ end
-- will be using personal positioning instead of waypoints for any move order (doesn't affect "formation move").
-- useful console commands for debugging: "dbg navwaypoints", "dbg navpath", "dbg navsteering"
function SetupPathfinding()
SetNavigatorPersonalPosMaxDistance(9999)
if rawget(_G, "SetNavigatorPersonalPosMaxDistance") then
SetNavigatorPersonalPosMaxDistance(9999)
end
end

-- these imports break cycle dependencies of import sequences of mods
Expand Down
Loading