From b34b537a26888e71a61f96815d2afdacf485f332 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 28 Oct 2020 09:46:03 +0100 Subject: [PATCH] Update AI_Formation.lua - Issue #1358 --- Moose Development/Moose/AI/AI_Formation.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/AI/AI_Formation.lua b/Moose Development/Moose/AI/AI_Formation.lua index c1bfe5757..17c1b5345 100644 --- a/Moose Development/Moose/AI/AI_Formation.lua +++ b/Moose Development/Moose/AI/AI_Formation.lua @@ -184,11 +184,13 @@ function AI_FORMATION:New( FollowUnit, FollowGroupSet, FollowName, FollowBriefin self.FollowGroupSet:ForEachGroup( function( FollowGroup ) - self:E("Following") + --self:E("Following") FollowGroup:SetState( self, "Mode", self.__Enum.Mode.Formation ) end ) + self:SetFlightModeFormation() + self:SetFlightRandomization( 2 ) self:SetStartState( "None" ) @@ -997,7 +999,7 @@ function AI_FORMATION:SetFlightModeMission( FollowGroup ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission ) else - self.EscortGroupSet:ForSomeGroupAlive( + self.FollowGroupSet:ForSomeGroupAlive( --- @param Core.Group#GROUP EscortGroup function( FollowGroup ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) @@ -1021,7 +1023,7 @@ function AI_FORMATION:SetFlightModeAttack( FollowGroup ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack ) else - self.EscortGroupSet:ForSomeGroupAlive( + self.FollowGroupSet:ForSomeGroupAlive( --- @param Core.Group#GROUP EscortGroup function( FollowGroup ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) @@ -1045,7 +1047,7 @@ function AI_FORMATION:SetFlightModeFormation( FollowGroup ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation ) else - self.EscortGroupSet:ForSomeGroupAlive( + self.FollowGroupSet:ForSomeGroupAlive( --- @param Core.Group#GROUP EscortGroup function( FollowGroup ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )