From 74b770a96a834cea6b3a4b32d30a301863160b7c Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 2 Aug 2008 22:50:52 +0000 Subject: (svn r13940) -Add [YAPP]: YAPF is now able to reserve the found path. (michi_cc) --- src/yapf/yapf.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/yapf/yapf.h') diff --git a/src/yapf/yapf.h b/src/yapf/yapf.h index ca400a754..fb39854b2 100644 --- a/src/yapf/yapf.h +++ b/src/yapf/yapf.h @@ -8,6 +8,7 @@ #include "../debug.h" #include "../depot_type.h" #include "../direction_type.h" +#include "../pbs.h" /** Finds the best path for given ship. * @param v the ship that needs to find a path @@ -32,9 +33,11 @@ Trackdir YapfChooseRoadTrack(const Vehicle *v, TileIndex tile, DiagDirection ent * @param enterdir diagonal direction which the RV will enter this new tile from * @param tracks available trackdirs on the new tile (to choose from) * @param path_not_found [out] true is returned if no path can be found (returned Trackdir is only a 'guess') + * @param reserve_track indicates whether YAPF should try to reserve the found path + * @param target [out] the target tile of the reservation, free is set to true if path was reserved * @return the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found */ -Trackdir YapfChooseRailTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool *path_not_found); +Trackdir YapfChooseRailTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool *path_not_found, bool reserve_track, PBSTileInfo *target); /** Used by RV multistop feature to find the nearest road stop that has a free slot. * @param v RV (its current tile will be the origin) -- cgit v1.2.3-54-g00ecf