diff options
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_actor.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 26e0b6dfe..ae2db5b78 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -82,6 +82,9 @@ static s32 sCurCeilingBgId; // Used for animating the ice trap on the "Get Item" model. f32 iceTrapScale; +// For Link's voice pitch SFX modifier +static f32 freqMultiplier = 1; + void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale) { shape->yOffset = yOffset; shape->shadowDraw = shadowDraw; @@ -2185,7 +2188,17 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) } void func_8002F7DC(Actor* actor, u16 sfxId) { - Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + if (actor->id != ACTOR_PLAYER || sfxId < NA_SE_VO_LI_SWORD_N || sfxId > NA_SE_VO_LI_ELECTRIC_SHOCK_LV_KID) { + Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8); + } else { + freqMultiplier = CVarGetFloat("gLinkVoiceFreqMultiplier", 1.0); + if (freqMultiplier <= 0) { + freqMultiplier = 1; + } + // Authentic behavior uses D_801333E0 for both freqScale and a4 + // Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &freqMultiplier, &D_801333E0, &D_801333E8); + } } void Audio_PlayActorSound2(Actor* actor, u16 sfxId) { |
