From d82ac8f35515bd02caa1054441262708fab3e94d Mon Sep 17 00:00:00 2001 From: RndName Date: Mon, 14 Nov 2022 17:41:12 +0100 Subject: [PATCH] Fix IADS Network update for basic mode the iads update_network method would recreate a basic iads network as advanced network by range. This small change now checks for advanced mode before calculating connetions. --- game/theater/iadsnetwork/iadsnetwork.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/game/theater/iadsnetwork/iadsnetwork.py b/game/theater/iadsnetwork/iadsnetwork.py index 170989ae..dc3c7e44 100644 --- a/game/theater/iadsnetwork/iadsnetwork.py +++ b/game/theater/iadsnetwork/iadsnetwork.py @@ -171,16 +171,17 @@ class IadsNetwork: # the ground object is not participating to the IADS Network return - # Create the connections to the secondary nodes - if self.iads_config: - # If iads_config was defined and campaign designer added a config for the - # given primary node generate the connections from the config. - # If the primary node was not defined in the iads_config it will be added - # without any connections - self._add_connections_from_config(node) - else: - # Otherwise calculate the connections by range - self._calculate_connections_by_range(node) + if self.advanced_iads: + # Create the connections to the secondary nodes + if self.iads_config: + # If iads_config was defined and campaign designer added a config for + # the given primary node generate the connections from the config. If + # the primary node was not defined in the iads_config it will be added + # without any connections + self._add_connections_from_config(node) + else: + # Otherwise calculate the connections by range + self._calculate_connections_by_range(node) events.update_iads_node(node)