summaryrefslogtreecommitdiff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-16 20:17:57 +0000
committerPaweł Redman <pawel.redman@gmail.com>2017-12-16 20:17:57 +0000
commit273c601a94464bef2161b9c3a29ea3cf901340e9 (patch)
tree9b3c4907c69dddf3b2dc421d89841081a735ac0d /src/game/game.cpp
parentd96a70e50f7b3b19f3424aa9b97123db681269a8 (diff)
Rename aliens to spiders and humans to soldiers.
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 35d66ec..51dca09 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -63,25 +63,25 @@ void entity_t::sleep(void)
void state_t::start(void)
{
- human_t *human;
- alien_t *alien;
+ unit_soldier_t *soldier;
+ unit_spider_t *spider;
world.generator = worldgen;
world.generator_data = (void*)this;
- human = new human_t(this);
- human->place(&world, v2f_t(0.5, 0.5));
- human = new human_t(this);
- human->place(&world, v2f_t(1.5, 0.5));
- human = new human_t(this);
- human->place(&world, v2f_t(2.5, 0.5));
+ soldier = new unit_soldier_t(this);
+ soldier->place(&world, v2f_t(0.5, 0.5));
+ soldier = new unit_soldier_t(this);
+ soldier->place(&world, v2f_t(1.5, 0.5));
+ soldier = new unit_soldier_t(this);
+ soldier->place(&world, v2f_t(2.5, 0.5));
- alien = new alien_t(this);
- alien->place(&world, v2f_t(15.5, -2.5));
- alien = new alien_t(this);
- alien->place(&world, v2f_t(14.5, -2.5));
- alien = new alien_t(this);
- alien->place(&world, v2f_t(13.5, -2.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)
@@ -103,7 +103,7 @@ void state_t::select(rectf_t x)
unit = (unit_t*)ent;
- if (unit->type != unit_t::UNIT_HUMAN)
+ if (!unit->controllable)
continue;
if (!unit->dead && unit->selected != old_cookie)