]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/common.qc
Provisions for unit testing
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / common.qc
index 85e8820f38c9dc21cc15f4ff3fe8581357af8576..2a439f3d9eeb26d5763b85349995a12937f65f63 100644 (file)
@@ -8,20 +8,15 @@
 #include <common/weapons/all.qh>
 #include <common/items/all.qc>
 
-void W_GiveWeapon (entity e, float wep)
-{SELFPARAM();
-
-       if (!wep)
-               return;
+void W_GiveWeapon(entity e, int wep)
+{
+       if (!wep) return;
 
        e.weapons |= WepSet_FromWeapon(Weapons_from(wep));
 
-       setself(e);
-
-       if(IS_PLAYER(other))
-               { Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_WEAPON_GOT, wep); }
-
-       setself(this);
+       if (IS_PLAYER(e)) {
+           Send_Notification(NOTIF_ONE, e, MSG_MULTI, ITEM_WEAPON_GOT, wep);
+    }
 }
 
 void W_PlayStrengthSound(entity player) // void W_PlayStrengthSound