summaryrefslogtreecommitdiff
path: root/src/peds/PedIK.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-10 17:09:57 +0200
committeraap <aap@papnet.eu>2020-05-10 17:09:57 +0200
commit5b605c127144ab805581f62015ef3742c1d4a64e (patch)
treef86a422d080f58afcaa5eac7cf2b378bdf306142 /src/peds/PedIK.cpp
parentd9a3533438ea0bf3ace712facfd01c9462390130 (diff)
some fixes and cosmetic changes
Diffstat (limited to 'src/peds/PedIK.cpp')
-rw-r--r--src/peds/PedIK.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/peds/PedIK.cpp b/src/peds/PedIK.cpp
index 3db3dc0f..c9428cb3 100644
--- a/src/peds/PedIK.cpp
+++ b/src/peds/PedIK.cpp
@@ -33,13 +33,18 @@ CPedIK::CPedIK(CPed *ped)
#ifdef PED_SKIN
inline RwMatrix*
-GetComponentMatrix(CPed *ped, int32 node)
+GetBoneMatrix(CPed *ped, int32 bone)
{
RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(ped->GetClump());
- int idx = RpHAnimIDGetIndex(hier, ped->m_pFrames[node]->nodeID);
+ int idx = RpHAnimIDGetIndex(hier, bone);
RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier);
return &mats[idx];
}
+inline RwMatrix*
+GetComponentMatrix(CPed *ped, int32 node)
+{
+ return GetBoneMatrix(ped, ped->m_pFrames[node]->nodeID);
+}
#endif
void
@@ -245,7 +250,7 @@ CPedIK::LookInDirection(float phi, float theta)
}
// parent of head is torso
- RwMatrix worldMat = *GetComponentMatrix(m_ped, BONE_torso);
+ RwMatrix worldMat = *GetBoneMatrix(m_ped, BONE_torso);
ExtractYawAndPitchWorld(&worldMat, &yaw, &pitch);
LimbMoveStatus headStatus = MoveLimb(m_headOrient, CGeneral::LimitRadianAngle(phi - yaw),