You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Fix not releasing action when actions are erased
This commit is contained in:
committed by
Rémi Verschelde
parent
1cf3180537
commit
2fc6e11e31
@@ -229,6 +229,10 @@ void InputMap::action_erase_event(const StringName &p_action, RequiredParam<Inpu
|
|||||||
void InputMap::action_erase_events(const StringName &p_action) {
|
void InputMap::action_erase_events(const StringName &p_action) {
|
||||||
ERR_FAIL_COND_MSG(!input_map.has(p_action), suggest_actions(p_action));
|
ERR_FAIL_COND_MSG(!input_map.has(p_action), suggest_actions(p_action));
|
||||||
|
|
||||||
|
if (Input::get_singleton()->is_action_pressed(p_action)) {
|
||||||
|
Input::get_singleton()->action_release(p_action);
|
||||||
|
}
|
||||||
|
|
||||||
input_map[p_action].inputs.clear();
|
input_map[p_action].inputs.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user