mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#SET_GROUP - fix for lost event if IniDCSGroup isn't filled
This commit is contained in:
parent
04f8f6d512
commit
63c68d729b
@ -1538,6 +1538,13 @@ do
|
|||||||
local size = 1
|
local size = 1
|
||||||
if Event.IniDCSGroup then
|
if Event.IniDCSGroup then
|
||||||
size = Event.IniDCSGroup:getSize()
|
size = Event.IniDCSGroup:getSize()
|
||||||
|
elseif Event.IniDCSGroupName then
|
||||||
|
local grp = Group.getByName(Event.IniDCSGroupName)
|
||||||
|
if grp then
|
||||||
|
size = grp:getSize()
|
||||||
|
end
|
||||||
|
elseif Object:IsAlive() then
|
||||||
|
size = Object:CountAliveUnits()
|
||||||
end
|
end
|
||||||
if size == 1 then -- Only remove if the last unit of the group was destroyed.
|
if size == 1 then -- Only remove if the last unit of the group was destroyed.
|
||||||
self:Remove( ObjectName )
|
self:Remove( ObjectName )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user