diff options
| author | Fabio Alessandrelli | 2016-10-17 03:57:32 +0200 |
|---|---|---|
| committer | Fabio Alessandrelli | 2016-10-19 17:52:49 +0200 |
| commit | 17d7e6a142500a80ba6628a32eca792c44bbbdb7 (patch) | |
| tree | c10e5dd3c04c1db13a86bb800072b9a6aee39b44 /main/input_default.cpp | |
| parent | c23e8797f1bec30defd1903cfeef0992cb1f1a89 (diff) | |
| download | godot-17d7e6a142500a80ba6628a32eca792c44bbbdb7.tar.gz godot-17d7e6a142500a80ba6628a32eca792c44bbbdb7.tar.zst godot-17d7e6a142500a80ba6628a32eca792c44bbbdb7.zip | |
Diffstat (limited to 'main/input_default.cpp')
| -rw-r--r-- | main/input_default.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index c60fcd224..6c2c6ebbb 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -377,13 +377,13 @@ void InputDefault::parse_input_event(const InputEvent& p_event) { if (InputMap::get_singleton()->event_is_action(p_event,E->key())) { - Action action; - action.fixed_frame=OS::get_singleton()->get_fixed_frames(); - action.idle_frame=OS::get_singleton()->get_idle_frames(); - action.pressed=p_event.is_pressed(); - - action_state[E->key()]=action; - + if(is_action_pressed(E->key()) != p_event.is_pressed()) { + Action action; + action.fixed_frame=OS::get_singleton()->get_fixed_frames(); + action.idle_frame=OS::get_singleton()->get_idle_frames(); + action.pressed=p_event.is_pressed(); + action_state[E->key()]=action; + } } } } |
