.float prevwarntime;
bool weapon_prepareattack_checkammo(Weapon thiswep, entity actor, bool secondary, .entity weaponentity)
{
- if ((actor.items & IT_UNLIMITED_WEAPON_AMMO)) return true;
+ if ((actor.items & IT_UNLIMITED_AMMO)) return true;
bool ammo = false;
if (secondary) ammo = thiswep.wr_checkammo2(thiswep, actor, weaponentity);
else ammo = thiswep.wr_checkammo1(thiswep, actor, weaponentity);
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use, .entity weaponentity)
{
if (MUTATOR_CALLHOOK(W_DecreaseAmmo, actor, actor.(weaponentity), ammo_use)) return;
- if ((actor.items & IT_UNLIMITED_WEAPON_AMMO) && !wep.reloading_ammo) return;
+ if ((actor.items & IT_UNLIMITED_AMMO) && !wep.reloading_ammo) return;
ammo_use = M_ARGV(2, float);
w_ent.clip_load = w_ent.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
// if the gun uses no ammo, max out weapon load, else decrease ammo as we increase weapon load
- if (!w_ent.reload_ammo_min || (actor.items & IT_UNLIMITED_WEAPON_AMMO) || wpn.ammo_type == RES_NONE)
+ if (!w_ent.reload_ammo_min || (actor.items & IT_UNLIMITED_AMMO) || wpn.ammo_type == RES_NONE)
{
w_ent.clip_load = w_ent.reload_ammo_amount;
}
{
if (!GetResource(actor, e.ammo_type) && this.reload_ammo_min)
{
- if (!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if (!(actor.items & IT_UNLIMITED_AMMO))
{
if (IS_REAL_CLIENT(actor) && actor.reload_complain < time)
{