summaryrefslogtreecommitdiffstats
path: root/src/peds/PlayerPed.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-12-20 19:53:06 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-12-20 19:53:06 +0100
commitca4602d7888bdf3caefb493c947243b041e6566a (patch)
tree9e32a6435a723895fc73b46758971b96397f82d6 /src/peds/PlayerPed.cpp
parentmain.cpp mostly checked against ps2 now (diff)
downloadre3-ca4602d7888bdf3caefb493c947243b041e6566a.tar
re3-ca4602d7888bdf3caefb493c947243b041e6566a.tar.gz
re3-ca4602d7888bdf3caefb493c947243b041e6566a.tar.bz2
re3-ca4602d7888bdf3caefb493c947243b041e6566a.tar.lz
re3-ca4602d7888bdf3caefb493c947243b041e6566a.tar.xz
re3-ca4602d7888bdf3caefb493c947243b041e6566a.tar.zst
re3-ca4602d7888bdf3caefb493c947243b041e6566a.zip
Diffstat (limited to 'src/peds/PlayerPed.cpp')
-rw-r--r--src/peds/PlayerPed.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 74db3055..5ac2c110 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -1331,7 +1331,9 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
#ifdef FREE_CAM
static int8 changedHeadingRate = 0;
+ static int8 pointedGun = 0;
if (changedHeadingRate == 2) changedHeadingRate = 1;
+ if (pointedGun == 2) pointedGun = 1;
// Rotate player/arm when shooting. We don't have auto-rotation anymore
if (CCamera::m_bUseMouse3rdPerson && CCamera::bFreeCam &&
@@ -1349,7 +1351,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
SetWeaponLockOnTarget(nil);
bIsPointingGunAt = false; // to not stop after attack
}
-
+ pointedGun = 2;
SetLookFlag(limitedCam, true);
SetAimFlag(limitedCam);
SetLookTimer(INT32_MAX); // removing this makes head move for real, but I experinced some bugs.
@@ -1373,8 +1375,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
m_fRotationCur += (limitedRotDest - m_fRotationCur) / 2;
}
}
- } else if (CAN_AIM_WITH_ARM && m_nPedState != PED_ATTACK)
- ClearPointGunAt();
+ }
}
#undef CAN_AIM_WITH_ARM
}
@@ -1382,6 +1383,10 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
changedHeadingRate = 0;
RestoreHeadingRate();
}
+ if (pointedGun == 1 && m_nPedState != PED_ATTACK) {
+ pointedGun = 0;
+ ClearPointGunAt();
+ }
#endif
if (padUsed->GetTarget() && m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT && !TheCamera.Using1stPersonWeaponMode() && weaponInfo->m_bCanAim) {