diff options
author | frosch <frosch@openttd.org> | 2013-04-03 20:24:10 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-04-03 20:24:10 +0000 |
commit | 87fae6ba578ae648d50df4927a13c5f896cec6d8 (patch) | |
tree | d268377899b68dfe02273bd1f37ce76e5d969196 /src | |
parent | c56c4f7b34edcf64036d20f4f5a23255ca5c2199 (diff) | |
download | openttd-87fae6ba578ae648d50df4927a13c5f896cec6d8.tar.xz |
(svn r25140) -Fix [FS#5519]: Towns are build as OWNER_TOWN, so they also need to be removed as OWNER_TOWN.
Diffstat (limited to 'src')
-rw-r--r-- | src/town_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index abfa18106..729769212 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1847,7 +1847,10 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size /* if the population is still 0 at the point, then the * placement is so bad it couldn't grow at all */ if (t->cache.population > 0) return t; + + Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE); CommandCost rc = DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN); + cur_company.Restore(); assert(rc.Succeeded()); /* We already know that we can allocate a single town when |