From 7e88ed1247e9481f593c4ae06dbd67387229d7bb Mon Sep 17 00:00:00 2001 From: Lyberta Date: Thu, 23 Mar 2017 07:27:51 +0300 Subject: [PATCH] Added DebugPrintToChat. --- qcsrc/server/player.qc | 8 ++++++++ qcsrc/server/player.qh | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 9458f1dc0..091b97862 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -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: diff --git a/qcsrc/server/player.qh b/qcsrc/server/player.qh index c6cdd3880..40812a765 100644 --- a/qcsrc/server/player.qh +++ b/qcsrc/server/player.qh @@ -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); -- 2.39.2