Mercurial > hg > openttd
changeset 14419:aceaa62dd309 draft
(svn r18976) -Fix: Estimating the cost of removing statues could clear the presence flag in the town.
author | frosch <frosch@openttd.org> |
---|---|
date | Sun, 31 Jan 2010 20:56:24 +0000 |
parents | 1a5f2a839c10 |
children | 0b3ad86407fd |
files | src/unmovable_cmd.cpp |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -287,9 +287,11 @@ 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) {