1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-01-31 07:54:50 +01:00

Fix for tracker id 2942033: Spectator Bugs in Multiplayer-Games

Patch by rookie86
This commit is contained in:
gunnar_g 2010-01-29 07:38:11 +00:00
parent d48bb2de5e
commit 6214b21d01

View File

@ -365,22 +365,16 @@ league_cup_average_capacity(gint clid)
{ {
teams = (GArray*)league_cup_get_teams(clid); teams = (GArray*)league_cup_get_teams(clid);
for(i=0;i<teams->len;i++) for(i=0;i<teams->len;i++)
if(team_is_user(&g_array_index(teams, Team, i)) == -1)
{
sum += g_array_index(teams, Team, i).stadium.capacity; sum += g_array_index(teams, Team, i).stadium.capacity;
cnt++; cnt++;
} }
}
else else
{ {
teamsp = (GPtrArray*)league_cup_get_teams(clid); teamsp = (GPtrArray*)league_cup_get_teams(clid);
for(i=0;i<teamsp->len;i++) for(i=0;i<teamsp->len;i++)
if(team_is_user((Team*)g_ptr_array_index(teamsp, i)) == -1)
{
sum += ((Team*)g_ptr_array_index(teamsp, i))->stadium.capacity; sum += ((Team*)g_ptr_array_index(teamsp, i))->stadium.capacity;
cnt++; cnt++;
} }
}
return sum / (gfloat)cnt; return sum / (gfloat)cnt;
} }