#UNIT #CTLD

* Stabilize that sometimes a unit coordinate cannot be found
This commit is contained in:
Applevangelist 2023-06-02 08:44:43 +02:00
parent 878169f51c
commit 065c59f167
2 changed files with 12 additions and 2 deletions

View File

@ -21,6 +21,7 @@ __Moose.Include( 'Core\\Zone_Detection.lua' )
__Moose.Include( 'Core\\Database.lua' )
__Moose.Include( 'Core\\Set.lua' )
__Moose.Include( 'Core\\Point.lua' )
__Moose.Include( 'Core\\Pathline.lua' )
__Moose.Include( 'Core\\Velocity.lua' )
__Moose.Include( 'Core\\Message.lua' )
__Moose.Include( 'Core\\Fsm.lua' )

View File

@ -22,7 +22,7 @@
-- @module Ops.CTLD
-- @image OPS_CTLD.jpg
-- Last Update Apr 2023
-- Last Update June 2023
do
@ -1221,7 +1221,7 @@ CTLD.UnitTypes = {
--- CTLD class version.
-- @field #string version
CTLD.version="1.0.37"
CTLD.version="1.0.38"
--- Instantiate a new CTLD.
-- @param #CTLD self
@ -4308,6 +4308,9 @@ end
local uspeed = Unit:GetVelocityMPS()
local uheight = Unit:GetHeight()
local ucoord = Unit:GetCoordinate()
if not ucoord then
return false
end
local gheight = ucoord:GetLandHeight()
local aheight = uheight - gheight -- height above ground
local maxh = self.maximumHoverHeight -- 15
@ -4334,6 +4337,9 @@ end
local uspeed = Unit:GetVelocityMPS()
local uheight = Unit:GetHeight()
local ucoord = Unit:GetCoordinate()
if not ucoord then
return false
end
local gheight = ucoord:GetLandHeight()
local aheight = uheight - gheight -- height above ground
local minh = self.HercMinAngels-- 1500m
@ -4419,6 +4425,9 @@ end
end
local uheight = Unit:GetHeight()
local ucoord = Unit:GetCoordinate()
if not ucoord then
return false
end
local gheight = ucoord:GetLandHeight()
local aheight = uheight - gheight -- height above ground
if aheight >= minheight then