]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clan Arena: make work team chat for killed players
authorterencehill <piuntn@gmail.com>
Tue, 28 Aug 2018 11:57:40 +0000 (13:57 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 28 Aug 2018 11:57:40 +0000 (13:57 +0200)
qcsrc/server/command/cmd.qc

index 443aac085d3f652872b9f7b5135bb8d16b9f6ef0..30f3a040efb467dc36649e20689a5e1128da72c0 100644 (file)
@@ -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
                }