mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Don't return available destinations when retreating aircraft if the runway is not operational (#3435)
Short circuits selecting control points to retreat aircraft to when the control point being captured has a damaged runway. Fixes #3434. I'm not sure how to test this locally though, so I have no idea if it works.
This commit is contained in:
@@ -764,6 +764,9 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC):
|
||||
def aircraft_retreat_destination(
|
||||
self, squadron: Squadron
|
||||
) -> Optional[ControlPoint]:
|
||||
if not self.runway_is_operational():
|
||||
return None
|
||||
|
||||
closest = ObjectiveDistanceCache.get_closest_airfields(self)
|
||||
max_retreat_distance = squadron.aircraft.max_mission_range
|
||||
# Skip the first airbase because that's the airbase we're retreating
|
||||
|
||||
Reference in New Issue
Block a user