diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/input_default.cpp | 4 | ||||
-rw-r--r-- | main/input_default.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index e8015400af..b1084900d6 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -556,14 +556,14 @@ Point2i InputDefault::warp_mouse_motion(const Ref<InputEventMouseMotion> &p_moti void InputDefault::iteration(float p_step) { } -void InputDefault::action_press(const StringName &p_action) { +void InputDefault::action_press(const StringName &p_action, float p_strength) { Action action; action.physics_frame = Engine::get_singleton()->get_physics_frames(); action.idle_frame = Engine::get_singleton()->get_idle_frames(); action.pressed = true; - action.strength = 0.f; + action.strength = p_strength; action_state[p_action] = action; } diff --git a/main/input_default.h b/main/input_default.h index 4964b9a83c..b6767669f0 100644 --- a/main/input_default.h +++ b/main/input_default.h @@ -227,7 +227,7 @@ public: void set_main_loop(MainLoop *p_main_loop); void set_mouse_position(const Point2 &p_posf); - void action_press(const StringName &p_action); + void action_press(const StringName &p_action, float p_strength = 1.f); void action_release(const StringName &p_action); void iteration(float p_step); |