]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix NULL in pause command.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Mar 2015 08:36:55 +0000 (08:36 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Mar 2015 08:36:55 +0000 (08:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12175 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c

index e2b8123ecba76b18a32d70d94bb9b06431702aa1..754672515a027bae1f9eb8a0a45c9b2f33e5e203 100644 (file)
@@ -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);