- added quick&dirty peeking back (not exactly perfect, but better then no peeking)
authorIngo Ruhnke <grumbel@gmx.de>
Fri, 24 Aug 2007 18:47:42 +0000 (18:47 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Fri, 24 Aug 2007 18:47:42 +0000 (18:47 +0000)
SVN-Revision: 5157

src/object/camera.cpp

index ed81966..42dd1aa 100644 (file)
@@ -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;