X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_skate.c;h=ae3272cfbb097c1f3e43dcb46439d8e0e6ac787a;hb=6a6539bcfeb7bd693251f7aae31056671a65c0f0;hp=d1be6b8b82c84adf3d7978e176b138e4afec7117;hpb=223e75026f958029f9664380ed20a5daa3ee2ae7;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_skate.c b/player_skate.c index d1be6b8..ae3272c 100644 --- a/player_skate.c +++ b/player_skate.c @@ -5,6 +5,7 @@ #include "audio.h" #include "vg/vg_perlin.h" #include "menu.h" +#include "ent_skateshop.h" VG_STATIC void player__skate_bind( player_instance *player ) { @@ -1191,13 +1192,10 @@ VG_STATIC void player__skate_post_update( player_instance *player ) slide = 0.0f; } - static float menu_gate = 1.0f; - menu_gate = vg_lerpf( menu_gate, 1-cl_menu, vg.time_frame_delta*4.0f ); - - float - vol_main = sqrtf( (1.0f-air)*attn*(1.0f-slide) * 0.4f ) * menu_gate, - vol_air = sqrtf( air *attn * 0.5f ) * menu_gate, - vol_slide = sqrtf( (1.0f-air)*attn*slide * 0.25f ) * menu_gate; + f32 gate = 1.0f-menu.factive, + vol_main = sqrtf( (1.0f-air)*attn*(1.0f-slide) * 0.4f ) * gate, + vol_air = sqrtf( air *attn * 0.5f ) * gate, + vol_slide = sqrtf( (1.0f-air)*attn*slide * 0.25f ) * gate; const u32 flags = AUDIO_FLAG_SPACIAL_3D|AUDIO_FLAG_LOOP; @@ -2966,7 +2964,7 @@ VG_STATIC void player__skate_animate( player_instance *player, q_mul( kf_board->q, qtrick, kf_board->q ); q_normalize( kf_board->q ); - struct player_board *board = player->board; + struct player_board *board = player_get_player_board( player ); if( board ){ /* foot weight distribution */