From 66bed86bbb76ff799e79df1796535f592af81a1f Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 25 Feb 2019 13:07:22 +0000 Subject: Fix #7062, Revert 7af53d7588: Don't test ship max order distance when pathfinding. --- src/ship_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index c04d3e1e2..6c2d09a16 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -466,8 +466,8 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr bool path_found = true; Track track; - if (v->dest_tile == 0 || DistanceManhattan(tile, v->dest_tile) > SHIP_MAX_ORDER_DISTANCE + 5) { - /* No destination or destination too far, don't invoke pathfinder. */ + if (v->dest_tile == 0) { + /* No destination, don't invoke pathfinder. */ track = TrackBitsToTrack(v->state); if (!IsDiagonalTrack(track)) track = TrackToOppositeTrack(track); if (!HasBit(tracks, track)) track = FindFirstTrack(tracks); -- cgit v1.2.3-70-g09d2