- Added tanker and CAP zones
This commit is contained in:
Frank
2021-10-03 21:33:33 +02:00
parent 2ae2ee64be
commit fa6fbca67b
12 changed files with 189 additions and 44 deletions

View File

@@ -136,6 +136,7 @@ TARGET.version="0.5.2"
-- TODO list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Had cases where target life was 0 but target was not dead. Need to figure out why!
-- TODO: Add pseudo functions.
-- DONE: Initial object can be nil.
@@ -383,6 +384,11 @@ function TARGET:onafterStatus(From, Event, To)
damaged=true
end
if life==0 then
self:I(self.lid..string.format("FF life is zero but no object dead event fired ==> object dead now for traget object %s!", tostring(target.Name)))
self:ObjectDead(target)
end
end
-- Target was damaged.
@@ -1056,7 +1062,8 @@ end
-- @param #TARGET self
-- @return #string Name of the target usually the first object.
function TARGET:GetName()
return self.name or "Unknown"
local name=self.name or "Unknown"
return name
end
--- Get 2D vector.