]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/weapons/selection.qh
Merge branch 'master' into terencehill/dynamic_hud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / selection.qh
1 #pragma once
2
3 // switch between weapons
4 void Send_WeaponComplain(entity e, float wpn, float type);
5
6 .float hasweapon_complain_spam;
7 bool client_hasweapon(entity cl, Weapon wpn, float andammo, bool complain);
8
9 .int weaponcomplainindex;
10 float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, float complain, float skipmissing);
11
12 #define w_getbestweapon(ent) Weapons_from(W_GetCycleWeapon(ent, ent.cvar_cl_weaponpriority, 0, -1, false, true))
13
14 void W_SwitchWeapon_Force(entity e, Weapon w);
15
16 // perform weapon to attack (weaponstate and attack_finished check is here)
17 void W_SwitchToOtherWeapon(entity pl);
18 void W_SwitchWeapon(Weapon imp);
19
20 void W_CycleWeapon(string weaponorder, float dir);
21
22 void W_NextWeaponOnImpulse(float imp);
23
24 // next weapon
25 void W_NextWeapon(float list);
26
27 // prev weapon
28 void W_PreviousWeapon(float list);
29
30 // previously used if exists and has ammo, (second) best otherwise
31 void W_LastWeapon(entity this);