(svn r16938) -Codechange: introduce helper function to tell whether a tile is either a rail station or rail waypoint tile

This commit is contained in:
rubidium
2009-07-24 11:15:11 +00:00
parent 07447a1766
commit 2c6b5237f6
12 changed files with 36 additions and 14 deletions

View File

@@ -1858,7 +1858,7 @@ static void SetDefaultRailGui()
RailType count[RAILTYPE_END];
memset(count, 0, sizeof(count));
for (TileIndex t = 0; t < MapSize(); t++) {
if (IsTileType(t, MP_RAILWAY) || IsLevelCrossingTile(t) || IsRailwayStationTile(t) ||
if (IsTileType(t, MP_RAILWAY) || IsLevelCrossingTile(t) || HasStationTileRail(t) ||
(IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL)) {
count[GetRailType(t)]++;
}