Merge branch 'develop' into FF/Develop

This commit is contained in:
funkyfranky
2018-08-26 17:29:45 +02:00
4 changed files with 59 additions and 14 deletions

View File

@@ -279,7 +279,7 @@ function POSITIONABLE:GetBoundingRadius()
local Z = Box.max.z - Box.min.z
local CX = X / 2
local CZ = Z / 2
return math.max( CX, CZ )
return math.max( CX, CZ ) + 3
end
BASE:E( { "Cannot GetBoundingRadius", Positionable = self, Alive = self:IsAlive() } )
@@ -946,6 +946,12 @@ do -- Cargo
-- @param #POSITIONABLE self
-- @return #number CargoBayFreeWeight
function POSITIONABLE:GetCargoBayFreeWeight()
-- When there is no cargo bay weight limit set, then calculate this for this positionable!
if not self.__.CargoBayWeightLimit then
self:SetCargoBayWeightLimit()
end
local CargoWeight = 0
for CargoName, Cargo in pairs( self.__.Cargo ) do
CargoWeight = CargoWeight + Cargo:GetWeight()
@@ -1007,6 +1013,7 @@ do -- Cargo
self.__.CargoBayWeightLimit = CargoBayWeightLimit
end
end
self:F({CargoBayWeightLimit = self.__.CargoBayWeightLimit})
end
end --- Cargo