Mercurial > hg > openttd
changeset 15794:c4583e59eb02 draft
(svn r20469) -Fix (r20227): Building statues used different companys for CMD_LANDSCAPE_CLEAR during testrun and DC_EXEC.
author | frosch <frosch@openttd.org> |
---|---|
date | Thu, 12 Aug 2010 14:20:02 +0000 |
parents | 1666a11eb6a6 |
children | c9cf5fe6d6a1 |
files | src/town_cmd.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2504,7 +2504,9 @@ 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);