summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorbigbossbro08 <bigbossbro08@gmail.com>2020-05-10 18:05:45 +0200
committerbigbossbro08 <bigbossbro08@gmail.com>2020-05-10 18:05:45 +0200
commitbd302ecca157982a2bfe83d6cfb3167418fd8bb3 (patch)
treeb9d849f3fc61246f0038e5bec53ef8f61b040b83 /src/peds
parentfixed few more typos (diff)
parentsome fixes and cosmetic changes (diff)
downloadre3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar
re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.gz
re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.bz2
re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.lz
re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.xz
re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.zst
re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.zip
Diffstat (limited to 'src/peds')
-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),