tree growth is rounded up.

This commit is contained in:
Enno Rehling 2020-07-30 13:25:55 +02:00
parent 6ccaaee4ea
commit 68e2a6e892

View file

@ -681,8 +681,8 @@ growing_trees(region * r, const season_t current_season, const season_t last_wee
a = a_find(r->attribs, &at_germs);
if (!a) {
a = a_add(&r->attribs, a_new(&at_germs));
a->data.sa[0] = (short)cap_int(rtrees(r, 0) / 9, 0, SHRT_MAX);
a->data.sa[1] = (short)cap_int(rtrees(r, 1) / 9, 0, SHRT_MAX);
a->data.sa[0] = (short)cap_int((8 + rtrees(r, 0)) / 9, 0, SHRT_MAX);
a->data.sa[1] = (short)cap_int((8 + rtrees(r, 1)) / 9, 0, SHRT_MAX);
}
else if (a->data.sa[0] < 0 || a->data.sa[1] < 0) {
a->data.sa[0] = (short)cap_int(a->data.sa[0], 0, SHRT_MAX);