diff options
author | smatz <smatz@openttd.org> | 2007-12-16 19:30:42 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2007-12-16 19:30:42 +0000 |
commit | 145517fb8e0bbd66daa711ca2b31aecc0179fe74 (patch) | |
tree | 3d93af5bbe577ea3e66b1184cb89c1a934d6bcda /src/town_cmd.cpp | |
parent | 0730b9afc135eabce02144e2928b86cfa0b7f95e (diff) | |
download | openttd-145517fb8e0bbd66daa711ca2b31aecc0179fe74.tar.xz |
(svn r11649) -Codechange: some code can be simplified thanks to changes in r11642
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 302146081..e2eb21537 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1064,10 +1064,8 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t /* Reached a tunnel/bridge? Then continue at the other side of it. */ if (IsTileType(tile, MP_TUNNELBRIDGE)) { - if (IsTunnel(tile) && GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) { - *tile_ptr = GetOtherTunnelEnd(tile); - } else if (IsBridge(tile) && GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) { - *tile_ptr = GetOtherBridgeEnd(tile); + if (GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) { + *tile_ptr = IsTunnel(tile) ? GetOtherTunnelEnd(tile) : GetOtherBridgeEnd(tile); } return; } |