]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added DebugPrintToChat.
authorLyberta <lyberta@lyberta.net>
Thu, 23 Mar 2017 04:27:51 +0000 (07:27 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 23 Mar 2017 04:27:51 +0000 (07:27 +0300)
qcsrc/server/player.qc
qcsrc/server/player.qh

index 9458f1dc065d2ca0fb99685b042a5ea716c5890e..091b97862913b1dbc95f65ed98bad5607eb88e7b 100644 (file)
@@ -684,6 +684,14 @@ void PrintToChat(entity player, string text)
        sprint(player, text);
 }
 
+void DebugPrintToChat(entity player, string text)
+{
+       if (autocvar_developer)
+       {
+               PrintToChat(player, text);
+       }
+}
+
 /**
  * message "": do not say, just test flood control
  * return value:
index c6cdd3880375b52f5fb3667da35245422ec06ee4..40812a7653a7e35e51959f3b23dd7455a50f6cfe 100644 (file)
@@ -17,6 +17,13 @@ void dedicated_print(string input);
 /// \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);
+
 void player_setupanimsformodel(entity this);
 
 void player_anim(entity this);