@@ -20,11 +20,10 @@ void command_system(entt::registry ®istry) {
case input_listener_component::type::RIGHT:
vel.dx = 1.0f;
break;
- default:
+ case input_listener_component::type::NONE:
+ vel.dx = vel.dy = 0.0f;
}
-
- input.command = input_listener_component::type::NONE;
@@ -37,6 +37,9 @@ void input_system(entt::registry ®istry, const SDL_Event &event, bool &quit)
case SDLK_RIGHT:
internal::update_listeners(registry, input_listener_component::type::RIGHT);
+ case SDLK_SPACE:
+ internal::update_listeners(registry, input_listener_component::type::NONE);
+ break;