summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf/npf_func.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-08-18 11:37:47 +0000
committerfrosch <frosch@openttd.org>2012-08-18 11:37:47 +0000
commitd17ec934f55f5000cf30aa752437cc48cff19645 (patch)
tree68d5895b8ad40d12189102617bc8a15a0db3a3f6 /src/pathfinder/npf/npf_func.h
parent0f0f027379181bf35b3e0b9ae6900cd3b0d82574 (diff)
downloadopenttd-d17ec934f55f5000cf30aa752437cc48cff19645.tar.xz
(svn r24481) -Feature [FS#5127]: Make the pathfinder decide whether ships shall leave depots towards north or south.
Diffstat (limited to 'src/pathfinder/npf/npf_func.h')
-rw-r--r--src/pathfinder/npf/npf_func.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pathfinder/npf/npf_func.h b/src/pathfinder/npf/npf_func.h
index f83c06f13..6507f4ec5 100644
--- a/src/pathfinder/npf/npf_func.h
+++ b/src/pathfinder/npf/npf_func.h
@@ -50,6 +50,13 @@ Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDir
Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found);
/**
+ * Returns true if it is better to reverse the ship before leaving depot using NPF.
+ * @param v the ship leaving the depot
+ * @return true if reversing is better
+ */
+bool NPFShipCheckReverse(const Ship *v);
+
+/**
* Used when user sends train to the nearest depot or if train needs servicing using NPF
* @param v train that needs to go to some depot
* @param max_penalty max max_penalty (in pathfinder penalty) from the current train position