mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-10 05:40:34 +00:00
some fixes and cosmetic changes
This commit is contained in:
parent
d9a3533438
commit
5b605c1271
8 changed files with 34 additions and 23 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue