mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Move viggen tot check down to pydcs waypoint only.
This commit is contained in:
parent
fb312236a2
commit
103f18191d
@ -1210,12 +1210,13 @@ class PydcsWaypointBuilder:
|
|||||||
waypoint.alt_type = self.waypoint.alt_type
|
waypoint.alt_type = self.waypoint.alt_type
|
||||||
waypoint.name = String(self.waypoint.name)
|
waypoint.name = String(self.waypoint.name)
|
||||||
tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint)
|
tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint)
|
||||||
if tot is not None and not self._viggen_client_tot():
|
if tot is not None:
|
||||||
self.set_waypoint_tot(waypoint, tot)
|
self.set_waypoint_tot(waypoint, tot)
|
||||||
return waypoint
|
return waypoint
|
||||||
|
|
||||||
def set_waypoint_tot(self, waypoint: MovingPoint, tot: timedelta) -> None:
|
def set_waypoint_tot(self, waypoint: MovingPoint, tot: timedelta) -> None:
|
||||||
self.waypoint.tot = tot
|
self.waypoint.tot = tot
|
||||||
|
if not self._viggen_client_tot():
|
||||||
waypoint.ETA = int(tot.total_seconds())
|
waypoint.ETA = int(tot.total_seconds())
|
||||||
waypoint.ETA_locked = True
|
waypoint.ETA_locked = True
|
||||||
waypoint.speed_locked = False
|
waypoint.speed_locked = False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user