summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-08-20 21:59:50 +0300
committererorcun <erorcunerorcun@hotmail.com.tr>2021-08-20 21:59:50 +0300
commit80b7d52eebc988058c9787237fd39bea1f81ce26 (patch)
tree262818e5b995da3037fb9311f4c62f952b1fa7d0 /src
parent0256790e1c18826d383f8e1eec134b2c5cecd044 (diff)
Auto switch to remote grenade after detonator
Diffstat (limited to 'src')
-rw-r--r--src/peds/PlayerPed.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index e486d4ce..2c6330aa 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -777,7 +777,8 @@ spentAmmoCheck:
// BUG: m_nSelectedWepSlot and GetWeapon(..) takes slot in VC but they compared them against weapon types in whole condition! jeez
#ifdef FIX_BUGS
- if (m_nSelectedWepSlot == WEAPONSLOT_MELEE || GetWeapon(m_nSelectedWepSlot).m_nAmmoTotal > 0 && m_nSelectedWepSlot != WEAPONSLOT_PROJECTILE) {
+ if (m_nSelectedWepSlot == WEAPONSLOT_MELEE ||
+ GetWeapon(m_nSelectedWepSlot).m_nAmmoTotal > 0 && (m_nSelectedWepSlot != WEAPONSLOT_PROJECTILE || GetWeapon(WEAPONSLOT_PROJECTILE).m_eWeaponType == WEAPONTYPE_DETONATOR_GRENADE)) {
#else
if (m_nSelectedWepSlot == WEAPONTYPE_BASEBALLBAT && GetWeapon(WEAPONTYPE_BASEBALLBAT).m_eWeaponType == WEAPONTYPE_BASEBALLBAT
|| GetWeapon(m_nSelectedWepSlot).m_nAmmoTotal > 0