X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fcmd.qc;h=e22399f4acd14ed8b42b8901d1dc2f9c056050e2;hp=9fe72b829ac4e1e0a2646a633f01f3bdbcb5f074;hb=6da43def85c45064172b55faaa8cd811f22ae179;hpb=e46955aa359b3a9b0399b572ebd34e3770c283b7 diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 9fe72b829..e22399f4a 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -154,18 +154,18 @@ void ClientCommand_join(float request) { if(nJoinAllowed(self)) { - if(g_ca) { self.caplayer = 1; } if(autocvar_g_campaign) { campaign_bots_may_start = 1; } - + self.classname = "player"; PlayerScore_Clear(self); - Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_JOIN_PLAY, self.netname); + Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_PREVENT_JOIN); + Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname); PutClientInServer(); } else { //player may not join because of g_maxplayers is set - centerprint(self, PREVENT_JOIN_TEXT); + Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT); } } } @@ -194,6 +194,8 @@ void ClientCommand_ready(float request) // todo: anti-spam for toggling readynes { if(!readyrestart_happened || autocvar_sv_ready_restart_repeatable) { + if(time < game_starttime) // game is already restarting + return; if (self.ready) // toggle { self.ready = FALSE; @@ -284,10 +286,10 @@ void ClientCommand_selectteam(float request, float argc) switch(argv(1)) { - case "red": selection = FL_TEAM_1; break; - case "blue": selection = FL_TEAM_2; break; - case "yellow": selection = FL_TEAM_3; break; - case "pink": selection = FL_TEAM_4; break; + case "red": selection = NUM_TEAM_1; break; + case "blue": selection = NUM_TEAM_2; break; + case "yellow": selection = NUM_TEAM_3; break; + case "pink": selection = NUM_TEAM_4; break; case "auto": selection = (-1); break; default: selection = 0; break; @@ -412,10 +414,10 @@ void ClientCommand_spectate(float request) if(self.classname == "player" && autocvar_sv_spectate == 1) ClientKill_TeamChange(-2); // observe - + // in CA, allow a dead player to move to spectators (without that, caplayer!=0 will be moved back to the player list) // note: if arena game mode is ever done properly, this needs to be removed. - if(g_ca && self.caplayer && (self.classname == "spectator" || self.classname == "observer")) + if(self.caplayer && (self.classname == "spectator" || self.classname == "observer")) { sprint(self, "WARNING: you will spectate in the next round.\n"); self.caplayer = 0;