summaryrefslogtreecommitdiffstats
path: root/src/peds/PlayerPed.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-05 16:03:59 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-05 16:03:59 +0200
commit4fc2f9c359781fabe182fec88444ad540125fd40 (patch)
treeb068784c8e75aa87396a99f7399c88e90a150c59 /src/peds/PlayerPed.cpp
parentMerge remote-tracking branch 'origin/master' into MoreLanguages (diff)
parentfixed look behind bug (diff)
downloadre3-4fc2f9c359781fabe182fec88444ad540125fd40.tar
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.gz
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.bz2
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.lz
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.xz
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.zst
re3-4fc2f9c359781fabe182fec88444ad540125fd40.zip
Diffstat (limited to 'src/peds/PlayerPed.cpp')
-rw-r--r--src/peds/PlayerPed.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index cd2cac23..6dbf7687 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -18,10 +18,6 @@
#define PAD_MOVE_TO_GAME_WORLD_MOVE 60.0f
-#ifdef FREE_CAM
-extern bool bFreeMouseCam;
-#endif
-
CPlayerPed::~CPlayerPed()
{
delete m_pWanted;
@@ -693,7 +689,7 @@ CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed)
float padMoveInGameUnit = padMove / PAD_MOVE_TO_GAME_WORLD_MOVE;
if (padMoveInGameUnit > 0.0f) {
#ifdef FREE_CAM
- if (!bFreeMouseCam)
+ if (!CCamera::bFreeCam)
m_fRotationDest = CGeneral::LimitRadianAngle(TheCamera.Orientation);
else
m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown) - TheCamera.Orientation;
@@ -993,7 +989,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
SetStoredState();
m_nPedState = PED_SNIPER_MODE;
#ifdef FREE_CAM
- if (bFreeMouseCam && TheCamera.Cams[0].Using3rdPersonMouseCam()) {
+ if (CCamera::bFreeCam && TheCamera.Cams[0].Using3rdPersonMouseCam()) {
m_fRotationCur = CGeneral::LimitRadianAngle(-TheCamera.Orientation);
SetHeading(m_fRotationCur);
}
@@ -1018,7 +1014,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
if (m_nSelectedWepSlot == m_currentWeapon) {
if (m_pPointGunAt) {
#ifdef FREE_CAM
- if (bFreeMouseCam && weaponInfo->m_eWeaponFire == WEAPON_FIRE_MELEE && m_fMoveSpeed < 1.0f)
+ if (CCamera::bFreeCam && weaponInfo->m_eWeaponFire == WEAPON_FIRE_MELEE && m_fMoveSpeed < 1.0f)
StartFightAttack(padUsed->GetWeapon());
else
#endif
@@ -1052,7 +1048,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
#ifdef FREE_CAM
// Rotate player/arm when shooting. We don't have auto-rotation anymore
- if (CCamera::m_bUseMouse3rdPerson && bFreeMouseCam &&
+ if (CCamera::m_bUseMouse3rdPerson && CCamera::bFreeCam &&
m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT) {
// Weapons except throwable and melee ones
@@ -1103,7 +1099,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
// what??
if (!m_pPointGunAt
#ifdef FREE_CAM
- || (!bFreeMouseCam && CCamera::m_bUseMouse3rdPerson)
+ || (!CCamera::bFreeCam && CCamera::m_bUseMouse3rdPerson)
#else
|| CCamera::m_bUseMouse3rdPerson
#endif
@@ -1125,7 +1121,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
TheCamera.UpdateAimingCoors(m_pPointGunAt->GetPosition());
}
#ifdef FREE_CAM
- else if ((bFreeMouseCam && weaponInfo->m_eWeaponFire == WEAPON_FIRE_MELEE) || (weaponInfo->m_bCanAim && !CCamera::m_bUseMouse3rdPerson)) {
+ else if ((CCamera::bFreeCam && weaponInfo->m_eWeaponFire == WEAPON_FIRE_MELEE) || (weaponInfo->m_bCanAim && !CCamera::m_bUseMouse3rdPerson)) {
#else
else if (weaponInfo->m_bCanAim && !CCamera::m_bUseMouse3rdPerson) {
#endif