feat(component): implement CCharacterComponent::ReplaceExtraSkinTexture

This commit is contained in:
fallenoak 2025-10-28 16:30:02 -05:00
parent 0fce98aabc
commit 7cc8da4ac1
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -866,7 +866,31 @@ void CCharacterComponent::RenderPrepSections() {
} }
void CCharacterComponent::ReplaceExtraSkinTexture(const char* a2) { void CCharacterComponent::ReplaceExtraSkinTexture(const char* a2) {
// TODO if (!ComponentValidateBase(
CCharacterComponent::s_chrVarArray,
this->m_data.raceID,
this->m_data.sexID,
VARIATION_SKIN,
0,
this->m_data.hairColorID
)) {
return;
}
auto sectionsRec = this->GetSectionsRecord(VARIATION_SKIN, 0, this->m_data.skinColorID, nullptr);
if (!*sectionsRec->m_textureName[1]) {
return;
}
SStrCopy(s_pathEnd, sectionsRec->m_textureName[1]);
auto extraSkinTexture = CCharacterComponent::CreateTexture(s_path, &s_status);
if (extraSkinTexture) {
this->m_data.model->ReplaceTexture(8, extraSkinTexture);
HandleClose(extraSkinTexture);
}
} }
void CCharacterComponent::ReplaceHairTexture(int32_t hairStyleID, const char* a3) { void CCharacterComponent::ReplaceHairTexture(int32_t hairStyleID, const char* a3) {