X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_walk.c;h=10d00947a2701a8b67e024c58603511cd8cdfd9a;hb=b8ff92a2caafa557608b84f4a037a5b3ce2628f7;hp=be2195f42437e9fabdbe0674dd27c6368b648a3d;hpb=f24a8cdd8ea6c3d762d26de2fc0700599bedbcad;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_walk.c b/player_walk.c index be2195f..10d0094 100644 --- a/player_walk.c +++ b/player_walk.c @@ -120,7 +120,7 @@ VG_STATIC void player_walk_drop_in_overhang_transform( player_instance *player, 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 ); @@ -390,7 +390,7 @@ VG_STATIC void player__walk_update( player_instance *player ) 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 @@ -652,19 +652,19 @@ VG_STATIC void player__walk_post_update( player_instance *player ) 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 ); }