- Fixed IsAlive
This commit is contained in:
Frank 2023-12-25 23:12:55 +01:00
parent 4e36ed170b
commit 1b01b89343
2 changed files with 4 additions and 2 deletions

View File

@ -1860,6 +1860,7 @@ function ARMYGROUP:_UpdateEngageTarget()
else else
-- Could not get position of target (not alive any more?) ==> Disengage. -- Could not get position of target (not alive any more?) ==> Disengage.
self:T(self.lid.."Could not get position of target ==> Disengage!")
self:Disengage() self:Disengage()
end end
@ -1867,6 +1868,7 @@ function ARMYGROUP:_UpdateEngageTarget()
else else
-- Target not alive any more ==> Disengage. -- Target not alive any more ==> Disengage.
self:T(self.lid.."Target not ALIVE ==> Disengage!")
self:Disengage() self:Disengage()
end end

View File

@ -526,11 +526,11 @@ function TARGET:IsAlive()
for _,_target in pairs(self.targets) do for _,_target in pairs(self.targets) do
local target=_target --Ops.Target#TARGET.Object local target=_target --Ops.Target#TARGET.Object
if target.Status==TARGET.ObjectStatus.ALIVE then if target.Status~=TARGET.ObjectStatus.DEAD then
return true return true
end end
end end
return false return false
end end