HurtingPlatform won't kill invincible player
authorChristoph Sommer <mail@christoph-sommer.de>
Thu, 31 Jan 2008 23:21:22 +0000 (23:21 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Thu, 31 Jan 2008 23:21:22 +0000 (23:21 +0000)
SVN-Revision: 5306

src/object/hurting_platform.cpp

index 59cbfdf..2c0a010 100644 (file)
@@ -38,6 +38,9 @@ HurtingPlatform::collision(GameObject& other, const CollisionHit& )
 {
   Player* player = dynamic_cast<Player*>(&other);
   if (player) {
+    if(player->is_invincible()) {
+      return ABORT_MOVE;
+    }
     player->kill(false);
   }
   BadGuy* badguy = dynamic_cast<BadGuy*>(&other);