forked from dcs-liberation/dcs_liberation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix save issues after aborting mission.
When the mission is aborted the pending mission is still in the event list, which is part of the game option. That event has a reference to the operation, which in turn contains all the mission generator objects. Two of these objects are the radio/TACAN allocators, which use a generator to track the next free channel. Generators cannot be picked, so because these are transitively part of the game object the game cannot be saved. Aside from the briefing generator, none of those objects are actually needed outside the generation function itself, so just make them locals instead. This probably needs a larger refactor at some point. It doesn't look like we need so many calls into the operation type (it has an initialize, a prepare, and a generate, and it doesn't seem to need anything but the last one). The only reason breifinggen needs to remain a part of the class is because the briefing title and description are filled in from the derived class, where title and description should probably be overridden properties instead. I'm also not sure if we need to make the event list a part of game at all, and also don't think that the mission needs to be one of these events.
- Loading branch information
Showing
1 changed file
with
52 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters