diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2019-06-17 12:37:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 12:37:59 +0200 |
commit | 0bb8bf9d1505792a0fd4f9872fd57fca8f197d13 (patch) | |
tree | cc2c85e0ccf486546de22074639d0e8fbe032f65 /src/Camera.cpp | |
parent | Merge pull request #7 from GTAmodding/master (diff) | |
parent | Merge pull request #20 from gennariarmando/master (diff) | |
download | re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.gz re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.bz2 re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.lz re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.xz re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.zst re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.zip |
Diffstat (limited to 'src/Camera.cpp')
-rw-r--r-- | src/Camera.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Camera.cpp b/src/Camera.cpp index 6054f1fc..1b4b1db6 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,15 @@ 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); |