X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Ftotem.hpp;h=8742025142e80396024fe6940c6607a5e49cd16f;hb=bbecaf79e2406262c12d4c33dd92bcdb656cd561;hp=5146d82b3d07ffb19d6cad17d7df9d3eae28bf2c;hpb=07ddaed2a657e4d2a3d038fed223fc5827159caf;p=supertux.git diff --git a/src/badguy/totem.hpp b/src/badguy/totem.hpp index 5146d82b3..874202514 100644 --- a/src/badguy/totem.hpp +++ b/src/badguy/totem.hpp @@ -30,6 +30,7 @@ class Totem : public BadGuy { public: Totem(const lisp::Lisp& reader); + Totem(const Totem& totem); ~Totem(); void activate(); @@ -38,9 +39,10 @@ public: HitResponse collision_solid(GameObject& other, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); -protected: - bool stay_on_platform; /**< change direction before falling off a ledge */ + virtual Totem* clone() const { return new Totem(*this); } + virtual bool updatePointers(const GameObject* from_object, GameObject* to_object); +protected: Totem* carrying; /**< Totem we are currently carrying (or 0) */ Totem* carried_by; /**< Totem by which we are currently carried (or 0) */