Collisions: CollisionModifier needs to be resetted for every loop
authorDaniel Genrich <daniel.genrich@gmx.net>
Tue, 14 Oct 2008 11:54:07 +0000 (11:54 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Tue, 14 Oct 2008 11:54:07 +0000 (11:54 +0000)
source/blender/blenkernel/intern/collision.c

index e8cec7e1852228759ad0bf34e83e12bb11fda49f..775f1dee241be01f004eaf36475697bd71e07d21 100644 (file)
@@ -1320,6 +1320,8 @@ CollisionModifierData **get_collisionobjects(Object *self, int *numcollobj)
                {
                        collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision );
                }
+               else
+                       collmd = NULL;
                
                if ( collmd )
                {       
@@ -1358,6 +1360,8 @@ CollisionModifierData **get_collisionobjects(Object *self, int *numcollobj)
                                        {
                                                collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision );
                                        }
+                                       else
+                                               collmd = NULL;
 
                                        if ( !collmd )
                                                continue;