}
}
+entity GetAmmoItem(int ammotype)
+{
+ switch (ammotype)
+ {
+ case RES_SHELLS: return ITEM_Shells;
+ case RES_BULLETS: return ITEM_Bullets;
+ case RES_ROCKETS: return ITEM_Rockets;
+ case RES_CELLS: return ITEM_Cells;
+ case RES_PLASMA: return ITEM_Plasma;
+ case RES_FUEL: return ITEM_JetpackFuel;
+ }
+ LOG_WARNF("Invalid ammo type %d ", ammotype);
+ return NULL;
+ // WEAPONTODO: use this generic func to reduce duplication ?
+ // GetAmmoPicture GetAmmoName notif_arg_item_wepammo ammo_pickupevalfunc ?
+}
+
+#ifdef SVQC
+int GetAmmoConsumptionPrimary(string netname)
+// Returns ammo consumed per shot by the primary/default fire mode
+{
+ switch (netname)
+ {
+ case "arc": return cvar("g_balance_arc_beam_ammo");
+ case "devastator": return cvar("g_balance_devastator_ammo");
+ case "machinegun": return cvar("g_balance_machinegun_sustained_ammo");
+ case "minelayer": return cvar("g_balance_minelayer_ammo");
+ case "seeker": return cvar("g_balance_seeker_tag_ammo");
+ default: return cvar(strcat("g_balance_", netname, "_primary_ammo"));
+ }
+}
+#endif
+
#ifdef CSQC
int GetAmmoTypeFromNum(int i)
{