summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-09-07 19:20:15 +0000
committerfrosch <frosch@openttd.org>2010-09-07 19:20:15 +0000
commitb57a3ae5ecda91c2a0f9771c1f914992e27416c0 (patch)
tree127e8aa44d9d82e0f867da595b5ddab0dc30e06f /src
parent0e2a9b07674339899c0a5be9aa30bb722b3626a3 (diff)
downloadopenttd-b57a3ae5ecda91c2a0f9771c1f914992e27416c0.tar.xz
(svn r20763) -Fix [FS#4113](r20749): The bridgetest on building shipdepots can no longer rely on being only called for clear water tiles.
Diffstat (limited to 'src')
-rw-r--r--src/water_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 9315ef849..15e847e1d 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -104,7 +104,8 @@ CommandCost CmdBuildShipDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
return_cmd_error(STR_ERROR_MUST_BE_BUILT_ON_WATER);
}
- if (IsBridgeAbove(tile) || IsBridgeAbove(tile2)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
+ if ((MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) ||
+ (MayHaveBridgeAbove(tile2) && IsBridgeAbove(tile2))) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
if (GetTileSlope(tile, NULL) != SLOPE_FLAT || GetTileSlope(tile2, NULL) != SLOPE_FLAT) {
/* Prevent depots on rapids */