changeset 19488:91c52205e8ad draft

(svn r24391) -Change [FS#5229]: Disallow original and better road layouts to build roads under bridges along the bridge direction.
author frosch <frosch@openttd.org>
date Mon, 09 Jul 2012 19:43:22 +0000
parents 8aee85c3b185
children a7a82c815205
files src/town_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -847,6 +847,9 @@
 {
 	if (DistanceFromEdge(tile) == 0) return false;
 
+	/* Prevent towns from building roads under bridges along the bridge. Looks silly. */
+	if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile) && GetBridgeAxis(tile) == DiagDirToAxis(dir)) return false;
+
 	/* Check if there already is a road at this point? */
 	if (GetTownRoadBits(tile) == ROAD_NONE) {
 		/* No, try if we are able to build a road piece there.