Add: allow gamescripts to build neutral objects (#9568)

This commit is contained in:
dP
2021-09-25 14:39:40 +03:00
committed by GitHub
parent 66c7d9b8ed
commit 39662aabef
9 changed files with 161 additions and 2 deletions

View File

@@ -349,7 +349,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
}
if (flags & DC_EXEC) {
BuildObject(type, tile, _current_company, nullptr, view);
BuildObject(type, tile, _current_company == OWNER_DEITY ? OWNER_NONE : _current_company, nullptr, view);
/* Make sure the HQ starts at the right size. */
if (type == OBJECT_HQ) UpdateCompanyHQ(tile, hq_score);