}
float client_hasweapon(entity cl, float wpn, float andammo, float complain)
-{
+{SELFPARAM();
float f;
entity oldself;
}
float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, float complain, float skipmissing)
-{
+{SELFPARAM();
// We cannot tokenize in this function, as GiveItems calls this
// function. Thus we must use car/cdr.
float weaponwant, first_valid, prev_valid, switchtonext, switchtolast;
}
void W_SwitchWeapon(float imp)
-{
+{SELFPARAM();
if (self.switchweapon != imp)
{
if (client_hasweapon(self, imp, true, true))
}
void W_CycleWeapon(string weaponorder, float dir)
-{
+{SELFPARAM();
float w;
w = W_GetCycleWeapon(self, weaponorder, dir, -1, 1, true);
if(w > 0)
}
void W_NextWeaponOnImpulse(float imp)
-{
+{SELFPARAM();
float w;
w = W_GetCycleWeapon(self, self.cvar_cl_weaponpriority, +1, imp, 1, (self.cvar_cl_weaponimpulsemode == 0));
if(w > 0)
// next weapon
void W_NextWeapon(float list)
-{
+{SELFPARAM();
if(list == 0)
W_CycleWeapon(weaponorder_byid, -1);
else if(list == 1)
// prev weapon
void W_PreviousWeapon(float list)
-{
+{SELFPARAM();
if(list == 0)
W_CycleWeapon(weaponorder_byid, +1);
else if(list == 1)
// previously used if exists and has ammo, (second) best otherwise
void W_LastWeapon(void)
-{
+{SELFPARAM();
if(client_hasweapon(self, self.cnt, true, false))
W_SwitchWeapon(self.cnt);
else