mirror of https://github.com/tstellar/bygfoot.git
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;
|
||||
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. */
|
||||
for(i = 0; i < league->joined_leagues->len; i++)
|
||||
{
|
||||
|
|
|
@ -169,6 +169,15 @@ start_new_season(void)
|
|||
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++)
|
||||
if(query_league_active(&lig(i)))
|
||||
fixture_write_league_fixtures(&lig(i));
|
||||
|
|
Loading…
Reference in New Issue