mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Avoid recreating flight-plan when syncing package wpts
This commit is contained in:
parent
5e2f86de96
commit
98f0c93012
@ -102,8 +102,18 @@ def update_package_waypoints_if_primary_flight(
|
||||
wpts.initial = wpts.get_initial_point(
|
||||
waypoint.position, flight.package.target.position
|
||||
)
|
||||
else:
|
||||
return
|
||||
for f in flight.package.flights:
|
||||
if f is flight:
|
||||
continue
|
||||
f.recreate_flight_plan()
|
||||
events.update_flight(f)
|
||||
for wpt in f.flight_plan.iter_waypoints():
|
||||
if wpt.waypoint_type == waypoint.waypoint_type or (
|
||||
"INGRESS" in wpt.waypoint_type.name
|
||||
and "INGRESS" in waypoint.waypoint_type.name
|
||||
):
|
||||
wpt.position = waypoint.position.new_in_same_map(
|
||||
waypoint.position.x, waypoint.position.y
|
||||
)
|
||||
events.update_flight(f)
|
||||
break
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user