X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_walk.c;h=eacdeeb2f4634ced916fd6528df10f0c0cba80c5;hb=7b4f1548e85202dd34e4f849e56e042d73dbb6f2;hp=040426b39a1b5d23a7f0f2d0b13c4898273014e4;hpb=2a75bf4808092487fcfd5d12b30412d7c995f67a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_walk.c b/player_walk.c index 040426b..eacdeeb 100644 --- a/player_walk.c +++ b/player_walk.c @@ -264,6 +264,7 @@ static void player_walk_pre_ground(void){ if( button_down(k_srbind_sit) ){ v3_zero( localplayer.rb.v ); w->state.activity = k_walk_activity_sit; + w->state.transition_t = 0.0f; return; } @@ -1124,8 +1125,7 @@ static void player__walk_animator_exchange( bitpack_ctx *ctx, void *data ){ bitpack_qv3f( ctx, 24, -1024.0f, 1024.0f, animator->root_co ); bitpack_qquat( ctx, animator->root_q ); bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->fly ); - bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->run ); - bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->walk ); + bitpack_qf32( ctx, 8, 0.0f, k_runspeed, &animator->run ); bitpack_qf32( ctx, 16, 0.0f, 120.0f, &animator->walk_timer ); for( int i=0; i<1; i++ ){ /* without this you get a warning from gcc. lol */