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)
{
string W_NameWeaponOrder(string order);
string W_NumberWeaponOrder(string order);
+// ammo types
+.float ammo_shells;
+.float ammo_nails;
+.float ammo_rockets;
+.float ammo_cells;
+.float ammo_fuel;
+.float ammo_batteries; // dummy
+
// entity properties of weaponinfo:
.float weapon; // WEP_...
.float weapons; // WEPBIT_...
.float impulse; // weapon impulse
.float bot_pickupbasevalue; // bot weapon priority
.string model2; // wpn- sprite name
-
-
+..float ammo_field; // main ammo field
// dynamic weapon adding
float w_null(float dummy);