(babies): Err, the maxpop case wasn't an optimization... Without
that, we get negative babies, which leads to negative avail and baby food (cannibalism?) in grow_people(). Restore it.
This commit is contained in:
parent
4d0a17c882
commit
19d1830bc4
1 changed files with 3 additions and 0 deletions
|
@ -284,6 +284,9 @@ babies(int adults, int etu, double brate, int food, int maxpop)
|
||||||
{
|
{
|
||||||
int new_birth, new_food, new;
|
int new_birth, new_food, new;
|
||||||
|
|
||||||
|
if (adults >= maxpop)
|
||||||
|
return 0;
|
||||||
|
|
||||||
new_birth = roundavg(brate * etu * adults);
|
new_birth = roundavg(brate * etu * adults);
|
||||||
if (opt_NOFOOD)
|
if (opt_NOFOOD)
|
||||||
new_food = new_birth;
|
new_food = new_birth;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue