+static void player__walk_reset(void){
+ struct player_walk *w = &player_walk;
+ w->state.activity = k_walk_activity_air;
+ w->state.outro_type = k_walk_outro_none;
+ w->state.outro_start_time = 0.0;
+
+ v3f fwd = { 0.0f, 0.0f, 1.0f };
+ q_mulv( localplayer.rb.q, fwd, fwd );
+ q_axis_angle( localplayer.rb.q, (v3f){0.0f,1.0f,0.0f},
+ atan2f(fwd[0], fwd[2]) );
+
+ rb_update_transform( &localplayer.rb );
+}
+
+static void player__walk_animator_exchange( bitpack_ctx *ctx, void *data ){
+ struct player_walk_animator *animator = 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, 16, 0.0f, 120.0f, &animator->walk_timer );
+
+ for( int i=0; i<1; i++ ){ /* without this you get a warning from gcc. lol */
+ bitpack_bytes( ctx, 8, &animator->outro_type );
+ 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 );
+ }
+ }
+
+ u32 code = bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->sit_t );
+ if( code ){
+ bitpack_qf32( ctx, 8, -k_sit_yaw_limit, k_sit_yaw_limit, &animator->yaw );
+ bitpack_qf32( ctx, 8, -k_sit_pitch_limit, k_sit_pitch_limit,
+ &animator->pitch );
+ }
+}
+
+static void player__walk_sfx_oneshot( u8 id, v3f pos, f32 volume ){
+ audio_lock();
+
+ if( id == k_player_walk_soundeffect_splash ){
+ audio_oneshot_3d( &audio_splash, pos, 40.0f, 1.0f );
+ }
+
+ audio_unlock();
+}