summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-03-31 10:29:35 +0200
committerGitHub <noreply@github.com>2020-03-31 10:29:35 +0200
commita57d9b6797841db38f14b63e224da2d00d8f38fc (patch)
tree619bc010a0a290810fcc96b79b3a4071da1bb9cb /src/peds/Ped.cpp
parentMerge pull request #371 from Sergeanur/MoreLanguages (diff)
parentMouse free cam for peds&cars (under FREE_CAM) (diff)
downloadre3-a57d9b6797841db38f14b63e224da2d00d8f38fc.tar
re3-a57d9b6797841db38f14b63e224da2d00d8f38fc.tar.gz
re3-a57d9b6797841db38f14b63e224da2d00d8f38fc.tar.bz2
re3-a57d9b6797841db38f14b63e224da2d00d8f38fc.tar.lz
re3-a57d9b6797841db38f14b63e224da2d00d8f38fc.tar.xz
re3-a57d9b6797841db38f14b63e224da2d00d8f38fc.tar.zst
re3-a57d9b6797841db38f14b63e224da2d00d8f38fc.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);