forked from github/server
tree growth is rounded up.
This commit is contained in:
parent
6ccaaee4ea
commit
68e2a6e892
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue