Skip to content

Commit

Permalink
Fix muscle_fat
Browse files Browse the repository at this point in the history
  • Loading branch information
user-grinch committed Jan 3, 2024
1 parent 0ff411b commit 22c36db
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/features/weapon/bloodremap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ void BloodRemapFeature::Process(RwFrame* frame, CWeapon *pWeapon) {

if (!data.m_Textures[name].m_bInit) {
Initialize(frame, pWeapon);
CWeaponInfo* pWeaponInfo = CWeaponInfo::GetWeaponInfo(pWeapon->m_eWeaponType, FindPlayerPed()->GetWeaponSkill(pWeapon->m_eWeaponType));
if (!pWeaponInfo) return;

CWeaponModelInfo* pWeaponModelInfo = static_cast<CWeaponModelInfo*>(CModelInfo::GetModelInfo(pWeaponInfo->m_nModelId1));
if (!pWeaponModelInfo) return;

RpClumpForAllAtomics(pWeaponModelInfo->m_pRwClump, [](RpAtomic *atomic, void *data) {
if (atomic->geometry) {
RpGeometryForAllMaterials(atomic->geometry, [](RpMaterial *material, void *data) {
WepData *pData = reinterpret_cast<WepData*>(data);
material->texture = pData->m_Textures[pData->m_CurNode].m_pFrames[0];
return material;
}, data);
}
return atomic;
}, &data);

data.m_Textures[name].m_bInit = true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/features/weapon/bodystate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void BodyStateFeature::ProcessZen(RwFrame* frame, CWeapon *pWeapon) {
if (bodyState != data.prevBodyState) {
Util::HideAllChilds(frame);
if (isFat && isMuscle) {
Util::ShowChildWithName(frame, "fat_muscle");
Util::ShowChildWithName(frame, "muscle_fat");
}
else if (isFat) {
Util::ShowChildWithName(frame, isPlus? "fat+" : "fat");
Expand Down

0 comments on commit 22c36db

Please sign in to comment.