This commit is contained in:
FlightControl_Master
2017-08-08 21:37:12 +02:00
parent 3dde62a550
commit e16e5d9a81
8 changed files with 28 additions and 50 deletions
+1 -7
View File
@@ -367,22 +367,16 @@ function AI_A2A_PATROL:onafterRoute( AIGroup, From, Event, To )
true
)
PatrolRoute[#PatrolRoute+1] = ToPatrolRoutePoint
PatrolRoute[#PatrolRoute+1] = ToPatrolRoutePoint
local Tasks = {}
Tasks[#Tasks+1] = AIGroup:TaskFunction( "AI_A2A_PATROL.PatrolRoute", self )
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 )
AIGroup:OptionROEReturnFire()
AIGroup:OptionROTPassiveDefense()
--- NOW ROUTE THE GROUP!
AIGroup:SetTask( AIGroup:TaskRoute( PatrolRoute ), 0.5 )
AIGroup:Route( PatrolRoute, 0.5 )
end
end