int work;
int totpop;
int act; /* actual production */
- int cost;
+ double cost;
int i;
int max; /* production w/infinite materials */
int nsect;
} else
mtake = take = 0.0;
- cost = (int)(take * (double)pp->p_cost);
+ cost = take * pp->p_cost;
if (opt_TECH_POP) {
if (pp->p_level == NAT_TLEV) {
totpop = count_pop(sect.sct_own);
if (totpop > 50000)
- cost = (int)((double)cost * (double)totpop / 50000.0);
+ cost *= totpop / 50000.0;
}
}
}
pr(" %.2f", prodeff);
- pr(" $%-5d", cost);
+ pr(" $%-5.0f", cost);
for (i = 0; i < 3; i++) {
if (i < MAXPRCON && cmnem[i])
pr("%4d%c", cuse[i], cmnem[i]);
if (opt_TECH_POP) {
if (product->p_level == NAT_TLEV) {
if (tpops[sp->sct_own] > 50000)
- *cost =
- (double)*cost * (double)tpops[sp->sct_own] / 50000.0;
+ *cost *= tpops[sp->sct_own] / 50000.0;
}
}