X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_walk.c;h=40b836c26db55a85b065922e51d7f2f2da5287a6;hb=6ba5c35d106d749a1ebafbd3cbe18c3a02f781d3;hp=1306e2a012258fbbb0b8169fea8df21b4ec09720;hpb=430081b929e41735f0036ded51e186f5bacdbce3;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_walk.c b/player_walk.c index 1306e2a..40b836c 100644 --- a/player_walk.c +++ b/player_walk.c @@ -50,7 +50,7 @@ static void player_walk_generic_to_skate( enum skate_activity init, f32 yaw ){ v3_copy( v, player_skate.state.cog_v ); v3_copy( v, localplayer.rb.v ); - player__begin_holdout(); + player__begin_holdout( (v3f){0.0f,0.0f,0.0f} ); player__skate_reset_animator(); player__skate_clear_mechanics(); rb_update_transform( &localplayer.rb ); @@ -67,7 +67,7 @@ static void player_walk_drop_in_to_skate(void){ player_skate.state.activity_prev = k_skate_activity_ground; player_skate.state.activity = k_skate_activity_ground; - player__begin_holdout(); + player__begin_holdout( (v3f){0.0f,0.0f,0.0f} ); player__skate_clear_mechanics(); player__skate_reset_animator(); @@ -964,19 +964,19 @@ static void player__walk_reset( ent_spawn *rp ){ static void player__walk_animator_exchange( bitpack_ctx *ctx, void *data ){ struct player_walk_animator *animator = data; - //bitpack_bytes( ctx, sizeof(*animator), animator ); - bitpack_bytes( ctx, sizeof(animator->root_co), animator->root_co ); + + 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, 16, 0.0f, 120.0f, &animator->walk_timer ); - /* we can do variable length exchanges now? */ - - bitpack_bytes( ctx, sizeof(animator->foot_anchor), animator->foot_anchor ); bitpack_bytes( ctx, 8, &animator->outro_type ); - bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->outro_t ); - bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->commit_t ); + if( animator->outro_type ){ + bitpack_bytes(ctx, sizeof(animator->foot_anchor), animator->foot_anchor ); + bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->outro_t ); + bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->commit_t ); + } } #endif /* PLAYER_DEVICE_WALK_H */