mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
Introduce world::dead_body_energy_carryover
This commit is contained in:
parent
0c29808836
commit
da3a988116
2 changed files with 3 additions and 1 deletions
3
agent.cc
3
agent.cc
|
@ -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
|
||||
|
|
1
world.h
1
world.h
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue