mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
player_patches: ensure Unleash gauge penalty doesn't dip into negatives
This commit is contained in:
parent
809c88408e
commit
16484a2343
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ void PostUnleashMidAsmHook(PPCRegister& r30)
|
||||||
if (m_isUnleashCancelled)
|
if (m_isUnleashCancelled)
|
||||||
{
|
{
|
||||||
if (auto pEvilSonicContext = (SWA::Player::CEvilSonicContext*)g_memory.Translate(r30.u32))
|
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;
|
m_isUnleashCancelled = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue