summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf/npf.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-13 21:56:40 +0000
committerrubidium <rubidium@openttd.org>2010-12-13 21:56:40 +0000
commit4045429df6e39fbd020a5feda379177b2d2bc267 (patch)
tree05b6e3ca49be9fc6cdc7465458a7fd8101719304 /src/pathfinder/npf/npf.cpp
parent6bc002ad7414fb7d27e9ace04865d501cc3b08b9 (diff)
downloadopenttd-4045429df6e39fbd020a5feda379177b2d2bc267.tar.xz
(svn r21511) -Feature: vehicle lost message for ships
Diffstat (limited to 'src/pathfinder/npf/npf.cpp')
-rw-r--r--src/pathfinder/npf/npf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index 6cb013bc3..45c1c2d9c 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -1159,7 +1159,7 @@ Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDir
/*** Ships ***/
-Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
+Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found)
{
NPFFindStationOrTileData fstd;
Trackdir trackdir = v->GetVehicleTrackdir();
@@ -1173,6 +1173,7 @@ Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir,
* the direction we need to take to get there, if ftd.best_bird_dist is not 0,
* we did not find our target, but ftd.best_trackdir contains the direction leading
* to the tile closest to our target. */
+ path_found = (ftd.best_bird_dist == 0);
if (ftd.best_trackdir == 0xff) return INVALID_TRACK;
return TrackdirToTrack(ftd.best_trackdir);
}