]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Death messages are now FULLY FUNCTIONAL (minus some new feature ideas yet)
authorSamual Lenks <samual@xonotic.org>
Sat, 15 Dec 2012 06:39:22 +0000 (01:39 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 15 Dec 2012 06:39:22 +0000 (01:39 -0500)
20 files changed:
qcsrc/common/notifications.qc
qcsrc/server/g_damage.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_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rifle.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc

index db127c42f4b99ad0376231af2165636174716865..9ad13d73ba10e1487e5fa01709d4a3b4973e40b1 100644 (file)
@@ -188,7 +188,7 @@ string got_commandkey;
        MSG_INFO_NOTIF(INFO_DEATH_MURDER_CHEAT,                         2, 1, XPND3(s1, s2, SPREE_END), XPND2(s1, s2),          "notify_death",                 _("^BG%s^K1 was unfairly eliminated by ^BG%s^K1%s\n"), "") \
        MSG_INFO_NOTIF(INFO_DEATH_MURDER_FIRE,                          2, 1, XPND3(s1, s2, SPREE_END), XPND2(s1, s2),          "notify_death",                 _("^BG%s^K1 was burnt up into a crisp by ^BG%s^K1%s\n"), _("^F1%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s\n")) \
        MULTITEAM_INFO(INFO_SCORES_, 4,                                         0, 0, NO_STR_ARG, XPND2("", ""),                                        "",                                             _("^TC^TT ^BGteam scores!\n"), "") \
-       MSG_INFO_NOTIF(INFO_WEAPON_THINKING_WITH_PORTALS,                       1, 0, s1, XPND2(s1, ""),                                "notify_selfkill",                      _("^BG%s^K1 is now thinking with portals...\n"), "") \
+       MSG_INFO_NOTIF(INFO_WEAPON_THINKING_WITH_PORTALS,                       1, 0, s1, XPND2(s1, ""),                                "notify_selfkill", _("^BG%s^K1 is now thinking with portals...\n"), "") \
        MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_SUICIDE,                             1, 0, s1, XPND2(s1, ""),                                "weaponcrylink", _("^BG%s^K1 felt the strong pull of their Crylink\n"), "") \
        MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_MURDER,                                      2, 0, XPND2(s1, s2), XPND2(s1, s2),     "weaponcrylink", _("^BG%s^K1 felt the strong pull of ^BG%s^K1's Crylink\n"), "") \
        MSG_INFO_NOTIF(INFO_WEAPON_ELECTRO_SUICIDE_ORBS,                        1, 0, s1, XPND2(s1, ""),                                "weaponelectro", _("^BG%s^K1 could not remember where they put their Electro plasma\n"), "") \
@@ -312,56 +312,56 @@ string got_commandkey;
                 nothing */
 
 #define MSG_WEAPON_NOTIFICATIONS \
-       MSG_WEAPON_NOTIF(WEAPON_EMPTY,                                          NO_MSG,                                                                 NO_MSG)
-       MSG_INFO_NOTIF(INFO_WEAPON_THINKING_WITH_PORTALS,                       
-       MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_SUICIDE,                             
-       MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_MURDER,                                      
-       MSG_INFO_NOTIF(INFO_WEAPON_ELECTRO_SUICIDE_ORBS,                        
-       MSG_INFO_NOTIF(INFO_WEAPON_ELECTRO_SUICIDE_BOLT,                        
-       MSG_INFO_NOTIF(INFO_WEAPON_ELECTRO_MURDER_BOLT,                         
-       MSG_INFO_NOTIF(INFO_WEAPON_ELECTRO_MURDER_ORBS,                         
-       MSG_INFO_NOTIF(INFO_WEAPON_ELECTRO_MURDER_COMBO,                        
-       MSG_INFO_NOTIF(INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,           
-       MSG_INFO_NOTIF(INFO_WEAPON_FIREBALL_SUICIDE_BLAST,                      
-       MSG_INFO_NOTIF(INFO_WEAPON_FIREBALL_MURDER_FIREMINE,            
-       MSG_INFO_NOTIF(INFO_WEAPON_FIREBALL_MURDER_BLAST,                       
-       MSG_INFO_NOTIF(INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,                      
-       MSG_INFO_NOTIF(INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,                       
-       MSG_INFO_NOTIF(INFO_WEAPON_MORTAR_MURDER_EXPLODE,                       
-       MSG_INFO_NOTIF(INFO_WEAPON_MORTAR_MURDER_BOUNCE,                        
-       MSG_INFO_NOTIF(INFO_WEAPON_HAGAR_SUICIDE,                                       
-       MSG_INFO_NOTIF(INFO_WEAPON_HAGAR_MURDER_BURST,                          
-       MSG_INFO_NOTIF(INFO_WEAPON_HAGAR_MURDER_SPRAY,                          
-       MSG_INFO_NOTIF(INFO_WEAPON_HLAC_SUICIDE,                                        
-       MSG_INFO_NOTIF(INFO_WEAPON_HLAC_MURDER,                                         
-       MSG_INFO_NOTIF(INFO_WEAPON_HOOK_MURDER,                                         
-       MSG_INFO_NOTIF(INFO_WEAPON_LASER_SUICIDE,                                       
-       MSG_INFO_NOTIF(INFO_WEAPON_LASER_MURDER,                                        
-       MSG_INFO_NOTIF(INFO_WEAPON_MINELAYER_SUICIDE,                           
-       MSG_INFO_NOTIF(INFO_WEAPON_MINELAYER_MURDER,                            
-       MSG_INFO_NOTIF(INFO_WEAPON_MINSTANEX_MURDER,                            
-       MSG_INFO_NOTIF(INFO_WEAPON_NEX_MURDER,                                          
-       MSG_INFO_NOTIF(INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,          
-       MSG_INFO_NOTIF(INFO_WEAPON_RIFLE_MURDER_HAIL,                           
-       MSG_INFO_NOTIF(INFO_WEAPON_RIFLE_MURDER_PIERCING,                       
-       MSG_INFO_NOTIF(INFO_WEAPON_RIFLE_MURDER,                                        
-       MSG_INFO_NOTIF(INFO_WEAPON_RIFLE_MURDER_HEADSHOT,                       
-       MSG_INFO_NOTIF(INFO_WEAPON_ROCKETLAUNCHER_SUICIDE,                      
-       MSG_INFO_NOTIF(INFO_WEAPON_ROCKETLAUNCHER_MURDER_DIRECT,        
-       MSG_INFO_NOTIF(INFO_WEAPON_ROCKETLAUNCHER_MURDER_SPLASH,        
-       MSG_INFO_NOTIF(INFO_WEAPON_SEEKER_SUICIDE,                                      
-       MSG_INFO_NOTIF(INFO_WEAPON_SEEKER_MURDER_TAG,                           
-       MSG_INFO_NOTIF(INFO_WEAPON_SEEKER_MURDER_SPRAY,                         
-       MSG_INFO_NOTIF(INFO_WEAPON_SHOTGUN_MURDER_SLAP,                         
-       MSG_INFO_NOTIF(INFO_WEAPON_SHOTGUN_MURDER,                                      
-       MSG_INFO_NOTIF(INFO_WEAPON_TUBA_SUICIDE,                                        
-       MSG_INFO_NOTIF(INFO_WEAPON_TUBA_MURDER,                                         
-       MSG_INFO_NOTIF(INFO_WEAPON_ACCORDEON_SUICIDE,                           
-       MSG_INFO_NOTIF(INFO_WEAPON_ACCORDEON_MURDER,                            
-       MSG_INFO_NOTIF(INFO_WEAPON_KLEINBOTTLE_SUICIDE,                         
-       MSG_INFO_NOTIF(INFO_WEAPON_KLEINBOTTLE_MURDER,                          
-       MSG_INFO_NOTIF(INFO_WEAPON_UZI_MURDER_SNIPE,                            
-       MSG_INFO_NOTIF(INFO_WEAPON_UZI_MURDER_SPRAY,                            
+       MSG_WEAPON_NOTIF(WEAPON_EMPTY,                                                  NO_MSG,                                                                         NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_THINKING_WITH_PORTALS,                  INFO_WEAPON_THINKING_WITH_PORTALS,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_CRYLINK_SUICIDE,                                INFO_WEAPON_CRYLINK_SUICIDE,                            NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_CRYLINK_MURDER,                                 INFO_WEAPON_CRYLINK_MURDER,                             NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ELECTRO_SUICIDE_ORBS,                   INFO_WEAPON_ELECTRO_SUICIDE_ORBS,                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ELECTRO_SUICIDE_BOLT,                   INFO_WEAPON_ELECTRO_SUICIDE_BOLT,                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ELECTRO_MURDER_BOLT,                    INFO_WEAPON_ELECTRO_MURDER_BOLT,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ELECTRO_MURDER_ORBS,                    INFO_WEAPON_ELECTRO_MURDER_ORBS,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ELECTRO_MURDER_COMBO,                   INFO_WEAPON_ELECTRO_MURDER_COMBO,                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_FIREBALL_SUICIDE_FIREMINE,              INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,          NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_FIREBALL_SUICIDE_BLAST,                 INFO_WEAPON_FIREBALL_SUICIDE_BLAST,             NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_FIREBALL_MURDER_FIREMINE,               INFO_WEAPON_FIREBALL_MURDER_FIREMINE,           NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_FIREBALL_MURDER_BLAST,                  INFO_WEAPON_FIREBALL_MURDER_BLAST,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_MORTAR_SUICIDE_EXPLODE,                 INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,             NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_MORTAR_SUICIDE_BOUNCE,                  INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_MORTAR_MURDER_EXPLODE,                  INFO_WEAPON_MORTAR_MURDER_EXPLODE,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_MORTAR_MURDER_BOUNCE,                   INFO_WEAPON_MORTAR_MURDER_BOUNCE,                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_HAGAR_SUICIDE,                                  INFO_WEAPON_HAGAR_SUICIDE,                                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_HAGAR_MURDER_BURST,                     INFO_WEAPON_HAGAR_MURDER_BURST,                         NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_HAGAR_MURDER_SPRAY,                     INFO_WEAPON_HAGAR_MURDER_SPRAY,                         NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_HLAC_SUICIDE,                                   INFO_WEAPON_HLAC_SUICIDE,                                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_HLAC_MURDER,                                    INFO_WEAPON_HLAC_MURDER,                                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_HOOK_MURDER,                                    INFO_WEAPON_HOOK_MURDER,                                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_LASER_SUICIDE,                                  INFO_WEAPON_LASER_SUICIDE,                                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_LASER_MURDER,                                   INFO_WEAPON_LASER_MURDER,                                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_MINELAYER_SUICIDE,                              INFO_WEAPON_MINELAYER_SUICIDE,                          NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_MINELAYER_MURDER,                               INFO_WEAPON_MINELAYER_MURDER,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_MINSTANEX_MURDER,                               INFO_WEAPON_MINSTANEX_MURDER,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_NEX_MURDER,                                     INFO_WEAPON_NEX_MURDER,                                         NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_RIFLE_MURDER_HAIL_PIERCING,             INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,         NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_RIFLE_MURDER_HAIL,                              INFO_WEAPON_RIFLE_MURDER_HAIL,                          NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_RIFLE_MURDER_PIERCING,                  INFO_WEAPON_RIFLE_MURDER_PIERCING,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_RIFLE_MURDER,                                   INFO_WEAPON_RIFLE_MURDER,                                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_RIFLE_MURDER_HEADSHOT,                  INFO_WEAPON_RIFLE_MURDER_HEADSHOT,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ROCKETLAUNCHER_SUICIDE,                 INFO_WEAPON_ROCKETLAUNCHER_SUICIDE,             NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ROCKETLAUNCHER_MURDER_DIRECT,   INFO_WEAPON_ROCKETLAUNCHER_MURDER_DIRECT,       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ROCKETLAUNCHER_MURDER_SPLASH,   INFO_WEAPON_ROCKETLAUNCHER_MURDER_SPLASH,       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_SEEKER_SUICIDE,                                 INFO_WEAPON_SEEKER_SUICIDE,                             NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_SEEKER_MURDER_TAG,                              INFO_WEAPON_SEEKER_MURDER_TAG,                          NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_SEEKER_MURDER_SPRAY,                    INFO_WEAPON_SEEKER_MURDER_SPRAY,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_SHOTGUN_MURDER_SLAP,                    INFO_WEAPON_SHOTGUN_MURDER_SLAP,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_SHOTGUN_MURDER,                                 INFO_WEAPON_SHOTGUN_MURDER,                             NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_TUBA_SUICIDE,                                   INFO_WEAPON_TUBA_SUICIDE,                                       NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_TUBA_MURDER,                                    INFO_WEAPON_TUBA_MURDER,                                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ACCORDEON_SUICIDE,                              INFO_WEAPON_ACCORDEON_SUICIDE,                          NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_ACCORDEON_MURDER,                               INFO_WEAPON_ACCORDEON_MURDER,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_KLEINBOTTLE_SUICIDE,                    INFO_WEAPON_KLEINBOTTLE_SUICIDE,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_KLEINBOTTLE_MURDER,                     INFO_WEAPON_KLEINBOTTLE_MURDER,                         NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_UZI_MURDER_SNIPE,                               INFO_WEAPON_UZI_MURDER_SNIPE,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(WEAPON_UZI_MURDER_SPRAY,                               INFO_WEAPON_UZI_MURDER_SPRAY,                           NO_MSG) 
 
 
 #define MSG_DEATH_NOTIFICATIONS \
index 4fb24168151f27337c8ba9dd6bd664e67a38d912..39acca6c13da22158e2613b544f41e4429f6d192 100644 (file)
@@ -350,31 +350,19 @@ void Obituary_SpecialDeath(entity notif_target, float murder, float deathtype, s
                }
        }
 }
-
-void Obituary_WeaponDeath(entity notif_target, float deathtype, string s1, string s2, float f1, float f2, float f3)
+float w_deathtype;
+void Obituary_WeaponDeath(float murder, float deathtype, string s1, string s2)
 {
-       float handled, hits;
-       if(DEATH_ISSPECIAL(deathtype))
+       float death_weapon = DEATH_WEAPONOF(deathtype);
+
+       if(death_weapon)
        {
-               #define DEATHTYPE(name,msg_death,msg_death_by,position) \
-                       { if(deathtype == max(0, name)) \
-                       { \
-                               ++hits; \
-                       } }
+               w_deathtype = deathtype;
+               float death_message = weapon_action(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
+               w_deathtype = FALSE;
 
-               DEATHTYPES
-               #undef DEATHTYPE
-               
-               if not(hits)
-               {
-                       backtrace("Unhandled deathtype. Please notify Samual!\n");
-                       //return;
-               }
-               if not(handled)
-               {
-                       print(sprintf("Obituary_SpecialDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification!\n", Deathtype_Name(deathtype), deathtype));
-                       return;
-               }
+               if(death_message) { Send_Notification(world, MSG_ALL, MSG_WEAPON, death_message, s1, s2, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
+               else { print(sprintf("Obituary_WeaponDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification for weapon %d!\n", Deathtype_Name(deathtype), deathtype, death_weapon)); }
        }
 }
 
@@ -436,7 +424,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                }
                else if(DEATH_WEAPONOF(deathtype))
                {
-                       print("SUICIDE: death was a weapon!\n");
+                       Obituary_WeaponDeath(FALSE, deathtype, targ.netname, NO_STR_ARG);
                }
                else
                {
@@ -528,7 +516,6 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                                        Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_FIRST_VERBOSE : DEATH_MURDER_FRAGGED_FIRST),
                                                s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
                                }
-                               //Send_Notification(world, MSG_INFO, INFO_DEATH_FRAG_FIRSTBLOOD, s1, s2, attacker.team, NO_FL_ARG, NO_FL_ARG);
                        }
                        else // normal frags, kill sprees listed
                        {
@@ -548,11 +535,10 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                                        Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_VERBOSE : DEATH_MURDER_FRAGGED),
                                                s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
                                }
-
-                               // Send_Notification(world, MSG_WEAPON, 50, s1, s2, attacker.killcount, targ.killcount, Obituary_Score_Position);
-                               if(DEATH_WEAPONOF(deathtype)) { print("Currently unhandled...\n"); }
-                               else { Obituary_SpecialDeath(targ, TRUE, deathtype, s2, s1, targ.killcount, NO_FL_ARG, NO_FL_ARG); }
                        }
+                       
+                       if(DEATH_WEAPONOF(deathtype)) { Obituary_WeaponDeath(TRUE, deathtype, targ.netname, attacker.netname); }
+                       else { Obituary_SpecialDeath(targ, TRUE, deathtype, s2, s1, targ.killcount, NO_FL_ARG, NO_FL_ARG); }
                }
        }
 
index bb44e827e709cd0eb84e37bdf04c361179055e45..a2ec3faae1d4820577ce4203a54ae96af3bd91ed 100644 (file)
@@ -684,6 +684,14 @@ float w_crylink(float req)
        {
                W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), autocvar_g_balance_crylink_reload_ammo, autocvar_g_balance_crylink_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_CRYLINK_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_CRYLINK_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -712,19 +720,6 @@ float w_crylink(float req)
                precache_sound("weapons/crylink_impact2.wav");
                precache_sound("weapons/crylink_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = _("%s succeeded at self-destructing themself with the Crylink");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE)
-                       w_deathtypestring = _("%s could not hide from %s's Crylink"); // unchecked: SPLASH (SECONDARY can't be)
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = _("%s was too close to %s's Crylink"); // unchecked: SECONDARY
-               else
-                       w_deathtypestring = _("%s took a close look at %s's Crylink"); // unchecked: SECONDARY
-       }
        return TRUE;
 }
 #endif
index 7a91cbd89cae366bfde23606899c9fd9807281a9..d9dbe43b5840d48c5836fa1330dfcd50d17cb8c5 100644 (file)
@@ -547,6 +547,27 @@ float w_electro(float req)
        {
                W_Reload(min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), autocvar_g_balance_electro_reload_ammo, autocvar_g_balance_electro_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_ELECTRO_SUICIDE_ORBS;
+               else
+                       return WEAPON_ELECTRO_SUICIDE_BOLT;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       return WEAPON_ELECTRO_MURDER_ORBS;
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                               return WEAPON_ELECTRO_MURDER_COMBO;
+                       else
+                               return WEAPON_ELECTRO_MURDER_BOLT;
+               }
+       }
        return TRUE;
 }
 #endif
@@ -585,32 +606,6 @@ 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 = _("%s could not remember where they put their electro plasma");
-               else
-                       w_deathtypestring = _("%s played with electro plasma");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_SPLASH) // unchecked: BOUNCE
-                               w_deathtypestring = _("%s just noticed %s's electro plasma");
-                       else // unchecked: BOUNCE
-                               w_deathtypestring = _("%s got in touch with %s's electro plasma");
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE) // combo
-                               w_deathtypestring = _("%s felt the electrifying air of %s's electro combo");
-                       else if(w_deathtype & HITTYPE_SPLASH)
-                               w_deathtypestring = _("%s got too close to %s's blue electro bolt");
-                       else
-                               w_deathtypestring = _("%s was blasted by %s's blue electro bolt");
-               }
-       }
        return TRUE;
 }
 #endif
index 67547e3583efef51458b138d926cfda5daf1ed2d..0c386923aed6e7298030a8328982864b96f31191 100644 (file)
@@ -374,6 +374,24 @@ float w_fireball(float req)
        {
                self.fireball_primarytime = time;
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_FIREBALL_SUICIDE_FIREMINE;
+               else
+                       return WEAPON_FIREBALL_SUICIDE_BLAST;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       return WEAPON_FIREBALL_MURDER_FIREMINE;
+               }
+               else
+               {
+                       return WEAPON_FIREBALL_MURDER_BLAST;
+               }
+       }
        return TRUE;
 }
 #endif
@@ -399,37 +417,6 @@ float w_fireball(float req)
        {
                precache_sound("weapons/fireball_impact2.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s forgot about some firemine");
-               else
-                       w_deathtypestring = _("%s should have used a smaller gun");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_HEADSHOT)
-                               w_deathtypestring = _("%s tried to catch %s's firemine");
-                       else
-                               w_deathtypestring = _("%s fatefully ignored %s's firemine");
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               if(w_deathtype & HITTYPE_SPLASH) // BFG effect
-                                       w_deathtypestring = _("%s could not hide from %s's fireball");
-                               else // laser
-                                       w_deathtypestring = _("%s saw the pretty lights of %s's fireball");
-                       }
-                       else if(w_deathtype & HITTYPE_SPLASH)
-                               w_deathtypestring = _("%s got too close to %s's fireball");
-                       else
-                               w_deathtypestring = _("%s tasted %s's fireball");
-               }
-       }
        return TRUE;
 }
 #endif
index 5f6c0346f5cf3c11137bf6e5271487fb764b263e..a7f5b3870f318cb1517c644b3767218f18ad10ee 100644 (file)
@@ -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
index 9a4b1ef4495aa95d223d7df5cd15f7e770060f0b..e071efb8f59c9f500370dfc116f160365b2033cb 100644 (file)
@@ -432,6 +432,17 @@ float w_hagar(float req)
                if not(self.hagar_load) // require releasing loaded rockets first
                        W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_HAGAR_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_HAGAR_MURDER_BURST;
+               else
+                       return WEAPON_HAGAR_MURDER_SPRAY;
+       }
        return TRUE;
 }
 #endif
@@ -459,15 +470,6 @@ float w_hagar(float req)
                precache_sound("weapons/hagexp2.wav");
                precache_sound("weapons/hagexp3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s played with tiny hagar rockets");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // must be secondary; unchecked: SPLASH
-                       w_deathtypestring = _("%s was pummeled with a burst of hagar rockets by %s");
-               else // unchecked: SPLASH, SECONDARY
-                       w_deathtypestring = _("%s was pummeled with hagar rockets by %s");
-       }
        return TRUE;
 }
 #endif
index a2697b2f5cb527050677ace98031e52896c6b83e..67a1e4e60ac64c6fb462c2b3b104369715a2c2d5 100644 (file)
@@ -219,6 +219,10 @@ float w_hlac(float req)
        {
                W_Reload(min(autocvar_g_balance_hlac_primary_ammo, autocvar_g_balance_hlac_secondary_ammo), autocvar_g_balance_hlac_reload_ammo, autocvar_g_balance_hlac_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               return WEAPON_HLAC_SUICIDE;
+       else if (req == WR_KILLMESSAGE)
+               return WEAPON_HLAC_MURDER;
        return TRUE;
 }
 #endif
@@ -237,10 +241,6 @@ float w_hlac(float req)
        {
                precache_sound("weapons/laserimpact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s should have used a smaller gun");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s was cut down with a HLAC by %s");
        return TRUE;
 }
 #endif
index 63d02604c4271f11cc808099f148f8946393bbf1..f07ec07ca655a5bd94ac6afd4faa4bd6b64d8155 100644 (file)
@@ -265,6 +265,10 @@ float w_hook(float req)
        {
                self.hook_refire = time;
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               return FALSE;
+       else if (req == WR_KILLMESSAGE)
+               return WEAPON_HOOK_MURDER;
        return TRUE;
 }
 #endif
@@ -283,10 +287,6 @@ float w_hook(float req)
        {
                precache_sound("weapons/hookbomb_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s did the impossible");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s was caught in %s's hook gravity bomb");
        return TRUE;
 }
 #endif
index 5e2bb075aa5c7ff1a4fd6b258ac2cea9661954a7..73caaf09647cc0b966e93e7e9067c3989dc2d08f 100644 (file)
@@ -291,6 +291,14 @@ float w_laser(float req)
        {
                W_Reload(0, autocvar_g_balance_laser_reload_ammo, autocvar_g_balance_laser_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_LASER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_LASER_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -309,15 +317,6 @@ float w_laser(float req)
        {
                precache_sound("weapons/laserimpact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s lasered themself to hell");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s was cut in half by %s's gauntlet"); // unchecked: SPLASH
-               else
-                       w_deathtypestring = _("%s was lasered to death by %s"); // unchecked: SPLASH
-       }
        return TRUE;
 }
 #endif
index 4d98f0c91cd50927abfecdacd53c1b82c6a35dec..158a9d8eb87b2377486ae5ddd3a7eca466908490 100644 (file)
@@ -509,6 +509,14 @@ float w_minelayer(float req)
        {
                W_Reload(autocvar_g_balance_minelayer_ammo, autocvar_g_balance_minelayer_reload_ammo, autocvar_g_balance_minelayer_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_MINELAYER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_MINELAYER_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -527,20 +535,6 @@ float w_minelayer(float req)
        {
                precache_sound("weapons/mine_exp.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = _("%s blew themself up with their minelayer");
-               else
-                       w_deathtypestring = _("%s forgot about their mine");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = _("%s got too close to %s's mine");
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = _("%s almost dodged %s's mine");
-               else
-                       w_deathtypestring = _("%s stepped on %s's mine");
-       }
        return TRUE;
 }
 #endif
index 7a94299eb28ee110e3d01e8aa686bf51d3918828..fae9a811efaa16770a51f72e0e00885204f9773b 100644 (file)
@@ -278,6 +278,14 @@ float w_minstanex(float req)
 
                W_Reload(used_ammo, autocvar_g_balance_minstanex_reload_ammo, autocvar_g_balance_minstanex_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_MINSTANEX_MURDER;
+       }
        return TRUE;
 }
 #endif
index 51afdd00f100bcb7a3847960c43ec561619c08dd..9d66f407ef8bbb401c2fd4c77f0c1fd2ae52cf42 100644 (file)
@@ -233,7 +233,14 @@ float w_nex(float req)
        {
                W_Reload(min(autocvar_g_balance_nex_primary_ammo, autocvar_g_balance_nex_secondary_ammo), autocvar_g_balance_nex_reload_ammo, autocvar_g_balance_nex_reload_time, "weapons/reload.wav");
        }
-
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_NEX_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -252,10 +259,6 @@ float w_nex(float req)
        {
                precache_sound("weapons/neximpact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s is now thinking with portals");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s has been vaporized by %s's nex");
        return TRUE;
 }
 #endif
index f95e554b0e9799d78a52108ca39e72f2c7dde053..790bcd124c588deff469d8d258bed5b919009d3e 100644 (file)
@@ -375,10 +375,6 @@ float w_porto(float req)
        {
                // nothing to do
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s did the impossible");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s felt %s doing the impossible to him");
        return TRUE;
 }
 #endif
index 1c5f766d7dbf2240ce03ee0bce3e149db4c48489..33b2bda5ff2b99361f0e688f55360c6a9ceea9be 100644 (file)
@@ -200,6 +200,34 @@ float w_rifle(float req)
        {
                W_Reload(min(autocvar_g_balance_rifle_primary_ammo, autocvar_g_balance_rifle_secondary_ammo), autocvar_g_balance_rifle_reload_ammo, autocvar_g_balance_rifle_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                               return WEAPON_RIFLE_MURDER_HAIL_PIERCING;
+                       else
+                               return WEAPON_RIFLE_MURDER_HAIL;
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                       {
+                               return WEAPON_RIFLE_MURDER_PIERCING;
+                       }
+                       else
+                       {
+                               if(w_deathtype & HITTYPE_HEADSHOT)
+                                       return WEAPON_RIFLE_MURDER_HEADSHOT;
+                               else
+                                       return WEAPON_RIFLE_MURDER;
+                       }
+               }
+       }
        return TRUE;
 }
 #endif
@@ -227,35 +255,6 @@ float w_rifle(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = _("%s is now thinking with portals");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                               w_deathtypestring = _("%s failed to hide from %s's rifle bullet hail");
-                       else
-                               w_deathtypestring = _("%s died in %s's rifle bullet hail");
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               // TODO special headshot message here too?
-                               w_deathtypestring = _("%s failed to hide from %s's rifle");
-                       }
-                       else
-                       {
-                               if(w_deathtype & HITTYPE_HEADSHOT)
-                                       w_deathtypestring = _("%s got shot in the head with a rifle by %s");
-                               else
-                                       w_deathtypestring = _("%s was sniped with a rifle by %s");
-                       }
-               }
-       }
        return TRUE;
 }
 #endif
index 643bf4bd5b5b72b0984365ab6f3f368347b434a2..29426699c06e6c5746f2d06f818b8655102b0e5e 100644 (file)
@@ -445,6 +445,17 @@ float w_rlauncher(float req)
        {
                W_Reload(autocvar_g_balance_rocketlauncher_ammo, autocvar_g_balance_rocketlauncher_reload_ammo, autocvar_g_balance_rocketlauncher_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_ROCKETLAUNCHER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
+                       return WEAPON_ROCKETLAUNCHER_MURDER_SPLASH;
+               else
+                       return WEAPON_ROCKETLAUNCHER_MURDER_DIRECT;
+       }
        return TRUE;
 }
 #endif
@@ -463,17 +474,6 @@ float w_rlauncher(float req)
        {
                precache_sound("weapons/rocket_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s blew themself up with their rocketlauncher");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = _("%s got too close to %s's rocket");
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = _("%s almost dodged %s's rocket");
-               else
-                       w_deathtypestring = _("%s ate %s's rocket");
-       }
        return TRUE;
 }
 #endif
index 7cf6cfb73634e11be73aba7215de897f8ee7b715..dec007ae8f3ec9d9413101107e767543e6872445 100644 (file)
@@ -612,6 +612,17 @@ float w_seeker(float req)
        {
                W_Reload(min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo), autocvar_g_balance_seeker_reload_ammo, autocvar_g_balance_seeker_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_SEEKER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_SEEKER_MURDER_TAG;
+               else
+                       return WEAPON_SEEKER_MURDER_SPRAY;
+       }
        return TRUE;
 }
 #endif
@@ -664,15 +675,6 @@ float w_seeker(float req)
                precache_sound("weapons/tagexp3.wav");
                precache_sound("weapons/tag_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s played with tiny seeker rockets");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s was tagged with a seeker by %s");
-               else
-                       w_deathtypestring = _("%s was pummeled with seeker rockets by %s");
-       }
        return TRUE;
 }
 #endif
index fcf9a27c27482a25432747d58cc37ee974fae513..7d175e55ba55249b94f1df02afaabd951082342b 100644 (file)
@@ -238,6 +238,17 @@ float w_shotgun(float req)
        {
                W_Reload(autocvar_g_balance_shotgun_primary_ammo, autocvar_g_balance_shotgun_reload_ammo, autocvar_g_balance_shotgun_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_SHOTGUN_MURDER_SLAP;
+               else
+                       return WEAPON_SHOTGUN_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -267,15 +278,6 @@ float w_shotgun(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s is now thinking with portals");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%2$s slapped %1$s around a bit with a large shotgun");
-               else
-                       w_deathtypestring = _("%s was gunned down with a shotgun by %s");
-       }
        return TRUE;
 }
 #endif
index 9993dd4eeb4bc115318f3fcdaaaa8e0b776a5083..05329cf46dcef90dcd1297832602c1aff30aac74 100644 (file)
@@ -422,6 +422,26 @@ 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)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE)
+                       return WEAPON_ACCORDEON_SUICIDE;
+               else if(w_deathtype & HITTYPE_HEADSHOT)
+                       return WEAPON_KLEINBOTTLE_SUICIDE;
+               else
+                       return WEAPON_TUBA_SUICIDE;
+
+               return FALSE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE)
+                       return WEAPON_ACCORDEON_MURDER;
+               else if(w_deathtype & HITTYPE_HEADSHOT)
+                       return WEAPON_KLEINBOTTLE_MURDER;
+               else
+                       return WEAPON_TUBA_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -436,54 +456,6 @@ float w_tuba(float req)
        {
                // nothing to do
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               float instr;
-               instr = 0;
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       instr |= 1;
-               if(w_deathtype & HITTYPE_BOUNCE)
-                       instr |= 2;
-               if(w_deathtype & HITTYPE_HEADSHOT)
-                       instr |= 4;
-               switch(instr)
-               {
-                       default:
-                       case 0: // Tuba
-                               w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Tuba");
-                               break;
-                       case 1: // Accordeon
-                               w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Accordeon");
-                               break;
-                       case 2: // Klein Bottle
-                               w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Klein Bottle");
-                               break;
-               }
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               float instr;
-               instr = 0;
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       instr |= 1;
-               if(w_deathtype & HITTYPE_BOUNCE)
-                       instr |= 2;
-               if(w_deathtype & HITTYPE_HEADSHOT)
-                       instr |= 4;
-               switch(instr)
-               {
-                       default:
-                       case 0: // Tuba
-                               w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Tuba");
-                               break;
-                       case 1: // Accordeon
-                               w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Accordeon");
-                               break;
-                       case 2: // Klein Bottle
-                               w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Klein Bottle");
-                               break;
-               }
-       }
        return TRUE;
 }
 #endif
index 77d8b4aee562215cec57fa4a1021857d41be4ca0..7204437bb6f02fb7b8899f9ec8a74da4f9216e9f 100644 (file)
@@ -289,6 +289,17 @@ float w_uzi(float req)
        {
                W_Reload(min(max(autocvar_g_balance_uzi_sustained_ammo, autocvar_g_balance_uzi_first_ammo), autocvar_g_balance_uzi_burst_ammo), autocvar_g_balance_uzi_reload_ammo, autocvar_g_balance_uzi_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_UZI_MURDER_SNIPE;
+               else
+                       return WEAPON_UZI_MURDER_SPRAY;
+       }
        return TRUE;
 }
 #endif
@@ -314,15 +325,6 @@ float w_uzi(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s is now thinking with portals");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s was sniped by %s's machine gun");
-               else
-                       w_deathtypestring = _("%s was riddled full of holes by %s's machine gun");
-       }
        return TRUE;
 }
 #endif