X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_audio.h;h=757f495a1b761e3d94da2bafad365d5828cad33a;hb=5ecf9cca8b5b9bf876d7e7c7fde03d5b187bb42b;hp=3071af3097802e2ec7870bf8bb6abdca8806a47f;hpb=c2d67378dd5c82de50b8fbbbe222ec6be2da4eee;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_audio.h b/player_audio.h index 3071af3..757f495 100644 --- a/player_audio.h +++ b/player_audio.h @@ -1,10 +1,5 @@ /* - * Copyright 2021-2022 (C) Mount0 Software, Harry Godden - All Rights Reserved - * ----------------------------------------------------------------------------- - * - * Player audio - * - * ----------------------------------------------------------------------------- + * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved */ #ifndef PLAYER_AUDIO_H @@ -31,7 +26,7 @@ static void player_audio(void) audio_lock(); - double revert_delta = vg_time - last_revert; + double revert_delta = vg.time - last_revert; if( phys->on_board && (!_air && l2) && (fabsf(phys->slip) > 0.5f) && (revert_delta > 0.7) ) { @@ -40,11 +35,11 @@ static void player_audio(void) audio_player_set_vol( &audio_player_extra, 2.0f ); audio_player_playclip( &audio_player_extra, &audio_lands[rand()%5] ); - last_revert = vg_time; + last_revert = vg.time; } static float air = 0.0f; - air = vg_lerpf(air, phys->in_air? 1.0f: 0.0f, 5.0f*ktimestep); + air = vg_lerpf(air, phys->in_air? 1.0f: 0.0f, 5.0f*VG_TIMESTEP_FIXED ); /* Spacial info */ v3f ears = { 1.0f,0.0f,0.0f };