@@ -28,7 +28,7 @@ public static class B2Islands
2828
2929 public static B2Island b2CreateIsland ( B2World world , int setIndex )
3030 {
31- B2_ASSERT ( setIndex == ( int ) B2SolverSetType2 . b2_awakeSet || setIndex >= ( int ) B2SolverSetType2 . b2_firstSleepingSet ) ;
31+ B2_ASSERT ( setIndex == ( int ) B2SolverSetType . b2_awakeSet || setIndex >= ( int ) B2SolverSetType . b2_firstSleepingSet ) ;
3232
3333 int islandId = b2AllocId ( world . islandIdPool ) ;
3434
@@ -283,17 +283,17 @@ internal static void b2LinkContact(B2World world, B2Contact contact)
283283 B2Body bodyA = b2Array_Get ( ref world . bodies , bodyIdA ) ;
284284 B2Body bodyB = b2Array_Get ( ref world . bodies , bodyIdB ) ;
285285
286- B2_ASSERT ( bodyA . setIndex != ( int ) B2SolverSetType2 . b2_disabledSet && bodyB . setIndex != ( int ) B2SolverSetType2 . b2_disabledSet ) ;
287- B2_ASSERT ( bodyA . setIndex != ( int ) B2SolverSetType2 . b2_staticSet || bodyB . setIndex != ( int ) B2SolverSetType2 . b2_staticSet ) ;
286+ B2_ASSERT ( bodyA . setIndex != ( int ) B2SolverSetType . b2_disabledSet && bodyB . setIndex != ( int ) B2SolverSetType . b2_disabledSet ) ;
287+ B2_ASSERT ( bodyA . setIndex != ( int ) B2SolverSetType . b2_staticSet || bodyB . setIndex != ( int ) B2SolverSetType . b2_staticSet ) ;
288288
289289 // Wake bodyB if bodyA is awake and bodyB is sleeping
290- if ( bodyA . setIndex == ( int ) B2SolverSetType2 . b2_awakeSet && bodyB . setIndex >= ( int ) B2SolverSetType2 . b2_firstSleepingSet )
290+ if ( bodyA . setIndex == ( int ) B2SolverSetType . b2_awakeSet && bodyB . setIndex >= ( int ) B2SolverSetType . b2_firstSleepingSet )
291291 {
292292 b2WakeSolverSet ( world , bodyB . setIndex ) ;
293293 }
294294
295295 // Wake bodyA if bodyB is awake and bodyA is sleeping
296- if ( bodyB . setIndex == ( int ) B2SolverSetType2 . b2_awakeSet && bodyA . setIndex >= ( int ) B2SolverSetType2 . b2_firstSleepingSet )
296+ if ( bodyB . setIndex == ( int ) B2SolverSetType . b2_awakeSet && bodyA . setIndex >= ( int ) B2SolverSetType . b2_firstSleepingSet )
297297 {
298298 b2WakeSolverSet ( world , bodyA . setIndex ) ;
299299 }
@@ -302,8 +302,8 @@ internal static void b2LinkContact(B2World world, B2Contact contact)
302302 int islandIdB = bodyB . islandId ;
303303
304304 // Static bodies have null island indices.
305- B2_ASSERT ( bodyA . setIndex != ( int ) B2SolverSetType2 . b2_staticSet || islandIdA == B2_NULL_INDEX ) ;
306- B2_ASSERT ( bodyB . setIndex != ( int ) B2SolverSetType2 . b2_staticSet || islandIdB == B2_NULL_INDEX ) ;
305+ B2_ASSERT ( bodyA . setIndex != ( int ) B2SolverSetType . b2_staticSet || islandIdA == B2_NULL_INDEX ) ;
306+ B2_ASSERT ( bodyB . setIndex != ( int ) B2SolverSetType . b2_staticSet || islandIdB == B2_NULL_INDEX ) ;
307307 B2_ASSERT ( islandIdA != B2_NULL_INDEX || islandIdB != B2_NULL_INDEX ) ;
308308
309309 // Merge islands. This will destroy one of the islands.
@@ -393,11 +393,11 @@ internal static void b2LinkJoint(B2World world, B2Joint joint)
393393
394394 B2_ASSERT ( bodyA . type == B2BodyType . b2_dynamicBody || bodyB . type == B2BodyType . b2_dynamicBody ) ;
395395
396- if ( bodyA . setIndex == ( int ) B2SolverSetType2 . b2_awakeSet && bodyB . setIndex >= ( int ) B2SolverSetType2 . b2_firstSleepingSet )
396+ if ( bodyA . setIndex == ( int ) B2SolverSetType . b2_awakeSet && bodyB . setIndex >= ( int ) B2SolverSetType . b2_firstSleepingSet )
397397 {
398398 b2WakeSolverSet ( world , bodyB . setIndex ) ;
399399 }
400- else if ( bodyB . setIndex == ( int ) B2SolverSetType2 . b2_awakeSet && bodyA . setIndex >= ( int ) B2SolverSetType2 . b2_firstSleepingSet )
400+ else if ( bodyB . setIndex == ( int ) B2SolverSetType . b2_awakeSet && bodyA . setIndex >= ( int ) B2SolverSetType . b2_firstSleepingSet )
401401 {
402402 b2WakeSolverSet ( world , bodyA . setIndex ) ;
403403 }
@@ -469,7 +469,7 @@ internal static void b2SplitIsland(B2World world, int baseId)
469469 B2Island baseIsland = b2Array_Get ( ref world . islands , baseId ) ;
470470 int setIndex = baseIsland . setIndex ;
471471
472- if ( setIndex != ( int ) B2SolverSetType2 . b2_awakeSet )
472+ if ( setIndex != ( int ) B2SolverSetType . b2_awakeSet )
473473 {
474474 // can only split awake island
475475 return ;
@@ -536,7 +536,7 @@ internal static void b2SplitIsland(B2World world, int baseId)
536536 // Grab the next body off the stack and add it to the island.
537537 int bodyId = stack [ -- stackCount ] ;
538538 B2Body body = bodies [ bodyId ] ;
539- B2_ASSERT ( body . setIndex == ( int ) B2SolverSetType2 . b2_awakeSet ) ;
539+ B2_ASSERT ( body . setIndex == ( int ) B2SolverSetType . b2_awakeSet ) ;
540540 B2_ASSERT ( body . islandId == islandId ) ;
541541
542542 // Add body to island
@@ -586,7 +586,7 @@ internal static void b2SplitIsland(B2World world, int baseId)
586586 B2Body otherBody = bodies [ otherBodyId ] ;
587587
588588 // Maybe add other body to stack
589- if ( otherBody . islandId != islandId && otherBody . setIndex != ( int ) B2SolverSetType2 . b2_staticSet )
589+ if ( otherBody . islandId != islandId && otherBody . setIndex != ( int ) B2SolverSetType . b2_staticSet )
590590 {
591591 B2_ASSERT ( stackCount < bodyCount ) ;
592592 stack [ stackCount ++ ] = otherBodyId ;
@@ -635,7 +635,7 @@ internal static void b2SplitIsland(B2World world, int baseId)
635635 }
636636
637637 // todo redundant with test below?
638- if ( joint . setIndex == ( int ) B2SolverSetType2 . b2_disabledSet )
638+ if ( joint . setIndex == ( int ) B2SolverSetType . b2_disabledSet )
639639 {
640640 continue ;
641641 }
@@ -645,7 +645,7 @@ internal static void b2SplitIsland(B2World world, int baseId)
645645 B2Body otherBody = bodies [ otherBodyId ] ;
646646
647647 // Don't simulate joints connected to disabled bodies.
648- if ( otherBody . setIndex == ( int ) B2SolverSetType2 . b2_disabledSet )
648+ if ( otherBody . setIndex == ( int ) B2SolverSetType . b2_disabledSet )
649649 {
650650 continue ;
651651 }
@@ -657,7 +657,7 @@ internal static void b2SplitIsland(B2World world, int baseId)
657657 }
658658
659659 // Maybe add other body to stack
660- if ( otherBody . islandId != islandId && otherBody . setIndex == ( int ) B2SolverSetType2 . b2_awakeSet )
660+ if ( otherBody . islandId != islandId && otherBody . setIndex == ( int ) B2SolverSetType . b2_awakeSet )
661661 {
662662 B2_ASSERT ( stackCount < bodyCount ) ;
663663 stack [ stackCount ++ ] = otherBodyId ;
0 commit comments