summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-31 13:24:44 +0000
committerrubidium <rubidium@openttd.org>2006-12-31 13:24:44 +0000
commit6d5db058e1d75e132ee69bedc7b97bfeaad9a56e (patch)
tree5f8d7d16ff61e374d9f36aa1c5ffeba0f33adbf6 /town_cmd.c
parentd746829809b8249e88bc40a55f5bf7e76ae6de5d (diff)
downloadopenttd-6d5db058e1d75e132ee69bedc7b97bfeaad9a56e.tar.xz
(svn r7698) -Fix (r7573): towns did not grow beyond bridges.
Diffstat (limited to 'town_cmd.c')
-rw-r--r--town_cmd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/town_cmd.c b/town_cmd.c
index bcffa01c0..9c00cf25a 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -612,15 +612,16 @@ static void GrowTownInTile(TileIndex* tile_ptr, RoadBits mask, int block, Town*
} else {
int i;
- // Reached a tunnel? Then continue at the other side of it.
- if (IsTunnelTile(tile) && GetTunnelTransportType(tile) == TRANSPORT_ROAD) {
- *tile_ptr = GetOtherTunnelEnd(tile);
+ // Reached a tunnel/bridge? Then continue at the other side of it.
+ if (IsTileType(tile, MP_TUNNELBRIDGE)) {
+ if (IsTunnel(tile) && GetTunnelTransportType(tile) == TRANSPORT_ROAD) {
+ *tile_ptr = GetOtherTunnelEnd(tile);
+ } else if (IsBridge(tile) && GetBridgeTransportType(tile) == TRANSPORT_ROAD) {
+ *tile_ptr = GetOtherBridgeEnd(tile);
+ }
return;
}
- // For any other kind of tunnel/bridge, bail out.
- if (IsTileType(tile, MP_TUNNELBRIDGE)) return;
-
// Possibly extend the road in a direction.
// Randomize a direction and if it has a road, bail out.
i = GB(Random(), 0, 2);