]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items.qc
Merge remote branch 'origin/master' into samual/updatecommands
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items.qc
index 5387c05aae1cac4d2d26d1aae4172536be840326..3ddf8099f51c0736471859939a61b79b97e21df6 100644 (file)
@@ -19,6 +19,18 @@ void register_weapon(float id, float(float) func, float ammotype, float i, float
        e.model2 = strzone(strcat("wpn-", e.mdl));
        e.impulse = i;
        e.bot_pickupbasevalue = pickupbasevalue;
+       if(ammotype & IT_SHELLS)
+               e.ammo_field = ammo_shells;
+       else if(ammotype & IT_NAILS)
+               e.ammo_field = ammo_nails;
+       else if(ammotype & IT_ROCKETS)
+               e.ammo_field = ammo_rockets;
+       else if(ammotype & IT_CELLS)
+               e.ammo_field = ammo_cells;
+       else if(ammotype & IT_FUEL)
+               e.ammo_field = ammo_fuel;
+       else
+               e.ammo_field = ammo_batteries;
 }
 float w_null(float dummy)
 {