From e1fdc10227c29c55a4f6ab844b9e2ab540c5067f Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 21 Apr 2025 15:45:29 +0100 Subject: [PATCH] Fix e114ed357d: Incorrect test of object flags allowed HQ to be removed. (#14062) --- src/object_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 395a622890..9271467fdb 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -571,7 +571,7 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlags flags) } else if (CheckTileOwnership(tile).Failed()) { /* We don't own it!. */ return CommandCost(STR_ERROR_OWNED_BY); - } else if (spec->flags.All({ObjectFlag::CannotRemove, ObjectFlag::Autoremove})) { + } else if (spec->flags.Test(ObjectFlag::CannotRemove) && !spec->flags.Test(ObjectFlag::Autoremove)) { /* In the game editor or with cheats we can remove, otherwise we can't. */ if (!_cheats.magic_bulldozer.value) { if (type == OBJECT_HQ) return CommandCost(STR_ERROR_COMPANY_HEADQUARTERS_IN);