summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-03-08 14:34:32 +0000
committertruelight <truelight@openttd.org>2007-03-08 14:34:32 +0000
commit7b153e6356954b1ebcde3c17e0f31474d2973fc6 (patch)
tree74204bca3b25f96b90b1b1a8de5dfed13c92a61b /src/town_cmd.cpp
parentc517f8fd6e9b028c1266ba107b3ab1caadf7c34b (diff)
downloadopenttd-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/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
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
}