- if (nix_weapon_ammo & IT_SHELLS)
- self.ammo_shells = self.ammo_shells + autocvar_g_balance_nix_ammoincr_shells;
- else if (nix_weapon_ammo & IT_NAILS)
- self.ammo_nails = self.ammo_nails + autocvar_g_balance_nix_ammoincr_nails;
- else if (nix_weapon_ammo & IT_ROCKETS)
- self.ammo_rockets = self.ammo_rockets + autocvar_g_balance_nix_ammoincr_rockets;
- else if (nix_weapon_ammo & IT_CELLS)
- self.ammo_cells = self.ammo_cells + autocvar_g_balance_nix_ammoincr_cells;
- if (nix_weapon_ammo & IT_FUEL) // hook uses cells and fuel
- self.ammo_fuel = self.ammo_fuel + autocvar_g_balance_nix_ammoincr_fuel;
+ switch(e.ammo_field)
+ {
+ case ammo_shells: self.ammo_shells += autocvar_g_balance_nix_ammoincr_shells; break;
+ case ammo_nails: self.ammo_nails += autocvar_g_balance_nix_ammoincr_nails; break;
+ case ammo_rockets: self.ammo_rockets += autocvar_g_balance_nix_ammoincr_rockets; break;
+ case ammo_cells: self.ammo_cells += autocvar_g_balance_nix_ammoincr_cells; break;
+ case ammo_plasma: self.ammo_plasma += autocvar_g_balance_nix_ammoincr_plasma; break;
+ case ammo_fuel: self.ammo_fuel += autocvar_g_balance_nix_ammoincr_fuel; break;
+ }
+