mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-03-15 10:10:12 +01:00
"Cup talent diff bug fixed."
This commit is contained in:
parent
cc34db8ee3
commit
6b176972bb
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg
|
||||
AM_CFLAGS = -Wall -fprofile-arcs -ftest-coverage -pg
|
||||
|
||||
SUBDIRS = src po
|
||||
|
||||
|
@ -361,6 +361,7 @@ function get_team_defs()
|
||||
|
||||
my_wget $uri
|
||||
tar xfj $file_name.bz2
|
||||
rm -rfv $file_name.bz2 2>> $log_file | tee -a $log_file
|
||||
|
||||
if [ -d ../$country ]; then
|
||||
pushd ../$country &> /dev/null
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
642
po/bygfoot.pot
642
po/bygfoot.pot
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg
|
||||
AM_CFLAGS = -Wall -fprofile-arcs -ftest-coverage -pg
|
||||
|
||||
INCLUDES = \
|
||||
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
|
||||
|
@ -438,7 +438,7 @@ game_check_live_game_resume_state(void)
|
||||
for(j=0;j<11;j++)
|
||||
if(!query_integer_is_in_array(player_of_idx_team(teams[i], j)->id,
|
||||
usr(stat2).live_game.team_state[i].player_ids,
|
||||
0, 11))
|
||||
11))
|
||||
subs[i]++;
|
||||
|
||||
if(subs[i] > usr(stat2).live_game.subs_left[i])
|
||||
@ -467,7 +467,7 @@ game_reset_players(gint idx)
|
||||
for(i=0;i<tm->players->len;i++)
|
||||
if(!query_integer_is_in_array(player_of_idx_team(tm, i)->id,
|
||||
usr(stat2).live_game.team_state[idx].player_ids,
|
||||
0, 11))
|
||||
11))
|
||||
g_array_append_val(players, *player_of_idx_team(tm, i));
|
||||
|
||||
g_array_free(tm->players, TRUE);
|
||||
@ -496,7 +496,7 @@ game_get_subs(gint team_number, gint *subs_in, gint *subs_out)
|
||||
current_players[i] = player_of_idx_team(tm, i)->id;
|
||||
if(!query_integer_is_in_array(player_of_idx_team(tm, i)->id,
|
||||
usr(stat2).live_game.team_state[team_number].player_ids,
|
||||
0, 11))
|
||||
11))
|
||||
{
|
||||
subs_in[cnt] = player_of_idx_team(tm, i)->id;
|
||||
cnt++;
|
||||
@ -506,7 +506,7 @@ game_get_subs(gint team_number, gint *subs_in, gint *subs_out)
|
||||
cnt = 0;
|
||||
for(i=0;i<11;i++)
|
||||
if(!query_integer_is_in_array(usr(stat2).live_game.team_state[team_number].player_ids[i],
|
||||
current_players, 0, 11))
|
||||
current_players, 11))
|
||||
{
|
||||
subs_out[cnt] = usr(stat2).live_game.team_state[team_number].player_ids[i];
|
||||
cnt++;
|
||||
|
@ -317,7 +317,7 @@ lg_commentary_get_order(const GArray *commentaries, gint *order)
|
||||
for(j=0;j<commentaries->len;j++)
|
||||
if(bounds[j] < permutation[i] && permutation[i] <= bounds[j + 1])
|
||||
{
|
||||
if(!query_integer_is_in_array(j, order, 0, commentaries->len))
|
||||
if(!query_integer_is_in_array(j, order, commentaries->len))
|
||||
{
|
||||
order[order_idx] = j;
|
||||
order_idx++;
|
||||
|
@ -163,15 +163,14 @@ misc_print_grouped_int(gint number, gchar *buf)
|
||||
/** Check whether 'item' is in array 'array' between
|
||||
'min' and 'max'.
|
||||
@param array The integer list.
|
||||
@param min The lower delimitor (inclusive).
|
||||
@param max The upper delimitor (exclusive).
|
||||
@param item The item we look for. */
|
||||
gboolean
|
||||
query_integer_is_in_array(gint item, gint *array, gint min, gint max)
|
||||
query_integer_is_in_array(gint item, gint *array, gint max)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for(i=min;i<max;i++)
|
||||
for(i=0;i<max;i++)
|
||||
if(item == array[i])
|
||||
return TRUE;
|
||||
|
||||
|
@ -24,7 +24,7 @@ void
|
||||
misc_print_grouped_int(gint number, gchar *buf);
|
||||
|
||||
gboolean
|
||||
query_integer_is_in_array(gint item, gint *array, gint min, gint max);
|
||||
query_integer_is_in_array(gint item, gint *array, gint max);
|
||||
|
||||
gint
|
||||
misc_int_compare(gint first, gint second);
|
||||
|
@ -516,7 +516,7 @@ player_substitution_good_structure(gint old_structure, gint old_pos, gint player
|
||||
old_structure - (gint)rint(powf(10, PLAYER_POS_FORWARD - old_pos)) +
|
||||
(gint)rint(powf(10, PLAYER_POS_FORWARD - player_pos));
|
||||
|
||||
return query_integer_is_in_array(new_structure, accepted_structures, 0, 5);
|
||||
return query_integer_is_in_array(new_structure, accepted_structures, 5);
|
||||
}
|
||||
|
||||
/** Copy a player into a team.
|
||||
|
@ -114,9 +114,15 @@ team_generate_players_stadium(Team *tm)
|
||||
skill_factor * league_from_clid(tm->clid)->average_talent :
|
||||
tm->average_talent;
|
||||
else
|
||||
{
|
||||
average_talent =
|
||||
skill_factor * team_get_average_talents(lig(0).teams) *
|
||||
(1 + cup_from_clid(tm->clid)->talent_diff);
|
||||
printf("%s av %.1f sf %.2f tea %.1f tdif %.2f\n",
|
||||
tm->name, average_talent, skill_factor,
|
||||
team_get_average_talents(lig(0).teams),
|
||||
cup_from_clid(tm->clid)->talent_diff);
|
||||
}
|
||||
|
||||
average_talent = CLAMP(average_talent, 0, const_float("float_player_max_skill"));
|
||||
tm->average_talent = average_talent;
|
||||
|
@ -947,7 +947,8 @@ treeview_helper_player_info_health_to_cell(GtkCellRenderer *renderer, const Play
|
||||
const_app("string_treeview_helper_color_player_injury"), NULL);
|
||||
}
|
||||
else
|
||||
strcpy(buf, "OK");
|
||||
/* Player health: ok. */
|
||||
strcpy(buf, _("OK"));
|
||||
|
||||
g_object_set(renderer, "text", buf, NULL);
|
||||
}
|
||||
@ -1216,7 +1217,8 @@ treeview_helper_player_status_to_cell(GtkTreeViewColumn *col,
|
||||
else
|
||||
{
|
||||
if(!render_icon)
|
||||
strcpy(buf, "OK");
|
||||
/* Player status: ok. */
|
||||
strcpy(buf, _("OK"));
|
||||
else
|
||||
{
|
||||
if(ban == -1)
|
||||
|
@ -282,7 +282,7 @@ xml_cup_read_text (GMarkupParseContext *context,
|
||||
new_cup.yellow_red = int_value;
|
||||
else if(state == STATE_TALENT_DIFF)
|
||||
new_cup.talent_diff =
|
||||
(float_value / 10000) * const_float("float_player_max_skill");
|
||||
(float_value / 10000);
|
||||
else if(state == STATE_CUP_ROUND_NEW_TEAMS)
|
||||
new_round.new_teams = int_value;
|
||||
else if(state == STATE_CUP_ROUND_BYES)
|
||||
|
@ -19,6 +19,7 @@ string_contrib_entry Mark Calderbank (Bulgaria, England, Ireland, Spain, Victori
|
||||
string_contrib_entry Tobe & Arne Deprez (Belgium)
|
||||
string_contrib_entry Celso Goya (Brazil)
|
||||
string_contrib_entry Pechorin (Serbia & Montenegro)
|
||||
string_contrib_entry Koen Pijnenburg (Netherlands)
|
||||
string_contrib_entry Arnaud Le Rouzic (France)
|
||||
string_contrib_entry Michal Rudolf (Poland)
|
||||
string_contrib_entry Cristian Spoiala (Romania)
|
||||
|
Loading…
x
Reference in New Issue
Block a user