mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Check if RecceGroup is alive before iterating...
This commit is contained in:
parent
6959f50777
commit
f628e720a9
@ -2453,6 +2453,7 @@ do -- DETECTION_AREAS
|
||||
local DistanceRecce = 1000000000 -- Units are not further than 1000000 km away from an area :-)
|
||||
|
||||
for RecceGroupName, RecceGroup in pairs( self.DetectionSetGroup:GetSet() ) do
|
||||
if RecceGroup and RecceGroup:IsAlive() then
|
||||
for RecceUnit, RecceUnit in pairs( RecceGroup:GetUnits() ) do
|
||||
if RecceUnit:IsActive() then
|
||||
local RecceUnitCoord = RecceUnit:GetCoordinate()
|
||||
@ -2464,6 +2465,7 @@ do -- DETECTION_AREAS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
DetectedItem.NearestFAC = NearestRecce
|
||||
DetectedItem.DistanceRecce = DistanceRecce
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user