(svn r13940) -Add [YAPP]: YAPF is now able to reserve the found path. (michi_cc)

This commit is contained in:
rubidium
2008-08-02 22:50:52 +00:00
parent c91c12adde
commit abc46b1e86
6 changed files with 317 additions and 17 deletions

View File

@@ -534,6 +534,21 @@ static inline bool HasPbsSignalOnTrackdir(TileIndex tile, Trackdir td)
IsPbsSignal(GetSignalType(tile, TrackdirToTrack(td)));
}
/**
* Is a one-way signal blocking the trackdir? A one-way signal on the
* trackdir against will block, but signals on both trackdirs won't.
* @param tile the tile to check
* @param td the trackdir to check
*/
static inline bool HasOnewaySignalBlockingTrackdir(TileIndex tile, Trackdir td)
{
return
IsTileType(tile, MP_RAILWAY) &&
HasSignalOnTrackdir(tile, ReverseTrackdir(td)) &&
!HasSignalOnTrackdir(tile, td) &&
IsOnewaySignal(tile, TrackdirToTrack(td));
}
/**
* Return the rail type of tile, or INVALID_RAILTYPE if this is no rail tile.