Fix work command not to spend more mobility than requested
Culprit is careless rounding in work().
This commit is contained in:
parent
3615cfc8ac
commit
ab2893fa41
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue