From 96e2435aa827b9e4af60b7c87fd8da38f9b87cc2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 9 Sep 2009 21:01:45 +0000 Subject: (svn r17491) -Fix [FS#3188]: road vehicles could get lost when the prelimiary destination (for the pathfinder heuristics) is unreachable. --- src/yapf/yapf.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/yapf/yapf.h') 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 -- cgit v1.2.3-70-g09d2