Fixed MrTree. He uses activate() to change direction which is now working again.
[supertux.git] / src / badguy / dart.hpp
index c816e92..1c6a3d3 100644 (file)
@@ -30,7 +30,8 @@ class Dart : public BadGuy
 {
 public:
   Dart(const lisp::Lisp& reader);
-  Dart(float pos_x, float pos_y, Direction d, const BadGuy* parent);
+  Dart(const Vector& pos, Direction d, const BadGuy* parent);
+  Dart(const Dart& dart);
   ~Dart();
 
   void activate();
@@ -43,11 +44,15 @@ public:
   HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit);
   HitResponse collision_player(Player& player, const CollisionHit& hit);
 
+  virtual Dart* clone() const { return new Dart(*this); }
+
+  virtual bool updatePointers(const GameObject* from_object, GameObject* to_object);
+
 protected:
   bool set_direction;
   Direction initial_direction;
   const BadGuy* parent; /**< collisions with this BadGuy will be ignored */
-  SoundSource* soundSource; /**< SoundSource for ambient sound */
+  std::auto_ptr<SoundSource> sound_source; /**< SoundSource for ambient sound */
 };
 
 #endif