]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename Send_CSQC_Centerprint to Send_CSQC_KillCenterprint and HUD_Centerprint to...
authorterencehill <piuntn@gmail.com>
Sat, 20 Aug 2011 15:15:48 +0000 (17:15 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 20 Aug 2011 15:33:24 +0000 (17:33 +0200)
qcsrc/client/Main.qc
qcsrc/client/hud.qc
qcsrc/common/constants.qh
qcsrc/server/g_damage.qc

index f5dfec4e4a12f09649e3ff800e48c8cd732ff901..0ec9ccd960668cd85b3d6bc80ffe16209321e71e 100644 (file)
@@ -1321,9 +1321,9 @@ void Net_Notify() {
        {
                HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
        }
-       else if(type == CSQC_CENTERPRINT)
+       else if(type == CSQC_KILLCENTERPRINT)
        {
-               HUD_Centerprint(ReadString(), ReadString(), ReadShort(), ReadByte());
+               HUD_KillCenterprint(ReadString(), ReadString(), ReadShort(), ReadByte());
        }
        else if(type == CSQC_CENTERPRINT_GENERIC)
        {
index 4eafa2bf633125dac75ebedd1d0e0ac463485145..e3fa2b3c0ee1610818824c41b93eebacf71e294a 100644 (file)
@@ -1833,7 +1833,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
        }
 }
 
-void HUD_Centerprint(string s1, string s2, float type, float msg)
+void HUD_KillCenterprint(string s1, string s2, float type, float msg)
 {
        float gentle;
        gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
index 82b306506fe41387d843ab072babd34635a5e183..be7e7cd0adb096ab7b1e91c630fe1ff5c88560e3 100644 (file)
@@ -80,7 +80,7 @@ const float RACE_NET_SERVER_STATUS = 12;
 const float RANKINGS_CNT = 15;
 
 const float CSQC_KILLNOTIFY = 0;
-const float CSQC_CENTERPRINT = 1;
+const float CSQC_KILLCENTERPRINT = 1;
 const float CSQC_CENTERPRINT_GENERIC = 2;
 
 const float ENT_CLIENT = 0;
index d6020bd349a8b7bf6955b838d5f094da1b80d7db..06e52238a63e2572acba0567f13981519ab6bde5 100644 (file)
@@ -277,7 +277,7 @@ void Send_KillNotification (string s1, string s2, string s3, float msg, float ty
 }
 
 // Function is used to send a generic centerprint whose content CSQC gets to decide (gentle version or not in the below cases)
-void Send_CSQC_Centerprint(entity e, string s1, string s2, float msg, float type)
+void Send_CSQC_KillCenterprint(entity e, string s1, string s2, float msg, float type)
 {
        if (clienttype(e) == CLIENTTYPE_REAL)
        {
@@ -285,7 +285,7 @@ void Send_CSQC_Centerprint(entity e, string s1, string s2, float msg, float type
                WRITESPECTATABLE_MSG_ONE({
                        WriteByte(MSG_ONE, SVC_TEMPENTITY);
                        WriteByte(MSG_ONE, TE_CSQC_NOTIFY);
-                       WriteByte(MSG_ONE, CSQC_CENTERPRINT);
+                       WriteByte(MSG_ONE, CSQC_KILLCENTERPRINT);
                        WriteString(MSG_ONE, s1);
                        WriteString(MSG_ONE, s2);
                        WriteShort(MSG_ONE, msg);
@@ -309,7 +309,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                        if (deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
                                msg = ColoredTeamName(targ.team); // TODO: check if needed?
             if(!g_cts) // no "killed your own dumb self" message in CTS
-                Send_CSQC_Centerprint(targ, msg, "", deathtype, MSG_SUICIDE);
+                Send_CSQC_KillCenterprint(targ, msg, "", deathtype, MSG_SUICIDE);
 
                        if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)
                        {
@@ -340,7 +340,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 
                                GiveFrags(attacker, targ, -1, deathtype);
 
-                               Send_CSQC_Centerprint(attacker, s, "", type, MSG_KILL);
+                               Send_CSQC_KillCenterprint(attacker, s, "", type, MSG_KILL);
 
                                if (targ.killcount > 2) {
                                        msg = ftos(targ.killcount);
@@ -363,18 +363,18 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        checkrules_firstblood = TRUE;
                                        Send_KillNotification(a, "", "", KILL_FIRST_BLOOD, MSG_KILL);
                                        // TODO: make these print a newline if they dont
-                                       Send_CSQC_Centerprint(attacker, "", "", KILL_FIRST_BLOOD, MSG_KILL);
-                                       Send_CSQC_Centerprint(targ, "", "", KILL_FIRST_VICTIM, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(attacker, "", "", KILL_FIRST_BLOOD, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(targ, "", "", KILL_FIRST_VICTIM, MSG_KILL);
                                        PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, 1);
                                        PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
                                }
 
                                if((autocvar_sv_fragmessage_information_typefrag) && (targ.BUTTON_CHAT)) {
-                                       Send_CSQC_Centerprint(attacker, s, GetAdvancedDeathReports(targ), KILL_TYPEFRAG, MSG_KILL);
-                                       Send_CSQC_Centerprint(targ, a, GetAdvancedDeathReports(attacker), KILL_TYPEFRAGGED, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(attacker, s, GetAdvancedDeathReports(targ), KILL_TYPEFRAG, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(targ, a, GetAdvancedDeathReports(attacker), KILL_TYPEFRAGGED, MSG_KILL);
                                } else {
-                                       Send_CSQC_Centerprint(attacker, s, GetAdvancedDeathReports(targ), KILL_FRAG, MSG_KILL);
-                                       Send_CSQC_Centerprint(targ, a, GetAdvancedDeathReports(attacker), KILL_FRAGGED, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(attacker, s, GetAdvancedDeathReports(targ), KILL_FRAG, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(targ, a, GetAdvancedDeathReports(attacker), KILL_FRAGGED, MSG_KILL);
                                }
 
                                attacker.taunt_soundtime = time + 1;
@@ -455,7 +455,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                }
                else
                {
-                       Send_CSQC_Centerprint(targ, "", "", deathtype, MSG_KILL_ACTION);
+                       Send_CSQC_KillCenterprint(targ, "", "", deathtype, MSG_KILL_ACTION);
                        if (deathtype == DEATH_HURTTRIGGER && inflictor.message != "")
                                msg = inflictor.message;
                        else if (deathtype == DEATH_CUSTOM)