diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index cb9aa539..00d7569a 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -63,7 +63,9 @@ from .frontline import FrontLine from .missiontarget import MissionTarget from .theatergroundobject import ( GenericCarrierGroundObject, + IadsGroundObject, TheaterGroundObject, + VehicleGroupGroundObject, ) from .theatergroup import TheaterUnit from ..ato.starttype import StartType @@ -828,18 +830,24 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC): self.retreat_ground_units(game) self.retreat_air_units(game) self.depopulate_uncapturable_tgos() - - # All the attached TGOs have either been depopulated or captured. Tell the UI to - # update their state. - for tgo in self.connected_objectives: - events.update_tgo(tgo) - self._coalition = new_coalition self.base.set_strength_to_minimum() self._clear_front_lines(events) self._create_missing_front_lines(events) events.update_control_point(self) + # All the attached TGOs have either been depopulated or captured. Tell the UI to + # update their state. Also update orientation and IADS state for specific tgos + for tgo in self.connected_objectives: + if isinstance(tgo, IadsGroundObject) or isinstance( + tgo, VehicleGroupGroundObject + ): + if isinstance(tgo, IadsGroundObject): + game.theater.iads_network.update_tgo(tgo) + conflict_heading = game.theater.heading_to_conflict_from(tgo.position) + tgo.rotate(conflict_heading or tgo.heading) + events.update_tgo(tgo) + @property def required_aircraft_start_type(self) -> Optional[StartType]: return None