Fixed GROUP:IsAlive() returning true even if all group members aredead

Fixed the mechanism by checking if the group has a :getUnit(1) ~= nil
This commit is contained in:
Sven Van de Velde
2017-02-23 17:25:16 +01:00
parent d9e9ef887b
commit 6fb5a88953
6 changed files with 51 additions and 5 deletions

View File

@@ -184,7 +184,7 @@ function GROUP:IsAlive()
local DCSGroup = self:GetDCSObject()
if DCSGroup then
local GroupIsAlive = DCSGroup:isExist()
local GroupIsAlive = DCSGroup:isExist() and DCSGroup:getUnit(1) ~= nil
self:T3( GroupIsAlive )
return GroupIsAlive
end

View File

@@ -0,0 +1,14 @@
---
-- Name: XXX-999 - Title
-- Author: YYY
-- Date Created: DD Mmm YYYY
--
-- # Situation:
--
--
--
-- # Test cases:
--
-- 1.