(svn r12118) -Codechange: Put the two descriptions of bridges in an array instead of two single variables, following the transport type it represents

This commit is contained in:
belugas
2008-02-12 03:05:27 +00:00
parent b0b929ce42
commit f4334301e8
4 changed files with 16 additions and 22 deletions

View File

@@ -1142,8 +1142,7 @@ static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td)
td->str = (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL) ?
STR_5017_RAILROAD_TUNNEL : STR_5018_ROAD_TUNNEL;
} else { //so it must be a bridge
const BridgeSpec *brspc = GetBridgeSpec(GetBridgeType(tile));
td->str = GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL ? brspc->name_rail : brspc->name_road;
td->str = GetBridgeSpec(GetBridgeType(tile))->transport_name[GetTunnelBridgeTransportType(tile)];
}
td->owner = GetTileOwner(tile);
}