diff options
author | frosch <frosch@openttd.org> | 2010-01-31 20:56:24 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-01-31 20:56:24 +0000 |
commit | c23e4e45388a4802de14f4b9bcb8abec2e5926fd (patch) | |
tree | 77bc78dd07945dce53a6d94dbfe5645492af1eca | |
parent | 5f4f562d5333d8401157dfa0cef82e8788f21952 (diff) | |
download | openttd-c23e4e45388a4802de14f4b9bcb8abec2e5926fd.tar.xz |
(svn r18976) -Fix: Estimating the cost of removing statues could clear the presence flag in the town.
-rw-r--r-- | src/unmovable_cmd.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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) { |