mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Fix CAS commit range display.
CAS commits around the target, not its flight plan.
This commit is contained in:
parent
0594e1148e
commit
40aa7734e1
@ -11,7 +11,6 @@ from dcs.vehicles import vehicle_map
|
|||||||
from shapely.geometry import LineString, Point as ShapelyPoint, Polygon, MultiPolygon
|
from shapely.geometry import LineString, Point as ShapelyPoint, Polygon, MultiPolygon
|
||||||
|
|
||||||
from game import Game, db
|
from game import Game, db
|
||||||
from game.factions.faction import Faction
|
|
||||||
from game.navmesh import NavMesh
|
from game.navmesh import NavMesh
|
||||||
from game.profiling import logged_duration
|
from game.profiling import logged_duration
|
||||||
from game.theater import (
|
from game.theater import (
|
||||||
@ -27,7 +26,7 @@ from game.transfers import MultiGroupTransport, TransportMap
|
|||||||
from game.utils import meters, nautical_miles
|
from game.utils import meters, nautical_miles
|
||||||
from gen.ato import AirTaskingOrder
|
from gen.ato import AirTaskingOrder
|
||||||
from gen.flights.flight import Flight, FlightWaypoint, FlightWaypointType
|
from gen.flights.flight import Flight, FlightWaypoint, FlightWaypointType
|
||||||
from gen.flights.flightplan import FlightPlan, PatrollingFlightPlan
|
from gen.flights.flightplan import FlightPlan, PatrollingFlightPlan, CasFlightPlan
|
||||||
from qt_ui.dialogs import Dialog
|
from qt_ui.dialogs import Dialog
|
||||||
from qt_ui.models import GameModel, AtoModel
|
from qt_ui.models import GameModel, AtoModel
|
||||||
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
||||||
@ -554,13 +553,19 @@ class FlightJs(QObject):
|
|||||||
return []
|
return []
|
||||||
start = self.flight.flight_plan.patrol_start
|
start = self.flight.flight_plan.patrol_start
|
||||||
end = self.flight.flight_plan.patrol_end
|
end = self.flight.flight_plan.patrol_end
|
||||||
line = LineString(
|
if isinstance(self.flight.flight_plan, CasFlightPlan):
|
||||||
[
|
center = self.flight.flight_plan.target.position
|
||||||
ShapelyPoint(start.x, start.y),
|
commit_center = ShapelyPoint(center.x, center.y)
|
||||||
ShapelyPoint(end.x, end.y),
|
else:
|
||||||
]
|
commit_center = LineString(
|
||||||
|
[
|
||||||
|
ShapelyPoint(start.x, start.y),
|
||||||
|
ShapelyPoint(end.x, end.y),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
bubble = commit_center.buffer(
|
||||||
|
self.flight.flight_plan.engagement_distance.meters
|
||||||
)
|
)
|
||||||
bubble = line.buffer(self.flight.flight_plan.engagement_distance.meters)
|
|
||||||
return shapely_poly_to_leaflet_points(bubble, self.theater)
|
return shapely_poly_to_leaflet_points(bubble, self.theater)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user