Frank, pushing a fix for APCs, please test. Helicopters will be adapted and planes too later.

This commit is contained in:
FlightControl
2018-09-18 13:08:02 +02:00
parent e0c8d55a5d
commit 02aff87b9f
2 changed files with 40 additions and 8 deletions

View File

@@ -166,6 +166,37 @@ function AI_CARGO:IsRelocating()
end
--- On after Pickup event.
-- @param #AI_CARGO self
-- @param Wrapper.Group#GROUP APC
-- @param From
-- @param Event
-- @param To
-- @param Core.Point#COORDINATE Coordinate of the pickup point.
-- @param #number Speed Speed in km/h to drive to the pickup coordinate. Default is 50% of max possible speed the unit can go.
-- @param Core.Zone#ZONE PickupZone (optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.
function AI_CARGO:onafterPickup( APC, From, Event, To, Coordinate, Speed, PickupZone )
self.Transporting = false
self.Relocating = true
end
--- On after Deploy event.
-- @param #AI_CARGO self
-- @param Wrapper.Group#GROUP APC
-- @param From
-- @param Event
-- @param To
-- @param Core.Point#COORDINATE Coordinate Deploy place.
-- @param #number Speed Speed in km/h to drive to the depoly coordinate. Default is 50% of max possible speed the unit can go.
function AI_CARGO:onafterDeploy( APC, From, Event, To, Coordinate, Speed, DeployZone )
self.Relocating = false
self.Transporting = true
end
--- On before Load event.
-- @param #AI_CARGO self
@@ -322,6 +353,9 @@ function AI_CARGO:onafterPickedUp( Carrier, From, Event, To, PickupZone )
self:F( { Carrier, From, Event, To } )
Carrier:RouteResume()
self.Relocating = false
self.Transporting = true
end
@@ -434,5 +468,7 @@ function AI_CARGO:onafterDeployed( Carrier, From, Event, To, DeployZone )
self:__Guard( 0.1 )
self.Transporting = false
end