(prod, upd_buildeff): Truncated work to even before sector building.
Fix.
This commit is contained in:
parent
5a0216893f
commit
b985192f6f
2 changed files with 4 additions and 4 deletions
|
@ -141,7 +141,7 @@ prod(void)
|
|||
}
|
||||
if (work > 999) work = 999;
|
||||
}
|
||||
bwork = (int)((double)work / 2.0);
|
||||
bwork = work / 2;
|
||||
|
||||
if (sect.sct_off)
|
||||
continue;
|
||||
|
@ -207,7 +207,7 @@ prod(void)
|
|||
bwork -= twork;
|
||||
eff += twork;
|
||||
}
|
||||
work = work / 2 + bwork;
|
||||
work = (work + 1) / 2 + bwork;
|
||||
if (eff < 60 || (type != SCT_ENLIST && eff < 61))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ upd_buildeff(struct natstr *np, register struct sctstr *sp, int *workp,
|
|||
short *vec, int etu, int *desig, int sctwork, int *cost)
|
||||
{
|
||||
register int work_cost = 0;
|
||||
int buildeff_work = (int)(*workp / 2);
|
||||
int buildeff_work = *workp / 2;
|
||||
int n, hcms, lcms, neweff;
|
||||
u_char old_type = *desig;
|
||||
|
||||
|
@ -159,7 +159,7 @@ upd_buildeff(struct natstr *np, register struct sctstr *sp, int *workp,
|
|||
}
|
||||
}
|
||||
}
|
||||
*workp = *workp / 2 + buildeff_work;
|
||||
*workp = (*workp + 1) / 2 - buildeff_work;
|
||||
|
||||
return neweff;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue