From 18417fdef64e5cc97ae021d79b8c92213af8bd4b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 2 Aug 2006 17:58:20 +0000 Subject: [PATCH] (produce): The reported amount produced (returned through last parameter) did not reflect production cut for ITEM_MAX. Broken in 3.0.14 or so. Reported by Stefan Hauser. --- src/lib/update/produce.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/update/produce.c b/src/lib/update/produce.c index d863a6ef..6b00403f 100644 --- a/src/lib/update/produce.c +++ b/src/lib/update/produce.c @@ -126,13 +126,13 @@ produce(struct natstr *np, struct sctstr *sp, short *vec, int work, * material_consume / actual); if (material_consume < 0) material_consume = 0; - vec[item] = ITEM_MAX; + actual = ITEM_MAX - vec[item]; if (sp->sct_own && !player->simulation) wu(0, sp->sct_own, "%s production backlog in %s\n", product->p_name, ownxy(sp)); - } else - vec[item] += actual; + } + vec[item] += actual; } /* * Reset produced amount by commodity production ratio