mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'tt/warehouse-asset-size-fix' into tt/misc-bug-fixes
This commit is contained in:
commit
4f8e65b515
@ -4101,9 +4101,9 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
|
|||||||
-- Get the size of an object.
|
-- Get the size of an object.
|
||||||
local function _GetObjectSize(DCSdesc)
|
local function _GetObjectSize(DCSdesc)
|
||||||
if DCSdesc.box then
|
if DCSdesc.box then
|
||||||
local x=DCSdesc.box.max.x+math.abs(DCSdesc.box.min.x) --length
|
local x=DCSdesc.box.max.x-DCSdesc.box.min.x --length
|
||||||
local y=DCSdesc.box.max.y+math.abs(DCSdesc.box.min.y) --height
|
local y=DCSdesc.box.max.y-DCSdesc.box.min.y --height
|
||||||
local z=DCSdesc.box.max.z+math.abs(DCSdesc.box.min.z) --width
|
local z=DCSdesc.box.max.z-DCSdesc.box.min.z --width
|
||||||
return math.max(x,z), x , y, z
|
return math.max(x,z), x , y, z
|
||||||
end
|
end
|
||||||
return 0,0,0,0
|
return 0,0,0,0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user