move source content folders
[carveJwlIkooP6JGAAIwe30JlM.git] / player_skate.c
index eb12d641c9ad644bd19e805ad0008a3252b0ad34..50247502224d9b27963e44d9db793f256ddb9e90 100644 (file)
@@ -1095,10 +1095,11 @@ static void skate_apply_pump_model(void){
    }
    else{
       /* Collect */
-      float doty = v3_dot( localplayer.rb.to_world[1], state->throw_v );
+      f32 doty = v3_dot( localplayer.rb.to_world[1], state->throw_v );
       
       v3f Fl, Fv;
       v3_muladds( state->throw_v, localplayer.rb.to_world[1], -doty, Fl);
+      player_skate.collect_feedback = v3_length(Fl) * 4.0f;
 
       if( state->activity == k_skate_activity_ground ){
          if( v3_length2(localplayer.rb.v)<(20.0f*20.0f) ){
@@ -1109,7 +1110,7 @@ static void skate_apply_pump_model(void){
       }
 
       v3_muls( localplayer.rb.to_world[1], -doty, Fv );
-      v3_muladds( localplayer.rb.v,     Fv, k_mmcollect_vert, localplayer.rb.v );
+      v3_muladds( localplayer.rb.v, Fv, k_mmcollect_vert, localplayer.rb.v );
       v3_muladds( state->throw_v, Fv, k_mmcollect_vert, state->throw_v );
    }
 
@@ -2795,15 +2796,16 @@ begin_collision:;
    }
 }
 
-void player__skate_im_gui(void){
+void player__skate_im_gui( ui_context *ctx )
+{
    struct player_skate_state *state = &player_skate.state;
-   player__debugtext( 1, "V:  %5.2f %5.2f %5.2f",localplayer.rb.v[0],
+   player__debugtext( ctx, 1, "V:  %5.2f %5.2f %5.2f",localplayer.rb.v[0],
                                                 localplayer.rb.v[1],
                                                 localplayer.rb.v[2] );
-   player__debugtext( 1, "CO: %5.2f %5.2f %5.2f",localplayer.rb.co[0],
+   player__debugtext( ctx, 1, "CO: %5.2f %5.2f %5.2f",localplayer.rb.co[0],
                                                 localplayer.rb.co[1],
                                                 localplayer.rb.co[2] );
-   player__debugtext( 1, "W:  %5.2f %5.2f %5.2f",localplayer.rb.w[0],
+   player__debugtext( ctx, 1, "W:  %5.2f %5.2f %5.2f",localplayer.rb.w[0],
                                                 localplayer.rb.w[1],
                                                 localplayer.rb.w[2] );
 
@@ -2821,19 +2823,14 @@ void player__skate_im_gui(void){
       "grind_5050"
    };
 
-   player__debugtext( 1, "activity: %s", activity_txt[state->activity] );
-#if 0
-   player__debugtext( 1, "steer_s: %5.2f %5.2f [%.2f %.2f]",
-                        state->steerx_s, state->steery_s,
-                        k_steer_ground, k_steer_air );
-#endif
-   player__debugtext( 1, "flip: %.4f %.4f", state->flip_rate, 
+   player__debugtext( ctx, 1, "activity: %s", activity_txt[state->activity] );
+   player__debugtext( ctx, 1, "flip: %.4f %.4f", state->flip_rate, 
                                              state->flip_time );
-   player__debugtext( 1, "trickv: %.2f %.2f %.2f", 
+   player__debugtext( ctx, 1, "trickv: %.2f %.2f %.2f", 
                            state->trick_vel[0],
                            state->trick_vel[1],
                            state->trick_vel[2] );
-   player__debugtext( 1, "tricke: %.2fs %.2f %.2f %.2f", 
+   player__debugtext( ctx, 1, "tricke: %.2fs %.2f %.2f %.2f", 
                            state->trick_time,
                            state->trick_euler[0],
                            state->trick_euler[1],