From: Ingo Ruhnke Date: Fri, 24 Aug 2007 18:47:42 +0000 (+0000) Subject: - added quick&dirty peeking back (not exactly perfect, but better then no peeking) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=04a3157ef478169b5a3fc05dae00ed6ee6a1fae2;p=supertux.git - added quick&dirty peeking back (not exactly perfect, but better then no peeking) SVN-Revision: 5157 --- diff --git a/src/object/camera.cpp b/src/object/camera.cpp index ed819665d..42dd1aad3 100644 --- a/src/object/camera.cpp +++ b/src/object/camera.cpp @@ -486,6 +486,12 @@ Camera::update_scroll_normal(float elapsed_time) } } + if(player->peeking_direction() == ::LEFT) { + lookahead_pos += config.max_speed_x * elapsed_time * 3.0f; + } else if(player->peeking_direction() == ::RIGHT) { + lookahead_pos -= config.max_speed_x * elapsed_time * 3.0f; + } + // adjust for level ends if (player_pos.x < LEFTEND) { lookahead_pos = LEFTEND;