Skip to content

Commit 9706481

Browse files
authored
Fix #2046: Bone rotating bugs (#2088)
1 parent 0b65b39 commit 9706481

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Client/game_sa/CEntitySA.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,11 @@ bool CEntitySA::SetBoneRotation(eBone boneId, float yaw, float pitch, float roll
678678
RtQuat* boneOrientation = &frameData->m_pIFrame->orientation;
679679
RwV3d angles = {yaw, roll, pitch};
680680
BoneNode_cSAInterface::EulerToQuat(&angles, boneOrientation);
681+
CEntitySAInterface* theInterface = GetInterface();
682+
if (theInterface)
683+
{
684+
theInterface->bDontUpdateHierarchy = false;
685+
}
681686
return true;
682687
}
683688
}

Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,15 @@ bool CLuaPedDefs::UpdateElementRpHAnim(lua_State* const luaVM, CClientEntity* en
10401040
if (theEntity)
10411041
{
10421042
theEntity->UpdateRpHAnim();
1043+
1044+
if (theEntity->GetModelIndex() == 0) // CJ skin
1045+
{
1046+
RpClump* clump = theEntity->GetRpClump();
1047+
if (clump)
1048+
{
1049+
((void(__cdecl*)(RpClump*))0x5DF560)(clump); // CPed::ShoulderBoneRotation
1050+
}
1051+
}
10431052
return true;
10441053
}
10451054
return false;

0 commit comments

Comments
 (0)