From 80811d89f8c20e08577903948f79c889cb1a8e4b Mon Sep 17 00:00:00 2001 From: genegrey Date: Sun, 15 May 2022 11:57:23 -0400 Subject: [PATCH] Add toggle to disable navi call voice audio --- libultraship/libultraship/SohImGuiImpl.cpp | 2 ++ soh/src/code/z_parameter.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 8e4becaab..bb7ed17b9 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -675,6 +675,8 @@ namespace SohImGui { Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask"); EnhancementCheckbox("Visual Stone of Agony", "gVisualAgony"); Tooltip("Displays an icon and plays a sound when Stone of Agony should be activated, for those without rumble"); + EnhancementCheckbox("Disable Navi Call Audio", "gDisableNaviCallAudio"); + Tooltip("Disables the voice audio when Navi calls you"); ImGui::Text("Graphics"); ImGui::Separator(); diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index edc4348b9..3409022d8 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2151,13 +2151,15 @@ void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState) { if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling && (globalCtx->csCtx.state == CS_STATE_IDLE)) { - // clang-format off - if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); } - // clang-format on + if (!CVar_GetS32("gDisableNaviCallAudio", 0)) { + // clang-format off + if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4, + &D_801333E0, &D_801333E0, &D_801333E8); } + // clang-format on - if (naviCallState == 0x1D) { - func_800F4524(&D_801333D4, NA_SE_VO_NA_HELLO_2, 32); + if (naviCallState == 0x1D) { + func_800F4524(&D_801333D4, NA_SE_VO_NA_HELLO_2, 32); + } } interfaceCtx->naviCalling = 1;