From db224585eb313cf60e7ba11eb4ecb062ff0fa3ad Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 26 Feb 2023 15:45:41 +0000 Subject: [PATCH] Revert "Public roads: Dynamically set A* max search nodes" This reverts commit acd67a0d0b0e319a6d7c581790581a9c26815ce8. --- src/road.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/road.cpp b/src/road.cpp index 880416839c..7a4374e630 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -947,6 +947,7 @@ static AyStar PublicRoadAyStar() finder.GetNeighbours = PublicRoad_GetNeighbours; finder.EndNodeCheck = PublicRoad_EndNodeCheck; finder.FoundEndNode = PublicRoad_FoundEndNode; + finder.max_search_nodes = 1 << 20; return finder; } @@ -954,9 +955,6 @@ static bool PublicRoadFindPath(AyStar& finder, const TileIndex from, TileIndex t { finder.user_target = reinterpret_cast(static_cast(to)); - uint distance = DistanceManhattan(from, to); - finder.max_search_nodes = Clamp(distance * distance * 64, 1 << 10, 1 << 20); - finder.Init(1 << _public_road_hash_size); AyStarNode start {};