Fixed issue in 2.1.1, targets not engaged when flying from parking spot.

This commit is contained in:
FlightControl_Master
2017-07-29 19:08:10 +02:00
parent ea8af14df5
commit 3ec783b0e4
4 changed files with 26 additions and 15 deletions

View File

@@ -361,6 +361,7 @@ function AI_A2A_PATROL:onafterRoute( AIGroup, From, Event, To )
true
)
PatrolRoute[#PatrolRoute+1] = ToPatrolRoutePoint
PatrolRoute[#PatrolRoute+1] = ToPatrolRoutePoint
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
@@ -369,7 +370,7 @@ function AI_A2A_PATROL:onafterRoute( AIGroup, From, Event, To )
local Tasks = {}
Tasks[#Tasks+1] = AIGroup:TaskFunction( 1, 1, "AI_A2A_PATROL.PatrolRoute" )
PatrolRoute[1].task = AIGroup:TaskCombo( Tasks )
PatrolRoute[#PatrolRoute].task = AIGroup:TaskCombo( Tasks )
--- Do a trick, link the NewPatrolRoute function of the PATROLGROUP object to the AIControllable in a temporary variable ...
AIGroup:SetState( AIGroup, "AI_A2A_PATROL", self )