mirror of https://github.com/tstellar/bygfoot.git
Next opponent goalie values bug.
This commit is contained in:
parent
dae5dd362e
commit
843db5af40
|
@ -214,10 +214,13 @@ finance_get_loan(gint value)
|
|||
else
|
||||
{
|
||||
/** Calculate new interest in a way that the user can't take unfair advantage of new market interest. */
|
||||
current_user.debt_interest =
|
||||
powf((debt_old * powf(1 + current_user.debt_interest, (gfloat)current_user.counters[COUNT_USER_LOAN]) +
|
||||
debt_new * powf(1 + current_interest, (gfloat)current_user.counters[COUNT_USER_LOAN])) / (gfloat)current_user.debt,
|
||||
1 / (gfloat)current_user.counters[COUNT_USER_LOAN]) - 1;
|
||||
if(current_interest != current_user.debt_interest)
|
||||
{
|
||||
current_user.debt_interest =
|
||||
powf((debt_old * powf(1 + current_user.debt_interest, (gfloat)current_user.counters[COUNT_USER_LOAN]) +
|
||||
debt_new * powf(1 + current_interest, (gfloat)current_user.counters[COUNT_USER_LOAN])) / (gfloat)current_user.debt,
|
||||
1 / (gfloat)current_user.counters[COUNT_USER_LOAN]) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
game_gui_print_message(_("You have %d weeks to pay back your loan."),
|
||||
|
|
|
@ -114,6 +114,10 @@ game_get_player_contribution(const Player *pl, gint type, gboolean special)
|
|||
const_float("float_player_team_weight_forward_midfield"),
|
||||
const_float("float_player_team_weight_forward_attack")}};
|
||||
|
||||
if(pl->cpos == PLAYER_POS_GOALIE)
|
||||
printf("plgamesk %.1f, weight %.1f\n",
|
||||
player_get_game_skill(pl, FALSE, special), player_weights[pl->cpos - 1][type - GAME_TEAM_VALUE_DEFEND]);
|
||||
|
||||
return player_get_game_skill(pl, FALSE, special) *
|
||||
player_weights[pl->cpos - 1][type - GAME_TEAM_VALUE_DEFEND];
|
||||
}
|
||||
|
|
|
@ -1596,6 +1596,8 @@ treeview_create_next_opponent_values(GtkListStore *ls, const Fixture *fix)
|
|||
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
printf("%d tv %.1f %.1f maxval %.1f maxpip %d\n",
|
||||
i, team_values[0][i], team_values[1][i], max_values[i], const_int("int_treeview_max_pipes"));
|
||||
strcpy(buf2, "");
|
||||
for(j=0;j<(gint)rint((gfloat)const_int("int_treeview_max_pipes") *
|
||||
(team_values[fix->teams[0] == current_user.tm][i] / max_values[i]));j++)
|
||||
|
|
Loading…
Reference in New Issue