better? grinds
[carveJwlIkooP6JGAAIwe30JlM.git] / player_walk.c
index d916c2646a9e9b8301a489f703efa8b6b2f312cf..d5f4aa0c28df9d57a1200ff762b6723f3f5c5bcb 100644 (file)
@@ -464,20 +464,7 @@ VG_STATIC void player__walk_update( player_instance *player )
     * Depenetrate
     */
    v3f dt;
-   v3_zero( dt );
-   for( int j=0; j<8; j++ )
-   {
-      for( int i=0; i<len; i++ )
-      {
-         struct contact *ct = &manifold[i];
-
-         float resolved_amt = v3_dot( ct->n, dt ),
-               remaining    = (ct->p-k_penetration_slop) - resolved_amt,
-               apply        = vg_maxf( remaining, 0.0f ) * 0.3f;
-
-         v3_muladds( dt, ct->n, apply, dt );
-      }
-   }
+   rb_depenetrate( manifold, len, dt );
    v3_add( dt, player->rb.co, player->rb.co );
 
    /* TODO: Stepping......