Merge branch 'tracerestrict-sx' into jgrpp

This commit is contained in:
Jonathan G Rennison
2016-03-01 20:55:19 +00:00
5 changed files with 17 additions and 7 deletions

View File

@@ -154,6 +154,20 @@ bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations)
return false;
}
/**
* Lift the reservation of a specific trackdir on a tile
* This also sets PBS signals to red if unreserving through the facing track direction
* @param tile the tile
* @param t the track
*/
void UnreserveRailTrackdir(TileIndex tile, Trackdir td)
{
if (HasPbsSignalOnTrackdir(tile, td)) {
SetSignalStateByTrackdir(tile, td, SIGNAL_STATE_RED);
}
UnreserveRailTrack(tile, TrackdirToTrack(td));
}
/**
* Lift the reservation of a specific track on a tile
* @param tile the tile