From 2f97d948b872c9b1ba94e64ac4f399ef2c28fa8c Mon Sep 17 00:00:00 2001 From: Raffson Date: Mon, 4 Jul 2022 16:02:22 +0200 Subject: [PATCH] Hotfix IADS (#2296) fix for #2292 --- game/theater/iadsnetwork/iadsnetwork.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/game/theater/iadsnetwork/iadsnetwork.py b/game/theater/iadsnetwork/iadsnetwork.py index 759a8690..0dd3f7e6 100644 --- a/game/theater/iadsnetwork/iadsnetwork.py +++ b/game/theater/iadsnetwork/iadsnetwork.py @@ -120,6 +120,13 @@ class IadsNetwork: # Skip culled ground objects continue + # HOTFIX! Skip non-static nodes with no alive units left + # Delete this as soon as PRs #2285, #2286 & #2287 are merged + unit_count = len(node.group.units) + is_static = node.group.units[0].is_static if unit_count > 0 else False + if node.group.alive_units == 0 and not is_static: + continue + # SkynetNode.from_group(node.group) may raise an exception # (originating from SkynetNode.dcs_name_for_group) # but if it does, we want to know because it's supposed to be impossible afaict