From 720dbe39d454d35e15ae2ad926f2a1df4102a0df Mon Sep 17 00:00:00 2001 From: Ryan Flegel Date: Wed, 5 May 2004 23:58:06 +0000 Subject: [PATCH] - made some backscroll changes. It's now a little better, but still needs some work. SVN-Revision: 1002 --- src/world.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/world.cpp b/src/world.cpp index 9a2b5e2e0..fdb1fda8e 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -340,7 +340,9 @@ void World::scrolling(double frame_ratio) final_scroll_x = tux_pos_x - X_SPACE; } - scroll_x += (final_scroll_x - scroll_x) / (frame_ratio * (CHANGE_DIR_SCROLL_SPEED / 100)); + scroll_x += (final_scroll_x - scroll_x) + / (frame_ratio * (CHANGE_DIR_SCROLL_SPEED / 100)) + + (tux.physic.get_velocity_x() * frame_ratio + tux.physic.get_acceleration_x() * frame_ratio * frame_ratio); // std::cerr << tux_pos_x << " " << final_scroll_x << " " << scroll_x << std::endl; } -- 2.11.0