From: z411 Date: Sat, 3 Oct 2020 05:50:06 +0000 (-0300) Subject: Colored obituary X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=738baf80b49d57b7c85c41d6279860affb516621;p=xonotic%2Fxonotic-data.pk3dir.git Colored obituary --- diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index bbb82110e..85f8beb32 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -315,7 +315,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAG, targ.netname); Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAGGED, attacker_name); - Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(targ.team, INFO_DEATH_TEAMKILL), targ.netname, attacker_name, deathlocation, CS(targ).killcount); + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(targ.team, INFO_DEATH_TEAMKILL), playername(targ, true), playername(attacker, true), deathlocation, CS(targ).killcount); // In this case, the death message will ALWAYS be "foo was betrayed by bar" // No need for specific death/weapon messages... @@ -421,8 +421,8 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en if(deathtype == DEATH_BUFF.m_id) f3 = buff_FirstFromFlags(STAT(BUFFS, 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 (!Obituary_WeaponDeath(targ, true, deathtype, playername(targ, true), playername(attacker, true), deathlocation, CS(targ).killcount, kill_count_to_attacker)) + Obituary_SpecialDeath(targ, true, deathtype, playername(targ, true), playername(attacker, true), deathlocation, CS(targ).killcount, kill_count_to_attacker, f3); } } @@ -439,7 +439,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en case DEATH_HURTTRIGGER: { Obituary_SpecialDeath(targ, false, deathtype, - targ.netname, + playername(targ, true), inflictor.message, deathlocation, CS(targ).killcount, @@ -451,7 +451,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en case DEATH_CUSTOM: { Obituary_SpecialDeath(targ, false, deathtype, - targ.netname, + playername(targ, true), ((strstrofs(deathmessage, "%", 0) < 0) ? strcat("%s ", deathmessage) : deathmessage), deathlocation, CS(targ).killcount, @@ -462,7 +462,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, deathtype, playername(targ, true), deathlocation, "", CS(targ).killcount, 0, 0); break; } }