// weapon reload code
// ----------------------------------------------------------------
-float W_ReloadCheck(float ammo_amount)
+float W_ReloadCheck(float ammo_amount, float ammo_use_primary, float ammo_use_secondary)
{
- if(ammo_amount < min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo)) // when we get here, ammo_counter must be 0 or -1
+ if(ammo_amount < min(ammo_use_primary, ammo_use_secondary)) // when we get here, ammo_counter must be 0 or -1
{
print("cannot reload... not enough ammo\n");
self.ammo_counter = -1; // reload later
float t;
- if(!W_ReloadCheck(self.ammo_shells))
+ if(!W_ReloadCheck(self.ammo_shells, autocvar_g_balance_shotgun_primary_ammo, 0))
return;
sound (self, CHAN_WEAPON2, "weapons/campingrifle_reload.wav", VOL_BASE, ATTN_NORM);
float t;
- if(!W_ReloadCheck(self.ammo_nails))
+ if(!W_ReloadCheck(self.ammo_nails, autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo))
return;
sound (self, CHAN_WEAPON2, "weapons/campingrifle_reload.wav", VOL_BASE, ATTN_NORM);