From 4f7f52f56bc339a393aaec64d2c93ab0fe809984 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 14 Jun 2022 15:34:41 +0200 Subject: [PATCH] Fix #2698 "arc is missing a suicide death message" --- notifications.cfg | 8 +++++--- qcsrc/common/notifications/all.inc | 2 ++ qcsrc/common/weapons/weapon/arc.qc | 7 +++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/notifications.cfg b/notifications.cfg index 83fbcaf84..c913b5826 100644 --- a/notifications.cfg +++ b/notifications.cfg @@ -93,7 +93,7 @@ seta notification_ANNCE_VOTE_ACCEPT "2" "0 = disabled, 1 = enabled if gentle mod seta notification_ANNCE_VOTE_CALL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled" seta notification_ANNCE_VOTE_FAIL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled" -// MSG_INFO notifications (count = 334): +// MSG_INFO notifications (count = 335): seta notification_INFO_CA_JOIN_LATE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_CA_LEAVE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_CHAT_NOSPECTATORS "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -283,6 +283,7 @@ seta notification_INFO_WEAPON_ACCORDEON_MURDER "1" "0 = off, 1 = print to consol seta notification_INFO_WEAPON_ACCORDEON_SUICIDE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_ARC_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_ARC_MURDER_SPRAY "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_WEAPON_ARC_SUICIDE_BOLT "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_BLASTER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_BLASTER_SUICIDE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_CRYLINK_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -537,7 +538,7 @@ seta notification_CENTER_VEHICLE_STEAL "1" "0 = off, 1 = centerprint" seta notification_CENTER_VEHICLE_STEAL_SELF "1" "0 = off, 1 = centerprint" seta notification_CENTER_WEAPON_MINELAYER_LIMIT "1" "0 = off, 1 = centerprint" -// MSG_MULTI notifications (count = 156): +// MSG_MULTI notifications (count = 157): seta notification_DEATH_MURDER_BUFF "1" "Enable this multiple notification" seta notification_DEATH_MURDER_CHEAT "1" "Enable this multiple notification" seta notification_DEATH_MURDER_DROWN "1" "Enable this multiple notification" @@ -636,6 +637,7 @@ seta notification_WEAPON_ACCORDEON_MURDER "1" "Enable this multiple notification seta notification_WEAPON_ACCORDEON_SUICIDE "1" "Enable this multiple notification" seta notification_WEAPON_ARC_MURDER "1" "Enable this multiple notification" seta notification_WEAPON_ARC_MURDER_SPRAY "1" "Enable this multiple notification" +seta notification_WEAPON_ARC_SUICIDE_BOLT "1" "Enable this multiple notification" seta notification_WEAPON_BLASTER_MURDER "1" "Enable this multiple notification" seta notification_WEAPON_BLASTER_SUICIDE "1" "Enable this multiple notification" seta notification_WEAPON_CRYLINK_MURDER "1" "Enable this multiple notification" @@ -746,4 +748,4 @@ seta notification_show_sprees_info "3" "Show spree information in MSG_INFO messa seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself" seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement" -// Notification counts (total = 839): MSG_ANNCE = 80, MSG_INFO = 334, MSG_CENTER = 241, MSG_MULTI = 156, MSG_CHOICE = 28 +// Notification counts (total = 841): MSG_ANNCE = 80, MSG_INFO = 335, MSG_CENTER = 241, MSG_MULTI = 157, MSG_CHOICE = 28 diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index df2141886..b42f344ba 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -443,6 +443,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_INFO_NOTIF(WEAPON_ACCORDEON_SUICIDE, N_CONSOLE, 2, 1, "s1 s2loc spree_lost", "s1", "weapontuba", _("^BG%s^K1 hurt their own ears with the @!#%%'n Accordeon%s%s"), "") MSG_INFO_NOTIF(WEAPON_ARC_MURDER, N_CONSOLE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponarc", _("^BG%s%s^K1 was electrocuted by ^BG%s^K1's Arc%s%s"), "") MSG_INFO_NOTIF(WEAPON_ARC_MURDER_SPRAY, N_CONSOLE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponarc", _("^BG%s%s^K1 was blasted by ^BG%s^K1's Arc bolts%s%s"), "") + MSG_INFO_NOTIF(WEAPON_ARC_SUICIDE_BOLT, N_CONSOLE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponarc", _("^BG%s^K1 played with Arc bolts%s%s"), "") MSG_INFO_NOTIF(WEAPON_BLASTER_MURDER, N_CONSOLE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponlaser", _("^BG%s%s^K1 was shot to death by ^BG%s^K1's Blaster%s%s"), "") MSG_INFO_NOTIF(WEAPON_BLASTER_SUICIDE, N_CONSOLE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponlaser", _("^BG%s^K1 shot themself to hell with their Blaster%s%s"), "") MSG_INFO_NOTIF(WEAPON_CRYLINK_MURDER, N_CONSOLE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponcrylink", _("^BG%s%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s%s"), "") @@ -894,6 +895,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_MULTI_NOTIF(WEAPON_ACCORDEON_SUICIDE, N_ENABLE, NULL, INFO_WEAPON_ACCORDEON_SUICIDE, CENTER_DEATH_SELF_GENERIC) MSG_MULTI_NOTIF(WEAPON_ARC_MURDER, N_ENABLE, NULL, INFO_WEAPON_ARC_MURDER, NULL) MSG_MULTI_NOTIF(WEAPON_ARC_MURDER_SPRAY, N_ENABLE, NULL, INFO_WEAPON_ARC_MURDER_SPRAY, NULL) + MSG_MULTI_NOTIF(WEAPON_ARC_SUICIDE_BOLT, N_ENABLE, NULL, INFO_WEAPON_ARC_SUICIDE_BOLT, CENTER_DEATH_SELF_GENERIC) MSG_MULTI_NOTIF(WEAPON_BLASTER_MURDER, N_ENABLE, NULL, INFO_WEAPON_BLASTER_MURDER, NULL) MSG_MULTI_NOTIF(WEAPON_BLASTER_SUICIDE, N_ENABLE, NULL, INFO_WEAPON_BLASTER_SUICIDE, CENTER_DEATH_SELF_GENERIC) MSG_MULTI_NOTIF(WEAPON_CRYLINK_MURDER, N_ENABLE, NULL, INFO_WEAPON_CRYLINK_MURDER, NULL) diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 54e7d99bd..981130cae 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -711,6 +711,13 @@ METHOD(Arc, wr_think, void(entity thiswep, entity actor, .entity weaponentity, i } #endif } +METHOD(Arc, wr_suicidemessage, Notification(entity thiswep)) +{ + if(w_deathtype & HITTYPE_SECONDARY) + return WEAPON_ARC_SUICIDE_BOLT; + else + return WEAPON_THINKING_WITH_PORTALS; +} METHOD(Arc, wr_init, void(entity thiswep)) { if(!arc_shotorigin[0]) -- 2.39.2