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~8^2~28 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9d50a697b0ac0b54bddcb05d96613144dc3b9b69;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 --- 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);