Kicked iceblocks kill badguys that fall on them ("squish" them)
[supertux.git] / src / badguy / mriceblock.cpp
index d224537..0b9b9ce 100644 (file)
@@ -183,6 +183,15 @@ MrIceBlock::collision_squished(GameObject& object)
 {
   switch(ice_state) {
     case ICESTATE_KICKED:
+      {
+        BadGuy* badguy = dynamic_cast<BadGuy*>(&object);
+        if (badguy) {
+          badguy->kill_fall();
+          break;
+        }
+      }
+
+      // fall through
     case ICESTATE_NORMAL:
       {
         Player* player = dynamic_cast<Player*>(&object);