summaryrefslogtreecommitdiffstats
path: root/src/peds/PlayerPed.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-19 16:39:19 +0200
committereray orçunus <erayorcunus@gmail.com>2020-05-19 16:43:16 +0200
commita6972714b7ce5b7834e55a3b23acf28cf51a78ff (patch)
tree8d74d2f68371cdfca7b6ef9336502bf6ebae254e /src/peds/PlayerPed.cpp
parentMerge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff)
downloadre3-a6972714b7ce5b7834e55a3b23acf28cf51a78ff.tar
re3-a6972714b7ce5b7834e55a3b23acf28cf51a78ff.tar.gz
re3-a6972714b7ce5b7834e55a3b23acf28cf51a78ff.tar.bz2
re3-a6972714b7ce5b7834e55a3b23acf28cf51a78ff.tar.lz
re3-a6972714b7ce5b7834e55a3b23acf28cf51a78ff.tar.xz
re3-a6972714b7ce5b7834e55a3b23acf28cf51a78ff.tar.zst
re3-a6972714b7ce5b7834e55a3b23acf28cf51a78ff.zip
Diffstat (limited to '')
-rw-r--r--src/peds/PlayerPed.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 69a6d211..9f972882 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -1088,6 +1088,7 @@ CPlayerPed::ProcessAnimGroups(void)
}
}
+// TODO(Miami): Hella TODO
void
CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
{
@@ -1099,8 +1100,9 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
}
if (!m_pFire) {
if (GetWeapon()->m_eWeaponType == WEAPONTYPE_ROCKETLAUNCHER ||
- GetWeapon()->m_eWeaponType == WEAPONTYPE_SNIPERRIFLE || GetWeapon()->m_eWeaponType == WEAPONTYPE_M16) {
- if (padUsed->TargetJustDown()) {
+ GetWeapon()->m_eWeaponType == WEAPONTYPE_SNIPERRIFLE || GetWeapon()->m_eWeaponType == WEAPONTYPE_M16 ||
+ GetWeapon()->m_eWeaponType == WEAPONTYPE_AK47) {
+ if (padUsed->TargetJustDown() || TheCamera.m_bJustJumpedOutOf1stPersonBecauseOfTarget) {
SetStoredState();
m_nPedState = PED_SNIPER_MODE;
#ifdef FREE_CAM
@@ -1134,7 +1136,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
else
#endif
SetAttack(m_pPointGunAt);
- } else if (m_currentWeapon != WEAPONTYPE_UNARMED) {
+ } else {
if (m_nPedState == PED_ATTACK) {
if (padUsed->WeaponJustDown()) {
m_bHaveTargetSelected = true;
@@ -1145,12 +1147,19 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
m_fAttackButtonCounter = 0.0f;
m_bHaveTargetSelected = false;
}
- SetAttack(nil);
- } else if (padUsed->WeaponJustDown()) {
- if (m_fMoveSpeed < 1.0f)
- StartFightAttack(padUsed->GetWeapon());
- else
- SetAttack(nil);
+ if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && GetWeapon()->m_eWeaponType != WEAPONTYPE_BRASSKNUCKLE &&
+ !weaponInfo->m_bFightMode) {
+
+ if (GetWeapon()->m_eWeaponType != WEAPONTYPE_DETONATOR && GetWeapon()->m_eWeaponType != WEAPONTYPE_DETONATOR_GRENADE ||
+ padUsed->WeaponJustDown())
+
+ SetAttack(nil);
+ } else if (padUsed->WeaponJustDown()) {
+ if (m_fMoveSpeed < 1.0f || m_nPedState == PED_FIGHT)
+ StartFightAttack(padUsed->GetWeapon());
+ else
+ SetAttack(nil);
+ }
}
}
} else {
@@ -1185,7 +1194,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
#endif
} else {
m_fRotationDest = limitedCam;
- m_headingRate = 50.0f;
+ m_headingRate = 12.5f;
// Anim. fix for shotgun, ak47 and m16 (we must finish rot. it quickly)
if (weaponInfo->m_bCanAim && padUsed->WeaponJustDown()) {