Fix prod() to limit level production to resource contents
This could make production command mispredict resource-depleting level production. Stock game is not affected. In fact, such a product would be highly unusual.
This commit is contained in:
parent
c63ec06d15
commit
8718a9428a
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ prod(void)
|
|||
* workforce?
|
||||
*/
|
||||
max = (int)(work * p_e / (double)unit_work + 0.5);
|
||||
if (resource && pp->p_nrdep != 0 && vtype != I_NONE) {
|
||||
if (resource && pp->p_nrdep != 0) {
|
||||
if (*resource * 100 < pp->p_nrdep * max)
|
||||
max = *resource * 100 / pp->p_nrdep;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue