Set collision group according to block's solidity. (Fix for 684)
authorwolfgangb <wolfgangb@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Tue, 24 Aug 2010 17:39:17 +0000 (17:39 +0000)
committerwolfgangb <wolfgangb@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Tue, 24 Aug 2010 17:39:17 +0000 (17:39 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6650 837edb03-e0f3-0310-88ca-d4d4e8b29345

src/object/magicblock.cpp

index 072ddc8..c69066b 100644 (file)
@@ -131,9 +131,11 @@ MagicBlock::update(float elapsed_time)
     solid_time+=elapsed_time;
     color.alpha = ALPHA_SOLID;
     sprite->set_action("solid");
+    set_group(COLGROUP_STATIC);
   } else {
     color.alpha = ALPHA_NONSOLID;
     sprite->set_action("normal");
+    set_group(COLGROUP_DISABLED);
   }
 }