]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Colored obituary
authorz411 <z411@omaera.org>
Sat, 3 Oct 2020 05:50:06 +0000 (02:50 -0300)
committerz411 <z411@omaera.org>
Sat, 3 Oct 2020 05:50:06 +0000 (02:50 -0300)
qcsrc/server/damage.qc

index bbb82110ececf1904c1d1e110dd16a90ba576d3c..85f8beb32aee4463e112877e78f52156d3e32390 100644 (file)
@@ -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;
                        }
                }