summaryrefslogtreecommitdiffstats
path: root/src/core/Cam.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-19 16:38:10 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-19 16:38:10 +0200
commit9e65eb34ec834de082154ee7559cd1c418f02ae6 (patch)
treec0c12ec094feb67e7ad98c5e8d48440b37035421 /src/core/Cam.cpp
parentmissing ifded (diff)
downloadre3-9e65eb34ec834de082154ee7559cd1c418f02ae6.tar
re3-9e65eb34ec834de082154ee7559cd1c418f02ae6.tar.gz
re3-9e65eb34ec834de082154ee7559cd1c418f02ae6.tar.bz2
re3-9e65eb34ec834de082154ee7559cd1c418f02ae6.tar.lz
re3-9e65eb34ec834de082154ee7559cd1c418f02ae6.tar.xz
re3-9e65eb34ec834de082154ee7559cd1c418f02ae6.tar.zst
re3-9e65eb34ec834de082154ee7559cd1c418f02ae6.zip
Diffstat (limited to '')
-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 07dc2051..505f838f 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;