]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Moved print functions to client.q[ch].
authorLyberta <lyberta@lyberta.net>
Mon, 30 Apr 2018 23:23:51 +0000 (02:23 +0300)
committerLyberta <lyberta@lyberta.net>
Mon, 30 Apr 2018 23:23:51 +0000 (02:23 +0300)
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/player.qc
qcsrc/server/player.qh

index d374876d0456441bc59fdf69fe683a643bb8d42a..9ecf2f9da678dd5a4531e831a5443682d889e3a3 100644 (file)
@@ -1469,6 +1469,59 @@ void respawn(entity this)
        PutClientInServer(this);
 }
 
+void dedicated_print(string input)
+{
+       if (server_is_dedicated) print(input);
+}
+
+void PrintToChat(entity player, string text)
+{
+       text = strcat("\{1}^7", text, "\n");
+       sprint(player, text);
+}
+
+void DebugPrintToChat(entity player, string text)
+{
+       if (autocvar_developer)
+       {
+               PrintToChat(player, text);
+       }
+}
+
+void PrintToChatAll(string text)
+{
+       text = strcat("\{1}^7", text, "\n");
+       bprint(text);
+}
+
+void DebugPrintToChatAll(string text)
+{
+       if (autocvar_developer)
+       {
+               PrintToChatAll(text);
+       }
+}
+
+void PrintToChatTeam(int teamnum, string text)
+{
+       text = strcat("\{1}^7", text, "\n");
+       FOREACH_CLIENT(IS_REAL_CLIENT(it),
+       {
+               if (it.team == teamnum)
+               {
+                       sprint(it, text);
+               }
+       });
+}
+
+void DebugPrintToChatTeam(int teamnum, string text)
+{
+       if (autocvar_developer)
+       {
+               PrintToChatTeam(teamnum, text);
+       }
+}
+
 void play_countdown(entity this, float finished, Sound samp)
 {
     TC(Sound, samp);
index 7499ee8ddfac0e0fbbd299ab4de285b53c62ea83..94fa050bc69af862c951f32dc23c57efb5b68934 100644 (file)
@@ -225,6 +225,46 @@ METHOD(Client, m_unwind, bool(Client this))
     return false;
 }
 
+/** 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.
+/// \param[in] text Text to print.
+/// \return No return.
+void PrintToChat(entity player, 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.
+/// \param[in] text Text to print.
+/// \return No return.
+void DebugPrintToChat(entity player, string text);
+
+/// \brief Prints the string to all players' 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"
+/// 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.
+/// \param[in] text Text to print.
+/// \return No return.
+void PrintToChatTeam(int teamnum, string text);
+
+/// \brief Print the string to chat of all players 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] text Text to print.
+/// \return No return.
+void DebugPrintToChatTeam(int teamnum, string text);
+
 void play_countdown(entity this, float finished, Sound samp);
 
 float CalcRotRegen(float current, float regenstable, float regenfactor, float regenlinear, float regenframetime, float rotstable, float rotfactor, float rotlinear, float rotframetime, float limit);
index 06bdb1428f869439244afd76f9e836eef8000945..408f44b6404f190de1433d39fee266b1430d7da9 100644 (file)
@@ -679,60 +679,6 @@ bool MoveToTeam(entity client, int team_colour, int type)
        return true;
 }
 
-/** print(), but only print if the server is not local */
-void dedicated_print(string input)
-{
-       if (server_is_dedicated) print(input);
-}
-
-void PrintToChat(entity player, string text)
-{
-       text = strcat("\{1}^7", text, "\n");
-       sprint(player, text);
-}
-
-void DebugPrintToChat(entity player, string text)
-{
-       if (autocvar_developer)
-       {
-               PrintToChat(player, text);
-       }
-}
-
-void PrintToChatAll(string text)
-{
-       text = strcat("\{1}^7", text, "\n");
-       bprint(text);
-}
-
-void DebugPrintToChatAll(string text)
-{
-       if (autocvar_developer)
-       {
-               PrintToChatAll(text);
-       }
-}
-
-void PrintToChatTeam(int teamnum, string text)
-{
-       text = strcat("\{1}^7", text, "\n");
-       FOREACH_CLIENT(IS_REAL_CLIENT(it),
-       {
-               if (it.team == teamnum)
-               {
-                       sprint(it, text);
-               }
-       });
-}
-
-void DebugPrintToChatTeam(int teamnum, string text)
-{
-       if (autocvar_developer)
-       {
-               PrintToChatTeam(teamnum, text);
-       }
-}
-
 /**
  * message "": do not say, just test flood control
  * return value:
index ee073ccb4498a960b757409fd055cec5d3c8062d..5e6642e0471a78220a1af579a705e7b50d74b76b 100644 (file)
@@ -9,45 +9,6 @@
 void CopyBody_Think(entity this);
 void CopyBody(entity this, float keepvelocity);
 
-void dedicated_print(string input);
-
-/// \brief Print the string to player's chat.
-/// \param[in] player Player to print to.
-/// \param[in] text Text to print.
-/// \return No return.
-void PrintToChat(entity player, 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.
-/// \param[in] text Text to print.
-/// \return No return.
-void DebugPrintToChat(entity player, string text);
-
-/// \brief Prints the string to all players' 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"
-/// 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.
-/// \param[in] text Text to print.
-/// \return No return.
-void PrintToChatTeam(int teamnum, string text);
-
-/// \brief Print the string to chat of all players 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] text Text to print.
-/// \return No return.
-void DebugPrintToChatTeam(int teamnum, string text);
-
 void player_setupanimsformodel(entity this);
 
 void player_anim(entity this);