diff options
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r-- | src/game/game.cpp | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index e5f32f5..9d184ea 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -117,7 +117,10 @@ void state_t::command(v2f_t x) if (unit->dead) continue; - if (!unit->start_moving(snap, CF_SOLID | CF_WATER)) + if (!unit->controllable) + continue; + + if (!unit->start_moving(snap)) unit->say(text::get(text::SAY_NO_PATH)); else unit->say(text::get(text::SAY_MOVING)); @@ -152,32 +155,6 @@ void state_t::tick(double now_, double dt_) } } -void state_t::wake_everything(v2f_t x, float range) -{ - rectf_t wake_range; - - wake_range[0] = x - v2f_t(range, range); - wake_range[1] = x + v2f_t(range, range); - - for (world::entity_t *went : world.get_entities(wake_range, -1)) { - auto ent = dynamic_cast<game::entity_t*>(went); - - // WTF? - if (!ent) - continue; - - if (ent->ignore_waking) - continue; - - ent->wake_time = now; - - if (ent->awake) - continue; - - ent->wake(); - } -} - die_t::die_t(size_t sides_) { sides = sides_; |