float next_round;
float redalive, bluealive, yellowalive, pinkalive;
-float totalalive;
.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
float red_players, blue_players, yellow_players, pink_players;
float total_players;
{
if(g_ca)
{
- totalalive = redalive = bluealive = yellowalive = pinkalive = 0;
+ redalive = bluealive = yellowalive = pinkalive = 0;
FOR_EACH_PLAYER(self) {
if (self.team == COLOR_TEAM1 && self.health >= 1)
- {
redalive += 1;
- totalalive += 1;
- }
else if (self.team == COLOR_TEAM2 && self.health >= 1)
- {
bluealive += 1;
- totalalive += 1;
- }
}
FOR_EACH_REALCLIENT(self) {
self.redalive_stat = redalive;
TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
}
- totalalive = redalive = bluealive = yellowalive = pinkalive = 0;
+ redalive = bluealive = yellowalive = pinkalive = 0;
next_round = time + 5;
}
else if(self.team == COLOR_TEAM2) ++bluealive;
else if(self.team == COLOR_TEAM3) ++yellowalive;
else if(self.team == COLOR_TEAM4) ++pinkalive;
- ++totalalive;
freezetag_update_alive_stats();
}
else if(self.team == COLOR_TEAM2) --bluealive;
else if(self.team == COLOR_TEAM3) --yellowalive;
else if(self.team == COLOR_TEAM4) --pinkalive;
- --totalalive;
freezetag_update_alive_stats();
}
if(total_players == 1) // only one player active on server, start a new match immediately
if(!next_round && warmup && (time < warmup - autocvar_g_freezetag_warmup || time > warmup)) // not awaiting next round
{
- totalalive = redalive = bluealive = yellowalive = pinkalive = 0;
+ redalive = bluealive = yellowalive = pinkalive = 0;
next_round = time;
return 1;
}