From 4048a2da19fa0866e945b5c6a4bb87bb18951396 Mon Sep 17 00:00:00 2001 From: Peter Ledbrook Date: Sun, 9 Jun 2019 17:05:20 +0100 Subject: [PATCH] Fix carrying out soldier multiple times (#557) The problem was that the game was setting the `bBodyRecovered` flag to true and then never clearing it again. So you could carry a soldier out once, but never again on any future missions. This fix simply clears the flag at the beginning of tactical play. --- CHANGELOG.md | 1 + .../Src/XComGame/Classes/XComGameState_Unit.uc | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d9a0980c..1cc1b9e18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -171,6 +171,7 @@ All notable changes to Vanilla 'War Of The Chosen' Behaviour will be documented their damage with psi flyovers (Psi Bomb, mod abilities) (#326) - Fix `X2AbilityToHitCalc_StandardAim` discarding unfavorable (for XCOM) changes to hit results from effects (#426) +- Allow soldiers to be carried out from multiple missions in a campaign (#557) ## Miscellaneous diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Unit.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Unit.uc index 3bae26c41..1e8cdd011 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Unit.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Unit.uc @@ -2292,6 +2292,14 @@ function OnBeginTacticalPlay(XComGameState NewGameState) } bRequiresVisibilityUpdate = true; + + // Start Issue #557 + // + // Reset the body recovered flag. A unit that was previously carried to evac while KO'd/bleeding + // out will have this flag set, and this flag prevents units from being carried. If this unit + // gets KO'd again, they won't be able to be picked up if this flag is still set. + bBodyRecovered = false; + // End Issue #557 } function ApplyFirstTimeStatModifiers()