mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fix WAREHOUSE.AssetItem size calculation
This commit is contained in:
parent
e2929a78c4
commit
f929951dbe
@ -4101,9 +4101,9 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
|
||||
-- Get the size of an object.
|
||||
local function _GetObjectSize(DCSdesc)
|
||||
if DCSdesc.box then
|
||||
local x=DCSdesc.box.max.x+math.abs(DCSdesc.box.min.x) --length
|
||||
local y=DCSdesc.box.max.y+math.abs(DCSdesc.box.min.y) --height
|
||||
local z=DCSdesc.box.max.z+math.abs(DCSdesc.box.min.z) --width
|
||||
local x=DCSdesc.box.max.x-DCSdesc.box.min.x --length
|
||||
local y=DCSdesc.box.max.y-DCSdesc.box.min.y --height
|
||||
local z=DCSdesc.box.max.z-DCSdesc.box.min.z --width
|
||||
return math.max(x,z), x , y, z
|
||||
end
|
||||
return 0,0,0,0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user