From 6202507673655a7e197438d3f345cc8a69cc8b78 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 20 Aug 2011 17:15:48 +0200 Subject: [PATCH] Rename Send_CSQC_Centerprint to Send_CSQC_KillCenterprint and HUD_Centerprint to HUD_KillCenterprint to make code less ambiguous --- qcsrc/client/Main.qc | 4 ++-- qcsrc/client/hud.qc | 2 +- qcsrc/common/constants.qh | 2 +- qcsrc/server/g_damage.qc | 22 +++++++++++----------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index f5dfec4e4..0ec9ccd96 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -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) { diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 4eafa2bf6..e3fa2b3c0 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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); diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 82b306506..be7e7cd0a 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index d6020bd34..06e52238a 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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) -- 2.39.2