Table bugfix.

This commit is contained in:
gyboth 2008-11-24 09:37:54 +00:00
parent a9d1129a75
commit eabb64b2bb
3 changed files with 7 additions and 4 deletions

View File

@ -199,6 +199,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg

View File

@ -73,7 +73,7 @@ player_new(Team *tm, gfloat average_talent, gboolean new_id)
new.talent =
CLAMP(average_talent * skill_factor, 0,
const_float("float_player_max_skill"));//85;
const_float("float_player_max_skill"));;
new.skill = player_skill_from_talent(&new);
new.cskill = new.skill;
@ -1212,7 +1212,7 @@ player_replace_by_new(Player *pl, gboolean free_player)
{
Team *tm = pl->team;
gint idx = player_id_index(tm, pl->id);
Player new = player_new(tm, team_get_average_skill(tm, FALSE), FALSE);
Player new = player_new(tm, team_get_average_talent(tm), FALSE);
new.name = name_get(pl->team->names_file);
new.pos = pl->pos;

View File

@ -69,11 +69,13 @@ table_element_new(Team *team, gint old_rank)
void
table_update(const Fixture *fix)
{
gint i, j;
gint i, j, end;
gint idx = (fix->result[0][0] < fix->result[1][0]);
TableElement *elements[2];
for(j = 0; j < 2; j++)
end = (fix->clid < ID_CUP_START) ? 2 : 1;
for(j = 0; j < end; j++)
{
elements[0] = elements[1] = NULL;
table_update_get_elements(elements, fix, (j == 1));