mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
TARGET
- Fixed IsAlive
This commit is contained in:
parent
4e36ed170b
commit
1b01b89343
@ -1860,6 +1860,7 @@ function ARMYGROUP:_UpdateEngageTarget()
|
||||
else
|
||||
|
||||
-- Could not get position of target (not alive any more?) ==> Disengage.
|
||||
self:T(self.lid.."Could not get position of target ==> Disengage!")
|
||||
self:Disengage()
|
||||
|
||||
end
|
||||
@ -1867,6 +1868,7 @@ function ARMYGROUP:_UpdateEngageTarget()
|
||||
else
|
||||
|
||||
-- Target not alive any more ==> Disengage.
|
||||
self:T(self.lid.."Target not ALIVE ==> Disengage!")
|
||||
self:Disengage()
|
||||
|
||||
end
|
||||
|
||||
@ -526,11 +526,11 @@ function TARGET:IsAlive()
|
||||
|
||||
for _,_target in pairs(self.targets) do
|
||||
local target=_target --Ops.Target#TARGET.Object
|
||||
if target.Status==TARGET.ObjectStatus.ALIVE then
|
||||
if target.Status~=TARGET.ObjectStatus.DEAD then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user