Fixed DesignateReport being generated for a group that does not exist.

This commit is contained in:
FlightControl_Master 2017-12-03 08:24:26 +01:00
parent a2fa2c4fa2
commit 901f460907

View File

@ -690,8 +690,10 @@ do -- DESIGNATE
self.Designating[DesignateIndex] = nil self.Designating[DesignateIndex] = nil
self.AttackSet:ForEachGroup( self.AttackSet:ForEachGroup(
function( AttackGroup ) function( AttackGroup )
local DetectionText = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " ) if AttackGroup:IsAlive() then
self.CC:GetPositionable():MessageToGroup( "Targets out of LOS\n" .. DetectionText, 10, AttackGroup, self.DesignateName ) local DetectionText = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " )
self.CC:GetPositionable():MessageToGroup( "Targets out of LOS\n" .. DetectionText, 10, AttackGroup, self.DesignateName )
end
end end
) )
else else