X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_skate.c;h=91265ceb3ec1bfbde17725b4eb2c0b607d71ff04;hb=1fd91b77f23ce1593037e01b9abb62859545b400;hp=de240df816280c96f09c8b7bd991397a297d3479;hpb=fc3e6cb16a7e6fdc440b35aa88c32f7f560d928f;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_skate.c b/player_skate.c index de240df..91265ce 100644 --- a/player_skate.c +++ b/player_skate.c @@ -1146,19 +1146,6 @@ static enum trick_type player_skate_trick_input(void){ static void player__skate_pre_update(void){ struct player_skate_state *state = &player_skate.state; -#if 0 - if( button_down(k_srbind_devbutton) ){ - state->activity = k_skate_activity_popoff; - state->handplant_t = 0.0f; - v3_copy( localplayer.rb.co, state->store_co ); - v3_copy( localplayer.rb.v, state->air_init_v ); - v4_copy( localplayer.rb.q, state->store_q ); - v3_copy( state->cog, state->store_cog ); - v3_copy( state->cog_v, state->store_cog_v ); - v4_copy( state->smoothed_rotation, state->store_smoothed ); - } -#endif - if( state->activity == k_skate_activity_handplant ){ state->handplant_t += vg.time_delta; mdl_keyframe hpose[32]; @@ -1234,7 +1221,8 @@ static void player__skate_pre_update(void){ player__begin_holdout( offset ); player__skate_kill_audio(); - player__walk_transition( k_walk_activity_ipopoff, state->trick_euler[0] ); + player__walk_transition( state->activity <= k_skate_activity_air_to_grind? + 0: 1, state->trick_euler[0] ); return; } @@ -3573,6 +3561,7 @@ static void player__skate_animator_exchange( bitpack_ctx *ctx, void *data ){ bitpack_qf32( ctx, 16, 0.0f, 120.0f, &animator->push_time ); bitpack_qf32( ctx, 16, 0.0f, 120.0f, &animator->jump_time ); + bitpack_qf32( ctx, 16, 0.0f, 4.0f, &animator->handplant_t ); bitpack_qv3f( ctx, 16, -100.0f, 100.0f, animator->root_v ); bitpack_bytes( ctx, 1, &animator->activity ); }