Fixing issues with cargo loading for helos and apcs when the near range was too small...

This commit is contained in:
FlightControl 2018-10-11 19:17:33 +02:00
parent 6625de9005
commit 08c593578f
2 changed files with 5 additions and 5 deletions

View File

@ -872,7 +872,7 @@ do -- CARGO
--self:F( { CargoObjectVec2 = self.CargoObject:GetVec2() } )
--self:F( { PointVec2 = PointVec2:GetVec2() } )
local Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() )
--self:F( Distance )
--self:F( { Distance = Distance, NearRadius = NearRadius or "nil" } )
if Distance <= NearRadius then
--self:F( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = true } )

View File

@ -248,7 +248,7 @@ do -- CARGO_UNIT
local Speed = 90
local Angle = 180
local Distance = 5
local Distance = 0
local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2()
local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees.
@ -297,14 +297,14 @@ do -- CARGO_UNIT
self:__Boarding( -1, CargoCarrier, NearRadius, ... )
self.RunCount = self.RunCount + 1
else
self:__Boarding( -5, CargoCarrier, NearRadius, ... )
self.RunCount = self.RunCount + 5
self:__Boarding( -2, CargoCarrier, NearRadius, ... )
self.RunCount = self.RunCount + 2
end
if self.RunCount >= 40 then
self.RunCount = 0
local Speed = 90
local Angle = 180
local Distance = 5
local Distance = 0
local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2()
local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees.