Weapon fixes

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

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