]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
Merge branch 'terencehill/clientkill' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 443aac085d3f652872b9f7b5135bb8d16b9f6ef0..353d81395b0f568acb931cc517219bc0c8d0e139 100644 (file)
@@ -11,6 +11,7 @@
 #include "../campaign.qh"
 #include "../cheats.qh"
 #include "../client.qh"
+#include "../clientkill.qh"
 #include "../player.qh"
 #include "../ipban.qh"
 #include "../mapvoting.qh"
@@ -304,7 +305,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
                }