File diff r17628:416ab6bada3d → r17629:21e9dfd343cd
src/pbs.h
Show inline comments
 
@@ -27,13 +27,23 @@ void UnreserveRailTrack(TileIndex tile, 
 
/** This struct contains information about the end of a reserved path. */
 
struct PBSTileInfo {
 
	TileIndex tile;      ///< Tile the path ends, INVALID_TILE if no valid path was found.
 
	Trackdir  trackdir;  ///< The reserved trackdir on the tile.
 
	bool      okay;      ///< True if tile is a safe waiting position, false otherwise.
 

	
 
	/**
 
	 * Create an empty PBSTileInfo.
 
	 */
 
	PBSTileInfo() : tile(INVALID_TILE), trackdir(INVALID_TRACKDIR), okay(false) {}
 

	
 
	/**
 
	 * Create a PBSTileInfo with given tile, track direction and safe waiting position information.
 
	 * @param _t The tile where the path ends.
 
	 * @param _td The reserved track dir on the tile.
 
	 * @param _okay Whether the tile is a safe waiting point or not.
 
	 */
 
	PBSTileInfo(TileIndex _t, Trackdir _td, bool _okay) : tile(_t), trackdir(_td), okay(_okay) {}
 
};
 

	
 
PBSTileInfo FollowTrainReservation(const Train *v, Vehicle **train_on_res = NULL);
 
bool IsSafeWaitingPosition(const Train *v, TileIndex tile, Trackdir trackdir, bool include_line_end, bool forbid_90deg = false);
 
bool IsWaitingPositionFree(const Train *v, TileIndex tile, Trackdir trackdir, bool forbid_90deg = false);