Disable acceleration in kill_fall().
[supertux.git] / src / object / hurting_platform.cpp
index 59cbfdf..f03890c 100644 (file)
@@ -28,7 +28,7 @@
 #include "object_factory.hpp"
 
 HurtingPlatform::HurtingPlatform(const lisp::Lisp& reader)
-       : Platform(reader)
+        : Platform(reader)
 {
   set_group(COLGROUP_TOUCHABLE);
 }
@@ -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);