]> git.pond.sub.org Git - empserver/commitdiff
(newe): Fix for max_pop() > 999.
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Feb 2005 18:25:14 +0000 (18:25 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Feb 2005 18:25:14 +0000 (18:25 +0000)
src/lib/commands/newe.c

index bd6e5a617fae9dc65694d8a9f688ce80c5349b0f..0b82d3ff84d1dedd2594dfc3508467b1950a9e88 100644 (file)
@@ -67,12 +67,10 @@ newe(void)
        if (!player->owner)
            continue;
        if (!sect.sct_off) {
-           civs = min(999, (int)((obrate * etu_per_update + 1.0)
-                                 * sect.sct_item[I_CIVIL]));
-           uws = min(999, (int)((uwbrate * etu_per_update + 1.0)
-                                * sect.sct_item[I_UW]));
+           civs = (1.0 + obrate * etu_per_update) * sect.sct_item[I_CIVIL];
+           uws = (1.0 + uwbrate * etu_per_update) * sect.sct_item[I_UW];
            natp = getnatp(sect.sct_own);
-           maxpop = max_pop((float)natp->nat_level[NAT_RLEV], &sect);
+           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 */