X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fcommon.qc;h=2a439f3d9eeb26d5763b85349995a12937f65f63;hb=23f5cebb4f13df89b13e1478c977a0f2fd16dbb5;hp=85e8820f38c9dc21cc15f4ff3fe8581357af8576;hpb=a31eac601c475a28155abbe0b25b2338ab0a8f5a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index 85e8820f3..2a439f3d9 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -8,20 +8,15 @@ #include #include -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