From b190763a43c261e22e68021b66f0a02a69712265 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 Aug 2019 17:04:35 +1000 Subject: [PATCH] Don't allow voice messages while dead --- qcsrc/server/command/cmd.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 26b41c5b8..4606638f6 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -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)); -- 2.39.2