Skip to content

Commit 55fb1fe

Browse files
authored
#689 HQ Bald Bug (#821)
1 parent ae55011 commit 55fb1fe

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

X2WOTCCommunityHighlander/Src/XComGame/Classes/XComHumanPawn.uc

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,26 +2124,31 @@ simulated function OnBodyPartLoaded(PawnContentRequest ContentRequest)
21242124
}
21252125

21262126
// Start Issue #219
2127-
// Note: Some of these functions may call each other (a suppressed helmet cannot affect the hairstyle)
21282127
// Use the currently loaded helmet and head to determine whether a
21292128
// hairstyle should be shown
2129+
2130+
// Start Issue #219: Replaced the calling each other with explicit mesh checks.
2131+
// Basically only makes a difference on the Avenger, where parts may be hidden but not "suppressed".
21302132
function bool SuppressHairstyle()
21312133
{
2132-
return (!SuppressHelmet() && HelmetContent != none && HelmetContent.FallbackHairIndex <= -1) || class'CHHelpers'.default.HeadSuppressesHair.Find(HeadContent.Name) > INDEX_NONE;
2134+
return (HelmetContent != none && m_kHelmetMC.SkeletalMesh != none && HelmetContent.FallbackHairIndex <= -1) ||
2135+
class'CHHelpers'.default.HeadSuppressesHair.Find(HeadContent.Name) > INDEX_NONE;
21332136
}
21342137

21352138
// Use the currently loaded helmet and head to determine whether a
21362139
// lower face prop should be shown
21372140
function bool SuppressLowerFaceProp()
21382141
{
2139-
return (!SuppressHelmet() && HelmetContent != none && HelmetContent.bHideLowerFacialProps) || class'CHHelpers'.default.HeadSuppressesLowerFaceProp.Find(HeadContent.Name) > INDEX_NONE;
2142+
return (HelmetContent != none && m_kHelmetMC.SkeletalMesh != none && HelmetContent.bHideLowerFacialProps) ||
2143+
class'CHHelpers'.default.HeadSuppressesLowerFaceProp.Find(HeadContent.Name) > INDEX_NONE;
21402144
}
21412145

21422146
// Use the currently loaded helmet and hat to determine whether an
21432147
// upper face prop should be shown
21442148
function bool SuppressUpperFaceProp()
21452149
{
2146-
return (!SuppressHelmet() && HelmetContent != none && HelmetContent.bHideUpperFacialProps) || class'CHHelpers'.default.HeadSuppressesUpperFaceProp.Find(HeadContent.Name) > INDEX_NONE;
2150+
return (HelmetContent != none && m_kHelmetMC.SkeletalMesh != none && HelmetContent.bHideUpperFacialProps) ||
2151+
class'CHHelpers'.default.HeadSuppressesUpperFaceProp.Find(HeadContent.Name) > INDEX_NONE;
21472152
}
21482153

21492154
// Use the currently loaded head to determine whether a
@@ -2157,8 +2162,8 @@ function bool SuppressHelmet()
21572162
// to determine whether facial hair should be shown
21582163
function bool SuppressBeard()
21592164
{
2160-
return (!SuppressHelmet() && HelmetContent != none && HelmetContent.bHideFacialHair) ||
2161-
(!SuppressLowerFaceProp() && LowerFacialContent != none && LowerFacialContent.bHideFacialHair) ||
2165+
return (HelmetContent != none && m_kHelmetMC.SkeletalMesh != none && HelmetContent.bHideFacialHair) ||
2166+
(LowerFacialContent != none && m_kLowerFacialMC.SkeletalMesh !=none && LowerFacialContent.bHideFacialHair) ||
21622167
class'CHHelpers'.default.HeadSuppressesBeard.Find(HeadContent.Name) > INDEX_NONE;
21632168
}
21642169
// End Issue #219
@@ -3000,4 +3005,4 @@ defaultproperties
30003005
{
30013006
m_iRequestKit=INDEX_NONE
30023007
PreviousVoiceSound=INDEX_NONE
3003-
}
3008+
}

0 commit comments

Comments
 (0)