Determine player vs enemy early in debriefing.

This way the results of committing the debriefing can't alter the view
of the debriefing. It looks like it was probably that case that
debriefing information displays (but not the committed results) would be
incorrect after a base capture because the results might be shown after
the results were committed.

Maybe fixes https://github.com/Khopa/dcs_liberation/issues/513
This commit is contained in:
Dan Albert
2020-12-06 16:29:53 -08:00
parent 84b8613cf5
commit edfaaacd04
4 changed files with 66 additions and 40 deletions

View File

@@ -116,8 +116,8 @@ class Event:
@staticmethod
def commit_air_losses(debriefing: Debriefing) -> None:
for loss in debriefing.air_losses.losses:
aircraft = loss.flight.unit_type
cp = loss.flight.departure
aircraft = loss.unit_type
cp = loss.departure
available = cp.base.total_units_of_type(aircraft)
if available <= 0:
logging.error(