diff options
Diffstat (limited to 'src/rail_map.h')
-rw-r--r-- | src/rail_map.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rail_map.h b/src/rail_map.h index 195aef9f5..bfdc19f6d 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -42,13 +42,24 @@ static inline RailTileType GetRailTileType(TileIndex t) * @pre IsTileType(t, MP_RAILWAY) * @return true if and only if the tile is normal rail (with or without signals) */ -static inline bool IsPlainRailTile(TileIndex t) +static inline bool IsPlainRail(TileIndex t) { RailTileType rtt = GetRailTileType(t); return rtt == RAIL_TILE_NORMAL || rtt == RAIL_TILE_SIGNALS; } /** + * Checks whether the tile is a rail tile or rail tile with signals. + * @param t the tile to get the information from + * @return true if and only if the tile is normal rail (with or without signals) + */ +static inline bool IsPlainRailTile(TileIndex t) +{ + return IsTileType(t, MP_RAILWAY) && IsPlainRail(t); +} + + +/** * Checks if a rail tile has signals. * @param t the tile to get the information from * @pre IsTileType(t, MP_RAILWAY) |