for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- if ((self.weapons & i) && (e.spawnflags & WEP_FLAG_RELOADABLE) && self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))
+ if ((self.weapons & W_WeaponBit(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))
self.switchweapon = i;
}
}
}
}
-#ifdef 0
+#if 0
// TODO: This disabled code is not working well and got replaced by custom weapon priorities.
// However, this logic should be refactored and moved to weapons code so each new weapon can be
// evaluated dynamically by bots without updating the "ai" or config files. --mand1nga