]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
all weapons supported. thanks div0
authorFruitieX <rasse@rasse-lappy.localdomain>
Tue, 8 Jun 2010 14:42:33 +0000 (17:42 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Tue, 8 Jun 2010 14:42:33 +0000 (17:42 +0300)
19 files changed:
qcsrc/client/Defs.qc
qcsrc/client/damage.qc
qcsrc/client/hud.qc
qcsrc/server/w_campingrifle.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc

index 2df3e084c760339203cbcafe2b5d816b07822326..80bd84a0768432f114133f5f3e0aee01265059a4 100644 (file)
@@ -248,3 +248,11 @@ float ticrate;
 // only for Porto
 float angles_held_status;
 vector angles_held;
+
+// weapons
+.float silent;
+
+float w_deathtype, w_issilent, w_random;
+string w_deathtypestring;
+vector w_org, w_backoff;
+
index 1b0138f36b0212f950ebf241c5de37892ae91bba..24c5f0153b35609fc3b455b3bc10013c53c8ac56 100644 (file)
@@ -1,8 +1,3 @@
-.float silent;
-
-float w_deathtype, w_issilent, w_random;
-vector w_org, w_backoff;
-
 void Ent_DamageInfo(float isNew)
 {
        float dmg, rad, edge, thisdmg, forcemul;
index daf257d4765143455cbc61b214a9f0adda08000e..df420d884a8601ab68847b9fb44b5c105dac4617 100644 (file)
@@ -2001,47 +2001,16 @@ void HUD_HealthArmor(void)
 
 string Weapon_SuicideMessage(float deathtype)
 {
-       float w;
-       w = DEATH_WEAPONOF(deathtype);
-
-       switch (w)
-       {
-               case 1:
-                       return "lasered himself to hell";
-               case 2:
-                       return "did the impossible";
-               case 3:
-                       return "did the impossible";
-               case 4:
-                       if(deathtype & HITTYPE_SECONDARY)
-                               return "tried out his own grenade";
-                       return "detonated";
-       }
-       // TODO: was blasted by?
-       return strcat("[no kill message for weapon ", ftos(w), "!]");
+       w_deathtype = deathtype;
+       get_weaponinfo(DEATH_WEAPONOF(deathtype)).weapon_func(WR_SUICIDEMESSAGE);
+       return w_deathtypestring;
 }
 
 string Weapon_KillMessage(float deathtype)
 {
-       float w;
-       w = DEATH_WEAPONOF(deathtype);
-
-       switch (w)
-       {
-               case 1:
-                       return "was lasered to death by";
-               case 2:
-                       return "was gunned by";
-               case 3:
-                       if(deathtype & HITTYPE_SECONDARY)
-                               return "was sniped by";
-                       return "was riddled full of holes by";
-               case 4:
-                       if(deathtype & HITTYPE_BOUNCE)
-                               return "didn't see #'s grenade";
-                       return "almost dodged #'s grenade";
-       }
-       return strcat("[no suicide message for weapon ", ftos(w), "!]");
+       w_deathtype = deathtype;
+       get_weaponinfo(DEATH_WEAPONOF(deathtype)).weapon_func(WR_KILLMESSAGE);
+       return w_deathtypestring;
 }
 
 float killnotify_times[10];
index c3c9d52f9b43926370c8af33e53e78714e69e18e..8fc8d839da6ca97b686bc86079c7c52cccbdf2f7 100644 (file)
@@ -250,38 +250,6 @@ float w_campingrifle(float req)
                return self.ammo_nails >= cvar("g_balance_campingrifle_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_nails >= cvar("g_balance_campingrifle_secondary_ammo");
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = "shot themself automatically";
-               else
-                       w_deathtypestring = "sniped themself somehow";
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                               w_deathtypestring = "failed to hide from #'s bullet hail";
-                       else
-                               w_deathtypestring = "died in #'s bullet hail";
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               // TODO special headshot message here too?
-                               w_deathtypestring = "failed to hide from #'s rifle";
-                       }
-                       else
-                       {
-                               if(w_deathtype & HITTYPE_HEADSHOT)
-                                       w_deathtypestring = "got hit in the head by #";
-                               else
-                                       w_deathtypestring = "was sniped by #";
-                       }
-               }
-       }
        else if (req == WR_RELOAD)
        {
                W_CampingRifle_Reload();
@@ -319,6 +287,38 @@ float w_campingrifle(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       w_deathtypestring = "shot themself automatically";
+               else
+                       w_deathtypestring = "sniped themself somehow";
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                               w_deathtypestring = "failed to hide from #'s bullet hail";
+                       else
+                               w_deathtypestring = "died in #'s bullet hail";
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                       {
+                               // TODO special headshot message here too?
+                               w_deathtypestring = "failed to hide from #'s rifle";
+                       }
+                       else
+                       {
+                               if(w_deathtype & HITTYPE_HEADSHOT)
+                                       w_deathtypestring = "got hit in the head by #";
+                               else
+                                       w_deathtypestring = "was sniped by #";
+                       }
+               }
+       }
        return TRUE;
 }
 #endif
index 7f6062d3f6a65bd262f0278a5b59f1ee31aa2b42..d80317a346ef1a1b3a3be3479b3c67e038133aad 100644 (file)
@@ -220,19 +220,6 @@ float w_crylink(float req)
                return self.ammo_cells >= cvar("g_balance_crylink_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_cells >= cvar("g_balance_crylink_secondary_ammo");
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = "succeeded at self-destructing themself with the Crylink";
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE)
-                       w_deathtypestring = "could not hide from #'s Crylink"; // unchecked: SPLASH (SECONDARY can't be)
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = "was too close to #'s Crylink"; // unchecked: SECONDARY
-               else
-                       w_deathtypestring = "took a close look at #'s Crylink"; // unchecked: SECONDARY
-       }
        return TRUE;
 };
 #endif
@@ -261,6 +248,19 @@ float w_crylink(float req)
                precache_sound("weapons/crylink_impact2.wav");
                precache_sound("weapons/crylink_impact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               w_deathtypestring = "succeeded at self-destructing themself with the Crylink";
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE)
+                       w_deathtypestring = "could not hide from #'s Crylink"; // unchecked: SPLASH (SECONDARY can't be)
+               else if(w_deathtype & HITTYPE_SPLASH)
+                       w_deathtypestring = "was too close to #'s Crylink"; // unchecked: SECONDARY
+               else
+                       w_deathtypestring = "took a close look at #'s Crylink"; // unchecked: SECONDARY
+       }
        return TRUE;
 }
 #endif
index 45168cdacf66fcf60d685f5521ec16f64e2a25aa..0b35eae662de8cc2848cb04ebe8d9e52a88f428a 100644 (file)
@@ -285,32 +285,6 @@ float w_electro(float req)
                return self.ammo_cells >= cvar("g_balance_electro_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_cells >= cvar("g_balance_electro_secondary_ammo");
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = "could not remember where they put plasma";
-               else
-                       w_deathtypestring = "played with plasma";
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_SPLASH) // unchecked: BOUNCE
-                               w_deathtypestring = "just noticed #'s blue ball";
-                       else // unchecked: BOUNCE
-                               w_deathtypestring = "got in touch with #'s blue ball";
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE) // combo
-                               w_deathtypestring = "felt the electrifying air of #'s combo";
-                       else if(w_deathtype & HITTYPE_SPLASH)
-                               w_deathtypestring = "got too close to #'s blue beam";
-                       else
-                               w_deathtypestring = "was blasted by #'s blue beam";
-               }
-       }
        else if (req == WR_RESETPLAYER)
        {
                self.electro_secondarytime = time;
@@ -353,6 +327,32 @@ float w_electro(float req)
                precache_sound("weapons/electro_impact.wav");
                precache_sound("weapons/electro_impact_combo.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       w_deathtypestring = "could not remember where they put plasma";
+               else
+                       w_deathtypestring = "played with plasma";
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       if(w_deathtype & HITTYPE_SPLASH) // unchecked: BOUNCE
+                               w_deathtypestring = "just noticed #'s blue ball";
+                       else // unchecked: BOUNCE
+                               w_deathtypestring = "got in touch with #'s blue ball";
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE) // combo
+                               w_deathtypestring = "felt the electrifying air of #'s combo";
+                       else if(w_deathtype & HITTYPE_SPLASH)
+                               w_deathtypestring = "got too close to #'s blue beam";
+                       else
+                               w_deathtypestring = "was blasted by #'s blue beam";
+               }
+       }
        return TRUE;
 }
 #endif
index d5c0b13f950fcc72542db32c4cd6a11c917ba122..278099c633877a2e056bc2fcbd9a72d20d773af9 100644 (file)
@@ -351,6 +351,36 @@ float w_fireball(float req)
                return self.ammo_fuel >= cvar("g_balance_fireball_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_fuel >= cvar("g_balance_fireball_secondary_ammo");
+       else if (req == WR_RESETPLAYER)
+       {
+               self.fireball_primarytime = time;
+       }
+       return TRUE;
+};
+#endif
+#ifdef CSQC
+float w_fireball(float req)
+{
+       if(req == WR_IMPACTEFFECT)
+       {
+               vector org2;
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       // firemine goes out silently
+               }
+               else
+               {
+                       org2 = w_org + w_backoff * 16;
+                       pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1);
+                       if(!w_issilent)
+                               sound(self, CHAN_PROJECTILE, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM * 0.25); // long range boom
+               }
+       }
+       else if(req == WR_PRECACHE)
+       {
+               precache_sound("weapons/fireball_impact.wav");
+               precache_sound("weapons/fireball_impact2.wav");
+       }
        else if (req == WR_SUICIDEMESSAGE)
        {
                if(w_deathtype & HITTYPE_SECONDARY)
@@ -386,36 +416,6 @@ float w_fireball(float req)
                                w_deathtypestring = "tasted #'s fireball";
                }
        }
-       else if (req == WR_RESETPLAYER)
-       {
-               self.fireball_primarytime = time;
-       }
-       return TRUE;
-};
-#endif
-#ifdef CSQC
-float w_fireball(float req)
-{
-       if(req == WR_IMPACTEFFECT)
-       {
-               vector org2;
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       // firemine goes out silently
-               }
-               else
-               {
-                       org2 = w_org + w_backoff * 16;
-                       pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1);
-                       if(!w_issilent)
-                               sound(self, CHAN_PROJECTILE, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM * 0.25); // long range boom
-               }
-       }
-       else if(req == WR_PRECACHE)
-       {
-               precache_sound("weapons/fireball_impact.wav");
-               precache_sound("weapons/fireball_impact2.wav");
-       }
        return TRUE;
 }
 #endif
index b340f76c90bc79f2eaa85c0f83076ddddbadce3e..a7d9a4935d7202a7a4a2bf18975cdafb4b1c5af1 100644 (file)
@@ -217,23 +217,6 @@ float w_glauncher(float req)
                return self.ammo_rockets >= cvar("g_balance_grenadelauncher_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_rockets >= cvar("g_balance_grenadelauncher_secondary_ammo");
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = "tried out his own grenade";
-               else
-                       w_deathtypestring = "detonated";
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SPLASH)
-                       if(w_deathtype & HITTYPE_BOUNCE) // (must be secondary then)
-                               w_deathtypestring = "didn't see #'s grenade";
-                       else // unchecked: SECONDARY
-                               w_deathtypestring = "almost dodged #'s grenade";
-               else // unchecked: SECONDARY, BOUNCE
-                       w_deathtypestring = "ate #'s grenade";
-       }
        return TRUE;
 };
 #endif
@@ -252,6 +235,23 @@ float w_glauncher(float req)
        {
                precache_sound("weapons/grenade_impact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       w_deathtypestring = "tried out his own grenade";
+               else
+                       w_deathtypestring = "detonated";
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SPLASH)
+                       if(w_deathtype & HITTYPE_BOUNCE) // (must be secondary then)
+                               w_deathtypestring = "didn't see #'s grenade";
+                       else // unchecked: SECONDARY
+                               w_deathtypestring = "almost dodged #'s grenade";
+               else // unchecked: SECONDARY, BOUNCE
+                       w_deathtypestring = "ate #'s grenade";
+       }
        return TRUE;
 }
 #endif
index c95a90e5dae9d78cf135fc143ea3c69b1f75cebe..d3723573687c76230d790fc810ed4bfc282877ea 100644 (file)
@@ -151,15 +151,6 @@ float w_hagar(float req)
                return self.ammo_rockets >= cvar("g_balance_hagar_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_rockets >= cvar("g_balance_hagar_secondary_ammo");
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "played with tiny rockets";
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // must be secondary; unchecked: SPLASH
-                       w_deathtypestring = "hoped #'s missiles wouldn't bounce";
-               else // unchecked: SPLASH, SECONDARY
-                       w_deathtypestring = "was pummeled by";
-       }
        return TRUE;
 };
 #endif
@@ -187,6 +178,15 @@ float w_hagar(float req)
                precache_sound("weapons/hagexp2.wav");
                precache_sound("weapons/hagexp3.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "played with tiny rockets";
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE) // must be secondary; unchecked: SPLASH
+                       w_deathtypestring = "hoped #'s missiles wouldn't bounce";
+               else // unchecked: SPLASH, SECONDARY
+                       w_deathtypestring = "was pummeled by";
+       }
        return TRUE;
 }
 #endif
index 5fe75ab2ca46bfbdfa0828b564b68aa419e8c060..88990de62821685de13d1ce24ca0decad035ac23 100644 (file)
@@ -207,10 +207,6 @@ float w_hlac(float req)
                return self.ammo_cells >= cvar("g_balance_hlac_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_cells >= cvar("g_balance_hlac_secondary_ammo");
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "should have used a smaller gun";
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = "was cut down by";
        return TRUE;
 };
 #endif
@@ -229,6 +225,10 @@ float w_hlac(float req)
        {
                precache_sound("weapons/laserimpact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "should have used a smaller gun";
+       else if (req == WR_KILLMESSAGE)
+               w_deathtypestring = "was cut down by";
        return TRUE;
 }
 #endif
index 9e5868355991106d4b48cd6feae4171c2903802d..c8d1369f7b42b11363f032163ec8b95eb306dc81 100644 (file)
@@ -239,10 +239,6 @@ float w_hook(float req)
        {
                return self.ammo_cells >= cvar("g_balance_hook_secondary_ammo");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "did the impossible";
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = "has run into #'s gravity bomb";
        else if (req == WR_RESETPLAYER)
        {
                self.hook_refire = time;
@@ -265,6 +261,10 @@ float w_hook(float req)
        {
                precache_sound("weapons/hookbomb_impact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "did the impossible";
+       else if (req == WR_KILLMESSAGE)
+               w_deathtypestring = "has run into #'s gravity bomb";
        return TRUE;
 }
 #endif
index a17f2a4c54031886124a3b2bfec6a2c9bf971fe8..cdfdaa537c048af9fa45594d5334f35c256eda78 100644 (file)
@@ -178,12 +178,6 @@ float w_laser(float req)
                return TRUE;
        else if (req == WR_CHECKAMMO2)
                return TRUE;
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "lasered themself to hell";
-       else if (req == WR_KILLMESSAGE)
-       {
-               w_deathtypestring = "was lasered to death by"; // unchecked: SPLASH
-       }
        return TRUE;
 };
 #endif
@@ -202,6 +196,12 @@ float w_laser(float req)
        {
                precache_sound("weapons/laserimpact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "lasered themself to hell";
+       else if (req == WR_KILLMESSAGE)
+       {
+               w_deathtypestring = "was lasered to death by"; // unchecked: SPLASH
+       }
        return TRUE;
 }
 #endif
index f28c8581cc5ee3c6fa2550561a6c994f8fcd55a5..65d02dcb2d6422151b971a9b6c47e92cb1aa9e8f 100644 (file)
@@ -232,10 +232,6 @@ float w_minstanex(float req)
        }
        else if (req == WR_CHECKAMMO2)
                return TRUE;
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "did the impossible";
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = "has been vaporized by";
        else if (req == WR_RESETPLAYER)
        {
                self.minstanex_lasthit = 0;
@@ -258,6 +254,10 @@ float w_minstanex(float req)
        {
                precache_sound("weapons/neximpact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "did the impossible";
+       else if (req == WR_KILLMESSAGE)
+               w_deathtypestring = "has been vaporized by";
        return TRUE;
 }
 #endif
index c23a47b5d668fbe1b000321698f4404e5dcc260d..4c30f4c675c5f6b1bd45102cd199324c11476708 100644 (file)
@@ -74,10 +74,6 @@ float w_nex(float req)
                return self.ammo_cells >= cvar("g_balance_nex_ammo");
        else if (req == WR_CHECKAMMO2)
                return FALSE;
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "did the impossible";
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = "has been vaporized by";
        return TRUE;
 };
 #endif
@@ -96,6 +92,10 @@ float w_nex(float req)
        {
                precache_sound("weapons/neximpact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "did the impossible";
+       else if (req == WR_KILLMESSAGE)
+               w_deathtypestring = "has been vaporized by";
        return TRUE;
 }
 #endif
index 1ab117885b02dde03a068e511da43c681403e366..b78e85574312d4cda870c4fec880701f29324686 100644 (file)
@@ -269,10 +269,6 @@ float w_porto(float req)
        }
        else if (req == WR_SETUP)
                weapon_setup(WEP_PORTO);
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "did the impossible";
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = "felt # doing the impossible to him";
        else if (req == WR_RESETPLAYER)
        {
                self.porto_current = world;
@@ -291,6 +287,10 @@ float w_porto(float req)
        {
                // nothing to do
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "did the impossible";
+       else if (req == WR_KILLMESSAGE)
+               w_deathtypestring = "felt # doing the impossible to him";
        return TRUE;
 }
 #endif
index f6975b3b6a0d13d6903830adc2526c8c9940110f..35ca569777f4cce38f988bcb93ad9671352fcac6 100644 (file)
@@ -544,17 +544,6 @@ float w_rlauncher(float req)
        }
        else if (req == WR_CHECKAMMO2)
                return FALSE;
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "exploded";
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = "got too close to #'s rocket";
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = "almost dodged #'s rocket";
-               else
-                       w_deathtypestring = "ate #'s rocket";
-       }
        else if (req == WR_RESETPLAYER)
        {
                self.rl_release = 0;
@@ -577,6 +566,17 @@ float w_rlauncher(float req)
        {
                precache_sound("weapons/rocket_impact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "exploded";
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
+                       w_deathtypestring = "got too close to #'s rocket";
+               else if(w_deathtype & HITTYPE_SPLASH)
+                       w_deathtypestring = "almost dodged #'s rocket";
+               else
+                       w_deathtypestring = "ate #'s rocket";
+       }
        return TRUE;
 }
 #endif
index 512eb28e8ca1800407a4c838cc02c175d363c805..c347648dff324c5300e837630fa197b1be17992d 100644 (file)
@@ -140,12 +140,6 @@ float w_shotgun(float req)
                return self.ammo_shells >= cvar("g_balance_shotgun_primary_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_shells >= cvar("g_balance_shotgun_secondary_ammo") * 3;
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "did the impossible";
-       else if (req == WR_KILLMESSAGE)
-       {
-               w_deathtypestring = "was gunned by"; // unchecked: SECONDARY
-       }
        return TRUE;
 };
 #endif
@@ -173,6 +167,12 @@ float w_shotgun(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "did the impossible";
+       else if (req == WR_KILLMESSAGE)
+       {
+               w_deathtypestring = "was gunned by"; // unchecked: SECONDARY
+       }
        return TRUE;
 }
 #endif
index f3b91649159d9aef03eda4e9685cd140f036d184..243b32b20e2b0bdbb3b787dec2275f6bba515d79 100644 (file)
@@ -241,14 +241,6 @@ float w_tuba(float req)
                return TRUE; // TODO use fuel?
        else if (req == WR_CHECKAMMO2)
                return TRUE; // TODO use fuel?
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = "hurt his own ears with the @!#%'n Tuba";
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               w_deathtypestring = "died of #'s great playing on the @!#%'n Tuba";
-       }
        return TRUE;
 };
 #endif
@@ -263,6 +255,14 @@ float w_tuba(float req)
        {
                // nothing to do
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               w_deathtypestring = "hurt his own ears with the @!#%'n Tuba";
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               w_deathtypestring = "died of #'s great playing on the @!#%'n Tuba";
+       }
        return TRUE;
 }
 #endif
index 5879b00b8c029a9ddb516d8e7fc5ae9c65108559..245ad652f6d8bb33eab902171e4975c7580195af 100644 (file)
@@ -126,15 +126,6 @@ float w_uzi(float req)
                return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "did the impossible";
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = "was sniped by";
-               else
-                       w_deathtypestring = "was riddled full of holes by";
-       }
        return TRUE;
 };
 #endif
@@ -160,6 +151,15 @@ float w_uzi(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "did the impossible";
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       w_deathtypestring = "was sniped by";
+               else
+                       w_deathtypestring = "was riddled full of holes by";
+       }
        return TRUE;
 }
 #endif