From ea14e560b2e5d8123542dd04b15cafc939277a33 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Tue, 1 May 2018 02:32:11 +0300 Subject: [PATCH] Print functions: better terminology. --- qcsrc/server/client.qc | 16 ++++++++-------- qcsrc/server/client.qh | 36 +++++++++++++++--------------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 9ecf2f9da6..31bf8ad5e0 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1474,17 +1474,17 @@ void dedicated_print(string input) if (server_is_dedicated) print(input); } -void PrintToChat(entity player, string text) +void PrintToChat(entity client, string text) { text = strcat("\{1}^7", text, "\n"); - sprint(player, text); + sprint(client, text); } -void DebugPrintToChat(entity player, string text) +void DebugPrintToChat(entity client, string text) { if (autocvar_developer) { - PrintToChat(player, text); + PrintToChat(client, text); } } @@ -1502,23 +1502,23 @@ void DebugPrintToChatAll(string text) } } -void PrintToChatTeam(int teamnum, string text) +void PrintToChatTeam(int team_num, string text) { text = strcat("\{1}^7", text, "\n"); FOREACH_CLIENT(IS_REAL_CLIENT(it), { - if (it.team == teamnum) + if (it.team == team_num) { sprint(it, text); } }); } -void DebugPrintToChatTeam(int teamnum, string text) +void DebugPrintToChatTeam(int team_num, string text) { if (autocvar_developer) { - PrintToChatTeam(teamnum, text); + PrintToChatTeam(team_num, text); } } diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 94fa050bc6..c8f060d23d 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -228,42 +228,36 @@ METHOD(Client, m_unwind, bool(Client this)) /** print(), but only print if the server is not local */ void dedicated_print(string input); -/// \brief Print the string to player's chat. -/// \param[in] player Player to print to. +/// \brief Print the string to the client's chat. +/// \param[in] client Client to print to. /// \param[in] text Text to print. -/// \return No return. -void PrintToChat(entity player, string text); +void PrintToChat(entity client, string text); -/// \brief Print the string to player's chat if the server cvar "developer" is -/// not 0. -/// \param[in] player Player to print to. +/// \brief Print the string to the client's chat if the server cvar "developer" +/// is not 0. +/// \param[in] client Client to print to. /// \param[in] text Text to print. -/// \return No return. -void DebugPrintToChat(entity player, string text); +void DebugPrintToChat(entity client, string text); -/// \brief Prints the string to all players' chat. +/// \brief Prints the string to all clients' chat. /// \param[in] text Text to print. -/// \return No return. void PrintToChatAll(string text); -/// \brief Prints the string to all players' chat if the server cvar "developer" +/// \brief Prints the string to all clients' chat if the server cvar "developer" /// is not 0. /// \param[in] text Text to print. -/// \return No return. void DebugPrintToChatAll(string text); -/// \brief Print the string to chat of all players of the specified team. -/// \param[in] teamnum Team to print to. See NUM_TEAM constants. +/// \brief Print the string to chat of all clients of the specified team. +/// \param[in] team_num Team to print to. See NUM_TEAM constants. /// \param[in] text Text to print. -/// \return No return. -void PrintToChatTeam(int teamnum, string text); +void PrintToChatTeam(int team_num, string text); -/// \brief Print the string to chat of all players of the specified team if the +/// \brief Print the string to chat of all clients of the specified team if the /// server cvar "developer" is not 0. -/// \param[in] teamnum Team to print to. See NUM_TEAM constants. +/// \param[in] team_num Team to print to. See NUM_TEAM constants. /// \param[in] text Text to print. -/// \return No return. -void DebugPrintToChatTeam(int teamnum, string text); +void DebugPrintToChatTeam(int team_num, string text); void play_countdown(entity this, float finished, Sound samp); -- 2.39.2