further event related stuff not working any more

This commit is contained in:
Applevangelist
2022-05-04 18:09:56 +02:00
parent 40bb181c78
commit 8a8b806362
2 changed files with 8 additions and 2 deletions

View File

@@ -1332,7 +1332,11 @@ do -- SET_GROUP
if Event.IniDCSUnit then
local ObjectName, Object = self:FindInDatabase( Event )
if ObjectName then
if Event.IniDCSGroup:getSize() == 1 then -- Only remove if the last unit of the group was destroyed.
local size = 1
if Event.IniDCSGroup then
size = Event.IniDCSGroup:getSize()
end
if size == 1 then -- Only remove if the last unit of the group was destroyed.
self:Remove( ObjectName )
end
end