Bug 471: Fix upward release of ice block, and grabbing cleanups.
[supertux.git] / src / object / player.hpp
index ebcf863..4d63ef9 100644 (file)
@@ -18,6 +18,7 @@
 #define HEADER_SUPERTUX_OBJECT_PLAYER_HPP
 
 #include "scripting/player.hpp"
+#include "sprite/sprite_ptr.hpp"
 #include "supertux/direction.hpp"
 #include "supertux/moving_object.hpp"
 #include "supertux/physic.hpp"
@@ -30,7 +31,6 @@ class Portable;
 class Climbable;
 class Controller;
 class CodeController;
-class Sprite;
 class Surface;
 class Timer;
 
@@ -298,11 +298,12 @@ public:
 
   Portable* grabbed_object;
 
-  std::auto_ptr<Sprite> sprite; /**< The main sprite representing Tux */
+  SpritePtr sprite; /**< The main sprite representing Tux */
 
   SurfacePtr airarrow; /**< arrow indicating Tux' position when he's above the camera */
 
   Vector floor_normal;
+  void position_grabbed_object();
   void try_grab();
 
   bool ghost_mode; /**< indicates if Tux should float around and through solid objects */