diff options
Diffstat (limited to 'src/script/api/script_group.cpp')
-rw-r--r-- | src/script/api/script_group.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_group.cpp b/src/script/api/script_group.cpp index 0e89c3c60..16a50bc17 100644 --- a/src/script/api/script_group.cpp +++ b/src/script/api/script_group.cpp @@ -28,9 +28,9 @@ return g != NULL && g->owner == ScriptObject::GetCompany(); } -/* static */ ScriptGroup::GroupID ScriptGroup::CreateGroup(ScriptVehicle::VehicleType vehicle_type) +/* static */ ScriptGroup::GroupID ScriptGroup::CreateGroup(ScriptVehicle::VehicleType vehicle_type, GroupID parent_group_id) { - if (!ScriptObject::DoCommand(0, (::VehicleType)vehicle_type, INVALID_GROUP, CMD_CREATE_GROUP, NULL, &ScriptInstance::DoCommandReturnGroupID)) return GROUP_INVALID; + if (!ScriptObject::DoCommand(0, (::VehicleType)vehicle_type, parent_group_id, CMD_CREATE_GROUP, NULL, &ScriptInstance::DoCommandReturnGroupID)) return GROUP_INVALID; /* In case of test-mode, we return GroupID 0 */ return (ScriptGroup::GroupID)0; |