Mercurial > hg > openttd
changeset 20187:b50ffa0525f2 draft
(svn r25140) -Fix [FS#5519]: Towns are build as OWNER_TOWN, so they also need to be removed as OWNER_TOWN.
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 03 Apr 2013 20:24:10 +0000 |
parents | 2a4d1262e2fe |
children | 7d2043dfec98 |
files | src/town_cmd.cpp |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1847,7 +1847,10 @@ /* 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