Forráskód Böngészése

Port `Input.action_press/release()` changes

(cherry picked from commit 6f0c852c9b0fa99fc14c4f2e3ab6f89c7f0e0ee2)
Michael Alexsander 3 éve
szülő
commit
63c3909669
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      main/input_default.cpp

+ 4 - 0
main/input_default.cpp

@@ -607,6 +607,8 @@ void InputDefault::action_press(const StringName &p_action, float p_strength) {
 	action.idle_frame = Engine::get_singleton()->get_idle_frames();
 	action.pressed = true;
 	action.strength = p_strength;
+	action.raw_strength = p_strength;
+	action.exact = true;
 
 	action_state[p_action] = action;
 }
@@ -618,6 +620,8 @@ void InputDefault::action_release(const StringName &p_action) {
 	action.idle_frame = Engine::get_singleton()->get_idle_frames();
 	action.pressed = false;
 	action.strength = 0.f;
+	action.raw_strength = 0.f;
+	action.exact = true;
 
 	action_state[p_action] = action;
 }