VG_STATIC void player_walk_drop_in_to_skate( player_instance *player )
{
+ player->immobile = 0;
player->subsystem = k_player_subsystem_skate;
struct player_walk *w = &player->_walk;
VG_STATIC int player_walk_scan_for_drop_in( player_instance *player )
{
struct player_walk *w = &player->_walk;
- world_instance *world = get_active_world();
+ world_instance *world = world_current_instance();
v3f dir, center;
q_mulv( player->rb.q, (v3f){0.0f,0.0f,1.0f}, dir );
player->subsystem = k_player_subsystem_drive;
}
else{
+ if( !player_get_player_board(player) )
+ return;
+
if( w->state.activity == k_walk_activity_ground ){
if( player_walk_scan_for_drop_in( player ) ){
w->state.outro_type = k_walk_outro_drop_in;
joystick_state( k_srjoystick_steer, steer );
w->move_speed = v2_length( steer );
- world_instance *world = get_active_world();
+ world_instance *world = world_current_instance();
/*
* Collision detection
audio_lock();
if( w->surface == k_surface_prop_concrete ){
audio_oneshot_3d(
- &audio_footsteps[rand()%vg_list_size(audio_footsteps)],
+ &audio_footsteps[vg_randu32()%vg_list_size(audio_footsteps)],
player->rb.co, 40.0f, 1.0f
);
}
else if( w->surface == k_surface_prop_grass ){
audio_oneshot_3d(
- &audio_footsteps_grass[rand()%vg_list_size(audio_footsteps_grass)],
+ &audio_footsteps_grass[vg_randu32()%vg_list_size(audio_footsteps_grass)],
player->rb.co, 40.0f, 1.0f
);
}
else if( w->surface == k_surface_prop_wood ){
audio_oneshot_3d(
- &audio_footsteps_wood[rand()%vg_list_size(audio_footsteps_wood)],
+ &audio_footsteps_wood[vg_randu32()%vg_list_size(audio_footsteps_wood)],
player->rb.co, 40.0f, 1.0f
);
}