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
|
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
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user