if(time < self.hasweapon_complain_spam)
complain = 0;
- if(wpn == WEP_HOOK.m_id && !g_grappling_hook && autocvar_g_nades && !((cl.weapons | weaponsInMap) & WepSet_FromWeapon(wpn)))
- complain = 0;
+ // ignore hook button when using nades without hook
+ if (autocvar_g_nades && cl.offhand != OFFHAND_HOOK)
+ if (wpn == WEP_HOOK.m_id && !((cl.weapons | weaponsInMap) & WepSet_FromWeapon(wpn)))
+ complain = 0;
if(complain)
self.hasweapon_complain_spam = time + 0.2;
else
{
setself(cl);
- f = WEP_ACTION(wpn, WR_CHECKAMMO1);
- f = f + WEP_ACTION(wpn, WR_CHECKAMMO2);
+ f = _WEP_ACTION(wpn, WR_CHECKAMMO1);
+ f = f + _WEP_ACTION(wpn, WR_CHECKAMMO2);
// always allow selecting the Mine Layer if we placed mines, so that we can detonate them
entity mine;
if (complain)
if(IS_REAL_CLIENT(cl))
{
- play2(cl, W_Sound("unavailable"));
+ play2(cl, SND(UNAVAILABLE));
Send_WeaponComplain (cl, wpn, 0);
}
return false;
Send_WeaponComplain (cl, wpn, 2);
}
- play2(cl, W_Sound("unavailable"));
+ play2(cl, SND(UNAVAILABLE));
}
return false;
}
else
self.selectweapon = imp; // update selectweapon ANYWAY
}
- else if(!forbidWeaponUse(self)) { WEP_ACTION(self.weapon, WR_RELOAD); }
+ else if(!forbidWeaponUse(self)) { _WEP_ACTION(self.weapon, WR_RELOAD); }
}
void W_CycleWeapon(string weaponorder, float dir)