diff options
author | dP <dp@dpointer.org> | 2021-09-25 14:39:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-25 13:39:40 +0200 |
commit | 39662aabefa851a153b66571a50fd4b78b83ced1 (patch) | |
tree | 9498197df55f57c9abb28234dd336f82f5b627bb /src/object_cmd.cpp | |
parent | 66c7d9b8ed9df8de1fc1e5b6c83808683bc6bbd2 (diff) | |
download | openttd-39662aabefa851a153b66571a50fd4b78b83ced1.tar.xz |
Add: allow gamescripts to build neutral objects (#9568)
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r-- | src/object_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index dc517dc5f..14645f93d 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -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); |