From 7b153e6356954b1ebcde3c17e0f31474d2973fc6 Mon Sep 17 00:00:00 2001 From: truelight Date: Thu, 8 Mar 2007 14:34:32 +0000 Subject: (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it --- src/town_cmd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/town_cmd.cpp') diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index b212af129..14079e98b 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1465,7 +1465,7 @@ static void TownActionRoadRebuild(Town* t) NEWS_FLAGS(NM_NORMAL, NF_TILE, NT_GENERAL, 0), t->xy, 0); } -static bool DoBuildStatueOfCompany(TileIndex tile) +static bool DoBuildStatueOfCompany(TileIndex tile, TownID town_id) { PlayerID old; int32 r; @@ -1485,7 +1485,7 @@ static bool DoBuildStatueOfCompany(TileIndex tile) if (CmdFailed(r)) return false; - MakeStatue(tile, _current_player); + MakeStatue(tile, _current_player, town_id); MarkTileDirtyByTile(tile); return true; @@ -1493,12 +1493,12 @@ static bool DoBuildStatueOfCompany(TileIndex tile) /** * Search callback function for TownActionBuildStatue - * @param data that is passed by the caller. In this case, nothing + * @param town_id The town_id for which we want a statue * @return the result of the test */ -static bool SearchTileForStatue(TileIndex tile, uint32 data) +static bool SearchTileForStatue(TileIndex tile, uint32 town_id) { - return DoBuildStatueOfCompany(tile); + return DoBuildStatueOfCompany(tile, town_id); } /** @@ -1510,7 +1510,7 @@ static void TownActionBuildStatue(Town* t) { TileIndex tile = t->xy; - if (CircularTileSearch(tile, 9, SearchTileForStatue, 0)) + if (CircularTileSearch(tile, 9, SearchTileForStatue, t->index)) SETBIT(t->statues, _current_player); ///< Once found and built, "inform" the Town } -- cgit v1.2.3-70-g09d2