X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fclientcommands.qc;h=3d52a01922a2d38419a5703878b45cc47f20a260;hb=2b02856374dd49f49af40afe71910d5c3d994df5;hp=369005ad5b07cac7d29d1e60ba7cb62224bf2ef3;hpb=cc148bf19700d380a18d7f51a706f9bbe959811b;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/server/clientcommands.qc b/data/qcsrc/server/clientcommands.qc index 369005ad..3d52a019 100644 --- a/data/qcsrc/server/clientcommands.qc +++ b/data/qcsrc/server/clientcommands.qc @@ -166,9 +166,8 @@ void SV_ParseClientCommand(string s) { } if(self.version != cvar("gameversion")) { - self.classname = "observer"; self.version_mismatch = 1; - PutClientInServer(); + ClientKill_TeamChange(-2); // observe } 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")) { @@ -221,16 +220,7 @@ void SV_ParseClientCommand(string s) { } } if(self.classname == "player" && cvar("sv_spectate") == 1) { - if(self.flagcarried) - DropFlag(self.flagcarried, world, world); - kh_Key_DropAll(self, TRUE); - WaypointSprite_PlayerDead(); - self.classname = "observer"; - if(g_ca) - self.caplayer = 0; - if(blockSpectators) - sprint(self, strcat("^7You have to become a player within the next ", ftos(cvar("g_maxplayers_spectator_blocktime")), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n")); - PutClientInServer(); + ClientKill_TeamChange(-2); // observe } } else if(cmd == "join") { if not(self.flags & FL_CLIENT) @@ -264,15 +254,15 @@ void SV_ParseClientCommand(string s) { } 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" ) { - DoTeamChange(COLOR_TEAM1); + ClientKill_TeamChange(COLOR_TEAM1); } else if( argv(1) == "blue" ) { - DoTeamChange(COLOR_TEAM2); + ClientKill_TeamChange(COLOR_TEAM2); } else if( argv(1) == "yellow" ) { - DoTeamChange(COLOR_TEAM3); + ClientKill_TeamChange(COLOR_TEAM3); } else if( argv(1) == "pink" ) { - DoTeamChange(COLOR_TEAM4); + ClientKill_TeamChange(COLOR_TEAM4); } else if( argv(1) == "auto" ) { - DoTeamChange(-1); + ClientKill_TeamChange(-1); } else { sprint( self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) ); }