diff options
author | rubidium <rubidium@openttd.org> | 2008-08-02 22:51:53 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-08-02 22:51:53 +0000 |
commit | 53cc7e8a5c6f1b72c1c0187c1ea9374a924ef832 (patch) | |
tree | 355223636c21b47b2c3e4c0eeff3fcffe1cacba8 /src/yapf/yapf.h | |
parent | 2b153abd9337e8c2f9b5d896a4839701a3d07e53 (diff) | |
download | openttd-53cc7e8a5c6f1b72c1c0187c1ea9374a924ef832.tar.xz |
(svn r13944) -Add [YAPP]: Add YAPF provider to find a safe tile and reserve a path. (michi_cc)
Diffstat (limited to 'src/yapf/yapf.h')
-rw-r--r-- | src/yapf/yapf.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/yapf/yapf.h b/src/yapf/yapf.h index fb39854b2..45ba94eb3 100644 --- a/src/yapf/yapf.h +++ b/src/yapf/yapf.h @@ -66,6 +66,17 @@ bool YapfFindNearestRailDepotTwoWay(const Vehicle *v, int max_distance, int reve /** Returns true if it is better to reverse the train before leaving station */ bool YapfCheckReverseTrain(const Vehicle* v); +/** + * Try to extend the reserved path of a train to the nearest safe tile. + * + * @param v The train that needs to find a safe tile. + * @param tile Last tile of the current reserved path. + * @param td Last trackdir of the current reserved path. + * @param override_railtype Should all physically compabtible railtypes be searched, even if the vehicle can't on them on it own? + * @return True if the path could be extended to a safe tile. + */ +bool YapfRailFindNearestSafeTile(const Vehicle *v, TileIndex tile, Trackdir td, bool override_railtype); + /** Use this function to notify YAPF that track layout (or signal configuration) has change */ void YapfNotifyTrackLayoutChange(TileIndex tile, Track track); |