diff --git a/mods/cnc/maps/nod08a/nod08a.lua b/mods/cnc/maps/nod08a/nod08a.lua index 569e80a0b9..0230e77f88 100644 --- a/mods/cnc/maps/nod08a/nod08a.lua +++ b/mods/cnc/maps/nod08a/nod08a.lua @@ -50,12 +50,18 @@ getAirstrikeTarget = function() local target = list[DateTime.GameTime % #list + 1].CenterPosition - if searches < 6 then + local sams = Map.ActorsInCircle(target, WDist.New(8 * 1024), function(actor) + return actor.Type == "sam" end) + + if #sams == 0 then + searches = 0 + return target + elseif searches < 6 then searches = searches + 1 return getAirstrikeTarget() else searches = 0 - return target + return nil end end diff --git a/mods/cnc/maps/nod08b/nod08b.lua b/mods/cnc/maps/nod08b/nod08b.lua index 74fb1b8745..8b280dd5db 100644 --- a/mods/cnc/maps/nod08b/nod08b.lua +++ b/mods/cnc/maps/nod08b/nod08b.lua @@ -51,12 +51,18 @@ getAirstrikeTarget = function() local target = list[DateTime.GameTime % #list + 1].CenterPosition - if searches < 6 then + local sams = Map.ActorsInCircle(target, WDist.New(8 * 1024), function(actor) + return actor.Type == "sam" end) + + if #sams == 0 then + searches = 0 + return target + elseif searches < 6 then searches = searches + 1 return getAirstrikeTarget() else searches = 0 - return target + return nil end end