diff options
author | aap <aap@papnet.eu> | 2020-04-24 13:49:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 13:49:30 +0200 |
commit | 17dda21cca625d9c985dded2c3b80746eb937c01 (patch) | |
tree | c4be4fa57b16c61d45e8156a51dd07b11e049bba /src/core/Cam.cpp | |
parent | removed fix that made no sense (diff) | |
parent | implemented skinned peds, no cutscene hands yet (diff) | |
download | re3-17dda21cca625d9c985dded2c3b80746eb937c01.tar re3-17dda21cca625d9c985dded2c3b80746eb937c01.tar.gz re3-17dda21cca625d9c985dded2c3b80746eb937c01.tar.bz2 re3-17dda21cca625d9c985dded2c3b80746eb937c01.tar.lz re3-17dda21cca625d9c985dded2c3b80746eb937c01.tar.xz re3-17dda21cca625d9c985dded2c3b80746eb937c01.tar.zst re3-17dda21cca625d9c985dded2c3b80746eb937c01.zip |
Diffstat (limited to 'src/core/Cam.cpp')
-rw-r--r-- | src/core/Cam.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index f0a60093..5cf1c8f3 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -2776,17 +2776,20 @@ CCam::Process_1rstPersonPedOnPC(const CVector&, float TargetOrientation, float, if(CamTargetEntity->IsPed()){ // static bool FailedTestTwelveFramesAgo = false; // unused - RwV3d HeadPos = vecHeadCamOffset; + CVector HeadPos = vecHeadCamOffset; CVector TargetCoors; - // needs fix for SKINNING - RwFrame *frm = ((CPed*)CamTargetEntity)->GetNodeFrame(PED_HEAD); + ((CPed*)CamTargetEntity)->TransformToNode(HeadPos, PED_HEAD); + // This is done on PC, but checking for the clump frame is not necessary apparently +/* + RwFrame *frm = ((CPed*)CamTargetEntity)->m_pFrames[PED_HEAD]->frame; while(frm){ RwV3dTransformPoints(&HeadPos, &HeadPos, 1, RwFrameGetMatrix(frm)); frm = RwFrameGetParent(frm); if(frm == RpClumpGetFrame(CamTargetEntity->GetClump())) frm = nil; } +*/ if(ResetStatics){ Beta = TargetOrientation; @@ -2813,13 +2816,13 @@ CCam::Process_1rstPersonPedOnPC(const CVector&, float TargetOrientation, float, m_vecBufferedPlayerBodyOffset.z = TheCamera.m_fGaitSwayBuffer * m_vecBufferedPlayerBodyOffset.z + (1.0f-TheCamera.m_fGaitSwayBuffer) * HeadPos.z; - HeadPos = (CamTargetEntity->GetMatrix() * m_vecBufferedPlayerBodyOffset).toRwV3d(); + HeadPos = (CamTargetEntity->GetMatrix() * m_vecBufferedPlayerBodyOffset); }else{ float HeadDelta = (HeadPos - InitialHeadPos).Magnitude2D(); CVector Fwd = CamTargetEntity->GetForward(); Fwd.z = 0.0f; Fwd.Normalise(); - HeadPos = (HeadDelta*1.23f*Fwd + CamTargetEntity->GetPosition()).toRwV3d(); + HeadPos = (HeadDelta*1.23f*Fwd + CamTargetEntity->GetPosition()); HeadPos.z += 0.59f; } Source = HeadPos; |