From: Lyberta Date: Thu, 23 Mar 2017 04:27:51 +0000 (+0300) Subject: Added DebugPrintToChat. X-Git-Tag: xonotic-v0.8.5~2842^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7e88ed1247e9481f593c4ae06dbd67387229d7bb;p=xonotic%2Fxonotic-data.pk3dir.git Added DebugPrintToChat. --- 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);