From a203379ff79ebb03ff48634546b0aa040d430630 Mon Sep 17 00:00:00 2001 From: Tedster59 Date: Thu, 22 Jun 2023 18:44:00 -0500 Subject: [PATCH 1/2] Update UIPawnMgr to address issue #1192 remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal --- .../Src/XComGame/Classes/UIPawnMgr.uc | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc index 3c3ee89bc..2e55aec2b 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc @@ -594,6 +594,10 @@ simulated function DestroyPawns(int StoreIdx, out array PawnStore) // Added variable for Issue #885 local int i; + // Start Issue #1192 - Add call to StopSounds to remove sound effects for destroyed pawns. + PawnStore[StoreIdx].Pawn.StopSounds(); + // End Issue #1192 + PawnStore[StoreIdx].Pawn.Destroy(); PawnStore[StoreIdx].Pawn = none; for ( idx = 0; idx < PawnStore[StoreIdx].Cosmetics.Length; ++idx ) @@ -637,6 +641,10 @@ simulated function ReleasePawnInternal(Actor referrer, int UnitRef, out array Date: Thu, 22 Jun 2023 18:44:00 -0500 Subject: [PATCH 2/2] Update UIPawnMgr to address issue #1192 remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal Revise cosmetic pawn removal to not assume inventory slot Now loops over all cosmetic pawns on the associated UnitState instead of attempting to remove a pawn from the secondary slot. remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal Remove code for cosmetic pawn issue remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal Revise cosmetic pawn removal to not assume inventory slot Now loops over all cosmetic pawns on the associated UnitState instead of attempting to remove a pawn from the secondary slot. remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal Update UIPawnMgr.uc --- .../Src/XComGame/Classes/UIPawnMgr.uc | 45 +++---------------- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc index 2e55aec2b..8e95fa396 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIPawnMgr.uc @@ -594,7 +594,10 @@ simulated function DestroyPawns(int StoreIdx, out array PawnStore) // Added variable for Issue #885 local int i; - // Start Issue #1192 - Add call to StopSounds to remove sound effects for destroyed pawns. + + // Start Issue #1192 + /// HL-Docs: ref:Bugfixes; issue:1192 + /// Add call to StopSounds to remove sound effects for destroyed pawns. PawnStore[StoreIdx].Pawn.StopSounds(); // End Issue #1192 @@ -641,10 +644,6 @@ simulated function ReleasePawnInternal(Actor referrer, int UnitRef, out array