From: terencehill Date: Fri, 11 Oct 2024 16:31:31 +0000 (+0200) Subject: Show trigger_hurt entity messages if present on trigger_hurt kill. FIXME: # should... X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=de406f7c8e1398ae323b96224ea5844438cdeebe;p=xonotic%2Fxonotic-data.pk3dir.git Show trigger_hurt entity messages if present on trigger_hurt kill. FIXME: # should be replaced with attacker name in murder message --- diff --git a/notifications.cfg b/notifications.cfg index dd43e2d66..413836892 100644 --- a/notifications.cfg +++ b/notifications.cfg @@ -159,6 +159,7 @@ seta notification_INFO_DEATH_MURDER_VH_WAKI_DEATH "1" "0 = off, 1 = print to con seta notification_INFO_DEATH_MURDER_VH_WAKI_GUN "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_MURDER_VH_WAKI_ROCKET "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_MURDER_VOID "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_DEATH_MURDER_VOID_ENT "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_SELF_AUTOTEAMCHANGE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_SELF_BETRAYAL "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_SELF_CAMP "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -212,6 +213,7 @@ seta notification_INFO_DEATH_SELF_VH_SPID_ROCKET "1" "0 = off, 1 = print to cons seta notification_INFO_DEATH_SELF_VH_WAKI_DEATH "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_SELF_VH_WAKI_ROCKET "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_SELF_VOID "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_DEATH_SELF_VOID_ENT "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DEATH_TEAMKILL "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_DOMINATION_CAPTURE_TIME "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_FREEZETAG_AUTO_REVIVED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -616,6 +618,7 @@ seta notification_DEATH_MURDER_VH_WAKI_DEATH "1" "Enable this multiple notificat seta notification_DEATH_MURDER_VH_WAKI_GUN "1" "Enable this multiple notification" seta notification_DEATH_MURDER_VH_WAKI_ROCKET "1" "Enable this multiple notification" seta notification_DEATH_MURDER_VOID "1" "Enable this multiple notification" +seta notification_DEATH_MURDER_VOID_ENT "1" "Enable this multiple notification" seta notification_DEATH_SELF_AUTOTEAMCHANGE "1" "Enable this multiple notification" seta notification_DEATH_SELF_BETRAYAL "1" "Enable this multiple notification" seta notification_DEATH_SELF_CAMP "1" "Enable this multiple notification" @@ -669,6 +672,7 @@ seta notification_DEATH_SELF_VH_SPID_ROCKET "1" "Enable this multiple notificati seta notification_DEATH_SELF_VH_WAKI_DEATH "1" "Enable this multiple notification" seta notification_DEATH_SELF_VH_WAKI_ROCKET "1" "Enable this multiple notification" seta notification_DEATH_SELF_VOID "1" "Enable this multiple notification" +seta notification_DEATH_SELF_VOID_ENT "1" "Enable this multiple notification" seta notification_ITEM_BUFF_DROP "1" "Enable this multiple notification" seta notification_ITEM_BUFF_GOT "1" "Enable this multiple notification" seta notification_ITEM_WEAPON_DONTHAVE "1" "Enable this multiple notification" diff --git a/qcsrc/common/deathtypes/all.inc b/qcsrc/common/deathtypes/all.inc index ac42a5bb2..19de656e0 100644 --- a/qcsrc/common/deathtypes/all.inc +++ b/qcsrc/common/deathtypes/all.inc @@ -1,61 +1,61 @@ -REGISTER_DEATHTYPE(AUTOTEAMCHANGE, DEATH_SELF_AUTOTEAMCHANGE, NULL, "") -REGISTER_DEATHTYPE(BUFF, NULL, DEATH_MURDER_BUFF, "") -REGISTER_DEATHTYPE(CAMP, DEATH_SELF_CAMP, NULL, "") -REGISTER_DEATHTYPE(CHEAT, DEATH_SELF_CHEAT, DEATH_MURDER_CHEAT, "") -REGISTER_DEATHTYPE(CUSTOM, DEATH_SELF_CUSTOM, NULL, "") -REGISTER_DEATHTYPE(DROWN, DEATH_SELF_DROWN, DEATH_MURDER_DROWN, "") -REGISTER_DEATHTYPE(FALL, DEATH_SELF_FALL, DEATH_MURDER_FALL, "") -REGISTER_DEATHTYPE(FIRE, DEATH_SELF_FIRE, DEATH_MURDER_FIRE, "") -REGISTER_DEATHTYPE(GENERIC, DEATH_SELF_GENERIC, NULL, "") -REGISTER_DEATHTYPE(HURTTRIGGER, DEATH_SELF_VOID, DEATH_MURDER_VOID, "") -REGISTER_DEATHTYPE(KILL, DEATH_SELF_SUICIDE, NULL, "") -REGISTER_DEATHTYPE(LAVA, DEATH_SELF_LAVA, DEATH_MURDER_LAVA, "") -REGISTER_DEATHTYPE(MIRRORDAMAGE, DEATH_SELF_BETRAYAL, NULL, "") -REGISTER_DEATHTYPE(MONSTER_MAGE, DEATH_SELF_MON_MAGE, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(MONSTER_GOLEM_CLAW, DEATH_SELF_MON_GOLEM_CLAW, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(MONSTER_GOLEM_SMASH, DEATH_SELF_MON_GOLEM_SMASH, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(MONSTER_GOLEM_ZAP, DEATH_SELF_MON_GOLEM_ZAP, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(MONSTER_SPIDER, DEATH_SELF_MON_SPIDER, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(MONSTER_WYVERN, DEATH_SELF_MON_WYVERN, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(MONSTER_ZOMBIE_JUMP, DEATH_SELF_MON_ZOMBIE_JUMP, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(MONSTER_ZOMBIE_MELEE, DEATH_SELF_MON_ZOMBIE_MELEE, DEATH_MURDER_MONSTER, "monster") -REGISTER_DEATHTYPE(NADE, DEATH_SELF_NADE, DEATH_MURDER_NADE, "") -REGISTER_DEATHTYPE(NADE_NAPALM, DEATH_SELF_NADE_NAPALM, DEATH_MURDER_NADE_NAPALM, "") -REGISTER_DEATHTYPE(NADE_ICE, DEATH_SELF_NADE_ICE, DEATH_MURDER_NADE_ICE, "") -REGISTER_DEATHTYPE(NADE_ICE_FREEZE, DEATH_SELF_NADE_ICE_FREEZE, DEATH_MURDER_NADE_ICE_FREEZE, "") -REGISTER_DEATHTYPE(NADE_HEAL, DEATH_SELF_NADE_HEAL, DEATH_MURDER_NADE_HEAL, "") -REGISTER_DEATHTYPE(NOAMMO, DEATH_SELF_NOAMMO, NULL, "") -REGISTER_DEATHTYPE(ROT, DEATH_SELF_ROT, NULL, "") -REGISTER_DEATHTYPE(SHOOTING_STAR, DEATH_SELF_SHOOTING_STAR, DEATH_MURDER_SHOOTING_STAR, "") -REGISTER_DEATHTYPE(SLIME, DEATH_SELF_SLIME, DEATH_MURDER_SLIME, "") -REGISTER_DEATHTYPE(SWAMP, DEATH_SELF_SWAMP, DEATH_MURDER_SWAMP, "") -REGISTER_DEATHTYPE(TEAMCHANGE, DEATH_SELF_TEAMCHANGE, NULL, "") -REGISTER_DEATHTYPE(TELEFRAG, NULL, DEATH_MURDER_TELEFRAG, "") -REGISTER_DEATHTYPE(TOUCHEXPLODE, DEATH_SELF_TOUCHEXPLODE, DEATH_MURDER_TOUCHEXPLODE, "") -REGISTER_DEATHTYPE(TURRET, DEATH_SELF_TURRET, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_EWHEEL, DEATH_SELF_TURRET_EWHEEL, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_FLAC, DEATH_SELF_TURRET_FLAC, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_HELLION, DEATH_SELF_TURRET_HELLION, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_HK, DEATH_SELF_TURRET_HK, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_MACHINEGUN, DEATH_SELF_TURRET_MACHINEGUN, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_MLRS, DEATH_SELF_TURRET_MLRS, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_PHASER, DEATH_SELF_TURRET_PHASER, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_PLASMA, DEATH_SELF_TURRET_PLASMA, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_TESLA, DEATH_SELF_TURRET_TESLA, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_WALK_GUN, DEATH_SELF_TURRET_WALK_GUN, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_WALK_MELEE, DEATH_SELF_TURRET_WALK_MELEE, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(TURRET_WALK_ROCKET, DEATH_SELF_TURRET_WALK_ROCKET, DEATH_MURDER_CHEAT, "turret") -REGISTER_DEATHTYPE(VH_BUMB_DEATH, DEATH_SELF_VH_BUMB_DEATH, DEATH_MURDER_VH_BUMB_DEATH, "vehicle") -REGISTER_DEATHTYPE(VH_BUMB_GUN, NULL, DEATH_MURDER_VH_BUMB_GUN, "vehicle") -REGISTER_DEATHTYPE(VH_CRUSH, DEATH_SELF_VH_CRUSH, DEATH_MURDER_VH_CRUSH, "vehicle") -REGISTER_DEATHTYPE(VH_RAPT_BOMB, DEATH_SELF_VH_RAPT_BOMB, DEATH_MURDER_VH_RAPT_BOMB, "vehicle") -REGISTER_DEATHTYPE(VH_RAPT_CANNON, NULL, DEATH_MURDER_VH_RAPT_CANNON, "vehicle") -REGISTER_DEATHTYPE(VH_RAPT_DEATH, DEATH_SELF_VH_RAPT_DEATH, DEATH_MURDER_VH_RAPT_DEATH, "vehicle") -REGISTER_DEATHTYPE(VH_RAPT_FRAGMENT, DEATH_SELF_VH_RAPT_BOMB, DEATH_MURDER_VH_RAPT_BOMB, "vehicle") -REGISTER_DEATHTYPE(VH_SPID_DEATH, DEATH_SELF_VH_SPID_DEATH, DEATH_MURDER_VH_SPID_DEATH, "vehicle") -REGISTER_DEATHTYPE(VH_SPID_MINIGUN, NULL, DEATH_MURDER_VH_SPID_MINIGUN, "vehicle") -REGISTER_DEATHTYPE(VH_SPID_ROCKET, DEATH_SELF_VH_SPID_ROCKET, DEATH_MURDER_VH_SPID_ROCKET, "vehicle") -REGISTER_DEATHTYPE(VH_WAKI_DEATH, DEATH_SELF_VH_WAKI_DEATH, DEATH_MURDER_VH_WAKI_DEATH, "vehicle") -REGISTER_DEATHTYPE(VH_WAKI_GUN, NULL, DEATH_MURDER_VH_WAKI_GUN, "vehicle") -REGISTER_DEATHTYPE(VH_WAKI_ROCKET, DEATH_SELF_VH_WAKI_ROCKET, DEATH_MURDER_VH_WAKI_ROCKET, "vehicle") -REGISTER_DEATHTYPE(WEAPON, NULL, NULL, "") +REGISTER_DEATHTYPE(AUTOTEAMCHANGE, DEATH_SELF_AUTOTEAMCHANGE, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(BUFF, NULL, DEATH_MURDER_BUFF, NULL, NULL, "") +REGISTER_DEATHTYPE(CAMP, DEATH_SELF_CAMP, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(CHEAT, DEATH_SELF_CHEAT, DEATH_MURDER_CHEAT, NULL, NULL, "") +REGISTER_DEATHTYPE(CUSTOM, DEATH_SELF_CUSTOM, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(DROWN, DEATH_SELF_DROWN, DEATH_MURDER_DROWN, NULL, NULL, "") +REGISTER_DEATHTYPE(FALL, DEATH_SELF_FALL, DEATH_MURDER_FALL, NULL, NULL, "") +REGISTER_DEATHTYPE(FIRE, DEATH_SELF_FIRE, DEATH_MURDER_FIRE, NULL, NULL, "") +REGISTER_DEATHTYPE(GENERIC, DEATH_SELF_GENERIC, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(HURTTRIGGER, DEATH_SELF_VOID, DEATH_MURDER_VOID, DEATH_SELF_VOID_ENT, DEATH_MURDER_VOID_ENT, "") +REGISTER_DEATHTYPE(KILL, DEATH_SELF_SUICIDE, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(LAVA, DEATH_SELF_LAVA, DEATH_MURDER_LAVA, NULL, NULL, "") +REGISTER_DEATHTYPE(MIRRORDAMAGE, DEATH_SELF_BETRAYAL, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(MONSTER_MAGE, DEATH_SELF_MON_MAGE, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(MONSTER_GOLEM_CLAW, DEATH_SELF_MON_GOLEM_CLAW, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(MONSTER_GOLEM_SMASH, DEATH_SELF_MON_GOLEM_SMASH, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(MONSTER_GOLEM_ZAP, DEATH_SELF_MON_GOLEM_ZAP, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(MONSTER_SPIDER, DEATH_SELF_MON_SPIDER, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(MONSTER_WYVERN, DEATH_SELF_MON_WYVERN, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(MONSTER_ZOMBIE_JUMP, DEATH_SELF_MON_ZOMBIE_JUMP, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(MONSTER_ZOMBIE_MELEE, DEATH_SELF_MON_ZOMBIE_MELEE, DEATH_MURDER_MONSTER, NULL, NULL, "monster") +REGISTER_DEATHTYPE(NADE, DEATH_SELF_NADE, DEATH_MURDER_NADE, NULL, NULL, "") +REGISTER_DEATHTYPE(NADE_NAPALM, DEATH_SELF_NADE_NAPALM, DEATH_MURDER_NADE_NAPALM, NULL, NULL, "") +REGISTER_DEATHTYPE(NADE_ICE, DEATH_SELF_NADE_ICE, DEATH_MURDER_NADE_ICE, NULL, NULL, "") +REGISTER_DEATHTYPE(NADE_ICE_FREEZE, DEATH_SELF_NADE_ICE_FREEZE, DEATH_MURDER_NADE_ICE_FREEZE, NULL, NULL, "") +REGISTER_DEATHTYPE(NADE_HEAL, DEATH_SELF_NADE_HEAL, DEATH_MURDER_NADE_HEAL, NULL, NULL, "") +REGISTER_DEATHTYPE(NOAMMO, DEATH_SELF_NOAMMO, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(ROT, DEATH_SELF_ROT, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(SHOOTING_STAR, DEATH_SELF_SHOOTING_STAR, DEATH_MURDER_SHOOTING_STAR, NULL, NULL, "") +REGISTER_DEATHTYPE(SLIME, DEATH_SELF_SLIME, DEATH_MURDER_SLIME, NULL, NULL, "") +REGISTER_DEATHTYPE(SWAMP, DEATH_SELF_SWAMP, DEATH_MURDER_SWAMP, NULL, NULL, "") +REGISTER_DEATHTYPE(TEAMCHANGE, DEATH_SELF_TEAMCHANGE, NULL, NULL, NULL, "") +REGISTER_DEATHTYPE(TELEFRAG, NULL, DEATH_MURDER_TELEFRAG, NULL, NULL, "") +REGISTER_DEATHTYPE(TOUCHEXPLODE, DEATH_SELF_TOUCHEXPLODE, DEATH_MURDER_TOUCHEXPLODE, NULL, NULL, "") +REGISTER_DEATHTYPE(TURRET, DEATH_SELF_TURRET, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_EWHEEL, DEATH_SELF_TURRET_EWHEEL, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_FLAC, DEATH_SELF_TURRET_FLAC, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_HELLION, DEATH_SELF_TURRET_HELLION, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_HK, DEATH_SELF_TURRET_HK, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_MACHINEGUN, DEATH_SELF_TURRET_MACHINEGUN, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_MLRS, DEATH_SELF_TURRET_MLRS, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_PHASER, DEATH_SELF_TURRET_PHASER, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_PLASMA, DEATH_SELF_TURRET_PLASMA, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_TESLA, DEATH_SELF_TURRET_TESLA, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_WALK_GUN, DEATH_SELF_TURRET_WALK_GUN, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_WALK_MELEE, DEATH_SELF_TURRET_WALK_MELEE, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(TURRET_WALK_ROCKET, DEATH_SELF_TURRET_WALK_ROCKET, DEATH_MURDER_CHEAT, NULL, NULL, "turret") +REGISTER_DEATHTYPE(VH_BUMB_DEATH, DEATH_SELF_VH_BUMB_DEATH, DEATH_MURDER_VH_BUMB_DEATH, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_BUMB_GUN, NULL, DEATH_MURDER_VH_BUMB_GUN, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_CRUSH, DEATH_SELF_VH_CRUSH, DEATH_MURDER_VH_CRUSH, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_RAPT_BOMB, DEATH_SELF_VH_RAPT_BOMB, DEATH_MURDER_VH_RAPT_BOMB, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_RAPT_CANNON, NULL, DEATH_MURDER_VH_RAPT_CANNON, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_RAPT_DEATH, DEATH_SELF_VH_RAPT_DEATH, DEATH_MURDER_VH_RAPT_DEATH, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_RAPT_FRAGMENT, DEATH_SELF_VH_RAPT_BOMB, DEATH_MURDER_VH_RAPT_BOMB, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_SPID_DEATH, DEATH_SELF_VH_SPID_DEATH, DEATH_MURDER_VH_SPID_DEATH, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_SPID_MINIGUN, NULL, DEATH_MURDER_VH_SPID_MINIGUN, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_SPID_ROCKET, DEATH_SELF_VH_SPID_ROCKET, DEATH_MURDER_VH_SPID_ROCKET, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_WAKI_DEATH, DEATH_SELF_VH_WAKI_DEATH, DEATH_MURDER_VH_WAKI_DEATH, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_WAKI_GUN, NULL, DEATH_MURDER_VH_WAKI_GUN, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(VH_WAKI_ROCKET, DEATH_SELF_VH_WAKI_ROCKET, DEATH_MURDER_VH_WAKI_ROCKET, NULL, NULL, "vehicle") +REGISTER_DEATHTYPE(WEAPON, NULL, NULL, NULL, NULL, "") diff --git a/qcsrc/common/deathtypes/all.qh b/qcsrc/common/deathtypes/all.qh index cb37df88e..fe2edc39b 100644 --- a/qcsrc/common/deathtypes/all.qh +++ b/qcsrc/common/deathtypes/all.qh @@ -10,15 +10,19 @@ REGISTRY_DEFINE_GET(Deathtypes, NULL) .entity death_msgself; .entity death_msgmurder; +.entity death_msg_ent_self; +.entity death_msg_ent_murder; .string death_msgextra; -#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, extra) \ +#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, msg_death_ent, msg_death_ent_by, extra) \ REGISTER(Deathtypes, DEATH, id, m_id, new_pure(deathtype)) { \ this.m_id += DT_FIRST; \ this.nent_name = #id; \ this.death_msgextra = extra; \ this.death_msgself = msg_death; \ this.death_msgmurder = msg_death_by; \ + this.death_msg_ent_self = msg_death_ent; \ + this.death_msg_ent_murder = msg_death_ent_by; \ } const int DEATH_WEAPONMASK = BITS(8); diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index 30994ba9e..40cba807a 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -304,6 +304,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_INFO_NOTIF(DEATH_MURDER_VH_WAKI_GUN, N_CONSOLE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was bolted down by ^BG%s^K1's Racer%s%s"), "") MSG_INFO_NOTIF(DEATH_MURDER_VH_WAKI_ROCKET, N_CONSOLE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 couldn't find shelter from ^BG%s^K1's Racer%s%s"), "") MSG_INFO_NOTIF(DEATH_MURDER_VOID, N_CONSOLE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_void", _("^BG%s%s^K1 was thrown into a world of hurt by ^BG%s^K1%s%s"), "") + MSG_INFO_NOTIF(DEATH_MURDER_VOID_ENT, N_CONSOLE, 4, 2, "spree_inf s1 s3 s2 s4loc spree_end", "s2 s1", "notify_void", "^BG%s%s^K1 %s ^BG%s^K1%s%s", "") MSG_INFO_NOTIF(DEATH_SELF_AUTOTEAMCHANGE, N_CONSOLE, 2, 1, "s1 death_team s2loc", "", "", _("^BG%s^K1 was moved into the %s%s"), "") MSG_INFO_NOTIF(DEATH_SELF_BETRAYAL, N_CONSOLE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_teamkill_red", _("^BG%s^K1 became enemies with the Lord of Teamplay%s%s"), "") @@ -358,6 +359,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_INFO_NOTIF(DEATH_SELF_VH_WAKI_DEATH, N_CONSOLE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 got caught in the blast of a Racer explosion%s%s"), "") MSG_INFO_NOTIF(DEATH_SELF_VH_WAKI_ROCKET, N_CONSOLE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 couldn't find shelter from a Racer rocket%s%s"), "") MSG_INFO_NOTIF(DEATH_SELF_VOID, N_CONSOLE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_void", _("^BG%s^K1 ended up in the wrong place%s%s"), "") + MSG_INFO_NOTIF(DEATH_SELF_VOID_ENT, N_CONSOLE, 3, 1, "s1 s2 s3loc spree_lost", "s1", "notify_void", "^BG%s^K1 %s%s%s", "") MULTITEAM_INFO(DEATH_TEAMKILL, N_CONSOLE, 3, 1, "s1 s2 s3loc spree_end", "s2 s1", "notify_teamkill_%s", _("^BG%s^K1 was betrayed by ^BG%s^K1%s%s"), "", NAME) @@ -884,6 +886,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_MULTI_NOTIF(DEATH_MURDER_VH_WAKI_GUN, N_ENABLE, NULL, INFO_DEATH_MURDER_VH_WAKI_GUN, NULL) MSG_MULTI_NOTIF(DEATH_MURDER_VH_WAKI_ROCKET, N_ENABLE, NULL, INFO_DEATH_MURDER_VH_WAKI_ROCKET, NULL) MSG_MULTI_NOTIF(DEATH_MURDER_VOID, N_ENABLE, NULL, INFO_DEATH_MURDER_VOID, NULL) + MSG_MULTI_NOTIF(DEATH_MURDER_VOID_ENT, N_ENABLE, NULL, INFO_DEATH_MURDER_VOID_ENT, NULL) MSG_MULTI_NOTIF(DEATH_SELF_AUTOTEAMCHANGE, N_ENABLE, NULL, INFO_DEATH_SELF_AUTOTEAMCHANGE, CENTER_DEATH_SELF_AUTOTEAMCHANGE) MSG_MULTI_NOTIF(DEATH_SELF_BETRAYAL, N_ENABLE, NULL, INFO_DEATH_SELF_BETRAYAL, CENTER_DEATH_SELF_BETRAYAL) @@ -938,6 +941,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_MULTI_NOTIF(DEATH_SELF_VH_WAKI_DEATH, N_ENABLE, NULL, INFO_DEATH_SELF_VH_WAKI_DEATH, CENTER_DEATH_SELF_VH_WAKI_DEATH) MSG_MULTI_NOTIF(DEATH_SELF_VH_WAKI_ROCKET, N_ENABLE, NULL, INFO_DEATH_SELF_VH_WAKI_ROCKET, CENTER_DEATH_SELF_VH_WAKI_ROCKET) MSG_MULTI_NOTIF(DEATH_SELF_VOID, N_ENABLE, NULL, INFO_DEATH_SELF_VOID, CENTER_DEATH_SELF_VOID) + MSG_MULTI_NOTIF(DEATH_SELF_VOID_ENT, N_ENABLE, NULL, INFO_DEATH_SELF_VOID_ENT, CENTER_DEATH_SELF_VOID) MSG_MULTI_NOTIF(ITEM_BUFF_DROP, N_ENABLE, NULL, INFO_ITEM_BUFF_DROP, CENTER_ITEM_BUFF_DROP) MSG_MULTI_NOTIF(ITEM_BUFF_GOT, N_ENABLE, NULL, INFO_ITEM_BUFF_GOT, CENTER_ITEM_BUFF_GOT) diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index e56658a68..7c0fa18d8 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -351,6 +351,7 @@ float autocvar_notification_show_sprees_center_specialonly = true; s1-s4: string arguments to be literally swapped into sprintf s2loc: s2 string of locations of deaths or other events s3loc: s3 string of locations of deaths or other events + s4loc: s4 string of locations of deaths or other events f1-f4: float arguments expanded into strings to be swapped into sprintf f1dtime: f1 float to string with 2 decimal places f2dtime: f2 float to string with 2 decimal places @@ -423,6 +424,7 @@ string BUFF_NAME(int i); ARG_CASE(ARG_CS_SV_HA, "s4", s4) \ ARG_CASE(ARG_CS_SV, "s2loc", ((autocvar_notification_show_location && (s2 != "")) ? sprintf(( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s2) : "")) \ ARG_CASE(ARG_CS_SV, "s3loc", ((autocvar_notification_show_location && (s3 != "")) ? sprintf(( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s3) : "")) \ + ARG_CASE(ARG_CS_SV, "s4loc", ((autocvar_notification_show_location && (s4 != "")) ? sprintf(( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s4) : "")) \ ARG_CASE(ARG_CS_SV_DC, "f1", ftos(f1)) \ ARG_CASE(ARG_CS_SV_DC, "f2", ftos(f2)) \ ARG_CASE(ARG_CS_SV, "f3", ftos(f3)) \ diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index 826e84d2b..7ca8ea090 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -125,8 +125,9 @@ void LogDeath(string mode, int deathtype, entity killer, entity killed) void Obituary_SpecialDeath( entity notif_target, float murder, + bool msg_from_ent, int deathtype, - string s1, string s2, string s3, + string s1, string s2, string s3, string s4, float f1, float f2, float f3) { if(!DEATH_ISSPECIAL(deathtype)) @@ -146,6 +147,8 @@ void Obituary_SpecialDeath( return; // TODO: somehow put this in CTS gamemode file! Notification death_message = (murder) ? deathent.death_msgmurder : deathent.death_msgself; + if (msg_from_ent) + death_message = (murder) ? deathent.death_msg_ent_murder : deathent.death_msg_ent_self; if(death_message) { Send_Notification_WOCOVA( @@ -153,7 +156,7 @@ void Obituary_SpecialDeath( notif_target, MSG_MULTI, death_message, - s1, s2, s3, "", + s1, s2, s3, s4, f1, f2, f3, 0 ); Send_Notification_WOCOVA( @@ -161,7 +164,7 @@ void Obituary_SpecialDeath( notif_target, MSG_INFO, death_message.nent_msginfo, - s1, s2, s3, "", + s1, s2, s3, s4, f1, f2, f3, 0 ); } @@ -272,7 +275,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en { if(deathtype == DEATH_TEAMCHANGE.m_id || deathtype == DEATH_AUTOTEAMCHANGE.m_id) { - Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.team, 0, 0); + Obituary_SpecialDeath(targ, false, 0, deathtype, targ.netname, deathlocation, "", "", targ.team, 0, 0); } else { @@ -280,15 +283,20 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en { case DEATH_MIRRORDAMAGE: { - Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0); + Obituary_SpecialDeath(targ, false, 0, deathtype, targ.netname, deathlocation, "", "", CS(targ).killcount, 0, 0); break; } case DEATH_HURTTRIGGER: - Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0); + bool msg_from_ent = (inflictor && inflictor.message != ""); + Obituary_SpecialDeath(targ, false, msg_from_ent, deathtype, + targ.netname, + (msg_from_ent ? inflictor.message : deathlocation), + (msg_from_ent ? deathlocation : ""), + "", CS(targ).killcount, 0, 0); break; default: { - Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0); + Obituary_SpecialDeath(targ, false, 0, deathtype, targ.netname, deathlocation, "", "", CS(targ).killcount, 0, 0); break; } } @@ -418,7 +426,21 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en f3 = buff_FirstFromFlags(attacker).m_id; if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker)) - Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3); + { + if (DEATH_ENT(deathtype) == DEATH_HURTTRIGGER) + { + // FIXME if # is present inside .message2 then it is should be replaced with attacker's name + bool msg_from_ent = (inflictor && inflictor.message2 != ""); + Obituary_SpecialDeath(targ, true, msg_from_ent, deathtype, + targ.netname, + attacker_name, + (msg_from_ent ? inflictor.message2 : deathlocation), + (msg_from_ent ? deathlocation : ""), + CS(targ).killcount, kill_count_to_attacker, f3); + } + else + Obituary_SpecialDeath(targ, true, 0, deathtype, targ.netname, attacker_name, deathlocation, "", CS(targ).killcount, kill_count_to_attacker, f3); + } } } @@ -434,9 +456,11 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en // and there will be a REAL DEATH_VOID implementation which mappers will use. case DEATH_HURTTRIGGER: { - Obituary_SpecialDeath(targ, false, deathtype, + bool msg_from_ent = (inflictor && inflictor.message != ""); + Obituary_SpecialDeath(targ, false, msg_from_ent, deathtype, targ.netname, - deathlocation, + (msg_from_ent ? inflictor.message : deathlocation), + (msg_from_ent ? deathlocation : ""), "", CS(targ).killcount, 0, @@ -446,10 +470,11 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en case DEATH_CUSTOM: { - Obituary_SpecialDeath(targ, false, deathtype, + Obituary_SpecialDeath(targ, false, 0, deathtype, targ.netname, ((strstrofs(deathmessage, "%", 0) < 0) ? strcat("%s ", deathmessage) : deathmessage), deathlocation, + "", CS(targ).killcount, 0, 0); @@ -458,7 +483,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en default: { - Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0); + Obituary_SpecialDeath(targ, false, 0, deathtype, targ.netname, deathlocation, "", "", CS(targ).killcount, 0, 0); break; } } diff --git a/qcsrc/server/damage.qh b/qcsrc/server/damage.qh index 09b80eea1..06948528f 100644 --- a/qcsrc/server/damage.qh +++ b/qcsrc/server/damage.qh @@ -89,9 +89,10 @@ void LogDeath(string mode, int deathtype, entity killer, entity killed); void Obituary_SpecialDeath( entity notif_target, - float murder, + bool murder, + bool msg_from_ent, int deathtype, - string s1, string s2, string s3, + string s1, string s2, string s3, string s4, float f1, float f2, float f3); float w_deathtype;