[Super-tux-commit] supertux/src world.cpp,1.63,1.64
Brought to you by:
wkendrick
From: Ryan F. <sik...@us...> - 2004-05-05 23:58:15
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21289 Modified Files: world.cpp Log Message: - made some backscroll changes. It's now a little better, but still needs some work. Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- world.cpp 5 May 2004 22:24:37 -0000 1.63 +++ world.cpp 5 May 2004 23:58:06 -0000 1.64 @@ -340,7 +340,9 @@ 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; } |