mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix game break when capturing factory.
We need to recompute the transit networks after a capture *before* processing transfers. Otherwise units deployed that turn will not be able to find their destination. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1070
This commit is contained in:
parent
5adcfbd7bd
commit
99dc91dcb4
@ -282,6 +282,11 @@ class Game:
|
||||
)
|
||||
self.turn += 1
|
||||
|
||||
# Need to recompute before transfers and deliveries to account for captures.
|
||||
# This happens in in initialize_turn as well, because cheating doesn't advance a
|
||||
# turn but can capture bases so we need to recompute there as well.
|
||||
self.compute_transit_networks()
|
||||
|
||||
# Must happen *before* unit deliveries are handled, or else new units will spawn
|
||||
# one hop ahead. ControlPoint.process_turn handles unit deliveries.
|
||||
self.transfers.perform_transfers()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user