]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't allow voice messages while dead
authorMario <mario@smbclan.net>
Thu, 29 Aug 2019 07:04:35 +0000 (17:04 +1000)
committerMario <mario@smbclan.net>
Thu, 29 Aug 2019 07:04:35 +0000 (17:04 +1000)
qcsrc/server/command/cmd.qc

index 26b41c5b8074b1951533a7c2bb9eeb784c6c11da..4606638f621ac1240078f0149b2e27ef5cb17c78 100644 (file)
@@ -762,6 +762,12 @@ void ClientCommand_voice(entity caller, int request, int argc, string command)
                                        sprint(caller, sprintf("Invalid voice. Use one of: %s\n", allvoicesamples));
                                        return;
                                }
+                               if (IS_DEAD(caller))
+                               {
+                                       // don't warn the caller when trying to taunt while dead, just don't play any sounds!
+                                       // we still allow them to see warnings if it's invalid, so a dead player can find out the sounds in peace
+                                       return;
+                               }
                                string msg = "";
                                if (argc >= 3)
                                        msg = substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2));