X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Ftotem.hpp;h=89ef732aa5cc24ea22ae0d2a2646f7288caf06c9;hb=4a486d92343d1824b311c234e9321e08f280fe68;hp=40b5da12006c5d897c8199b9dbc11801ddca9f1c;hpb=1930c5f5fe73a7ac379266e71b30082e28a0f26a;p=supertux.git diff --git a/src/badguy/totem.hpp b/src/badguy/totem.hpp index 40b5da120..89ef732aa 100644 --- a/src/badguy/totem.hpp +++ b/src/badguy/totem.hpp @@ -1,5 +1,5 @@ -// $Id: totem.cpp 3096 2006-03-17 12:03:02Z sommer $ -// +// $Id$ +// // SuperTux - "Totem" Badguy // Copyright (C) 2006 Christoph Sommer // @@ -12,7 +12,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -30,17 +30,19 @@ class Totem : public BadGuy { public: Totem(const lisp::Lisp& reader); + Totem(const Totem& totem); ~Totem(); void activate(); void active_update(float elapsed_time); void write(lisp::Writer& writer); - HitResponse collision_solid(GameObject& other, const CollisionHit& hit); + void collision_solid(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) */ @@ -54,4 +56,3 @@ protected: }; #endif -