mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Handle map reset when the game is loaded/unloaded.
https://github.com/dcs-liberation/dcs_liberation/issues/2039 Partial fix for https://github.com/dcs-liberation/dcs_liberation/issues/2045 (now works in the new map, old one not fixed yet).
This commit is contained in:
@@ -36,7 +36,7 @@ def waypoints_for_flight(flight: Flight) -> list[FlightWaypointJs]:
|
||||
|
||||
@router.get("/{flight_id}", response_model=list[FlightWaypointJs])
|
||||
def all_waypoints_for_flight(
|
||||
flight_id: UUID, game: Game = Depends(GameContext.get)
|
||||
flight_id: UUID, game: Game = Depends(GameContext.require)
|
||||
) -> list[FlightWaypointJs]:
|
||||
return waypoints_for_flight(game.db.flights.get(flight_id))
|
||||
|
||||
@@ -46,7 +46,7 @@ def set_position(
|
||||
flight_id: UUID,
|
||||
waypoint_idx: int,
|
||||
position: LeafletPoint,
|
||||
game: Game = Depends(GameContext.get),
|
||||
game: Game = Depends(GameContext.require),
|
||||
) -> None:
|
||||
from game.server import EventStream
|
||||
|
||||
|
||||
Reference in New Issue
Block a user