summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Motion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Motion.cpp')
-rw-r--r--src/displayapp/screens/Motion.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/displayapp/screens/Motion.cpp b/src/displayapp/screens/Motion.cpp
index e667d52..79132ec 100644
--- a/src/displayapp/screens/Motion.cpp
+++ b/src/displayapp/screens/Motion.cpp
@@ -84,11 +84,10 @@ void Motion::Refresh() {
jumping = true;
}
double jump_ratio = 1.0 - G_scaled;
- double jump_ratio *= jump_ratio;
double current_jump_accel = jump_ratio * 9.8;
double current_frame_s = current_frame_ms * 0.001;
current_jump_speed += current_jump_accel * current_frame_s;
- current_jump_length += current_jump_speed * current_frame_s;
+ current_jump_length += current_jump_speed * current_frame_s * jump_ratio;
} else {
if (jumping) {
double best_jump_length = records[0].jump_length;