Weapon fixes

This commit is contained in:
eray orçunus committed 2020-05-16 15:07:09 +03:00
1 parent 793a6a6d7e
commit 40ee29fb99
7 files changed
+59 -31

No files matched your search

+9 -7
View File
@@ -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