+ for( int i=0; i<rd->part_count-1; i ++ )
+ {
+ for( int j=i+1; j<rd->part_count; j ++ )
+ {
+ if( rd->parts[j].parent != i )
+ {
+ if( rb_global_has_space() )
+ {
+ rb_ct *buf = rb_global_buffer();
+
+ int l = rb_capsule__capsule( rd->parts[i].rb.to_world,
+ &rd->parts[i].rb.inf.capsule,
+ rd->parts[j].rb.to_world,
+ &rd->parts[j].rb.inf.capsule,
+ buf );
+
+ for( int k=0; k<l; k++ )
+ {
+ buf[k].rba = &rd->parts[i].rb;
+ buf[k].rbb = &rd->parts[j].rb;
+ }
+
+ rb_contact_count += l;
+ }
+ }
+ }
+ }
+
+ for( int j=0; j<rd->part_count; j++ )