diff options
author | truelight <truelight@openttd.org> | 2007-03-08 14:34:32 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-03-08 14:34:32 +0000 |
commit | 7b153e6356954b1ebcde3c17e0f31474d2973fc6 (patch) | |
tree | 74204bca3b25f96b90b1b1a8de5dfed13c92a61b /src/unmovable_cmd.cpp | |
parent | c517f8fd6e9b028c1266ba107b3ab1caadf7c34b (diff) | |
download | openttd-7b153e6356954b1ebcde3c17e0f31474d2973fc6.tar.xz |
(svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
Diffstat (limited to 'src/unmovable_cmd.cpp')
-rw-r--r-- | src/unmovable_cmd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index a7f7bb46c..b531e6827 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -233,6 +233,12 @@ static int32 ClearTile_Unmovable(TileIndex tile, byte flags) if (_game_mode != GM_EDITOR && _current_player != OWNER_WATER && ((flags & DC_AUTO || !_cheats.magic_bulldozer.value)) ) return_cmd_error(STR_5800_OBJECT_IN_THE_WAY); + if (IsStatue(tile)) { + TownID town = GetStatueTownID(tile); + CLRBIT(GetTown(town)->statues, _current_player); + InvalidateWindow(WC_TOWN_AUTHORITY, town); + } + if (flags & DC_EXEC) { DoClearSquare(tile); } |