mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Lock waypoint speed if ETA is 0 & avoid negative ETAs
This commit is contained in:
parent
10aee31c7d
commit
7d314f8ee4
@ -86,9 +86,9 @@ class PydcsWaypointBuilder:
|
||||
def set_waypoint_tot(self, waypoint: MovingPoint, tot: datetime) -> None:
|
||||
self.waypoint.tot = tot
|
||||
if not self._viggen_client_tot():
|
||||
waypoint.ETA = int((tot - self.now).total_seconds())
|
||||
waypoint.ETA = max(0, int((tot - self.now).total_seconds()))
|
||||
waypoint.ETA_locked = True
|
||||
waypoint.speed_locked = False
|
||||
waypoint.speed_locked = waypoint.ETA == 0
|
||||
|
||||
def _viggen_client_tot(self) -> bool:
|
||||
"""Viggen player aircraft consider any waypoint with a TOT set to be a target ("M") waypoint.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user