]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/selection.qc
Typecheck weaponframe
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / selection.qc
index 0d729fd6b331461f0e1ab888736e80326a5f8def..1337a1d71b89a097082565df800e6ea2a2e203ba 100644 (file)
@@ -226,11 +226,12 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa
        return 0;
 }
 
-void W_SwitchWeapon_Force(entity e, Weapon wep)
+void W_SwitchWeapon_Force(Player this, Weapon wep)
 {
-       e.cnt = PS(e).m_switchweapon.m_id;
-       PS(e).m_switchweapon = wep;
-       e.selectweapon = wep.m_id;
+    TC(Player, this); TC(Weapon, wep);
+       this.cnt = PS(this).m_switchweapon.m_id;
+       PS(this).m_switchweapon = wep;
+       this.selectweapon = wep.m_id;
 }
 
 // perform weapon to attack (weaponstate and attack_finished check is here)