Skip to content

Commit

Permalink
tree growth is rounded up.
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Aug 3, 2020
1 parent c0babd4 commit a5f457a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/laws.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a5f457a

Please sign in to comment.