diff options
author | _AG <gennariarmando@outlook.com> | 2019-06-15 01:34:19 +0200 |
---|---|---|
committer | _AG <gennariarmando@outlook.com> | 2019-06-15 01:34:36 +0200 |
commit | 92cc1cf3af5c5454eddd464e42c495d3739a1cce (patch) | |
tree | 1de213d2ed114443e28a72e486af0c173b8b3b1a /src/Camera.cpp | |
parent | Merge pull request #15 from ShFil119/patch-1 (diff) | |
download | re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.gz re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.bz2 re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.lz re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.xz re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.zst re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.zip |
Diffstat (limited to 'src/Camera.cpp')
-rw-r--r-- | src/Camera.cpp | 11 |
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); |