Fix work command not to spend more mobility than requested

Culprit is careless rounding in work().
This commit is contained in:
Markus Armbruster 2008-08-03 17:20:05 -04:00
parent 3615cfc8ac
commit ab2893fa41

View file

@ -79,7 +79,7 @@ work(void)
continue;
}
eff_amt = MIN(land.lnd_mobil, work_amt);
w = ldround(((double)eff_amt * land.lnd_effic / 600.0), 1);
w = (eff_amt * land.lnd_effic) / 600;
if (w < 1) {
pr("%s doesn't work enough to change efficiency (try increasing amount)\n",
prland(&land));