- }
- else if(!next_round) {
- if((redspawned && !bluespawned) || (bluespawned && !redspawned)) {
- next_round = time + 5;
- champion = find(world, classname, "player");
- if(champion_name)
- strunzone(champion_name);
- champion_name = strzone(champion.netname);
+ if(!next_round) {
+ if(!(redalive && bluealive)) {
+ // every player of (at least) one team is dead, round ends here
+ if(redalive) {
+ play2all("ctf/red_capture.wav");
+ FOR_EACH_CLIENT(self) centerprint(self, "^1RED ^7team wins the round");
+ TeamScore_AddToTeam(COLOR_TEAM1, ST_SCORE, +1);
+ }
+ else if(bluealive) {
+ play2all("ctf/blue_capture.wav");
+ FOR_EACH_CLIENT(self) centerprint(self, "^4BLUE ^7team wins the round");
+ TeamScore_AddToTeam(COLOR_TEAM2, ST_SCORE, +1);
+ }
+ else
+ FOR_EACH_CLIENT(self) centerprint(self, "^7Round tied");
+ next_round = -1;