diff options
Diffstat (limited to 'src/systems/movement.cpp')
-rw-r--r-- | src/systems/movement.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/systems/movement.cpp b/src/systems/movement.cpp index 7ff9966..4eb574d 100644 --- a/src/systems/movement.cpp +++ b/src/systems/movement.cpp @@ -75,14 +75,16 @@ void MovementSystem::update(entityx::EntityManager &en, entityx::EventManager &e // make the entity wander // TODO initialX and range? if (entity.has_component<Wander>()) { - auto& countdown = entity.component<Wander>()->countdown; + auto vel = entity.component<Wander>()->script(); + direction.x = vel.x; + /*auto& countdown = entity.component<Wander>()->countdown; if (countdown > 0) { countdown--; } else { countdown = 5000 + randGet() % 10 * 100; direction.x = (randGet() % 3 - 1) * 0.004f; - } + }*/ } } }); |