From 854f8fb6d20e83b886e0561b1137b983fa361399 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 11 Jun 2018 17:50:04 +1000 Subject: [PATCH] Move dedicated_print to miscfunctions (not a client-specific function) --- qcsrc/server/client.qc | 5 ----- qcsrc/server/client.qh | 3 --- qcsrc/server/miscfunctions.qc | 4 ++++ qcsrc/server/miscfunctions.qh | 3 +++ 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 7cd2a9932..003a29aba 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1478,11 +1478,6 @@ void respawn(entity this) PutClientInServer(this); } -void dedicated_print(string input) -{ - if (server_is_dedicated) print(input); -} - void PrintToChat(entity client, string text) { text = strcat("\{1}^7", text, "\n"); diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index c8f060d23..b2495c0f6 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -225,9 +225,6 @@ 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 the client's chat. /// \param[in] client Client to print to. /// \param[in] text Text to print. diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 1a885f78f..d6d3c63b6 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -67,6 +67,10 @@ void WarpZone_crosshair_trace(entity pl) WarpZone_traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl)); } +void dedicated_print(string input) +{ + if (server_is_dedicated) print(input); +} void GameLogEcho(string s) { diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 92707bf39..1455054d2 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -69,6 +69,9 @@ void follow_sameorigin(entity e, entity to); string formatmessage(entity this, string msg); +/** print(), but only print if the server is not local */ +void dedicated_print(string input); + void GameLogEcho(string s); void GameLogInit(); -- 2.39.2