You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #21954 from isaacremnant/fix_inputs
Fix is_action_pressed for InputEventActions
This commit is contained in:
@@ -199,6 +199,10 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str
|
||||
|
||||
Ref<InputEventAction> input_event_action = p_event;
|
||||
if (input_event_action.is_valid()) {
|
||||
if (p_pressed != NULL)
|
||||
*p_pressed = input_event_action->is_pressed();
|
||||
if (p_strength != NULL)
|
||||
*p_strength = (*p_pressed) ? 1.0f : 0.0f;
|
||||
return input_event_action->get_action() == p_action;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user