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"), "") \
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 \
}
}
}
-
-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)); }
}
}
}
else if(DEATH_WEAPONOF(deathtype))
{
- print("SUICIDE: death was a weapon!\n");
+ Obituary_WeaponDeath(FALSE, deathtype, targ.netname, NO_STR_ARG);
}
else
{
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
{
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); }
}
}
{
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
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
{
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
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
{
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
{
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
{
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
{
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
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
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
{
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
{
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
{
self.hook_refire = time;
}
+ else if (req == WR_SUICIDEMESSAGE)
+ return FALSE;
+ else if (req == WR_KILLMESSAGE)
+ return WEAPON_HOOK_MURDER;
return TRUE;
}
#endif
{
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
{
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
{
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
{
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
{
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
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
{
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
{
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
{
// 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
{
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
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
{
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
{
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
{
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
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
{
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
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
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
{
// 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
{
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
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