summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-03-12 11:36:18 +0000
committeryexo <yexo@openttd.org>2009-03-12 11:36:18 +0000
commit9eef8f77e2ed4a8fe297b70feb69cf311b906a91 (patch)
treed726ea2f4b251edf4848ef450d26e86262198e30 /src
parent84e5e44ca9dfd3f05be318a6642158375d107a1d (diff)
downloadopenttd-9eef8f77e2ed4a8fe297b70feb69cf311b906a91.tar.xz
(svn r15683) -Fix (r15670): Removing town-owned bridges was no longer possible.
Diffstat (limited to 'src')
-rw-r--r--src/tunnelbridge_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 566239730..c7f779870 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -594,10 +594,11 @@ static inline bool CheckAllowRemoveTunnelBridge(TileIndex tile)
if (HasBit(rts, ROADTYPE_TRAM)) tram_owner = GetRoadOwner(tile, ROADTYPE_TRAM);
/* We can remove unowned road and if the town allows it */
- if (road_owner == OWNER_NONE || (road_owner == OWNER_TOWN && (_settings_game.construction.extra_dynamite || _cheats.magic_bulldozer.value))) road_owner = _current_company;
+ if (road_owner == OWNER_TOWN && !(_settings_game.construction.extra_dynamite || _cheats.magic_bulldozer.value)) return CheckTileOwnership(tile);
+ if (road_owner == OWNER_NONE || road_owner == OWNER_TOWN) road_owner = _current_company;
if (tram_owner == OWNER_NONE) tram_owner = _current_company;
- return (GetTileOwner(tile) == OWNER_NONE || CheckTileOwnership(tile)) && CheckOwnership(road_owner) && CheckOwnership(tram_owner);
+ return CheckOwnership(road_owner) && CheckOwnership(tram_owner);
}
case TRANSPORT_RAIL: