mirror of https://github.com/OpenTTD/OpenTTD
(svn r25140) -Fix [FS#5519]: Towns are build as OWNER_TOWN, so they also need to be removed as OWNER_TOWN.
parent
c56c4f7b34
commit
87fae6ba57
|
@ -1847,7 +1847,10 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size
|
||||||
/* if the population is still 0 at the point, then the
|
/* if the population is still 0 at the point, then the
|
||||||
* placement is so bad it couldn't grow at all */
|
* placement is so bad it couldn't grow at all */
|
||||||
if (t->cache.population > 0) return t;
|
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);
|
CommandCost rc = DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN);
|
||||||
|
cur_company.Restore();
|
||||||
assert(rc.Succeeded());
|
assert(rc.Succeeded());
|
||||||
|
|
||||||
/* We already know that we can allocate a single town when
|
/* We already know that we can allocate a single town when
|
||||||
|
|
Loading…
Reference in New Issue