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 From 0add48abf589330ae6fe11e304c111d9f52ce009 Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 17 Jun 2019 00:16:38 +0200 Subject: got rid of upper case types --- src/Camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Camera.cpp') diff --git a/src/Camera.cpp b/src/Camera.cpp index ebe08f09..7bd4aac9 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -14,7 +14,7 @@ const float DefaultFOV = 80.0f; // actually 70.0f CCamera &TheCamera = *(CCamera*)0x6FACF8; -Bool &CCamera::m_bUseMouse3rdPerson = *(Bool *)0x5F03D8; +bool &CCamera::m_bUseMouse3rdPerson = *(bool *)0x5F03D8; WRAPPER void CCamera::DrawBordersForWideScreen(void) { EAXJMP(0x46B430); } -- cgit v1.2.3 From f299e9ebd51cc26d30a40ee5edff7ddf2968b2ec Mon Sep 17 00:00:00 2001 From: _AG Date: Mon, 17 Jun 2019 02:10:55 +0200 Subject: Update HUD stuff, bug and format fixes. Added environment variables to premake5.lua. Update README.md --- src/Camera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Camera.cpp') diff --git a/src/Camera.cpp b/src/Camera.cpp index 7bd4aac9..1b4b1db6 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -1249,7 +1249,8 @@ CCam::FixCamWhenObscuredByVehicle(const CVector &TargetCoors) Source.z += HeightFixerCarsObscuring; } -bool CCam::Using3rdPersonMouseCam() { +bool CCam::Using3rdPersonMouseCam() +{ return CCamera::m_bUseMouse3rdPerson && (Mode == MODE_FOLLOWPED || TheCamera.m_bPlayerIsInGarage && -- cgit v1.2.3