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

@@ -355,8 +355,6 @@ function AI_CARGO_APC._Pickup( APC, self, Coordinate, Speed, PickupZone )
if APC:IsAlive() then
self:Load( PickupZone )
self.Relocating = false
self.Transporting = true
end
end
@@ -367,8 +365,6 @@ function AI_CARGO_APC._Deploy( APC, self, Coordinate, DeployZone )
if APC:IsAlive() then
self:Unload( DeployZone )
self.Transporting = false
self.Relocating = false
end
end
@@ -405,8 +401,7 @@ function AI_CARGO_APC:onafterPickup( APC, From, Event, To, Coordinate, Speed, Pi
AI_CARGO_APC._Pickup( APC, self, Coordinate, Speed, PickupZone )
end
self.Relocating = true
self.Transporting = false
self:GetParent( self, AI_CARGO_APC ).onafterPickup( self, APC, From, Event, To, Coordinate, Speed, PickupZone )
end
end
@@ -438,13 +433,14 @@ function AI_CARGO_APC:onafterDeploy( APC, From, Event, To, Coordinate, Speed, De
APC:Route( Waypoints, 1 ) -- Move after a random seconds to the Route. See the Route method for details.
self.Relocating = false
self.Transporting = true
self:GetParent( self, AI_CARGO_APC ).onafterDeploy( self, APC, From, Event, To, Coordinate, Speed, DeployZone )
end
end
--- On after Home event.
-- @param #AI_CARGO_APC self
-- @param Wrapper.Group#GROUP APC