From c716ba16b3156ceed20608edb9bd6130a58cfee2 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Sat, 24 Aug 2019 22:28:44 +0200 Subject: [PATCH] - Bugfix when enemy plane has crashed, AttackerDetection is not existing anymore. --- Moose Development/Moose/AI/AI_A2G_Dispatcher.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua index b9552e00b..c8effaeee 100644 --- a/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua @@ -4292,7 +4292,7 @@ do -- AI_A2G_DISPATCHER for DefenseQueueID, DefenseQueueItem in pairs( self.DefenseQueue ) do local DefenseQueueItem = DefenseQueueItem -- #AI_A2G_DISPATCHER.DefenseQueueItem - if DefenseQueueItem.AttackerDetection.Index == DetectedItem.Index then + if DefenseQueueItem.AttackerDetection and DefenseQueueItem.AttackerDetection.Index and DefenseQueueItem.AttackerDetection.Index == DetectedItem.Index then DefenseTotal = DefenseTotal + 1 end end