From: Mario Date: Sat, 28 Sep 2019 08:41:29 +0000 (+1000) Subject: Don't allow voice messages to function while spectating or observing X-Git-Tag: xonotic-v0.8.5~1260 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc141acff9b80547084cbb83f52e83a7be95eceb;p=xonotic%2Fxonotic-data.pk3dir.git Don't allow voice messages to function while spectating or observing --- diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 4606638f6..6928957d6 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));