mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #436 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
This commit is contained in:
commit
83dd39d318
@ -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 )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user