From 04a3157ef478169b5a3fc05dae00ed6ee6a1fae2 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Fri, 24 Aug 2007 18:47:42 +0000 Subject: [PATCH] - added quick&dirty peeking back (not exactly perfect, but better then no peeking) SVN-Revision: 5157 --- src/object/camera.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.11.0