diff options
author | Peter Nelson <peter1138@openttd.org> | 2018-05-20 12:01:17 +0100 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-01-14 19:57:07 +0000 |
commit | 7af53d7588a97bc4b02dbfa456a0e2a9ab598864 (patch) | |
tree | bd0ee45f0dcdc77ffd2595e70547ea980381447f /src/ship_cmd.cpp | |
parent | b98887c4a014d5bc193b0c1089b3ac0334187775 (diff) | |
download | openttd-7af53d7588a97bc4b02dbfa456a0e2a9ab598864.tar.xz |
Codechange: Use const instead of magic number for ship order distance. Allow slightly further distance when following orders.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r-- | src/ship_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 080015eac..79560be04 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -459,7 +459,7 @@ 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) > 130) { + 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. */ static const TrackBits direction_to_trackbits[DIR_END] = { TRACK_BIT_LEFT | TRACK_BIT_RIGHT, // DIR_N |