From: Mario Date: Mon, 11 Jun 2018 07:50:04 +0000 (+1000) Subject: Move dedicated_print to miscfunctions (not a client-specific function) X-Git-Tag: xonotic-v0.8.5~2074^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=854f8fb6d20e83b886e0561b1137b983fa361399;p=xonotic%2Fxonotic-data.pk3dir.git Move dedicated_print to miscfunctions (not a client-specific function) --- 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();