From: Matthias Braun Date: Sat, 31 Dec 2005 14:39:06 +0000 (+0000) Subject: some fixes after my latest changes X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7ad6ac9b4cd93f7db764e7074939bcb2c30cd61c;p=supertux.git some fixes after my latest changes SVN-Revision: 2969 --- diff --git a/src/object/bell.cpp b/src/object/bell.cpp index 93980c004..0c2036c86 100644 --- a/src/object/bell.cpp +++ b/src/object/bell.cpp @@ -35,6 +35,7 @@ Bell::Bell(const lisp::Lisp& lisp) lisp.get("y", bbox.p1.y); bbox.set_size(32, 32); sprite = sprite_manager->create("bell"); + set_group(COLGROUP_TOUCHABLE); } Bell::~Bell() diff --git a/src/object/player.cpp b/src/object/player.cpp index 9a388a92e..566bcd8b1 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -696,6 +696,13 @@ Player::collision(GameObject& other, const CollisionHit& hit) return FORCE_MOVE; } + MovingObject* moving_object = static_cast (&other); + if(moving_object->get_group() == COLGROUP_TOUCHABLE) + return FORCE_MOVE; + + if(is_invincible()) + return FORCE_MOVE; + return CONTINUE; }