1
0
Fork 0

Merge pull request #111747 from zedzee37/input-fix

Fix not releasing action when actions are erased.
This commit is contained in:
Thaddeus Crews 2025-12-12 14:15:03 -06:00
commit 31413d5fd7
No known key found for this signature in database
GPG Key ID: 8C6E5FEB5FC03CCC
1 changed files with 4 additions and 0 deletions

View File

@ -229,6 +229,10 @@ void InputMap::action_erase_event(const StringName &p_action, RequiredParam<Inpu
void InputMap::action_erase_events(const StringName &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();
}