Kicked iceblocks kill badguys that fall on them ("squish" them)
authorRyan Flegel <rflegel@gmail.com>
Thu, 12 Jun 2008 05:50:20 +0000 (05:50 +0000)
committerRyan Flegel <rflegel@gmail.com>
Thu, 12 Jun 2008 05:50:20 +0000 (05:50 +0000)
SVN-Revision: 5564

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);