From: Mario Date: Thu, 29 Aug 2019 07:04:35 +0000 (+1000) Subject: Don't allow voice messages while dead X-Git-Tag: xonotic-v0.8.5~1352 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b190763a43c261e22e68021b66f0a02a69712265;p=xonotic%2Fxonotic-data.pk3dir.git Don't allow voice messages while dead --- 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));