mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Issue 2778 (#3374)
This PR addresses #2778 by: - Updating the logic for how redeployment of front line units works to handle "out of order" captures e.g. for control points A->B->C, where A starts friendly and B, C starts as enemy-controlled, the player captures C first, typically using air assault. - Updating the cheat logic so that capturing CPs using cheats behaves the same way as capturing CPs normally.
This commit is contained in:
@@ -16,6 +16,7 @@ from game import Game
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.config import RUNWAY_REPAIR_COST
|
||||
from game.server import EventStream
|
||||
from game.sim.missionresultsprocessor import MissionResultsProcessor
|
||||
from game.theater import (
|
||||
AMMO_DEPOT_FRONTLINE_UNIT_CONTRIBUTION,
|
||||
ControlPoint,
|
||||
@@ -156,6 +157,9 @@ class QBaseMenu2(QDialog):
|
||||
self.cp.capture(
|
||||
self.game_model.game, events, for_player=not self.cp.captured
|
||||
)
|
||||
# Redeploy frontline units, as if the CP capture was done in mission.
|
||||
results_processor = MissionResultsProcessor(self.game_model.game)
|
||||
results_processor.redeploy_units(self.cp)
|
||||
self.close()
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user