void changematchtime(float delta, float mi, float ma)
{
float cur;
- float new;
+ float update;
float lim;
if(delta == 0)
if(lim == 0)
return; // cannot increase any further
else if(lim < ma)
- new = min(ma, lim + delta);
+ update = min(ma, lim + delta);
else // already above maximum: FAIL
return;
}
else
{
if(lim == 0) // infinite: try reducing to max, if we are allowed to
- new = max(mi, ma);
+ update = max(mi, ma);
else if(lim > mi) // above minimum: decrease
- new = max(mi, lim + delta);
+ update = max(mi, lim + delta);
else // already below minimum: FAIL
return;
}
- cvar_set("timelimit", ftos(new / 60));
+ cvar_set("timelimit", ftos(update / 60));
}
{
entity tmp_player;
int i;
- float x, z, t_teams, t_players, team_color;
+ float x, t_teams, t_players, team_color;
// count the total amount of players and total amount of teams
t_players = 0;
}
// finally, from the list made earlier, re-join the players in different order.
- for(i = 1; i <= t_teams; ++i)
+ for (int i = 1; i <= t_teams; ++i)
{
// find out how many players to assign to this team
x = (t_players / t_teams);
team_color = Team_NumberToTeam(i);
// sort through the random list of players made earlier
- for(z = 1; z <= maxclients; ++z)
+ for (int z = 1; z <= maxclients; ++z)
{
if (!(shuffleteams_teams[i] >= x))
{