From c23e4e45388a4802de14f4b9bcb8abec2e5926fd Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 31 Jan 2010 20:56:24 +0000 Subject: (svn r18976) -Fix: Estimating the cost of removing statues could clear the presence flag in the town. --- src/unmovable_cmd.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index 91715604b..8e412b16f 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -287,9 +287,11 @@ static CommandCost ClearTile_Unmovable(TileIndex tile, DoCommandFlag flags) if (IsStatue(tile)) { if (flags & DC_AUTO) return_cmd_error(STR_ERROR_OBJECT_IN_THE_WAY); - TownID town = GetStatueTownID(tile); - ClrBit(Town::Get(town)->statues, GetTileOwner(tile)); - SetWindowDirty(WC_TOWN_AUTHORITY, town); + if (flags & DC_EXEC) { + TownID town = GetStatueTownID(tile); + ClrBit(Town::Get(town)->statues, GetTileOwner(tile)); + SetWindowDirty(WC_TOWN_AUTHORITY, town); + } } if (flags & DC_EXEC) { -- cgit v1.2.3-70-g09d2