mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix helicopters oscillating due to over-speeding
This commit is contained in:
parent
1157d264ee
commit
270301958a
@ -19,6 +19,7 @@
|
||||
* **[Payloads]** Added/Updated (missing) payloads
|
||||
* **[Aircraft Tasking]** Revised aircraft tasking, filtering out incompatible tasks for several aircraft
|
||||
* **[Data]** Corrected the class of the USS Samuel Chase from Logistics to LandingShip, in order to prevent it being spawned as part of AAA sites.
|
||||
* **[Mission Generation]** Helicopters oscillating due to over-speeding
|
||||
|
||||
# Retribution v1.2.1 (hotfix)
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ class GroundSpeed:
|
||||
# as it can at sea level. This probably isn't great assumption, but
|
||||
# might. be sufficient given the wiggle room. We can come up with
|
||||
# another heuristic if needed.
|
||||
cruise_mach = max_speed.mach() * 0.85
|
||||
cruise_mach = max_speed.mach() * (0.65 if flight.is_helo else 0.85)
|
||||
return mach(cruise_mach, altitude)
|
||||
|
||||
|
||||
|
||||
@ -292,9 +292,9 @@ class AircraftType(UnitType[Type[FlyingType]]):
|
||||
)
|
||||
else:
|
||||
# Slow like warbirds or helicopters
|
||||
# Use whichever is slowest - mach 0.35 or 70% of max speed
|
||||
logging.debug(f"{self.name} max_speed * 0.7 is {max_speed * 0.7}")
|
||||
return min(Speed.from_mach(0.35, altitude), max_speed * 0.7)
|
||||
# Use whichever is slowest - mach 0.35 or 50% of max speed
|
||||
logging.debug(f"{self.name} max_speed * 0.5 is {max_speed * 0.5}")
|
||||
return min(Speed.from_mach(0.35, altitude), max_speed * 0.5)
|
||||
|
||||
def alloc_flight_radio(self, radio_registry: RadioRegistry) -> RadioFrequency:
|
||||
from game.radio.radios import ChannelInUseError, kHz
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user