freds suggestion
authorhgn <hgodden00@gmail.com>
Fri, 17 Feb 2023 17:54:42 +0000 (17:54 +0000)
committerhgn <hgodden00@gmail.com>
Fri, 17 Feb 2023 17:54:42 +0000 (17:54 +0000)
player_skate.c

index 4d40667658aed7856cd16ac67920350b66dfc51a..e9aeaa747b3bcf7473a9942f4a2522a0f3684205 100644 (file)
@@ -735,7 +735,8 @@ VG_STATIC void skate_apply_friction_model( player_instance *player )
 
    if( !player->input_jump->button.value )
    {
-      if( player->input_push->button.value )
+      if( player->input_push->button.value || 
+          (vg.time-s->state.start_push<0.75) )
       {
          if( (vg.time - s->state.cur_push) > 0.25 )
             s->state.start_push = vg.time;
@@ -959,6 +960,7 @@ VG_STATIC void player__skate_pre_update( player_instance *player )
       v3_copy( player->cam.angles, angles );
       angles[2] = 0.0f;
 
+      player->holdout_time = 0.25f;
       player__walk_transition( player, angles );
       return;
    }
@@ -2551,6 +2553,8 @@ VG_STATIC void player__skate_animate( player_instance *player,
       q_mulv( qflip, rco, rco );
       v3_add( rco, rotation_point, dest->root_co );
    }
+
+   skeleton_copy_pose( sk, dest->pose, player->holdout_pose );
 }
 
 VG_STATIC void player__skate_post_animate( player_instance *player )