Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Applevangelist 2025-01-08 13:05:24 +01:00
commit c0d60b1bcf

View File

@ -1538,6 +1538,13 @@ do
local size = 1
if Event.IniDCSGroup then
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
if size == 1 then -- Only remove if the last unit of the group was destroyed.
self:Remove( ObjectName )