From 469e1a3c9b719135cc5e7f2ac8af5fb611721bd6 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Mon, 17 Apr 2017 18:53:32 +0200 Subject: [PATCH] This fixes issue #433 --- Moose Development/Moose/Core/Cargo.lua | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/Moose Development/Moose/Core/Cargo.lua b/Moose Development/Moose/Core/Cargo.lua index 42486f980..dc87effef 100644 --- a/Moose Development/Moose/Core/Cargo.lua +++ b/Moose Development/Moose/Core/Cargo.lua @@ -697,7 +697,7 @@ function CARGO_UNIT:onenterBoarding( From, Event, To, CargoCarrier, NearRadius, NearRadius = NearRadius or 25 - if From == "UnLoaded" then + if From == "UnLoaded" or From == "Boarding" then local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2() local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees. local CargoDeployHeading = ( ( CargoCarrierHeading + Angle ) >= 360 ) and ( CargoCarrierHeading + Angle - 360 ) or ( CargoCarrierHeading + Angle ) @@ -709,25 +709,6 @@ function CARGO_UNIT:onenterBoarding( From, Event, To, CargoCarrier, NearRadius, Points[#Points+1] = PointStartVec2:RoutePointGround( Speed ) Points[#Points+1] = CargoDeployPointVec2:RoutePointGround( Speed ) - - -- I need to do this mess, otherwise the units will stop boarding at a point in time... - -- This is a DCS bug that i am handling in this way. - do - local CargoBooardPointVec2 = CargoDeployPointVec2:GetRandomPointVec2InRadius(NearRadius,0) - Points[#Points+1] = CargoBooardPointVec2:RoutePointGround( Speed ) - end - do - local CargoBooardPointVec2 = CargoDeployPointVec2:GetRandomPointVec2InRadius(NearRadius,0) - Points[#Points+1] = CargoBooardPointVec2:RoutePointGround( Speed ) - end - do - local CargoBooardPointVec2 = CargoDeployPointVec2:GetRandomPointVec2InRadius(NearRadius,0) - Points[#Points+1] = CargoBooardPointVec2:RoutePointGround( Speed ) - end - do - local CargoBooardPointVec2 = CargoDeployPointVec2:GetRandomPointVec2InRadius(NearRadius,0) - Points[#Points+1] = CargoBooardPointVec2:RoutePointGround( Speed ) - end local TaskRoute = self.CargoObject:TaskRoute( Points ) self.CargoObject:SetTask( TaskRoute, 2 )