From dd310b48d4df46a158ceae589948e1d6aff2b0b0 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Wed, 8 Feb 2017 15:04:27 +0100 Subject: [PATCH] Fix for CAS, stopping when one plane crashed... --- Moose Development/Moose/AI/AI_Patrol.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/AI/AI_Patrol.lua b/Moose Development/Moose/AI/AI_Patrol.lua index 58b6fc030..693c99a03 100644 --- a/Moose Development/Moose/AI/AI_Patrol.lua +++ b/Moose Development/Moose/AI/AI_Patrol.lua @@ -405,9 +405,9 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE. - self:AddTransition( "*", "Eject", "Ejected" ) + self:AddTransition( "*", "Eject", "*" ) self:AddTransition( "*", "Crash", "Crashed" ) - self:AddTransition( "*", "PilotDead", "PilotDead" ) + self:AddTransition( "*", "PilotDead", "*" ) return self end @@ -865,7 +865,10 @@ end function AI_PATROL_ZONE:OnCrash( EventData ) if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then - self:__Crash( 1, EventData ) + self:E( self.Controllable:GetUnits() ) + if #self.Controllable:GetUnits() == 1 then + self:__Crash( 1, EventData ) + end end end