File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -396,8 +396,7 @@ void b2DestroyBody( b2BodyId bodyId )
396
396
{
397
397
b2ChainShape * chain = b2ChainShapeArray_Get ( & world -> chainShapes , chainId );
398
398
399
- b2Free ( chain -> shapeIndices , chain -> count * sizeof ( int ) );
400
- chain -> shapeIndices = NULL ;
399
+ b2FreeChainData ( chain );
401
400
402
401
// Return chain to free list.
403
402
b2FreeId ( & world -> chainIdPool , chainId );
Original file line number Diff line number Diff line change @@ -74,7 +74,13 @@ b2SurfaceMaterial b2DefaultSurfaceMaterial( void )
74
74
75
75
b2ChainDef b2DefaultChainDef ( void )
76
76
{
77
+ static b2SurfaceMaterial defaultMaterial = {
78
+ .friction = 0.6f ,
79
+ };
80
+
77
81
b2ChainDef def = { 0 };
82
+ def .materials = & defaultMaterial ;
83
+ def .materialCount = 1 ;
78
84
def .filter = b2DefaultFilter ();
79
85
def .internalValue = B2_SECRET_COOKIE ;
80
86
return def ;
You can’t perform that action at this time.
0 commit comments