// WEAPON PLUGIN SYSTEM
-entity weapon_info[24];
+entity weapon_info[WEP_MAXCOUNT];
entity dummy_weapon_info;
void register_weapon(float id, float(float) func, float ammotype, float i, float weapontype, float pickupbasevalue, string modelname, string shortname, string wname)
float i;
weaponorder_byid = "";
- for(i = 24; i >= 1; --i)
+ for(i = WEP_MAXCOUNT; i >= 1; --i)
if(weapon_info[i-1])
weaponorder_byid = strcat(weaponorder_byid, " ", ftos(i));
weaponorder_byid = strzone(substring(weaponorder_byid, 1, strlen(weaponorder_byid) - 1));
// If custom weapon priorities for bots is enabled rate most wanted weapons higher
if( bot_custom_weapon && c )
{
- for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+ for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
{
// Find weapon
if( (get_weaponinfo(i)).weapons & item.weapons != item.weapons )
c = 0;
// Detect needed ammo
- for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+ for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
{
wi = get_weaponinfo(i);