]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/selection.qc
Merge remote-tracking branch 'origin/master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / selection.qc
index d26ed831fbf05b7e4b427c6833705e97c80814b9..482b3180a0078222670860bf9fcb2eec018b509a 100644 (file)
@@ -1,11 +1,10 @@
 // switch between weapons
-void Send_WeaponComplain(entity e, float wpn, string wpnname, float type)
+void Send_WeaponComplain(entity e, float wpn, float type)
 {
        msg_entity = e;
        WriteByte(MSG_ONE, SVC_TEMPENTITY);
        WriteByte(MSG_ONE, TE_CSQC_WEAPONCOMPLAIN);
        WriteByte(MSG_ONE, wpn);
-       WriteString(MSG_ONE, wpnname);
        WriteByte(MSG_ONE, type);
 }
 
@@ -58,7 +57,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                                if(IS_REAL_CLIENT(cl))
                                {
                                        play2(cl, "weapons/unavailable.wav");
-                                       Send_WeaponComplain (cl, wpn, W_Name(wpn), 0);
+                                       Send_WeaponComplain (cl, wpn, 0);
                                }
                                return FALSE;
                        }
@@ -71,15 +70,11 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                // Report Proper Weapon Status / Modified Weapon Ownership Message
                if (weaponsInMap & WepSet_FromWeapon(wpn))
                {
-                       Send_WeaponComplain(cl, wpn, W_Name(wpn), 1);
+                       Send_WeaponComplain(cl, wpn, 1);
 
                        if(autocvar_g_showweaponspawns)
                        {
                                entity e;
-                               string s;
-
-                               e = get_weaponinfo(wpn);
-                               s = e.model2;
 
                                for(e = world; (e = findfloat(e, weapon, wpn)); )
                                {
@@ -88,7 +83,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                                        if(!(e.flags & FL_ITEM))
                                                continue;
                                        WaypointSprite_Spawn(
-                                               s,
+                                               (get_weaponinfo(wpn)).wpmodel,
                                                1, 0,
                                                world, e.origin,
                                                self, 0,
@@ -101,7 +96,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                }
                else
                {
-                       Send_WeaponComplain (cl, wpn, W_Name(wpn), 2);
+                       Send_WeaponComplain (cl, wpn, 2);
                }
 
                play2(cl, "weapons/unavailable.wav");