From 72682e4db3b012df6ca575afaa56f1564d0fe5fd Mon Sep 17 00:00:00 2001 From: RndName Date: Fri, 13 May 2022 20:04:35 +0200 Subject: [PATCH] Remove special heading to conflict calculation for radars The special handling is not required anymore as we now rotate the whole TGO to head towards the conflict if the campaign designer has not defined any specific heading --- game/armedforces/forcegroup.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/game/armedforces/forcegroup.py b/game/armedforces/forcegroup.py index 267c7077..14701bd9 100644 --- a/game/armedforces/forcegroup.py +++ b/game/armedforces/forcegroup.py @@ -289,19 +289,13 @@ class ForceGroup: # Align heading to GroundObject defined by the campaign designer unit.position.heading + rotation, ) - if unit.unit_type is not None: - if unit.unit_type.dcs_unit_type in UNITS_WITH_RADAR: - # Head Radars towards the center of the conflict - unit.position.heading = ( - game.theater.heading_to_conflict_from(unit.position) - or unit.position.heading - ) - if ( - isinstance(unit.unit_type, GroundUnitType) - and unit.unit_type.reversed_heading - ): - # Reverse the heading of the unit - unit.position.heading = unit.position.heading.opposite + if ( + unit.unit_type is not None + and isinstance(unit.unit_type, GroundUnitType) + and unit.unit_type.reversed_heading + ): + # Reverse the heading of the unit + unit.position.heading = unit.position.heading.opposite # Rotate unit around the center to align the orientation of the group unit.position.rotate(ground_object.position, rotation)