summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvaguerant <vaguerant@users.noreply.github.com>2022-07-22 09:21:18 +1000
committerGitHub <noreply@github.com>2022-07-22 01:21:18 +0200
commit059045481cbecbe733eec00bcf1b7ff57e941189 (patch)
treec80f01b9d5feb093e9dc134b9477704d3c004f42
parent44dbd3a8a92493b31a4ec36d6149b25213aa9e2a (diff)
Controller option: Navi on L (#861)
-rw-r--r--libultraship/libultraship/ImGuiImpl.cpp2
-rw-r--r--soh/src/overlays/actors/ovl_player_actor/z_player.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/libultraship/libultraship/ImGuiImpl.cpp b/libultraship/libultraship/ImGuiImpl.cpp
index b9ce62aee..7c23d2958 100644
--- a/libultraship/libultraship/ImGuiImpl.cpp
+++ b/libultraship/libultraship/ImGuiImpl.cpp
@@ -844,6 +844,8 @@ namespace SohImGui {
EnhancementCheckbox("D-pad Support for Browsing Shop Items", "gDpadShop");
EnhancementCheckbox("D-pad as Equip Items", "gDpadEquips");
Tooltip("Allows the D-pad to be used as extra C buttons");
+ EnhancementCheckbox("Answer Navi Prompt with L Button", "gNaviOnL");
+ Tooltip("Speak to Navi with L but enter first-person camera with C-Up");
ImGui::Separator();
EnhancementCheckbox("Show Inputs", "gInputEnabled");
diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c
index 1f1d09a8d..2ab19a877 100644
--- a/soh/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c
@@ -5191,7 +5191,7 @@ s32 func_8083B644(Player* this, GlobalContext* globalCtx) {
this->stateFlags2 |= PLAYER_STATE2_21;
}
- if (!CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) && !sp28) {
+ if (!CHECK_BTN_ALL(sControlInput->press.button, CVar_GetS32("gNaviOnL", 0) ? BTN_L : BTN_CUP) && !sp28) {
return 0;
}
@@ -5247,7 +5247,8 @@ s32 func_8083B998(Player* this, GlobalContext* globalCtx) {
(CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18) || (this->unk_664->naviEnemyId != 0xFF))) {
this->stateFlags2 |= PLAYER_STATE2_21;
}
- else if ((this->naviTextId == 0) && !func_8008E9C4(this) && CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) &&
+ else if ((this->naviTextId == 0 || CVar_GetS32("gNaviOnL", 0)) &&
+ !func_8008E9C4(this) && CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) &&
(YREG(15) != 0x10) && (YREG(15) != 0x20) && !func_8083B8F4(this, globalCtx)) {
func_80078884(NA_SE_SY_ERROR);
}