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:
Rémi Verschelde 2024-03-28 10:47:31 +01:00
commit 237479ffe8
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -894,7 +894,7 @@ void Input::action_press(const StringName &p_action, float p_strength) {
}
action_state.exact = 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);
}