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:
parent
8e7917bd5f
commit
cad59262ce
@ -365,22 +365,16 @@ league_cup_average_capacity(gint clid)
|
||||
{
|
||||
teams = (GArray*)league_cup_get_teams(clid);
|
||||
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;
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
teamsp = (GPtrArray*)league_cup_get_teams(clid);
|
||||
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;
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
return sum / (gfloat)cnt;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user