From 9d50a697b0ac0b54bddcb05d96613144dc3b9b69 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 4 Mar 2015 08:36:55 +0000 Subject: [PATCH] Fix NULL in pause command. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12175 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/host_cmd.c b/host_cmd.c index e2b8123e..75467251 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -1793,7 +1793,12 @@ static void Host_Pause_f (void) } sv.paused ^= 1; - SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un"); + if (cmd_source != src_command) + SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un"); + else if(*(sv_adminnick.string)) + SV_BroadcastPrintf("%s %spaused the game\n", sv_adminnick.string, sv.paused ? "" : "un"); + else + SV_BroadcastPrintf("%s %spaused the game\n", hostname.string, sv.paused ? "" : "un"); // send notification to all clients MSG_WriteByte(&sv.reliable_datagram, svc_setpause); MSG_WriteByte(&sv.reliable_datagram, sv.paused); -- 2.39.2