summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-10-17 21:47:16 +0000
committerplanetmaker <planetmaker@openttd.org>2013-10-17 21:47:16 +0000
commit70e4074a4ccb0e6d7f7562bc4454ad616757b975 (patch)
tree691d3d8cc64a19dea67e6b37196451d5346e8a4e /src/object_cmd.cpp
parented54d392011f7e2223891d4378743de13acac573 (diff)
downloadopenttd-70e4074a4ccb0e6d7f7562bc4454ad616757b975.tar.xz
(svn r25879) -Change: Allow to remove unowned objects unless they have the 'unremovable' flag
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 3976a6f6a..5d4d788c2 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -486,8 +486,8 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags)
} else if (_game_mode == GM_EDITOR) {
/* No further limitations for the editor. */
} else if (GetTileOwner(tile) == OWNER_NONE) {
- /* Owned by nobody, so we can only remove it with brute force! */
- if (!_cheats.magic_bulldozer.value) return CMD_ERROR;
+ /* Owned by nobody and unremovable, so we can only remove it with brute force! */
+ if (!_cheats.magic_bulldozer.value && (spec->flags & OBJECT_FLAG_CANNOT_REMOVE) != 0) return CMD_ERROR;
} else if (CheckTileOwnership(tile).Failed()) {
/* We don't own it!. */
return_cmd_error(STR_ERROR_OWNED_BY);