fix username bug, fix animator spin bug
[carveJwlIkooP6JGAAIwe30JlM.git] / player_skate.c
index d56fc982787b323111af1849b44ce185362ccb6a..f971b18037da760d075f57342cb73ffb152df6f3 100644 (file)
@@ -2824,6 +2824,10 @@ VG_STATIC void player__skate_animate( player_instance *player ){
    /* steer */
    joystick_state( k_srjoystick_steer, animator->steer );
 
+   animator->airdir = vg_lerpf( animator->airdir, -animator->steer[0],
+                                2.4f*vg.time_delta );
+      
+
    /* flip angle */
    if( (s->state.activity <= k_skate_activity_air_to_grind) &&
        (fabsf(s->state.flip_rate) > 0.01f) ){
@@ -2892,7 +2896,6 @@ VG_STATIC void player__skate_animate( player_instance *player ){
 
       vg_line_arrow( player->rb.co, p1, 0.25f, VG__PINK );
       vg_line_arrow( player->rb.co, p2, 0.25f, VG__PINK );
-
    }
    else q_identity( animator->qfixuptotal );
    q_identity( animator->qfixuptotal );
@@ -2966,10 +2969,6 @@ VG_STATIC void player__skate_pose( player_instance *player, player_pose *pose ){
    
    mdl_keyframe air_pose[32];
    {
-      float target = -animator->steer[1];
-      animator->airdir = vg_lerpf( animator->airdir, target, 
-                                   2.4f*vg.time_delta );
-      
       float air_frame = (animator->airdir*0.5f+0.5f) * (15.0f/30.0f);
       skeleton_sample_anim( sk, s->anim_air, air_frame, apose );