[Supertux-Commit] r5440 - trunk/supertux/src/object

matzeb at millhouse.dreamhost.com matzeb at millhouse.dreamhost.com
Thu May 8 12:11:29 PDT 2008


Author: matzeb
Date: 2008-05-08 12:11:28 -0700 (Thu, 08 May 2008)
New Revision: 5440

Modified:
   trunk/supertux/src/object/camera.cpp
Log:
center camera on tux feet, so we get no jumps when tux ducks

Modified: trunk/supertux/src/object/camera.cpp
===================================================================
--- trunk/supertux/src/object/camera.cpp	2008-05-08 19:00:11 UTC (rev 5439)
+++ trunk/supertux/src/object/camera.cpp	2008-05-08 19:11:28 UTC (rev 5440)
@@ -310,7 +310,8 @@
 {
   const CameraConfig& config = *(this->config);
   Player* player = sector->player;
-  const Vector& player_pos = player->get_bbox().get_middle();
+  const Vector& player_pos = Vector(player->get_bbox().get_middle().x,
+                                    player->get_bbox().get_bottom());
   static Vector last_player_pos = player_pos;
   Vector player_delta = player_pos - last_player_pos;
   last_player_pos = player_pos;




More information about the Supertux-Commit mailing list