mirror of
https://github.com/tstellar/bygfoot.git
synced 2024-12-17 02:39:14 +01:00
Solving valgrind errors. Player->peak_region was not yet defined before being used.
This commit is contained in:
parent
a83661b45a
commit
922d270910
@ -141,6 +141,10 @@ youth_academy_add_new_player(YouthAcademy *youth_academy)
|
||||
percentage_coach_talent_factor * av_talent *
|
||||
(1 + const_float("float_youth_academy_talent_variance")));
|
||||
|
||||
new.peak_region =
|
||||
math_gauss_dist(const_float("float_player_peak_region_lower"),
|
||||
const_float("float_player_peak_region_upper"));//2;
|
||||
|
||||
new.talent = CLAMP(new.talent, 0, const_float("float_player_max_skill"));
|
||||
new.skill = player_skill_from_talent(&new);
|
||||
new.cskill = new.skill;
|
||||
@ -168,10 +172,6 @@ youth_academy_add_new_player(YouthAcademy *youth_academy)
|
||||
new.streak = PLAYER_STREAK_NONE;
|
||||
new.streak_count = new.streak_prob = 0;
|
||||
|
||||
new.peak_region =
|
||||
math_gauss_dist(const_float("float_player_peak_region_lower"),
|
||||
const_float("float_player_peak_region_upper"));//2;
|
||||
|
||||
g_array_append_val(youth_academy->players, new);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user