mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(component): implement CCharacterComponent::ReplaceExtraSkinTexture
This commit is contained in:
parent
0fce98aabc
commit
7cc8da4ac1
@ -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) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user