mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix TOT not changing after abort
This commit is contained in:
parent
057f3fe53b
commit
94baaecf8c
@ -25,7 +25,7 @@ class Uninitialized(FlightState):
|
||||
|
||||
@property
|
||||
def is_waiting_for_start(self) -> bool:
|
||||
raise RuntimeError("Attempted to simulate flight that is not fully initialized")
|
||||
return True
|
||||
|
||||
def estimate_position(self) -> Point:
|
||||
raise RuntimeError("Attempted to simulate flight that is not fully initialized")
|
||||
|
||||
@ -178,7 +178,6 @@ class QTopPanel(QFrame):
|
||||
for flight in package.flights:
|
||||
if isinstance(flight.state, Uninitialized):
|
||||
flight.state.reinitialize(now)
|
||||
flight.state.reinitialize(now)
|
||||
if flight.state.is_waiting_for_start:
|
||||
startup = flight.flight_plan.startup_time()
|
||||
if startup < now:
|
||||
|
||||
@ -21,6 +21,7 @@ from PySide6.QtWidgets import (
|
||||
from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
|
||||
from game import Game
|
||||
from game.ato.flightstate import Uninitialized
|
||||
from game.debriefing import Debriefing
|
||||
from game.profiling import logged_duration
|
||||
from game.server import EventStream
|
||||
@ -241,7 +242,7 @@ class QWaitingForMissionResultWindow(QDialog):
|
||||
self.sim_controller.set_game(self.game)
|
||||
events = GameUpdateEvents()
|
||||
for _, f in self.game.db.flights.objects.items():
|
||||
f.state.reinitialize(self.game.conditions.start_time)
|
||||
f.state = Uninitialized(f, self.game.settings)
|
||||
events.update_flight(f)
|
||||
for cp in self.game.theater.controlpoints:
|
||||
cp.release_parking_slots()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user