diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-25 21:12:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 21:12:14 +0200 |
commit | eeee47196c19dc271d6fcf8981946a1a29efd16a (patch) | |
tree | 24c683fb89c07dc38dcea3ed8e60d277a52517a1 /main/input_default.cpp | |
parent | aa6876df5068141014930052428df4bbbd549ca5 (diff) | |
parent | 9fcf9ee813d792b3852cdb478f27f36ebae3b019 (diff) |
Merge pull request #23262 from swenner/more-cppcheck-fixes
More cppcheck fixes, fixes #22702
Diffstat (limited to 'main/input_default.cpp')
-rw-r--r-- | main/input_default.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index 33c422190d..e8015400af 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -429,6 +429,7 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool action.physics_frame = Engine::get_singleton()->get_physics_frames(); action.idle_frame = Engine::get_singleton()->get_idle_frames(); action.pressed = p_event->is_action_pressed(E->key()); + action.strength = 0.f; action_state[E->key()] = action; } action_state[E->key()].strength = p_event->get_action_strength(E->key()); @@ -562,6 +563,7 @@ void InputDefault::action_press(const StringName &p_action) { action.physics_frame = Engine::get_singleton()->get_physics_frames(); action.idle_frame = Engine::get_singleton()->get_idle_frames(); action.pressed = true; + action.strength = 0.f; action_state[p_action] = action; } @@ -573,6 +575,7 @@ void InputDefault::action_release(const StringName &p_action) { action.physics_frame = Engine::get_singleton()->get_physics_frames(); action.idle_frame = Engine::get_singleton()->get_idle_frames(); action.pressed = false; + action.strength = 0.f; action_state[p_action] = action; } |