]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/selection.qc
Move some more things to selection.qc and out of weaponsystem.qc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / selection.qc
index 95a145e692dae94a7e4991d422c7abe0abcb89bf..b8e08050e3efed2f6dddcc23625a2d211672a937 100644 (file)
@@ -188,6 +188,13 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa
 
 #define w_getbestweapon(ent) W_GetCycleWeapon(ent, ent.cvar_cl_weaponpriority, 0, -1, FALSE, TRUE)
 
+void W_SwitchWeapon_Force(entity e, float w)
+{
+       e.cnt = e.switchweapon;
+       e.switchweapon = w;
+       e.selectweapon = w;
+}
+
 // perform weapon to attack (weaponstate and attack_finished check is here)
 void W_SwitchToOtherWeapon(entity pl)
 {