Hotfix IADS (#2296)

fix for #2292
This commit is contained in:
Raffson 2022-07-04 16:02:22 +02:00 committed by GitHub
parent cc4237d076
commit 2f97d948b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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