summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-03-31 04:54:19 +0200
committereray orçunus <erayorcunus@gmail.com>2020-03-31 05:05:49 +0200
commit5e2fe749bd7620522168c9cd3dc469f70ac49e5a (patch)
treed87db4ec81411477066901fd30c67f79d153c801 /src/peds/Ped.cpp
parentMerge pull request #366 from Nick007J/master (diff)
downloadre3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.gz
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.bz2
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.lz
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.xz
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.tar.zst
re3-5e2fe749bd7620522168c9cd3dc469f70ac49e5a.zip
Diffstat (limited to 'src/peds/Ped.cpp')
-rw-r--r--src/peds/Ped.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index f43feae5..264fa669 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -59,6 +59,10 @@
#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f)
+#ifdef FREE_CAM
+extern bool bFreeMouseCam;
+#endif
+
CPed *gapTempPedList[50];
uint16 gnNumTempPedList;
@@ -807,6 +811,10 @@ CPed::IsPedInControl(void)
bool
CPed::CanStrafeOrMouseControl(void)
{
+#ifdef FREE_CAM
+ if (bFreeMouseCam)
+ return false;
+#endif
return m_nPedState == PED_NONE || m_nPedState == PED_IDLE || m_nPedState == PED_FLEE_POS || m_nPedState == PED_FLEE_ENTITY ||
m_nPedState == PED_ATTACK || m_nPedState == PED_FIGHT || m_nPedState == PED_AIM_GUN || m_nPedState == PED_JUMP;
}
@@ -6984,7 +6992,11 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg)
#endif
) {
+#ifdef FREE_CAM
+ if (TheCamera.Cams[0].Using3rdPersonMouseCam() && !bFreeMouseCam) {
+#else
if (TheCamera.Cams[0].Using3rdPersonMouseCam()) {
+#endif
float fpsAngle = ped->WorkOutHeadingForMovingFirstPerson(ped->m_fRotationCur);
ped->m_vecMoveSpeed.x = -velocityFromAnim * Sin(fpsAngle);
ped->m_vecMoveSpeed.y = velocityFromAnim * Cos(fpsAngle);