]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/clientcommands.qc
fixed for forced team
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / clientcommands.qc
index 0216757e9ccc99e358195b5f0426d1ab67ff6620..0cbe3017eae1ef889844324e8649a1c6cf036d8b 100644 (file)
@@ -171,7 +171,7 @@ void SV_ParseClientCommand(string s) {
                        PutClientInServer();
                } else if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force")) {
                        //JoinBestTeam(self, FALSE, TRUE);
-               } else if(teams_matter && !cvar("sv_spectate")) {
+               } else if(teams_matter && !cvar("sv_spectate") && !(self.team_forced > 0)) {
                        self.classname = "observer";
                        stuffcmd(self,"menu_showteamselect\n");
                }
@@ -249,9 +249,11 @@ void SV_ParseClientCommand(string s) {
                if not(self.flags & FL_CLIENT)
                        return;
                if( !teams_matter ) {
-                       sprint( self, "selecteam can only be used in teamgames\n");
+                       sprint( self, "selectteam can only be used in teamgames\n");
                } else if(cvar("g_campaign")) {
                        //JoinBestTeam(self, 0);
+               } else if(self.team_forced > 0) {
+                       sprint( self, "selectteam can not be used as your team is forced\n");
                } else if(lockteams) {
                        sprint( self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
                } else if( argv(1) == "red" ) {
@@ -303,6 +305,8 @@ void SV_ParseClientCommand(string s) {
        } else if(cmd == "records") {
                for(i = 0; i < 10; ++i)
                        sprint(self, records_reply[i]);
+       } else if(cmd == "ladder") {
+               sprint(self, ladder_reply);
        } else if(cmd == "rankings") {
                sprint(self, rankings_reply);
        } else if(cmd == "voice") {