diff options
author | rubidium <rubidium@openttd.org> | 2008-08-02 22:52:50 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-08-02 22:52:50 +0000 |
commit | a706766690b78502e9bef9348128eb46038f5f41 (patch) | |
tree | 7a3fe24c3a2e126c9847d3db6de32680ed7fbaea /src/npf.h | |
parent | 4f5f3846a041d002dc05ba17b7ae035108257603 (diff) | |
download | openttd-a706766690b78502e9bef9348128eb46038f5f41.tar.xz |
(svn r13948) -Add [YAPP]: Extend NPF with a function to find a safe tile and reserve a path. (michi_cc)
Diffstat (limited to 'src/npf.h')
-rw-r--r-- | src/npf.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -72,6 +72,7 @@ enum NPFNodeFlag { NPF_FLAG_LAST_SIGNAL_RED, ///< Used to mark that the last signal on this path was red NPF_FLAG_IGNORE_START_TILE, ///< Used to mark that the start tile is invalid, and searching should start from the second tile on NPF_FLAG_TARGET_RESERVED, ///< Used to mark that the possible reservation target is already reserved + NPF_FLAG_IGNORE_RESERVED, ///< Used to mark that reserved tiles should be considered impassable }; /* Meant to be stored in AyStar.userpath */ @@ -111,6 +112,12 @@ NPFFoundTargetData NPFRouteToDepotBreadthFirstTwoWay(TileIndex tile1, Trackdir t * of choices and accurate heuristics, such as water. */ NPFFoundTargetData NPFRouteToDepotTrialError(TileIndex tile, Trackdir trackdir, bool ignore_start_tile, TransportType type, uint sub_type, Owner owner, RailTypes railtypes); +/** + * Search for any safe tile using a breadth first search and try to reserve a path. + */ +NPFFoundTargetData NPFRouteToSafeTile(const Vehicle *v, TileIndex tile, Trackdir trackdir,bool override_railtype); + + void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, Vehicle *v, bool reserve_path = false); |