summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp8
-rw-r--r--src/peds/PlayerPed.cpp16
2 files changed, 8 insertions, 16 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 264fa669..54816b1c 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -59,10 +59,6 @@
#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f)
-#ifdef FREE_CAM
-extern bool bFreeMouseCam;
-#endif
-
CPed *gapTempPedList[50];
uint16 gnNumTempPedList;
@@ -812,7 +808,7 @@ bool
CPed::CanStrafeOrMouseControl(void)
{
#ifdef FREE_CAM
- if (bFreeMouseCam)
+ if (CCamera::bFreeCam)
return false;
#endif
return m_nPedState == PED_NONE || m_nPedState == PED_IDLE || m_nPedState == PED_FLEE_POS || m_nPedState == PED_FLEE_ENTITY ||
@@ -6993,7 +6989,7 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg)
) {
#ifdef FREE_CAM
- if (TheCamera.Cams[0].Using3rdPersonMouseCam() && !bFreeMouseCam) {
+ if (TheCamera.Cams[0].Using3rdPersonMouseCam() && !CCamera::bFreeCam) {
#else
if (TheCamera.Cams[0].Using3rdPersonMouseCam()) {
#endif
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