]> git.pond.sub.org Git - empserver/commitdiff
Fix prod() to limit level production to resource contents
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 7 Sep 2009 19:18:17 +0000 (15:18 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 8 Dec 2009 07:12:55 +0000 (08:12 +0100)
This could make production command mispredict resource-depleting level
production.  Stock game is not affected.  In fact, such a product
would be highly unusual.

src/lib/commands/prod.c

index 2b2b6519653227783d720780350eb96d6e48b04a..f959f377792963446a1a4871f5358ad4c2e19dbe 100644 (file)
@@ -247,7 +247,7 @@ prod(void)
         * workforce?
         */
        max = (int)(work * p_e / (double)unit_work + 0.5);
-       if (resource && pp->p_nrdep != 0 && vtype != I_NONE) {
+       if (resource && pp->p_nrdep != 0) {
            if (*resource * 100 < pp->p_nrdep * max)
                max = *resource * 100 / pp->p_nrdep;
        }