mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-03-05 19:47:55 +01:00
Joined league scheduling fix.
This commit is contained in:
parent
2eafaebc4b
commit
8a684b2f1d
@ -55,9 +55,6 @@ fixture_write_league_fixtures(League *league)
|
|||||||
max_rr = league->round_robins;
|
max_rr = league->round_robins;
|
||||||
teams = team_get_pointers_from_array(league->teams, NULL);
|
teams = team_get_pointers_from_array(league->teams, NULL);
|
||||||
|
|
||||||
g_array_free(league->fixtures, TRUE);
|
|
||||||
league->fixtures = g_array_new(FALSE, FALSE, sizeof(Fixture));
|
|
||||||
|
|
||||||
/** Add all teams to the same pointer array. */
|
/** Add all teams to the same pointer array. */
|
||||||
for(i = 0; i < league->joined_leagues->len; i++)
|
for(i = 0; i < league->joined_leagues->len; i++)
|
||||||
{
|
{
|
||||||
|
@ -168,7 +168,16 @@ start_new_season(void)
|
|||||||
|
|
||||||
start_new_season_reset_ids();
|
start_new_season_reset_ids();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We have to reset all fixture arrays beforehand because
|
||||||
|
of interleague scheduling (see joined_league). */
|
||||||
|
for(i=0;i<ligs->len;i++)
|
||||||
|
if(query_league_active(&lig(i)))
|
||||||
|
{
|
||||||
|
g_array_free(lig(i).fixtures, TRUE);
|
||||||
|
lig(i).fixtures = g_array_new(FALSE, FALSE, sizeof(Fixture));
|
||||||
|
}
|
||||||
|
|
||||||
for(i=0;i<ligs->len;i++)
|
for(i=0;i<ligs->len;i++)
|
||||||
if(query_league_active(&lig(i)))
|
if(query_league_active(&lig(i)))
|
||||||
fixture_write_league_fixtures(&lig(i));
|
fixture_write_league_fixtures(&lig(i));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user