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
d48bb2de5e
commit
6214b21d01
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user