Changeset - r15784:7f059c0b0d17
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-08-12 14:20:02
frosch@openttd.org
(svn r20469) -Fix (r20227): Building statues used different companys for CMD_LANDSCAPE_CLEAR during testrun and DC_EXEC.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -2504,7 +2504,9 @@ static CommandCost TownActionBuildStatue
 
	TileIndex tile = t->xy;
 
	if (CircularTileSearch(&tile, 9, SearchTileForStatue, NULL)) {
 
		if (flags & DC_EXEC) {
 
			Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE);
 
			DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
 
			cur_company.Restore();
 
			BuildObject(OBJECT_STATUE, tile, _current_company, t->index);
 
			SetBit(t->statues, _current_company); // Once found and built, "inform" the Town.
 
			MarkTileDirtyByTile(tile);
0 comments (0 inline, 0 general)