void W_Fireball_Attack1_Frame0()
{
- // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- {
- if(autocvar_g_balance_fireball_reload_ammo)
- {
- self.clip_load -= autocvar_g_balance_fireball_primary_ammo;
- self.weapon_load[WEP_FIREBALL] = self.clip_load;
- }
- else
- self.ammo_fuel -= autocvar_g_balance_fireball_primary_ammo;
- }
+ W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_reload_ammo);
W_Fireball_AttackEffect(0, '-1.25 -3.75 0');
sound (self, CHAN_WEAPON, "weapons/fireball_prefire2.wav", VOL_BASE, ATTN_NORM);
vector f_diff;
float c;
- // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- {
- if(autocvar_g_balance_fireball_reload_ammo)
- {
- self.clip_load -= autocvar_g_balance_fireball_secondary_ammo;
- self.weapon_load[WEP_FIREBALL] = self.clip_load;
- }
- else
- self.ammo_fuel -= autocvar_g_balance_fireball_secondary_ammo;
- }
+ W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_fireball_secondary_ammo, autocvar_g_balance_fireball_reload_ammo);
c = mod(self.bulletcounter, 4);
switch(c)
precache_sound ("weapons/fireball_fire.wav");
precache_sound ("weapons/fireball_fire2.wav");
precache_sound ("weapons/fireball_prefire2.wav");
- precache_sound ("weapons/reload.wav");
+ //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else
}
else if (req == WR_SETUP)
{
weapon_setup(WEP_FIREBALL);
+ self.current_ammo = ammo_fuel;
}
else if (req == WR_CHECKAMMO1)
{
if(self.ammo_fuel < 1)
self.ammo_fuel = 0;
- W_Reload(ammo_fuel, min(autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_secondary_ammo), autocvar_g_balance_fireball_reload_ammo, autocvar_g_balance_fireball_reload_time, "weapons/reload.wav");
+ W_Reload(min(autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_secondary_ammo), autocvar_g_balance_fireball_reload_ammo, autocvar_g_balance_fireball_reload_time, "weapons/reload.wav");
}
return TRUE;
};