From: terencehill Date: Tue, 28 Aug 2018 11:57:40 +0000 (+0200) Subject: Clan Arena: make work team chat for killed players X-Git-Tag: xonotic-v0.8.5~1909 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d46f774178c3d0025b5942a2f170519182897297;p=xonotic%2Fxonotic-data.pk3dir.git Clan Arena: make work team chat for killed players --- diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 443aac085..30f3a040e 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -304,7 +304,20 @@ void ClientCommand_say_team(entity caller, int request, int argc, string command { case CMD_REQUEST_COMMAND: { - if (argc >= 2) Say(caller, true, NULL, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); + if (argc >= 2) + { + string _classname = string_null; + if (!IS_PLAYER(caller) && caller.caplayer) + { + // CA: make work team chat for killed players + _classname = caller.classname; + caller.classname = STR_PLAYER; + } + + Say(caller, true, NULL, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); + if (_classname) + caller.classname = _classname; + } return; // never fall through to usage }