Fix AyStar::Init overriding max search nodes

See: c05ffb22bd
This commit is contained in:
Jonathan G Rennison 2023-12-25 10:16:42 +00:00
parent 96570dc869
commit 60378323ea
2 changed files with 1 additions and 3 deletions

View File

@ -1235,6 +1235,7 @@ static void BuildRiver(TileIndex begin, TileIndex end)
finder.EndNodeCheck = River_EndNodeCheck;
finder.FoundEndNode = River_FoundEndNode;
finder.user_target = &end;
finder.max_search_nodes = AYSTAR_DEF_MAX_SEARCH_NODES;
finder.Init(1 << RIVER_HASH_SIZE);

View File

@ -315,7 +315,4 @@ void AyStar::Init(uint num_buckets)
* When that one gets full it reserves another one, till this number
* That is why it can stay this high */
this->openlist_queue.Init(102400);
/* Set a reasonable default limit */
this->max_search_nodes = AYSTAR_DEF_MAX_SEARCH_NODES;
}