mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Show the real front line bounds on the map.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1067.
This commit is contained in:
@@ -11,8 +11,7 @@ from game.server.flights.models import FlightJs
|
||||
from game.server.frontlines.models import FrontLineJs
|
||||
from game.server.iadsnetwork.models import IadsConnectionJs
|
||||
from game.server.leaflet import LeafletPoint
|
||||
from game.server.mapzones.models import ThreatZonesJs
|
||||
from game.server.mapzones.models import UnculledZoneJs
|
||||
from game.server.mapzones.models import ThreatZonesJs, UnculledZoneJs
|
||||
from game.server.navmesh.models import NavMeshJs
|
||||
from game.server.supplyroutes.models import SupplyRouteJs
|
||||
from game.server.tgos.models import TgoJs
|
||||
@@ -59,6 +58,7 @@ class GameUpdateEventsJs(BaseModel):
|
||||
updated_unculled_zones = []
|
||||
updated_iads = []
|
||||
updated_supply_routes = []
|
||||
updated_front_lines = []
|
||||
if game is not None:
|
||||
new_combats = [
|
||||
FrozenCombatJs.for_combat(c, game.theater) for c in events.new_combats
|
||||
@@ -82,6 +82,10 @@ class GameUpdateEventsJs(BaseModel):
|
||||
updated_supply_routes = SupplyRouteJs.all_in_game(game)
|
||||
for route in updated_supply_routes:
|
||||
route.points = []
|
||||
updated_front_lines = [
|
||||
FrontLineJs.for_front_line(game.theater, f)
|
||||
for f in events.updated_front_lines
|
||||
]
|
||||
|
||||
return GameUpdateEventsJs(
|
||||
updated_flight_positions={
|
||||
@@ -103,9 +107,7 @@ class GameUpdateEventsJs(BaseModel):
|
||||
deleted_flights=events.deleted_flights,
|
||||
selected_flight=events.selected_flight,
|
||||
deselected_flight=events.deselected_flight,
|
||||
updated_front_lines=[
|
||||
FrontLineJs.for_front_line(f) for f in events.updated_front_lines
|
||||
],
|
||||
updated_front_lines=updated_front_lines,
|
||||
deleted_front_lines=events.deleted_front_lines,
|
||||
updated_tgos=[TgoJs.for_tgo(tgo) for tgo in events.updated_tgos],
|
||||
updated_control_points=[
|
||||
|
||||
Reference in New Issue
Block a user