diff --git a/game/server/flights/models.py b/game/server/flights/models.py index cb337603..bd965c51 100644 --- a/game/server/flights/models.py +++ b/game/server/flights/models.py @@ -6,6 +6,7 @@ from uuid import UUID from pydantic import BaseModel from game.ato.flightstate import InFlight +from game.ato.flightstate.killed import Killed from game.server.leaflet import LeafletPoint from game.server.waypoints.models import FlightWaypointJs from game.server.waypoints.routes import waypoints_for_flight @@ -29,10 +30,13 @@ class FlightJs(BaseModel): def for_flight(flight: Flight, with_waypoints: bool) -> FlightJs: # Don't provide a location for aircraft that aren't in the air. Later we can # expand the model to include the state data for the UI so that it can make its - # own decisions about whether or not to draw the aircraft, but for now we'll - # filter here. + # own decisions about whether to draw the aircraft, but for now we'll filter + # here. + # + # We also draw dead aircraft so the player has some feedback about what's being + # lost. position = None - if isinstance(flight.state, InFlight): + if isinstance(flight.state, InFlight) or isinstance(flight.state, Killed): position = flight.position().latlng() waypoints = None if with_waypoints: