diff --git a/changelog.md b/changelog.md index 38ec02db..33ca6919 100644 --- a/changelog.md +++ b/changelog.md @@ -34,6 +34,7 @@ Saves from 2.3 are not compatible with 2.4. * **[Factions]** Removed the F-111 unit from the NATO desert storm faction. (Recruiting it would cause crashes in DCS, since it is not a valid unit) * **[Units]** Fixed SPG_Stryker_M1128_MGS not being in db * **[Mission Generator]** Empty navy groups will no longer be generated +* **[Mission Generator]** Fixed BAI, SEAD, and DEAD flights ocassionally being assigned the wrong targets. * **[Flight Planner]** Fixed not being able to plan packages against opfor carriers * **[UI]** Repaired SAMs no longer show as dead. * **[UI]** Fixed not being able to manage a disbanded site after disbanding and closing the base menu. diff --git a/gen/aircraft.py b/gen/aircraft.py index 5e7cd879..788b969d 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -1478,10 +1478,7 @@ class BaiIngressBuilder(PydcsWaypointBuilder): target_group = self.package.target if isinstance(target_group, TheaterGroundObject): - # Match search is used due to TheaterGroundObject.name not matching - # the Mission group name because of SkyNet prefixes. - tgroup = self.mission.find_group(target_group.group_name, - search="match") + tgroup = self.mission.find_group(target_group.group_name) if tgroup is not None: task = AttackGroup(tgroup.id, weapon_type=WeaponType.Auto) task.params["attackQtyLimit"] = False @@ -1531,10 +1528,7 @@ class DeadIngressBuilder(PydcsWaypointBuilder): target_group = self.package.target if isinstance(target_group, TheaterGroundObject): - # Match search is used due to TheaterGroundObject.name not matching - # the Mission group name because of SkyNet prefixes. - tgroup = self.mission.find_group(target_group.group_name, - search="match") + tgroup = self.mission.find_group(target_group.group_name) if tgroup is not None: task = AttackGroup(tgroup.id, weapon_type=WeaponType.Guided) task.params["expend"] = "All" @@ -1597,10 +1591,7 @@ class SeadIngressBuilder(PydcsWaypointBuilder): target_group = self.package.target if isinstance(target_group, TheaterGroundObject): - # Match search is used due to TheaterGroundObject.name not matching - # the Mission group name because of SkyNet prefixes. - tgroup = self.mission.find_group(target_group.group_name, - search="match") + tgroup = self.mission.find_group(target_group.group_name) if tgroup is not None: waypoint.add_task(EngageTargetsInZone( position=tgroup.position,