]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Better handling of auto-team-change notification with movetoteam
authorSamual Lenks <samual@xonotic.org>
Thu, 13 Dec 2012 04:12:09 +0000 (23:12 -0500)
committerSamual Lenks <samual@xonotic.org>
Thu, 13 Dec 2012 04:12:09 +0000 (23:12 -0500)
qcsrc/common/notifications.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/sv_cmd.qc

index b5cf02a85c0355ae79b0d19f84176e15c326fbc2..723c4acb6cc4612e7c6a2fa2319a1b01b83845c0 100644 (file)
@@ -213,7 +213,7 @@ float Form_Score_Pos(entity player)
                                                                                                        NO_STR_ARG,                             XPND2("", ""),  "", _("^FG%s^K1\n"), "") \
        MSG_DEATH_NOTIF(DEATH_SELF_TEAMCHANGE,                  0, 1, DEATH_TEAM,               NO_CPID,                _("^BGYou are now on: %s"), "", \
                                                                                                        NO_STR_ARG,                             XPND2("", ""),  "", _("^FG%s^K1\n"), "") \
-       MSG_DEATH_NOTIF(DEATH_SELF_AUTOTEAMCHANGE,              0, 1, DEATH_TEAM,               NO_CPID,                _("^BGYou have been moved into a different team to improve team balance\nYou are now on: %s"), "", \
+       MSG_DEATH_NOTIF(DEATH_SELF_AUTOTEAMCHANGE,              0, 1, DEATH_TEAM,               NO_CPID,                _("^BGYou have been moved into a different team\nYou are now on: %s"), "", \
                                                                                                        NO_STR_ARG,                             XPND2("", ""),  "", _("^FG%s^K1\n"), "") \
        MSG_DEATH_NOTIF(DEATH_SELF_FALL,                                0, 0, NO_STR_ARG,               NO_CPID,                _("^K1You hit the ground with a crunch!"), "", \
                                                                                                        NO_STR_ARG,                             XPND2("", ""),  "notify_fall", _("^FG%s^K1 hit the ground with a crunch\n"), _("^FG%s^K1 hit the ground with a bit too much force\n")) \
index 6f75c89eefe4307aa026dde4c6b8d379ef0fbf0c..3f5ad0b492a4766c16e61da4e033cd43e462e61a 100644 (file)
@@ -1404,14 +1404,8 @@ void VoiceMessage(string type, string msg)
                FakeGlobalSound(self.sample, CH_VOICE, voicetype);
 }
 
-void MoveToTeam(entity client, float team_colour, float type, float show_message)
+void MoveToTeam(entity client, float team_colour, float type)
 {
-//     show_message
-//     0 (00) automove centerprint, admin message
-//     1 (01) automove centerprint, no admin message
-//     2 (10) no centerprint, admin message
-//     3 (11) no centerprint, no admin message
-
        float lockteams_backup;
 
        lockteams_backup = lockteams;  // backup any team lock
@@ -1426,9 +1420,5 @@ void MoveToTeam(entity client, float team_colour, float type, float show_message
 
        LogTeamchange(client.playerid, client.team, type);
 
-       // TODO FIXME FIXNOTIF
-       if not(show_message & 1) // admin message
-               sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: You have been moved to the ", Team_ColorName_Lower(team_colour), " team\n"));  // send a chat message
-
        bprint(strcat(client.netname, " joined the ", Team_ColoredFullName(client.team), "\n"));
 }
index 58644726ee1770f447764c1195d42c58396ed421..dd22d4b13018c149440c1786c9351e6c6b34a7ae 100644 (file)
@@ -974,7 +974,6 @@ void GameCommand_moveplayer(float request, float argc)
                        string targets = strreplace(",", " ", argv(1));
                        string original_targets = strreplace(" ", ", ", targets);
                        string destination = argv(2);
-                       string notify = argv(3);
                        
                        string successful, t;
                        successful = string_null;
@@ -1054,7 +1053,7 @@ void GameCommand_moveplayer(float request, float argc)
                                                                
                                                                // If so, lets continue and finally move the player
                                                                client.team_forced = 0;
-                                                               MoveToTeam(client, team_id, 6, stof(notify));
+                                                               MoveToTeam(client, team_id, 6);
                                                                successful = strcat(successful, (successful ? ", " : ""), client.netname);
                                                                print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
                                                                continue;
@@ -1086,13 +1085,10 @@ void GameCommand_moveplayer(float request, float argc)
                        print("Incorrect parameters for ^2moveplayer^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd moveplayer clients destination [notify]\n");
+                       print("\nUsage:^3 sv_cmd moveplayer clients destination\n");
                        print("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
                        print("  'destination' is what to send the player to, be it team or spectating\n");
                        print("  Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\"\n");
-                       print("  'notify' is whether or not to send messages notifying of the move. Detail below.\n");
-                       print("    0 (00) automove centerprint, admin message; 1 (01) automove centerprint, no admin message\n");
-                       print("    2 (10) no centerprint, admin message; 3 (11) no centerprint, no admin message\n");
                        print("Examples: sv_cmd moveplayer 1,3,5 red 3\n");
                        print("          sv_cmd moveplayer 2 spec \n");
                        print("See also: ^2allspec, shuffleteams^7\n");
@@ -1370,7 +1366,7 @@ void GameCommand_shuffleteams(float request)
                                                                self = edict_num(shuffleteams_players[z]);
 
                                                        if(self.team != team_color) 
-                                                               MoveToTeam(self, team_color, 6, 0);
+                                                               MoveToTeam(self, team_color, 6);
 
                                                        shuffleteams_players[z] = 0;
                                                        shuffleteams_teams[i] = shuffleteams_teams[i] + 1;