RECOVERYTANKER v1.0.4

- Fixed PG airbase enumerator names
- Rescuehelo v1.0.3
- minor stuff
This commit is contained in:
Frank
2019-01-28 22:03:21 +01:00
parent ff0371faa5
commit 9e450ce76b
9 changed files with 170 additions and 113 deletions

View File

@@ -428,6 +428,27 @@ function POSITIONABLE:GetBoundingBox() --R2.1
end
--- Get the object size.
-- @param #POSITIONABLE self
-- @return DCS#Distance Max size of object in x, z or 0 if bounding box could not be obtained.
-- @return DCS#Distance Length x or 0 if bounding box could not be obtained.
-- @return DCS#Distance Height y or 0 if bounding box could not be obtained.
-- @return DCS#Distance Width z or 0 if bounding box could not be obtained.
function POSITIONABLE:GetObjectSize()
-- Get bounding box.
local box=self:GetBoundingBox()
if box then
local x=box.max.x+math.abs(box.min.x) --length
local y=box.max.y+math.abs(box.min.y) --height
local z=box.max.z+math.abs(box.min.z) --width
return math.max(x,z), x , y, z
end
return 0,0,0,0
end
--- Get the bounding radius of the underlying POSITIONABLE DCS Object.
-- @param #POSITIONABLE self
-- @param #number mindist (Optional) If bounding box is smaller than this value, mindist is returned.