Clean up redundant code in prod()
This commit is contained in:
parent
2a1e039834
commit
ac60160355
1 changed files with 1 additions and 7 deletions
|
@ -135,7 +135,6 @@ prod(void)
|
||||||
eff = 0;
|
eff = 0;
|
||||||
}
|
}
|
||||||
if (!eff && IS_BIG_CITY(otype) && !IS_BIG_CITY(type)) {
|
if (!eff && IS_BIG_CITY(otype) && !IS_BIG_CITY(type)) {
|
||||||
natp = getnatp(sect.sct_own);
|
|
||||||
maxpop = max_population(natp->nat_level[NAT_RLEV],
|
maxpop = max_population(natp->nat_level[NAT_RLEV],
|
||||||
type, eff);
|
type, eff);
|
||||||
work = new_work(§,
|
work = new_work(§,
|
||||||
|
@ -184,12 +183,8 @@ prod(void)
|
||||||
|
|
||||||
if (sect.sct_own != sect.sct_oldown)
|
if (sect.sct_own != sect.sct_oldown)
|
||||||
continue;
|
continue;
|
||||||
civs = (1.0 + obrate * etu_per_update) * sect.sct_item[I_CIVIL];
|
|
||||||
natp = getnatp(sect.sct_own);
|
|
||||||
maxpop = max_pop(natp->nat_level[NAT_RLEV], §);
|
|
||||||
civs = MIN(civs, maxpop);
|
|
||||||
enlisted = 0;
|
enlisted = 0;
|
||||||
maxmil = (civs / 2) - sect.sct_item[I_MILIT];
|
maxmil = MIN(civs, maxpop) / 2 - sect.sct_item[I_MILIT];
|
||||||
if (maxmil > 0) {
|
if (maxmil > 0) {
|
||||||
enlisted = (etu_per_update
|
enlisted = (etu_per_update
|
||||||
* (10 + sect.sct_item[I_MILIT])
|
* (10 + sect.sct_item[I_MILIT])
|
||||||
|
@ -214,7 +209,6 @@ prod(void)
|
||||||
resource = (unsigned char *)§ + pp->p_nrndx;
|
resource = (unsigned char *)§ + pp->p_nrndx;
|
||||||
else
|
else
|
||||||
resource = NULL;
|
resource = NULL;
|
||||||
natp = getnatp(sect.sct_own);
|
|
||||||
/*
|
/*
|
||||||
* sect p_e (inc improvements)
|
* sect p_e (inc improvements)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue