]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_weaponsystem.qc
Merge branch 'master' into Mario/classname_checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_weaponsystem.qc
index 8d83c975e944009a90a250db74c6a8e8c03879ba..405904565e187a02dfc5552a2e6f5a3adce1783f 100644 (file)
@@ -14,21 +14,6 @@ float W_WeaponRateFactor()
        float t;
        t = 1.0 / g_weaponratefactor;
 
-       if(g_runematch)
-       {
-               if(self.runes & RUNE_SPEED)
-               {
-                       if(self.runes & CURSE_SLOW)
-                               t = t * autocvar_g_balance_rune_speed_combo_atkrate;
-                       else
-                               t = t * autocvar_g_balance_rune_speed_atkrate;
-               }
-               else if(self.runes & CURSE_SLOW)
-               {
-                       t = t * autocvar_g_balance_curse_slow_atkrate;
-               }
-       }
-
        return t;
 }
 
@@ -714,7 +699,6 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                                if(IS_REAL_CLIENT(cl))
                                {
                                        play2(cl, "weapons/unavailable.wav");
-                                       sprint(cl, strcat("You don't have any ammo for the ^2", W_Name(wpn), "\n"));
                                        Send_WeaponComplain (cl, wpn, W_Name(wpn), 0);
                                }
                                return FALSE;
@@ -728,8 +712,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                // Report Proper Weapon Status / Modified Weapon Ownership Message
                if (WEPSET_CONTAINS_AW(weaponsInMap, wpn))
                {
-                       sprint(cl, strcat("You do not have the ^2", W_Name(wpn), "\n") );
-                       Send_WeaponComplain (cl, wpn, W_Name(wpn), 1);
+                       Send_WeaponComplain(cl, wpn, W_Name(wpn), 1);
 
                        if(autocvar_g_showweaponspawns)
                        {
@@ -760,7 +743,6 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                else
                {
                        Send_WeaponComplain (cl, wpn, W_Name(wpn), 2);
-                       sprint(cl, strcat("The ^2", W_Name(wpn), "^7 is ^1NOT AVAILABLE^7 in this map\n") );
                }
 
                play2(cl, "weapons/unavailable.wav");
@@ -823,14 +805,6 @@ void W_SwitchToOtherWeapon(entity pl)
                W_SwitchWeapon_Force(pl, ww);
 }
 
-string PrimaryOrSecondary(float secondary)
-{
-       if(secondary)
-               return "secondary";
-       else
-               return "primary";
-}
-
 .float prevdryfire;
 .float prevwarntime;
 float weapon_prepareattack_checkammo(float secondary)
@@ -854,7 +828,15 @@ float weapon_prepareattack_checkammo(float secondary)
                {
                        if(time - self.prevwarntime > 1)
                        {
-                               sprint(self, strcat("^2", W_Name(self.weapon), " ", PrimaryOrSecondary(secondary), "^7 is unable to fire, but its ^2", PrimaryOrSecondary(1 - secondary), "^7 can.\n"));
+                               Send_Notification(
+                                       NOTIF_ONE,
+                                       self,
+                                       MSG_MULTI,
+                                       ITEM_WEAPON_PRIMORSEC,
+                                       self.weapon,
+                                       secondary,
+                                       (1 - secondary)
+                               );
                        }
                        self.prevwarntime = time;
                }