changeset 18001:6e430c0b722b draft

(svn r22810) -Fix: Growth a town on both ends of a tunnel/bridge if the town centre tile is a bridge ramp/tunnel portal.
author michi_cc <michi_cc@openttd.org>
date Mon, 22 Aug 2011 12:41:24 +0000
parents 7a129cd9f0b4
children 6e7281a51bb6
files src/town_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -1110,9 +1110,10 @@
 	} else {
 		bool allow_house = true; // Value which decides if we want to construct a house
 
-		/* Reached a tunnel/bridge? Then continue at the other side of it. */
+		/* Reached a tunnel/bridge? Then continue at the other side of it, unless
+		 * it is the starting tile. Half the time, we stay on this side then.*/
 		if (IsTileType(tile, MP_TUNNELBRIDGE)) {
-			if (GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) {
+			if (GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD && (target_dir != DIAGDIR_END || Chance16(1, 2))) {
 				*tile_ptr = GetOtherTunnelBridgeEnd(tile);
 			}
 			return;