[solved in 2.3.1l] svn up Youth too old: no time to react
Posted: Fri Nov 14, 2008 7:56 pm
Sorry to report several bugs in the same evening, probably better not to forget them. I've just got an annoying bug with the youth academy. I got the message "X is too old, he will probably leave your team if you don't propose him a contract", I clicked OK, and I immediately got a second message "X has left your team". I guess the reason for that is that it was a between-season session, and I guess time goes faster between seasons. Anyway, poor X, I had no opportunity to propose him a job.
Here are a few lines for a fix:
(i) increase the delay between the two events ("X wants to leave" -> "X has left")
the bug is probably in youth_academy.c:
if(g_array_index(ya->players, Player, j).age + 0.1 >
const_float("float_player_age_lower") &&
g_array_index(ya->players, Player, j).age + 0.08 <=
const_float("float_player_age_lower"))
The difference between 0.1 and 0.08 is probably too small (but I'm not 100% sure I understand the code here, so I'm not sure if it is better to increase 0.1 or to decrease 0.08).
(ii) directly open a "contract offer" window immediately after "X wants to leave".
I guess that (i) is simpler, and (ii) is nicer.
Here are a few lines for a fix:
(i) increase the delay between the two events ("X wants to leave" -> "X has left")
the bug is probably in youth_academy.c:
if(g_array_index(ya->players, Player, j).age + 0.1 >
const_float("float_player_age_lower") &&
g_array_index(ya->players, Player, j).age + 0.08 <=
const_float("float_player_age_lower"))
The difference between 0.1 and 0.08 is probably too small (but I'm not 100% sure I understand the code here, so I'm not sure if it is better to increase 0.1 or to decrease 0.08).
(ii) directly open a "contract offer" window immediately after "X wants to leave".
I guess that (i) is simpler, and (ii) is nicer.