Changeset - r28820:ac82714dfd1e
[Not reviewed]
master
0 1 0
Kuhnovic - 2 months ago 2024-02-27 11:55:42
68320206+Kuhnovic@users.noreply.github.com
Fix e38c3c5: Added missing return statement (#12185)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/pathfinder/yapf/yapf_ship.cpp
Show inline comments
 
@@ -249,13 +249,13 @@ public:
 
			if (attempt > 0) pf.RestrictSearch(high_level_path);
 

	
 
			/* Find best path. */
 
			path_found = pf.FindPath(v);
 
			Node *node = pf.GetBestNode();
 
			if (attempt == 0 && !path_found) continue; // Try again with restricted search area.
 
			if (!path_found || node == nullptr) GetRandomFollowUpTrackdir(v, src_tile, trackdir, true);
 
			if (!path_found || node == nullptr) return GetRandomFollowUpTrackdir(v, src_tile, trackdir, true);
 

	
 
			/* Return only the path within the current water region if an intermediate destination was returned. If not, cache the entire path
 
			 * to the final destination tile. The low-level pathfinder might actually prefer a different docking tile in a nearby region. Without
 
			 * caching the full path the ship can get stuck in a loop. */
 
			const WaterRegionPatchDesc end_water_patch = GetWaterRegionPatchInfo(node->GetTile());
 
			const WaterRegionPatchDesc start_water_patch = GetWaterRegionPatchInfo(tile);
0 comments (0 inline, 0 general)