(max_population): Deal gracefully with big city 10 * d_maxpop >
ITEM_MAX: let value grow linearly from d_maxpop at 0% to the minimum of 10 * d_maxpop and ITEM_MAX at 100%.
This commit is contained in:
parent
d22cb495bc
commit
be430d4b9d
1 changed files with 5 additions and 3 deletions
|
@ -46,11 +46,13 @@ int
|
|||
max_population(float research, int desig, int eff)
|
||||
{
|
||||
int maxpop = dchr[desig].d_maxpop;
|
||||
int rmax;
|
||||
int mp100, rmax;
|
||||
|
||||
/* city efficiency limits maximum population */
|
||||
if (IS_BIG_CITY(desig))
|
||||
maxpop *= 1 + 9.0 * eff / 100;
|
||||
if (IS_BIG_CITY(desig)) {
|
||||
mp100 = MIN(ITEM_MAX, 10 * maxpop);
|
||||
maxpop += (mp100 - maxpop) * eff / 100.0;
|
||||
}
|
||||
|
||||
if (opt_RES_POP) {
|
||||
/* research limits maximum population */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue