forked from mirror/OpenTTD
(svn r13940) -Add [YAPP]: YAPF is now able to reserve the found path. (michi_cc)
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user