From a5f457a62d36a12b1f7bec43635a1b687b621fc0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 30 Jul 2020 13:25:55 +0200 Subject: [PATCH] tree growth is rounded up. --- src/laws.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/laws.c b/src/laws.c index 731e46cea..99a61781e 100644 --- a/src/laws.c +++ b/src/laws.c @@ -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);