fixes
This commit is contained in:
Binary file not shown.
+32
-11
@@ -659,11 +659,22 @@ function Database:loadMissionzoneUnits()
|
|||||||
|
|
||||||
local groups = Spearhead.DcsUtil.getGroupsInZone(all_groups, missionZoneName)
|
local groups = Spearhead.DcsUtil.getGroupsInZone(all_groups, missionZoneName)
|
||||||
for _, groupName in pairs(groups) do
|
for _, groupName in pairs(groups) do
|
||||||
local group = Group.getByName(groupName)
|
if Spearhead.DcsUtil.IsGroupStatic(groupName) == true then
|
||||||
if group and group:getCoalition() == coalition.side.RED then
|
local object = StaticObject.getByName(groupName)
|
||||||
table.insert(self._tables.MissionZoneData[missionZoneName].RedGroups, groupName)
|
|
||||||
elseif group and group:getCoalition() == coalition.side.BLUE then
|
if object and object:getCoalition() == coalition.side.RED then
|
||||||
table.insert(self._tables.MissionZoneData[missionZoneName].BlueGroups, groupName)
|
table.insert(self._tables.MissionZoneData[missionZoneName].RedGroups, groupName)
|
||||||
|
elseif object then
|
||||||
|
table.insert(self._tables.MissionZoneData[missionZoneName].BlueGroups, groupName)
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
local group = Group.getByName(groupName)
|
||||||
|
if group and group:getCoalition() == coalition.side.RED then
|
||||||
|
table.insert(self._tables.MissionZoneData[missionZoneName].RedGroups, groupName)
|
||||||
|
elseif group then
|
||||||
|
table.insert(self._tables.MissionZoneData[missionZoneName].BlueGroups, groupName)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
is_group_taken[groupName] = true
|
is_group_taken[groupName] = true
|
||||||
end
|
end
|
||||||
@@ -680,13 +691,23 @@ function Database:loadRandomMissionzoneUnits()
|
|||||||
}
|
}
|
||||||
local groups = Spearhead.DcsUtil.getGroupsInZone(all_groups, missionZoneName)
|
local groups = Spearhead.DcsUtil.getGroupsInZone(all_groups, missionZoneName)
|
||||||
for _, groupName in pairs(groups) do
|
for _, groupName in pairs(groups) do
|
||||||
local group = Group.getByName(groupName)
|
if Spearhead.DcsUtil.IsGroupStatic(groupName) == true then
|
||||||
if group and group:getCoalition() == coalition.side.RED then
|
local object = StaticObject.getByName(groupName)
|
||||||
table.insert(self._tables.MissionZoneData[missionZoneName].RedGroups, groupName)
|
|
||||||
elseif group and group:getCoalition() == coalition.side.BLUE then
|
if object and object:getCoalition() == coalition.side.RED then
|
||||||
table.insert(self._tables.MissionZoneData[missionZoneName].BlueGroups, groupName)
|
table.insert(self._tables.MissionZoneData[missionZoneName].RedGroups, groupName)
|
||||||
|
elseif object then
|
||||||
|
table.insert(self._tables.MissionZoneData[missionZoneName].BlueGroups, groupName)
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
local group = Group.getByName(groupName)
|
||||||
|
if group and group:getCoalition() == coalition.side.RED then
|
||||||
|
table.insert(self._tables.MissionZoneData[missionZoneName].RedGroups, groupName)
|
||||||
|
elseif group then
|
||||||
|
table.insert(self._tables.MissionZoneData[missionZoneName].BlueGroups, groupName)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
is_group_taken[groupName] = true
|
is_group_taken[groupName] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user