mirror of https://github.com/godotengine/godot
Merge pull request #89946 from wlsnmrk/action-press-strength-clamp
Fix `Input.action_press()` accepting out-of-bounds strength values
This commit is contained in:
commit
237479ffe8
|
|
@ -894,7 +894,7 @@ void Input::action_press(const StringName &p_action, float p_strength) {
|
||||||
}
|
}
|
||||||
action_state.exact = true;
|
action_state.exact = true;
|
||||||
action_state.api_pressed = true;
|
action_state.api_pressed = true;
|
||||||
action_state.api_strength = p_strength;
|
action_state.api_strength = CLAMP(p_strength, 0.0f, 1.0f);
|
||||||
_update_action_cache(p_action, action_state);
|
_update_action_cache(p_action, action_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue