]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_grenadelauncher.qc
Merge branch 'master' into Mario/classname_checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_grenadelauncher.qc
index acde7d5c10f2d6c03bd117d2507db29bd47d3315..dcf06ceaa7f168e7e76fc0a549b3ccad62724c65 100644 (file)
@@ -12,7 +12,7 @@ void W_Grenade_Explode (void)
                        if(IsDifferentTeam(self.realowner, other))
                                if(other.deadflag == DEAD_NO)
                                        if(IsFlying(other))
-                                               AnnounceTo(self.realowner, "airshot");
+                                               Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_AIRSHOT);
 
        self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
@@ -32,7 +32,7 @@ void W_Grenade_Explode2 (void)
                        if(IsDifferentTeam(self.realowner, other))
                                if(other.deadflag == DEAD_NO)
                                        if(IsFlying(other))
-                                               AnnounceTo(self.realowner, "airshot");
+                                               Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_AIRSHOT);
 
        self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
@@ -366,6 +366,20 @@ float w_glauncher(float req)
        {
                W_Reload(min(autocvar_g_balance_grenadelauncher_primary_ammo, autocvar_g_balance_grenadelauncher_secondary_ammo), autocvar_g_balance_grenadelauncher_reload_ammo, autocvar_g_balance_grenadelauncher_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_MORTAR_SUICIDE_BOUNCE;
+               else
+                       return WEAPON_MORTAR_SUICIDE_EXPLODE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_MORTAR_MURDER_BOUNCE;
+               else
+                       return WEAPON_MORTAR_MURDER_EXPLODE;
+       }
        return TRUE;
 }
 #endif
@@ -384,23 +398,6 @@ float w_glauncher(float req)
        {
                precache_sound("weapons/grenade_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s didn't see their own grenade");
-               else
-                       w_deathtypestring = _("%s blew themself up with their grenadelauncher");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SPLASH)
-                       if(w_deathtype & HITTYPE_BOUNCE) // (must be secondary then)
-                               w_deathtypestring = _("%s didn't see %s's grenade");
-                       else // unchecked: SECONDARY
-                               w_deathtypestring = _("%s almost dodged %s's grenade");
-               else // unchecked: SECONDARY, BOUNCE
-                       w_deathtypestring = _("%s ate %s's grenade");
-       }
        return TRUE;
 }
 #endif