Merge pull request #58656 from MarcoFazioRandom/patch-1

This commit is contained in:
Rémi Verschelde 2022-06-28 16:23:58 +02:00 committed by GitHub
commit 9d29166bc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -325,6 +325,7 @@ float Input::get_action_strength(const StringName &p_action, bool p_exact) const
} }
float Input::get_action_raw_strength(const StringName &p_action, bool p_exact) const { float Input::get_action_raw_strength(const StringName &p_action, bool p_exact) const {
ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), 0.0, InputMap::get_singleton()->suggest_actions(p_action));
HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action);
if (!E) { if (!E) {
return 0.0f; return 0.0f;