mirror of https://github.com/OpenTTD/OpenTTD
Codefix c05ffb2: Scale river generation max_search_nodes
The river generation AyStar pathfinder search routine could end prematurely on large numbers of flat tiles at the same height. Scaling max_search_nodes with river length solves this issue.pull/13365/head
parent
f7aaf8ea24
commit
cf412d7866
|
@ -1297,6 +1297,7 @@ static void BuildRiver(TileIndex begin, TileIndex end, TileIndex spring, bool ma
|
|||
finder.FoundEndNode = River_FoundEndNode;
|
||||
finder.user_target = &end;
|
||||
finder.user_data = &user_data;
|
||||
finder.max_search_nodes = 1000 * DistanceManhattan(begin, end);
|
||||
|
||||
AyStarNode start;
|
||||
start.tile = begin;
|
||||
|
|
Loading…
Reference in New Issue