From dc141acff9b80547084cbb83f52e83a7be95eceb Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 28 Sep 2019 18:41:29 +1000 Subject: [PATCH] Don't allow voice messages to function while spectating or observing --- 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 4606638f62..6928957d6d 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -768,6 +768,12 @@ void ClientCommand_voice(entity caller, int request, int argc, string command) // we still allow them to see warnings if it's invalid, so a dead player can find out the sounds in peace return; } + if (IS_SPEC(caller) || IS_OBSERVER(caller)) + { + // observers/spectators have no player model of their own to play taunts from + // again, allow them to see warnings + return; + } string msg = ""; if (argc >= 3) msg = substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)); -- 2.39.2