-float next_round;
-float stopalivecheck;
-float redalive, bluealive, yellowalive, pinkalive;
-.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
-/**
- * This function finds out whether an arena round is over 1 player is left.
- * It determines the last player who's still alive and saves it's entity reference
- * in the global variable 'champion'. Then the new enemy/enemies are put into the server.
- *
- * Gets called in StartFrame()
- */
-void Spawnqueue_Check()
+void count_players()
+{
+ // count amount of players in each team
+ total_players = red_players = blue_players = yellow_players = pink_players = 0;
+ FOR_EACH_PLAYER(self) {
+ if (self.team == COLOR_TEAM1)
+ {
+ red_players += 1;
+ total_players += 1;
+ }
+ else if (self.team == COLOR_TEAM2)
+ {
+ blue_players += 1;
+ total_players += 1;
+ }
+ else if (self.team == COLOR_TEAM3)
+ {
+ yellow_players += 1;
+ total_players += 1;
+ }
+ else if (self.team == COLOR_TEAM4)
+ {
+ pink_players += 1;
+ total_players += 1;
+ }
+ }
+}
+
+void count_alive_players()