+
+ int walk_phase = 0;
+ if( vg_fractf(player.walk_timer) > 0.5f )
+ walk_phase = 1;
+ else
+ walk_phase = 0;
+
+ if( (player.step_phase != walk_phase) && !player.in_air )
+ {
+ v3_copy( player.rb.co, player.last_step_pos );
+
+ audio_player_set_flags( &audio_player_extra, AUDIO_FLAG_SPACIAL_3D );
+ audio_player_set_position( &audio_player_extra, player.rb.co );
+ audio_player_set_vol( &audio_player_extra, 6.0f );
+ audio_player_playclip( &audio_player_extra,
+ &audio_footsteps[rand()%4] );
+ }
+
+ player.step_phase = walk_phase;