summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-07-09 19:43:22 +0000
committerfrosch <frosch@openttd.org>2012-07-09 19:43:22 +0000
commit6c2e2011334f45ad6735efee28fb4c49d1aa5594 (patch)
treeea4cf91fd33be2ddaa8f0a33d68fc5ddfca629f2 /src
parent0ead281439ab408744a6099322bf98fcec86d539 (diff)
downloadopenttd-6c2e2011334f45ad6735efee28fb4c49d1aa5594.tar.xz
(svn r24391) -Change [FS#5229]: Disallow original and better road layouts to build roads under bridges along the bridge direction.
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 6c37ccae1..d0b2e291e 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -847,6 +847,9 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir)
{
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.