From 07e976e826c947cab3f5fbde5d7182a42c280555 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sun, 26 May 2024 22:29:13 +0100 Subject: [PATCH] Fix Hess Crash's Next Crash (#480) --- mm/src/code/z_player_lib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mm/src/code/z_player_lib.c b/mm/src/code/z_player_lib.c index 38fc3c23a..82a72f1ec 100644 --- a/mm/src/code/z_player_lib.c +++ b/mm/src/code/z_player_lib.c @@ -1807,6 +1807,12 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL gfx = POLY_OPA_DISP; + if (CVarGetInteger("gEnhancements.Fixes.HessCrash", 1)) { + if (eyeIndex >= PLAYER_EYES_MAX) { + eyeIndex = 0; + } + } + if (eyeIndex < 0) { eyeIndex = sPlayerFaces[face].eyeIndex; } @@ -1821,6 +1827,12 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL gSPSegment(&gfx[0], 0x08, Lib_SegmentedToVirtual(sPlayerEyesTextures[playerForm][eyeIndex])); + if (CVarGetInteger("gEnhancements.Fixes.HessCrash", 1)) { + if (mouthIndex >= PLAYER_MOUTH_MAX) { + mouthIndex = 0; + } + } + if (mouthIndex < 0) { mouthIndex = sPlayerFaces[face].mouthIndex; }