Fix work command to round mobility use randomly, not down
This commit is contained in:
parent
ab2893fa41
commit
063a7d9988
1 changed files with 3 additions and 4 deletions
|
@ -28,7 +28,7 @@
|
||||||
* work.c: Implementation of the work command
|
* work.c: Implementation of the work command
|
||||||
*
|
*
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
*
|
* Markus Armbruster, 2008
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -93,15 +93,14 @@ work(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
player->dolcost += cost;
|
player->dolcost += cost;
|
||||||
eff_amt = ((6 * w) / (land.lnd_effic / 100.0));
|
|
||||||
land.lnd_mission = 0;
|
land.lnd_mission = 0;
|
||||||
land.lnd_mobil -= eff_amt;
|
land.lnd_mobil -= roundavg(w * 600.0 / land.lnd_effic);
|
||||||
nunits++;
|
nunits++;
|
||||||
pr("%s %s efficiency at %s to %d\n",
|
pr("%s %s efficiency at %s to %d\n",
|
||||||
prland(&land),
|
prland(&land),
|
||||||
sect.sct_type == sect.sct_newtype ? "raised" : "lowered",
|
sect.sct_type == sect.sct_newtype ? "raised" : "lowered",
|
||||||
xyas(land.lnd_x, land.lnd_y, player->cnum),
|
xyas(land.lnd_x, land.lnd_y, player->cnum),
|
||||||
(int)sect.sct_effic);
|
sect.sct_effic);
|
||||||
putland(land.lnd_uid, &land);
|
putland(land.lnd_uid, &land);
|
||||||
putsect(§);
|
putsect(§);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue