summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2023-11-14 19:47:07 -0600
committerGitHub <noreply@github.com>2023-11-14 20:47:07 -0500
commit044d32a46f1ed5bd7287b78d5c52233b27c0d262 (patch)
tree03ee63f7f3c3a4254a8163a95ed290712938b060
parentafe032ea215215273a38b810d5c7be0705aaa460 (diff)
Add gFixEyesOpenWhileSleeping (#3365)
-rw-r--r--soh/soh/SohMenuBar.cpp2
-rw-r--r--soh/src/overlays/actors/ovl_player_actor/z_player.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp
index a71d2b8e3..8db6c7703 100644
--- a/soh/soh/SohMenuBar.cpp
+++ b/soh/soh/SohMenuBar.cpp
@@ -1061,6 +1061,8 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Fixes the bushes to drop items correctly rather than spawning undefined items.");
UIWidgets::PaddedEnhancementCheckbox("Fix falling from vine edges", "gFixVineFall", true, false);
UIWidgets::Tooltip("Prevents immediately falling off climbable surfaces if climbing on the edges.");
+ UIWidgets::PaddedEnhancementCheckbox("Fix Link's eyes open while sleeping", "gFixEyesOpenWhileSleeping", true, false);
+ UIWidgets::Tooltip("Fixes Link's eyes being open in the opening cutscene when he is supposed to be sleeping.");
ImGui::EndMenu();
}
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 09e33f2e4..497935a69 100644
--- a/soh/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c
@@ -15169,6 +15169,10 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) {
sp24 = D_808547C4[this->unk_446];
func_80852B4C(play, this, linkCsAction, &D_80854E50[ABS(sp24)]);
+
+ if (CVarGetInteger("gFixEyesOpenWhileSleeping", 0) && (play->csCtx.linkAction->action == 28 || play->csCtx.linkAction->action == 29)) {
+ this->skelAnime.jointTable[22].x = 8;
+ }
}
void func_80852E14(Player* this, PlayState* play) {