summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Nelson <peter@fuzzle.org>2019-01-20 09:07:27 +0000
committerMichael Lutz <michi@icosahedron.de>2019-01-20 11:06:33 +0100
commitf35b135e1738899be7745a2667de3d908f725f29 (patch)
treec5c63a7856a23dfa4afad042f3d0d6e53b4539a0 /src
parent4daaec1a9458b2df7215bd2b330cf0cd6797ebf3 (diff)
downloadopenttd-f35b135e1738899be7745a2667de3d908f725f29.tar.xz
Change 81330b8d6e: Cached path only needs to be cleared if it was found to be invalid.
Diffstat (limited to 'src')
-rw-r--r--src/ship_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 7727aa608..e3886aa34 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -484,9 +484,9 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr
}
/* Cached path is invalid so continue with pathfinder. */
+ v->path.clear();
}
- v->path.clear();
switch (_settings_game.pf.pathfinder_for_ships) {
case VPF_OPF: track = OPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break;
case VPF_NPF: track = NPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break;