Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDog86 authored and Iridar committed Nov 11, 2024
1 parent b55dda7 commit 3f2f9b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,8 @@ simulated function OnCategoryValueChange(int categoryIndex, int direction, optio
UpdatedUnitState.kAppearance.iArmorTintSecondary = WrapIndex(specificIndex, 0, XComHumanPawn(ActorPawn).NumPossibleArmorTints);
XComHumanPawn(ActorPawn).SetAppearance(UpdatedUnitState.kAppearance);
// Start Issue #380
/// HL-Docs: ref:Bugfixes; issue:380
/// Update cosmetic pawns when secondary armor color is changed as well as primary
CosmeticUnitPawn = XComPresentationLayerBase(Outer).GetUIPawnMgr().GetCosmeticPawn(eInvSlot_SecondaryWeapon, UpdatedUnitState.ObjectID);
if (CosmeticUnitPawn != none)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2309,15 +2309,16 @@ simulated function SpawnCosmeticUnitPawn(UIPawnMgr PawnMgr, EInventorySlot InvSl
return;
}

// Start Issue #380: Moved earlier because we want to SetAppearance() whether we create a new pawn or not
// Start Issue #380:
/// HL-Docs: ref:Bugfixes; issue:380
/// Ensure that the appearence of cosmetic unit pawns is updated properly, even when a new pawn is not created
UseAppearance = OwningUnit.kAppearance;
UseAppearance.iArmorTint = UseAppearance.iWeaponTint;
UseAppearance.iArmorTintSecondary = UseAppearance.iArmorTintSecondary;
UseAppearance.nmPatterns = UseAppearance.nmWeaponPattern;
// End Issue #380

CosmeticPawn = PawnMgr.GetCosmeticArchetypePawn(InvSlot, OwningUnit.ObjectID, bUsePhotoboothPawns);
if (CosmeticPawn != none && CosmeticPawn == ArchetypePawn)
// Start Issue #380
{
CosmeticPawn.SetAppearance(UseAppearance, true);
return;
Expand Down

0 comments on commit 3f2f9b2

Please sign in to comment.