summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-08-24 12:19:12 +0000
committerterkhen <terkhen@openttd.org>2011-08-24 12:19:12 +0000
commitbbdc8fdba7d30099d80227659919930f3dedf84b (patch)
tree6f92d67944e8d88a1624bb4c85f970748e72985a /src
parent70179db81e5a7fff78b558de9f39521c44a16886 (diff)
downloadopenttd-bbdc8fdba7d30099d80227659919930f3dedf84b.tar.xz
(svn r22821) -Fix [FS#4741]: Allow to demolish aqueducts built in the scenario editor.
Diffstat (limited to 'src')
-rw-r--r--src/tunnelbridge_cmd.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index ec98fc1ce..3d8ee8937 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -673,9 +673,15 @@ static inline CommandCost CheckAllowRemoveTunnelBridge(TileIndex tile)
}
case TRANSPORT_RAIL:
- case TRANSPORT_WATER:
return CheckOwnership(GetTileOwner(tile));
+ case TRANSPORT_WATER: {
+ /* Always allow to remove aqueducts without owner. */
+ Owner aqueduct_owner = GetTileOwner(tile);
+ if (aqueduct_owner == OWNER_NONE) aqueduct_owner = _current_company;
+ return CheckOwnership(aqueduct_owner);
+ }
+
default: NOT_REACHED();
}
}