summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-15 19:41:44 +0200
committeraap <aap@papnet.eu>2020-05-15 19:41:44 +0200
commit1fde2ba468ee88764620b8d01740e9504106c897 (patch)
tree4c4c0ab0610a65df50a0eb467ddb59eb6b154399 /src/peds/Ped.h
parentFix compilation (diff)
downloadre3-1fde2ba468ee88764620b8d01740e9504106c897.tar
re3-1fde2ba468ee88764620b8d01740e9504106c897.tar.gz
re3-1fde2ba468ee88764620b8d01740e9504106c897.tar.bz2
re3-1fde2ba468ee88764620b8d01740e9504106c897.tar.lz
re3-1fde2ba468ee88764620b8d01740e9504106c897.tar.xz
re3-1fde2ba468ee88764620b8d01740e9504106c897.tar.zst
re3-1fde2ba468ee88764620b8d01740e9504106c897.zip
Diffstat (limited to 'src/peds/Ped.h')
-rw-r--r--src/peds/Ped.h40
1 files changed, 10 insertions, 30 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index ccffc3cb..573b74c1 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -833,39 +833,19 @@ public:
// Using this to abstract nodes of skinned and non-skinned meshes
CVector GetNodePosition(int32 node)
{
-#ifdef PED_SKIN
- if(IsClumpSkinned(GetClump())){
- RwV3d pos = { 0.0f, 0.0f, 0.0f };
- RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump());
- int32 idx = RpHAnimIDGetIndex(hier, m_pFrames[node]->nodeID);
- RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier);
- // this is just stupid
- //RwV3dTransformPoints(&pos, &pos, 1, &mats[idx]);
- pos = mats[idx].pos;
- return pos;
- }else
-#endif
- {
- RwMatrix mat;
- CPedIK::GetWorldMatrix(m_pFrames[node]->frame, &mat);
- return mat.pos;
- }
+ RwV3d pos = { 0.0f, 0.0f, 0.0f };
+ RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump());
+ int32 idx = RpHAnimIDGetIndex(hier, m_pFrames[node]->nodeID);
+ RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier);
+ pos = mats[idx].pos;
+ return pos;
}
void TransformToNode(CVector &pos, int32 node)
{
-#ifdef PED_SKIN
- if(IsClumpSkinned(GetClump())){
- RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump());
- int32 idx = RpHAnimIDGetIndex(hier, m_pFrames[node]->nodeID);
- RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier);
- RwV3dTransformPoints((RwV3d*)&pos, (RwV3d*)&pos, 1, &mats[idx]);
- }else
-#endif
- {
- RwFrame *frame;
- for (frame = m_pFrames[node]->frame; frame; frame = RwFrameGetParent(frame))
- RwV3dTransformPoints((RwV3d*)&pos, (RwV3d*)&pos, 1, RwFrameGetMatrix(frame));
- }
+ RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump());
+ int32 idx = RpHAnimIDGetIndex(hier, m_pFrames[node]->nodeID);
+ RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier);
+ RwV3dTransformPoints((RwV3d*)&pos, (RwV3d*)&pos, 1, &mats[idx]);
}
// set by 0482:set_threat_reaction_range_multiplier opcode