summaryrefslogtreecommitdiffstats
path: root/src/core/Cam.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-26 23:54:48 +0200
committeraap <aap@papnet.eu>2020-04-26 23:54:48 +0200
commita069aa57dba36603b44ae282765fd8352ddd3a3d (patch)
treec487cfb3053bced222fda2fa1fcf45cb501f5242 /src/core/Cam.cpp
parentlibrw update (diff)
parentMerge pull request #489 from Nick007J/master (diff)
downloadre3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar
re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.gz
re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.bz2
re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.lz
re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.xz
re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.zst
re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.zip
Diffstat (limited to 'src/core/Cam.cpp')
-rw-r--r--src/core/Cam.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 5cf1c8f3..801652cb 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -2545,11 +2545,13 @@ CCam::Process_M16_1stPerson(const CVector &CameraTarget, float, float, float)
ResetStatics = false;
}
+#ifndef GTA3_1_1_PATCH
((CPed*)CamTargetEntity)->m_pedIK.GetComponentPosition(&HeadPos, PED_HEAD);
Source = HeadPos;
Source.z += 0.1f;
Source.x -= 0.19f*Cos(m_fInitialPlayerOrientation);
Source.y -= 0.19f*Sin(m_fInitialPlayerOrientation);
+#endif
// Look around
bool UseMouse = false;
@@ -2578,6 +2580,17 @@ CCam::Process_M16_1stPerson(const CVector &CameraTarget, float, float, float)
if(Alpha > DEGTORAD(60.0f)) Alpha = DEGTORAD(60.0f);
if(Alpha < -DEGTORAD(89.5f)) Alpha = -DEGTORAD(89.5f);
+#ifdef GTA3_1_1_PATCH
+ HeadPos.x = 0.0f;
+ HeadPos.y = 0.0f;
+ HeadPos.z = 0.0f;
+ ((CPed*)CamTargetEntity)->m_pedIK.GetComponentPosition(&HeadPos, PED_HEAD);
+ Source = HeadPos;
+ Source.z += 0.1f;
+ Source.x -= 0.19f * Cos(m_fInitialPlayerOrientation);
+ Source.y -= 0.19f * Sin(m_fInitialPlayerOrientation);
+#endif
+
TargetCoors.x = 3.0f * Cos(Alpha) * Cos(Beta) + Source.x;
TargetCoors.y = 3.0f * Cos(Alpha) * Sin(Beta) + Source.y;
TargetCoors.z = 3.0f * Sin(Alpha) + Source.z;