mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-03-16 02:30:16 +01:00
Randomize teams lists of non-user countries every season
This way the international cups will have new teams each year.
This commit is contained in:
parent
7f17e114d4
commit
a1119d0dd8
@ -145,6 +145,16 @@ start_new_season(void)
|
||||
free_names(TRUE);
|
||||
stat5 = STATUS_GENERATE_TEAMS;
|
||||
|
||||
/* Randomize league lists for non-user countries so we get different
|
||||
* teams in the international cups. */
|
||||
for (i = 0; i < country_list->len; i++) {
|
||||
Country *country = g_ptr_array_index(country_list, i);
|
||||
for (j = 0; j < country->leagues->len; j++) {
|
||||
League *league = &g_array_index(country->leagues, League, j);
|
||||
league->teams = misc_randomise_g_pointer_array(league->teams);
|
||||
}
|
||||
}
|
||||
|
||||
if(season == 1)
|
||||
{
|
||||
for(i=0;i<ligs->len;i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user