This commit is contained in:
Frank
2020-09-01 11:42:45 +02:00
parent 5ee35f3fbb
commit eb86d59203
5 changed files with 67 additions and 28 deletions

View File

@@ -561,7 +561,8 @@ do -- COORDINATE
return self
else
--env.info("FF translate with NEW coordinate T="..timer.getTime())
return COORDINATE:New(x, y, z)
local coord=COORDINATE:New(x, y, z)
return coord
end
end
@@ -761,7 +762,8 @@ do -- COORDINATE
-- Move the vector to start at the end of A.
vec=UTILS.VecAdd(self, vec)
return self:New(vec.x,vec.y,vec.z)
local coord=COORDINATE:New(vec.x,vec.y,vec.z)
return coord
end
--- Return the 2D distance in meters between the target COORDINATE and the COORDINATE.

View File

@@ -38,6 +38,8 @@
--
-- The TIMER class is the little sister of the SCHEDULER class. It does the same thing but is a bit easier to use and has less overhead. It should be sufficient in many cases.
--
-- It provides an easy interface to the DCS [timer.scheduleFunction](https://wiki.hoggitworld.com/view/DCS_func_scheduleFunction).
--
-- # Construction
--
-- A new TIMER is created by the @{#TIMER.New}(*func*, *...*) function
@@ -104,7 +106,7 @@ TIMER = {
_TIMERID=0
--- Timer data base.
_TIMERDB={}
--_TIMERDB={}
--- TIMER class version.
-- @field #string version
@@ -150,7 +152,7 @@ function TIMER:New(Function, ...)
self.lid=string.format("TIMER UID=%d | ", self.uid)
-- Add to DB.
_TIMERDB[self.uid]=self
--_TIMERDB[self.uid]=self
return self
end
@@ -208,7 +210,7 @@ function TIMER:Stop(Delay)
timer.removeFunction(self.tid)
-- Remove DB entry.
_TIMERDB[self.uid]=nil
--_TIMERDB[self.uid]=nil
end
@@ -232,8 +234,6 @@ end
-- @return #number Time when the function is called again or `nil` if the timer is stopped.
function TIMER:_Function(time)
--self:I(self.lid.."FF calling timer _Function")
-- Call function.
self.func(unpack(self.para))