diff options
author | peter1138 <peter1138@openttd.org> | 2019-02-25 13:07:22 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-31 17:22:54 +0100 |
commit | 66bed86bbb76ff799e79df1796535f592af81a1f (patch) | |
tree | ce533ab9ec231a7dc2548d02c8c9a6adcbdc8166 | |
parent | d0e8060182503627e17b74b4fa4c2b2637020f1a (diff) | |
download | openttd-66bed86bbb76ff799e79df1796535f592af81a1f.tar.xz |
Fix #7062, Revert 7af53d7588: Don't test ship max order distance when pathfinding.
-rw-r--r-- | src/ship_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); |