]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't show ready messages if the player is spectating
authorMario <mario@smbclan.net>
Sat, 28 Apr 2018 19:10:15 +0000 (05:10 +1000)
committerMario <mario@smbclan.net>
Sat, 28 Apr 2018 19:10:15 +0000 (05:10 +1000)
qcsrc/server/command/cmd.qc

index 47e94f52034bf8b1a0255c8ca76b419d9772d891..e0c72dbc2731493d3e7e22834918f5c7765c73b3 100644 (file)
@@ -248,12 +248,14 @@ void ClientCommand_ready(entity caller, float request)  // todo: anti-spam for t
                                                if (caller.ready)            // toggle
                                                {
                                                        caller.ready = false;
-                                                       bprint(playername(caller, false), "^2 is ^1NOT^2 ready\n");
+                                                       if(IS_PLAYER(caller) || caller.caplayer == 1)
+                                                               bprint(playername(caller, false), "^2 is ^1NOT^2 ready\n");
                                                }
                                                else
                                                {
                                                        caller.ready = true;
-                                                       bprint(playername(caller, false), "^2 is ready\n");
+                                                       if(IS_PLAYER(caller) || caller.caplayer == 1)
+                                                               bprint(playername(caller, false), "^2 is ready\n");
                                                }
 
                                                // cannot reset the game while a timeout is active!