mirror of
https://github.com/tstellar/bygfoot.git
synced 2024-12-15 09:54:52 +01:00
"Minor fixes."
This commit is contained in:
parent
3f7dbf6d04
commit
28ddd65abc
16
src/cup.c
16
src/cup.c
@ -106,11 +106,17 @@ cup_reset(Cup *cup)
|
|||||||
|
|
||||||
for(i=0;i<cup->rounds->len;i++)
|
for(i=0;i<cup->rounds->len;i++)
|
||||||
{
|
{
|
||||||
for(j=0;j<g_array_index(cup->rounds, CupRound, i).tables->len;j++)
|
if(g_array_index(cup->rounds, CupRound, i).tables->len > 0)
|
||||||
free_table(&g_array_index(g_array_index(cup->rounds, CupRound, i).tables, Table, j));
|
{
|
||||||
|
for(j=0;j<g_array_index(cup->rounds, CupRound, i).tables->len;j++)
|
||||||
g_array_free(g_array_index(cup->rounds, CupRound, i).tables, TRUE);
|
free_table(&g_array_index(g_array_index(cup->rounds, CupRound, i).tables, Table, j));
|
||||||
g_array_index(cup->rounds, CupRound, i).tables = g_array_new(FALSE, FALSE, sizeof(Table));
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
src/game.c
12
src/game.c
@ -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_DEFEND] *= (1 - style_factor);
|
||||||
team_values[i][GAME_TEAM_VALUE_ATTACK] *= (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); */
|
|
||||||
/* } */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,6 +426,10 @@ league_season_start(League *league)
|
|||||||
|
|
||||||
if(team_is_user(&g_array_index(league->teams, Team, i)) == -1)
|
if(team_is_user(&g_array_index(league->teams, Team, i)) == -1)
|
||||||
team_update_cpu_structure(&g_array_index(league->teams, Team, i));
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user