aboutsummaryrefslogtreecommitdiff
path: root/main/input_default.cpp
diff options
context:
space:
mode:
authorAndreaCatania2017-09-30 16:19:07 +0200
committerAndreaCatania2017-09-30 16:19:07 +0200
commit4537977d6dd2a76580d9ab611a18634efab55c74 (patch)
tree387e51e9bb1ed9b322312243c8b7d520292f3122 /main/input_default.cpp
parent4f39ce32b9195405f934445b20059e86632b47f9 (diff)
downloadgodot-4537977d6dd2a76580d9ab611a18634efab55c74.tar.gz
godot-4537977d6dd2a76580d9ab611a18634efab55c74.tar.zst
godot-4537977d6dd2a76580d9ab611a18634efab55c74.zip
Diffstat (limited to 'main/input_default.cpp')
-rw-r--r--main/input_default.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 18979c844..2940f432d 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -105,8 +105,8 @@ bool InputDefault::is_action_just_pressed(const StringName &p_action) const {
if (!E)
return false;
- if (Engine::get_singleton()->is_in_fixed_frame()) {
- return E->get().pressed && E->get().fixed_frame == Engine::get_singleton()->get_fixed_frames();
+ if (Engine::get_singleton()->is_in_physics_frame()) {
+ return E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames();
} else {
return E->get().pressed && E->get().idle_frame == Engine::get_singleton()->get_idle_frames();
}
@@ -118,8 +118,8 @@ bool InputDefault::is_action_just_released(const StringName &p_action) const {
if (!E)
return false;
- if (Engine::get_singleton()->is_in_fixed_frame()) {
- return !E->get().pressed && E->get().fixed_frame == Engine::get_singleton()->get_fixed_frames();
+ if (Engine::get_singleton()->is_in_physics_frame()) {
+ return !E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames();
} else {
return !E->get().pressed && E->get().idle_frame == Engine::get_singleton()->get_idle_frames();
}
@@ -324,7 +324,7 @@ void InputDefault::parse_input_event(const Ref<InputEvent> &p_event) {
if (InputMap::get_singleton()->event_is_action(p_event, E->key()) && is_action_pressed(E->key()) != p_event->is_pressed()) {
Action action;
- action.fixed_frame = Engine::get_singleton()->get_fixed_frames();
+ action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = p_event->is_pressed();
action_state[E->key()] = action;
@@ -460,7 +460,7 @@ void InputDefault::action_press(const StringName &p_action) {
Action action;
- action.fixed_frame = Engine::get_singleton()->get_fixed_frames();
+ action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = true;
@@ -471,7 +471,7 @@ void InputDefault::action_release(const StringName &p_action) {
Action action;
- action.fixed_frame = Engine::get_singleton()->get_fixed_frames();
+ action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = false;