From 16484a2343a138e00e92e6fc0c2164a2f174b97d Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Wed, 20 Nov 2024 01:25:58 +0000 Subject: [PATCH] player_patches: ensure Unleash gauge penalty doesn't dip into negatives --- UnleashedRecomp/patches/player_patches.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnleashedRecomp/patches/player_patches.cpp b/UnleashedRecomp/patches/player_patches.cpp index 8b987cfd..6b42a81a 100644 --- a/UnleashedRecomp/patches/player_patches.cpp +++ b/UnleashedRecomp/patches/player_patches.cpp @@ -86,7 +86,7 @@ void PostUnleashMidAsmHook(PPCRegister& r30) if (m_isUnleashCancelled) { if (auto pEvilSonicContext = (SWA::Player::CEvilSonicContext*)g_memory.Translate(r30.u32)) - pEvilSonicContext->m_DarkGaiaEnergy = m_lastDarkGaiaEnergy - 35.0f; + pEvilSonicContext->m_DarkGaiaEnergy = std::max(0.0f, m_lastDarkGaiaEnergy - 35.0f); m_isUnleashCancelled = false; }