summaryrefslogtreecommitdiffstats
path: root/src/Camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Camera.cpp')
-rw-r--r--src/Camera.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Camera.cpp b/src/Camera.cpp
index d20ef5bb..d7ee398b 100644
--- a/src/Camera.cpp
+++ b/src/Camera.cpp
@@ -1254,7 +1254,8 @@ CCam::FixCamWhenObscuredByVehicle(const CVector &TargetCoors)
Source.z += HeightFixerCarsObscuring;
}
-bool CCam::Using3rdPersonMouseCam()
+bool
+CCam::Using3rdPersonMouseCam()
{
return CCamera::m_bUseMouse3rdPerson &&
(Mode == MODE_FOLLOWPED ||
@@ -1263,6 +1264,16 @@ bool CCam::Using3rdPersonMouseCam()
Mode != MODE_TOPDOWN1 && this->CamTargetEntity == FindPlayerPed());
}
+bool
+CCam::GetWeaponFirstPersonOn()
+{
+ CEntity *target = this->CamTargetEntity;
+ if (target && target->IsPed())
+ return ((CPed*)target)->GetWeapon()->m_bAddRotOffset;
+
+ return false;
+}
+
STARTPATCHES
InjectHook(0x42C760, &CCamera::IsSphereVisible, PATCH_JUMP);
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);