X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fselection.qh;h=18e3f5a1c99cb1d62dd03f0656930b36d88ee84e;hb=678a61b45f332fcd560083b01e6b0bf5a5ae268c;hp=69f644c70a0f1e65dde06150f69d03996a762be7;hpb=6dc9591eba337374f2b4348a6a6deaa1cb6887d0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/selection.qh b/qcsrc/server/weapons/selection.qh index 69f644c70..18e3f5a1c 100644 --- a/qcsrc/server/weapons/selection.qh +++ b/qcsrc/server/weapons/selection.qh @@ -5,18 +5,18 @@ void Send_WeaponComplain(entity e, float wpn, float type); .float hasweapon_complain_spam; -float client_hasweapon(entity cl, float wpn, float andammo, float complain); +bool client_hasweapon(entity cl, Weapon wpn, float andammo, bool complain); .int weaponcomplainindex; float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, float complain, float skipmissing); -#define w_getbestweapon(ent) W_GetCycleWeapon(ent, ent.cvar_cl_weaponpriority, 0, -1, false, true) +#define w_getbestweapon(ent) Weapons_from(W_GetCycleWeapon(ent, ent.cvar_cl_weaponpriority, 0, -1, false, true)) -void W_SwitchWeapon_Force(entity e, float w); +void W_SwitchWeapon_Force(entity e, Weapon w); // perform weapon to attack (weaponstate and attack_finished check is here) void W_SwitchToOtherWeapon(entity pl); -void W_SwitchWeapon(float imp); +void W_SwitchWeapon(Weapon imp); void W_CycleWeapon(string weaponorder, float dir); @@ -29,5 +29,5 @@ void W_NextWeapon(float list); void W_PreviousWeapon(float list); // previously used if exists and has ammo, (second) best otherwise -void W_LastWeapon(void); +void W_LastWeapon(); #endif