summaryrefslogtreecommitdiffstats
path: root/src/weapons/Weapon.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-16 14:07:09 +0200
committereray orçunus <erayorcunus@gmail.com>2020-05-16 14:07:09 +0200
commit40ee29fb99cc82c720ece4eab0e06855a161d12a (patch)
tree4a345e53af2bd41fa11b869d3cb40fa220166652 /src/weapons/Weapon.cpp
parentbla (diff)
downloadre3-40ee29fb99cc82c720ece4eab0e06855a161d12a.tar
re3-40ee29fb99cc82c720ece4eab0e06855a161d12a.tar.gz
re3-40ee29fb99cc82c720ece4eab0e06855a161d12a.tar.bz2
re3-40ee29fb99cc82c720ece4eab0e06855a161d12a.tar.lz
re3-40ee29fb99cc82c720ece4eab0e06855a161d12a.tar.xz
re3-40ee29fb99cc82c720ece4eab0e06855a161d12a.tar.zst
re3-40ee29fb99cc82c720ece4eab0e06855a161d12a.zip
Diffstat (limited to 'src/weapons/Weapon.cpp')
-rw-r--r--src/weapons/Weapon.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index deb77cb9..1ae26106 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -2312,13 +2312,15 @@ CWeapon::BlowUpExplosiveThings(CEntity *thing)
bool
CWeapon::HasWeaponAmmoToBeUsed(void)
{
- switch (m_eWeaponType) {
- case WEAPONTYPE_UNARMED:
- case WEAPONTYPE_BASEBALLBAT:
- return true;
- default:
- return m_nAmmoTotal != 0;
- }
+ // FIX: This is better (not bug tho)
+#if 0
+ if (m_eWeaponType <= WEAPONTYPE_CHAINSAW)
+#else
+ if (CWeaponInfo::GetWeaponInfo(m_eWeaponType)->m_eWeaponFire == WEAPON_FIRE_MELEE)
+#endif
+ return true;
+ else
+ return m_nAmmoTotal != 0;
}
bool