3 #include <server/defs.qh>
4 #include <server/miscfunctions.qh>
6 // switch between weapons
7 void Send_WeaponComplain(entity e, float wpn, float type);
9 .float hasweapon_complain_spam;
10 bool client_hasweapon(entity this, Weapon wpn, .entity weaponentity, float andammo, bool complain);
12 .int weaponcomplainindex;
13 float W_GetCycleWeapon(entity this, string weaponorder, float dir, float imp, float complain, float skipmissing, .entity weaponentity);
15 #define w_getbestweapon(ent,wepent) Weapons_from(W_GetCycleWeapon(ent, CS(ent).cvar_cl_weaponpriority, 0, -1, false, true, wepent))
17 void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity);
19 // perform weapon to attack (weaponstate and attack_finished check is here)
20 void W_SwitchToOtherWeapon(entity this, .entity weaponentity);
21 bool W_SwitchWeapon(entity this, Weapon imp, .entity weaponentity); // returns false if the player does not have the weapon
22 void W_SwitchWeapon_TryOthers(entity this, Weapon imp, .entity weaponentity);
24 void W_CycleWeapon(entity this, string weaponorder, float dir, .entity weaponentity);
26 void W_NextWeaponOnImpulse(entity this, float imp, .entity weaponentity);
29 void W_NextWeapon(entity this, float list, .entity weaponentity);
32 void W_PreviousWeapon(entity this, float list, .entity weaponentity);
34 // previously used if exists and has ammo, (second) best otherwise
35 void W_LastWeapon(entity this, .entity weaponentity);