From 39f95fabe26074e47449cbdaf2ceb2e229bc1704 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 7 Sep 2010 19:20:15 +0000 Subject: [PATCH] (svn r20763) -Fix [FS#4113](r20749): The bridgetest on building shipdepots can no longer rely on being only called for clear water tiles. --- src/water_cmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 9315ef849e..15e847e1d3 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 */