From 92cc1cf3af5c5454eddd464e42c495d3739a1cce Mon Sep 17 00:00:00 2001 From: _AG Date: Sat, 15 Jun 2019 01:34:19 +0200 Subject: New updates for Hud.cpp and more. --- src/Camera.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/Camera.cpp') 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); -- cgit v1.2.3