Introduce world::dead_body_energy_carryover

This commit is contained in:
Petr Baudis 2011-11-27 04:12:51 +01:00
parent 0c29808836
commit da3a988116
2 changed files with 3 additions and 1 deletions

View file

@ -83,7 +83,8 @@ agent::die(void)
{
assert(!dead);
dead = true;
energy = world::dead_body_energy;
if (energy < 0) energy = 0;
energy = energy * world::dead_body_energy_carryover + world::dead_body_energy;
}
void

View file

@ -9,6 +9,7 @@ struct world {
const static int sun_energy = 1;
const static int dead_body_energy = 500;
const static double dead_body_energy_carryover = 0.5;
const static int dead_decay = -1;
};