Carrier group threat rings move with the carrier.

Previously, the individual units in the group were moved, but the ground_unit object was not.

Fixes: Khopa/dcs_liberation#735
This commit is contained in:
Simon Clark 2021-01-06 18:58:20 +00:00
parent 81b0ea1eef
commit 042be9da6d
2 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Saves from 2.3 are not compatible with 2.4.
## Fixes
* **[Economy]** Pending unit orders at captured bases will be refunded.
* **[UI]** Carrier group SAM threat rings now move with the carrier.
* **[Units]** J-11A is no longer spawned with empty loadout.
# 2.3.3

View File

@ -561,6 +561,8 @@ class ControlPoint(MissionTarget, ABC):
# Move the linked unit groups
for ground_object in self.ground_objects:
if isinstance(ground_object, GenericCarrierGroundObject):
ground_object.position.x = ground_object.position.x + delta.x
ground_object.position.y = ground_object.position.y + delta.y
for group in ground_object.groups:
for u in group.units:
u.position.x = u.position.x + delta.x