summaryrefslogtreecommitdiffstats
path: root/src/Camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Camera.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Camera.cpp b/src/Camera.cpp
index 6054f1fc..ebe08f09 100644
--- a/src/Camera.cpp
+++ b/src/Camera.cpp
@@ -14,8 +14,7 @@
const float DefaultFOV = 80.0f; // actually 70.0f
CCamera &TheCamera = *(CCamera*)0x6FACF8;
-
-WRAPPER Bool CCam::Using3rdPersonMouseCam() { EAXJMP(0x457460); }
+Bool &CCamera::m_bUseMouse3rdPerson = *(Bool *)0x5F03D8;
WRAPPER void CCamera::DrawBordersForWideScreen(void) { EAXJMP(0x46B430); }
@@ -1250,6 +1249,14 @@ CCam::FixCamWhenObscuredByVehicle(const CVector &TargetCoors)
Source.z += HeightFixerCarsObscuring;
}
+bool CCam::Using3rdPersonMouseCam() {
+ return CCamera::m_bUseMouse3rdPerson &&
+ (Mode == MODE_FOLLOWPED ||
+ TheCamera.m_bPlayerIsInGarage &&
+ FindPlayerPed() && FindPlayerPed()->m_nPedState != PED_DRIVING &&
+ Mode != MODE_TOPDOWN1 && this->CamTargetEntity == FindPlayerPed());
+}
+
STARTPATCHES
InjectHook(0x42C760, &CCamera::IsSphereVisible, PATCH_JUMP);
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);