Fixing problem with AI cargo helicopter pickup

This commit is contained in:
FlightControl
2018-09-09 18:44:04 +02:00
parent 492563d6f3
commit 5c5b9df470
2 changed files with 12 additions and 6 deletions

View File

@@ -254,7 +254,6 @@ function AI_CARGO_HELICOPTER:onafterLanded( Helicopter, From, Event, To )
--self:Load( Helicopter:GetPointVec2() )
self:Load( self.PickupZone )
self.RoutePickup = false
self.Relocating = true
end
end
@@ -262,8 +261,6 @@ function AI_CARGO_HELICOPTER:onafterLanded( Helicopter, From, Event, To )
if Helicopter:GetHeight( true ) <= 5 and Helicopter:GetVelocityKMH() < 10 then
self:Unload( self.DeployZone )
self.RouteDeploy = false
self.Transporting = false
self.Relocating = false
end
end
@@ -410,6 +407,7 @@ function AI_CARGO_HELICOPTER:onafterPickedUp( Helicopter, From, Event, To, Picku
self:F( { Helicopter, From, Event, To } )
if Helicopter and Helicopter:IsAlive() then
self.Relocating = false
self.Transporting = true
end
end
@@ -437,6 +435,8 @@ function AI_CARGO_HELICOPTER:onafterDeployed( Helicopter, From, Event, To, Deplo
end, Helicopter
)
self.Transporting = false
end
--- On after Pickup event.
@@ -500,7 +500,9 @@ function AI_CARGO_HELICOPTER:onafterPickup( Helicopter, From, Event, To, Coordin
Helicopter:Route( Route, 1 )
self.PickupZone = PickupZone
self.Transporting = true
self.Relocating = true
self.Transporting = false
end
end
@@ -576,7 +578,9 @@ function AI_CARGO_HELICOPTER:onafterDeploy( Helicopter, From, Event, To, Coordin
-- Now route the helicopter
Helicopter:Route( Route, 0 )
self.Relocating = false
self.Transporting = true
end
end