summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeterN <peter@fuzzle.org>2019-02-15 19:15:53 +0000
committerGitHub <noreply@github.com>2019-02-15 19:15:53 +0000
commit5dc377244d74cfffffc98830cbfd009d6cb9cffa (patch)
tree6d8a980b5827e57c64da141729337c0484bb41df
parent3a4b6b476b3de9daa0310280b3866f0eb0d805de (diff)
downloadopenttd-5dc377244d74cfffffc98830cbfd009d6cb9cffa.tar.xz
Fix #7224: AI could no longer create groups. (#7233)
-rw-r--r--src/script/api/script_group.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_group.cpp b/src/script/api/script_group.cpp
index 1e8d6d774..cf8dd51a8 100644
--- a/src/script/api/script_group.cpp
+++ b/src/script/api/script_group.cpp
@@ -29,7 +29,7 @@
/* static */ ScriptGroup::GroupID ScriptGroup::CreateGroup(ScriptVehicle::VehicleType vehicle_type)
{
- if (!ScriptObject::DoCommand(0, (::VehicleType)vehicle_type, 0, CMD_CREATE_GROUP, NULL, &ScriptInstance::DoCommandReturnGroupID)) return GROUP_INVALID;
+ if (!ScriptObject::DoCommand(0, (::VehicleType)vehicle_type, INVALID_GROUP, CMD_CREATE_GROUP, NULL, &ScriptInstance::DoCommandReturnGroupID)) return GROUP_INVALID;
/* In case of test-mode, we return GroupID 0 */
return (ScriptGroup::GroupID)0;