summaryrefslogtreecommitdiff
path: root/src/yapf/yapf.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-09 21:01:45 +0000
committerrubidium <rubidium@openttd.org>2009-09-09 21:01:45 +0000
commit96e2435aa827b9e4af60b7c87fd8da38f9b87cc2 (patch)
treeae66ccf568d694241914c749a9ab34f5bdc547e4 /src/yapf/yapf.h
parent48893c3a97f65f3f97754660d6fbb9cd38494fde (diff)
downloadopenttd-96e2435aa827b9e4af60b7c87fd8da38f9b87cc2.tar.xz
(svn r17491) -Fix [FS#3188]: road vehicles could get lost when the prelimiary destination (for the pathfinder heuristics) is unreachable.
Diffstat (limited to 'src/yapf/yapf.h')
-rw-r--r--src/yapf/yapf.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/yapf/yapf.h b/src/yapf/yapf.h
index aaff42028..a44dd012f 100644
--- a/src/yapf/yapf.h
+++ b/src/yapf/yapf.h
@@ -15,6 +15,7 @@
#include "../debug.h"
#include "../depot_type.h"
#include "../direction_type.h"
+#include "../station_type.h"
#include "../pbs.h"
/** Finds the best path for given ship.
@@ -53,6 +54,14 @@ Trackdir YapfChooseRailTrack(const Vehicle *v, TileIndex tile, DiagDirection ent
*/
uint YapfRoadVehDistanceToTile(const Vehicle *v, TileIndex tile);
+/** Used to determinine the closest reachable compatible road stop for a given vehicle.
+ * @param v vehicle that needs to go to the road stop
+ * @param station the station the road stop must belong to
+ * @param stop_tile receives the stop tile if a stop was found
+ * @return true if stop was found.
+ */
+bool YapfFindNearestRoadVehicleCompatibleStop(const RoadVehicle *v, StationID station, TileIndex *stop_tile);
+
/** Used when user sends road vehicle to the nearest depot or if road vehicle needs servicing.
* @param v vehicle that needs to go to some depot
* @param max_distance max distance (number of track tiles) from the current vehicle position