summaryrefslogtreecommitdiffstats
path: root/src/core/Cam.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-23 22:25:18 +0200
committeraap <aap@papnet.eu>2020-04-24 11:42:38 +0200
commitf03b4eec4c37eab75a5bd639279cfcc615105b01 (patch)
treec4be4fa57b16c61d45e8156a51dd07b11e049bba /src/core/Cam.cpp
parentMerge branch 'master' of github.com:gtamodding/re3 (diff)
downloadre3-f03b4eec4c37eab75a5bd639279cfcc615105b01.tar
re3-f03b4eec4c37eab75a5bd639279cfcc615105b01.tar.gz
re3-f03b4eec4c37eab75a5bd639279cfcc615105b01.tar.bz2
re3-f03b4eec4c37eab75a5bd639279cfcc615105b01.tar.lz
re3-f03b4eec4c37eab75a5bd639279cfcc615105b01.tar.xz
re3-f03b4eec4c37eab75a5bd639279cfcc615105b01.tar.zst
re3-f03b4eec4c37eab75a5bd639279cfcc615105b01.zip
Diffstat (limited to 'src/core/Cam.cpp')
-rw-r--r--src/core/Cam.cpp13
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;