diff options
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r-- | src/game/game.cpp | 30 |
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) |