1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2024-12-15 09:54:52 +01:00

"Minor fixes."

This commit is contained in:
gyboth 2005-05-11 20:17:24 +00:00
parent 3f7dbf6d04
commit 28ddd65abc
3 changed files with 15 additions and 17 deletions

View File

@ -106,11 +106,17 @@ cup_reset(Cup *cup)
for(i=0;i<cup->rounds->len;i++)
{
for(j=0;j<g_array_index(cup->rounds, CupRound, i).tables->len;j++)
free_table(&g_array_index(g_array_index(cup->rounds, CupRound, i).tables, Table, j));
g_array_free(g_array_index(cup->rounds, CupRound, i).tables, TRUE);
g_array_index(cup->rounds, CupRound, i).tables = g_array_new(FALSE, FALSE, sizeof(Table));
if(g_array_index(cup->rounds, CupRound, i).tables->len > 0)
{
for(j=0;j<g_array_index(cup->rounds, CupRound, i).tables->len;j++)
free_table(&g_array_index(g_array_index(cup->rounds, CupRound, i).tables, Table, j));
g_array_free(g_array_index(cup->rounds, CupRound, i).tables, TRUE);
g_array_index(cup->rounds, CupRound, i).tables = g_array_new(FALSE, FALSE, sizeof(Table));
}
if(g_array_index(cup->rounds, CupRound, i).teams->len > 0)
free_teams_array(&g_array_index(cup->rounds, CupRound, i).teams, TRUE);
}
}

View File

@ -59,18 +59,6 @@ game_get_values(const Fixture *fix, gfloat team_values[][GAME_TEAM_VALUE_END],
team_values[i][GAME_TEAM_VALUE_DEFEND] *= (1 - style_factor);
team_values[i][GAME_TEAM_VALUE_ATTACK] *= (1 + style_factor);
/*d*/
/* if(fixture_user_team_involved(fix) != -1) */
/* { */
/* printf("week %d %d\n", week, week_round); */
/* printf("%s attack %.1f midf %.1f defend %.1f style %d struct %d\n", */
/* tm[i]->name->str, */
/* team_values[i][GAME_TEAM_VALUE_ATTACK], */
/* team_values[i][GAME_TEAM_VALUE_MIDFIELD], */
/* team_values[i][GAME_TEAM_VALUE_DEFEND], */
/* tm[i]->style, tm[i]->structure); */
/* } */
}
}

View File

@ -426,6 +426,10 @@ league_season_start(League *league)
if(team_is_user(&g_array_index(league->teams, Team, i)) == -1)
team_update_cpu_structure(&g_array_index(league->teams, Team, i));
g_array_index(league->teams, Team, i).stadium.average_attendance =
g_array_index(league->teams, Team, i).stadium.games =
g_array_index(league->teams, Team, i).stadium.possible_attendance = 0;
}
}