From: divverent Date: Wed, 4 Mar 2015 08:36:55 +0000 (+0000) Subject: Fix NULL in pause command. X-Git-Tag: xonotic-v0.8.1~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5908505db317767a308ba531ea732d7a6f5b211d;p=xonotic%2Fdarkplaces.git Fix NULL in pause command. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12175 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=9d50a697b0ac0b54bddcb05d96613144dc3b9b69 --- 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);