New weight driven limits logic for cargo to load multiple cargo.

Fixed near range issue for carriers. now the infantry disappearance range for boarding is calculated by the carrier bounding range, which is derived from the bounding rectangle on the Y-axis. The near range parameter can still be provided and will be interpreted as the loading range for static cargo objects!
This commit is contained in:
FlightControl
2018-08-22 20:41:37 +02:00
parent 7a2dee4162
commit bf903c0cc7
8 changed files with 134 additions and 105 deletions

View File

@@ -128,10 +128,7 @@ function AI_CARGO_AIRPLANE:New( Airplane, CargoSet )
-- Set carrier.
self:SetCarrier( Airplane )
local Desc = Airplane:GetUnit(1):GetDesc()
self:F({Desc=Desc})
Airplane:SetCargoBayWeightLimit( Desc.massMax - ( Desc.massEmpty + Desc.fuelMassMax ) )
--Airplane:SetCargoBayVolumeLimit( 15 )
Airplane:SetCargoBayWeightLimit()
self.Relocating = true