summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-02-12 03:05:27 +0000
committerbelugas <belugas@openttd.org>2008-02-12 03:05:27 +0000
commitd465b23ee2373b908820b855561aab2ea17f1495 (patch)
tree1f3b08c93867a3ece67fea36d353dcbdb2385576 /src/tunnelbridge_cmd.cpp
parent7d88f6688e2762f7b77cda44c70142422df1cb42 (diff)
downloadopenttd-d465b23ee2373b908820b855561aab2ea17f1495.tar.xz
(svn r12118) -Codechange: Put the two descriptions of bridges in an array instead of two single variables, following the transport type it represents
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 8a3e23d6e..a1de7350e 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -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);
}