summaryrefslogtreecommitdiff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-16 22:41:48 +0000
committerPaweł Redman <pawel.redman@gmail.com>2017-12-16 22:41:48 +0000
commit38edebe4bdeb8caedccf6127a86fddfe9c5808a8 (patch)
tree466cf659201a66a12d922943337e636b5125bccb /src/game/game.cpp
parent5c7d962e605e123e1ce4e0610e8f330b1f4f5e82 (diff)
Fully working nests.
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 9584817..64dd224 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -32,7 +32,7 @@ void entity_t::place(world::world_t *world_)
if (do_spawn)
on_spawn();
- if (always_awake)
+ if (!ignore_waking)
wake();
}
@@ -51,7 +51,7 @@ void entity_t::wake(void)
wake_time = game->now;
game->awake_entities.insert(this);
- if (!always_awake)
+ if (!ignore_waking)
on_wake();
}
@@ -64,7 +64,6 @@ void entity_t::sleep(void)
void state_t::start(void)
{
unit_soldier_t *soldier;
- unit_spider_t *spider;
world.generator = worldgen;
world.generator_data = (void*)this;
@@ -75,13 +74,6 @@ void state_t::start(void)
soldier->place(&world, v2f_t(1.5, 0.5));
soldier = new unit_soldier_t(this);
soldier->place(&world, v2f_t(2.5, 0.5));
-
- spider = new unit_spider_t(this);
- spider->place(&world, v2f_t(15.5, -2.5));
- spider = new unit_spider_t(this);
- spider->place(&world, v2f_t(14.5, -2.5));
- spider = new unit_spider_t(this);
- spider->place(&world, v2f_t(13.5, -2.5));
}
void state_t::stop(void)
@@ -171,7 +163,7 @@ void state_t::wake_everything(v2f_t x, float range)
if (!ent)
continue;
- if (ent->always_awake || ent->awake)
+ if (ent->ignore_waking || ent->awake)
continue;
ent->wake();