"Minor bugfixes."

This commit is contained in:
gyboth 2006-01-10 21:26:51 +00:00
parent e9abbc09c1
commit 94cd6f351a
10 changed files with 54 additions and 12 deletions

View File

@ -1,3 +1,9 @@
2/22/2006: v1.9.5
- fixed a bug that led to a 'cup not found' exit after a few
seasons
- fixed a minor youth academy bug
12/22/2005: v1.9.4
- fixed an annoying crash that occurs every time a user wins a cup or
loses a cup final

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: bygfoot\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-01-07 20:50+0100\n"
"POT-Creation-Date: 2006-01-10 22:17+0100\n"
"PO-Revision-Date: 2005-09-08 12:56+0300\n"
"Last-Translator: Rostislav \"zbrox\" Raykov <nostalgiafed@gmail.com>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"

View File

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Bygfoot Football Manager 1.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-01-07 20:50+0100\n"
"POT-Creation-Date: 2006-01-10 22:17+0100\n"
"PO-Revision-Date: 2005-12-12 18:13+0100\n"
"Last-Translator: Kristian Poul Herkild <kristian@herkild.dk>\n"
"Language-Team: <kristian@herkild.dk>\n"

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-01-07 20:50+0100\n"
"POT-Creation-Date: 2006-01-10 22:17+0100\n"
"PO-Revision-Date: 2005-12-22 10:37+0100\n"
"Last-Translator: Michael Trent <trent@cortalconsors.de>\n"
"Language-Team: Deutsch <de@li.org>\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Bygfoot 1.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-01-07 20:50+0100\n"
"POT-Creation-Date: 2006-01-10 22:17+0100\n"
"PO-Revision-Date: 2005-12-09 17:03+0100\n"
"Last-Translator: Forjan Frédéric <fforjan@linuxmail.org>\n"
"Language-Team: French\n"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Bygfoot 1.9.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-01-07 20:50+0100\n"
"POT-Creation-Date: 2006-01-10 22:17+0100\n"
"PO-Revision-Date: 2005-12-10 14:08+0100\n"
"Last-Translator: Arne en Tobe Deprez <tobedeprez@scarlet.be>\n"
"Language-Team: Dutch <tobedeprez@scarlet.be>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: bygfoot 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-01-07 20:50+0100\n"
"POT-Creation-Date: 2006-01-10 22:17+0100\n"
"PO-Revision-Date: 2005-09-28 13:35+0800\n"
"Last-Translator: root <lbyoopp@gmail.com>\n"
"Language-Team: Chinese <i18n-translation@lists.linux.net.cn>\n"

View File

@ -373,7 +373,8 @@ league_season_start(League *league)
gint idx = league_index_from_sid(league->sid);
gboolean user_champ =
(team_is_user(
team_of_id(g_array_index(lig(0).table.elements, TableElement, 0).team_id)) != -1);
team_of_id(
g_array_index(lig(0).table.elements, TableElement, 0).team_id)) != -1);
gfloat team_change_factor = 0;
for(i=0;i<league->table.elements->len;i++)
@ -393,13 +394,17 @@ league_season_start(League *league)
team_change_factor =
(team_is_user(&g_array_index(league->teams, Team, i)) == -1) *
math_rnd(const_float("float_season_end_team_change_lower") +
(user_champ && idx == 0) * const_float("float_season_end_user_champ_addition"),
(user_champ && idx == 0) *
const_float("float_season_end_user_champ_addition"),
const_float("float_season_end_team_change_upper") +
(user_champ && idx == 0) * const_float("float_season_end_user_champ_addition"));
(user_champ && idx == 0) *
const_float("float_season_end_user_champ_addition"));
for(j=0;j<g_array_index(league->teams, Team, i).players->len;j++)
player_season_start(
&g_array_index(g_array_index(league->teams, Team, i).players, Player, j), team_change_factor);
&g_array_index(
g_array_index(
league->teams, Team, i).players, Player, j), team_change_factor);
g_array_index(league->teams, Team, i).stadium.average_attendance =
g_array_index(league->teams, Team, i).stadium.games =

View File

@ -40,6 +40,7 @@
#include "misc.h"
#include "name.h"
#include "option.h"
#include "player.h"
#include "start_end.h"
#include "stat.h"
#include "table.h"
@ -130,10 +131,16 @@ start_new_season(void)
usr(i).youth_academy.tm = usr(i).tm;
for(j=0;j<usr(i).youth_academy.players->len;j++)
{
g_array_index(usr(i).youth_academy.players, Player, j).team = usr(i).tm;
player_season_start(
&g_array_index(usr(i).youth_academy.players, Player, j), 0);
}
live_game_reset(&usr(i).live_game, NULL, TRUE);
}
start_new_season_reset_ids();
}
else
{
@ -174,8 +181,6 @@ start_new_season(void)
if(season == 1)
bet_update();
/*todo: reset league and cup id counters*/
}
/** Fill some global variables with default values at the
@ -211,6 +216,29 @@ start_generate_league_teams(void)
stat5 = -1;
}
/** Reset the cup and league ids to the smallest possible
value to avoid an overflow (gotta admit, the id system
isn't perfect). */
void
start_new_season_reset_ids(void)
{
gint i, max;
max = -1;
for(i=0;i<ligs->len;i++)
if(lig(i).id > max)
max = lig(i).id;
counters[COUNT_LEAGUE_ID] = max + 1;
max = -1;
for(i=0;i<cps->len;i++)
if(cp(i).id > max)
max = cp(i).id;
counters[COUNT_CUP_ID] = max + 1;
}
/** End a week round. */
void
end_week_round(void)

View File

@ -91,4 +91,7 @@ start_week_add_cups(void);
void
end_week_hide_cups(void);
void
start_new_season_reset_ids(void);
#endif