chore(component): use CCharacterComponent::GetSectionsRecord in more places

This commit is contained in:
fallenoak 2025-10-28 15:36:56 -05:00
parent ecc98d4738
commit f5aa37368a
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -444,15 +444,7 @@ void CCharacterComponent::RenderPrepHA(CCharacterComponent* component) {
} }
void CCharacterComponent::RenderPrepHL(CCharacterComponent* component) { void CCharacterComponent::RenderPrepHL(CCharacterComponent* component) {
auto sectionsRec = ComponentGetSectionsRecord( auto sectionsRec = component->GetSectionsRecord(VARIATION_SKIN, 0, component->m_data.skinColorID, nullptr);
CCharacterComponent::s_chrVarArray,
component->m_data.raceID,
component->m_data.sexID,
VARIATION_SKIN,
0,
component->m_data.skinColorID,
nullptr
);
// Skin texture // Skin texture
@ -482,15 +474,7 @@ void CCharacterComponent::RenderPrepHL(CCharacterComponent* component) {
} }
void CCharacterComponent::RenderPrepHU(CCharacterComponent* component) { void CCharacterComponent::RenderPrepHU(CCharacterComponent* component) {
auto sectionsRec = ComponentGetSectionsRecord( auto sectionsRec = component->GetSectionsRecord(VARIATION_SKIN, 0, component->m_data.skinColorID, nullptr);
CCharacterComponent::s_chrVarArray,
component->m_data.raceID,
component->m_data.sexID,
VARIATION_SKIN,
0,
component->m_data.skinColorID,
nullptr
);
// Skin texture // Skin texture
@ -1063,15 +1047,7 @@ void CCharacterComponent::SetSkinColor(int32_t skinColorID, bool a3, bool a4, co
0 0
); );
auto sectionsRec = ComponentGetSectionsRecord( auto sectionsRec = this->GetSectionsRecord(VARIATION_SKIN, 0, skinColorID, nullptr);
CCharacterComponent::s_chrVarArray,
this->m_data.raceID,
this->m_data.sexID,
VARIATION_SKIN,
0,
skinColorID,
nullptr
);
if (skinColorID < numColors && sectionsRec && !(sectionsRec->m_flags & 0x8)) { if (skinColorID < numColors && sectionsRec && !(sectionsRec->m_flags & 0x8)) {
auto underwearRec = this->GetSectionsRecord(VARIATION_UNDERWEAR, 0, skinColorID, nullptr); auto underwearRec = this->GetSectionsRecord(VARIATION_UNDERWEAR, 0, skinColorID, nullptr);