mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 10:23:38 +02:00
agent::on_tick(): Do nothing when not placed
This commit is contained in:
parent
a2a52f5884
commit
a151a2985d
1 changed files with 3 additions and 0 deletions
3
agent.cc
3
agent.cc
|
@ -106,6 +106,9 @@ agent::on_action_takes(void)
|
||||||
void
|
void
|
||||||
agent::on_tick(void)
|
agent::on_tick(void)
|
||||||
{
|
{
|
||||||
|
if (!tile)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!dead) {
|
if (!dead) {
|
||||||
chenergy(world::sun_energy);
|
chenergy(world::sun_energy);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue