]> git.pond.sub.org Git - empserver/commitdiff
(prod): Fix bug #1083175. Use max_pop() not just when opt_RES_POP is
authorMarc Olzheim <marcolz@stack.nl>
Tue, 14 Dec 2004 19:45:47 +0000 (19:45 +0000)
committerMarc Olzheim <marcolz@stack.nl>
Tue, 14 Dec 2004 19:45:47 +0000 (19:45 +0000)
enabled to determine the new working population of a sector.

src/lib/commands/prod.c

index 6827fec86d791c6d00c189ad67b3df7c72c4d060..619f30155704b3f1cb7e1ae42ed7b7d807b7043f 100644 (file)
@@ -113,15 +113,10 @@ prod(void)
                               * sect.sct_item[I_CIVIL]));
        uws = min(9999, (int)((uwbrate * etu_per_update + 1.0)
                              * sect.sct_item[I_UW]));
-       if (opt_RES_POP) {
-           natp = getnatp(sect.sct_own);
-           maxpop = max_pop((float)natp->nat_level[NAT_RLEV], &sect);
-           civs = min(civs, maxpop);
-           uws = min(uws, maxpop);
-       } else {                /* now RES_POP */
-           civs = min(999, civs);
-           uws = min(999, uws);
-       }                       /* end RES_POP */
+       natp = getnatp(sect.sct_own);
+       maxpop = max_pop(natp->nat_level[NAT_RLEV], &sect);
+       civs = min(civs, maxpop);
+       uws = min(uws, maxpop);
 
        /* This isn't quite right, since research might rise/fall */
        /* during the update, but it's the best we can really do  */