(svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it

This commit is contained in:
truelight
2007-03-08 14:34:32 +00:00
parent 4ca294dfff
commit c5a6a4458b
5 changed files with 41 additions and 8 deletions

View File

@@ -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);
}