diff --git a/game/ato/flightplans/waypointbuilder.py b/game/ato/flightplans/waypointbuilder.py index f1ddd38a..2a55f7d0 100644 --- a/game/ato/flightplans/waypointbuilder.py +++ b/game/ato/flightplans/waypointbuilder.py @@ -431,9 +431,12 @@ class WaypointBuilder: # Use the threat range as offset distance to avoid flying all the way to the SAM site assert self.flight.package.waypoints ingress = self.flight.package.waypoints.ingress + ingress2tgt_dist = ingress.distance_to_point(target.position) threat_range = 1.1 * max([x.threat_range for x in target.strike_targets]).meters hdg = target.position.heading_between_point(ingress) - hold = target.position.point_from_heading(hdg, threat_range) + hold = target.position.point_from_heading( + hdg, min(threat_range, ingress2tgt_dist * 0.95) + ) return FlightWaypoint( "SEAD Search",