mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Add missing braces to bugfix in CalculateMonStats
This commit is contained in:
parent
c506cf747f
commit
8afc28c98f
@ -2859,13 +2859,14 @@ void CalculateMonStats(struct Pokemon *mon)
|
||||
{
|
||||
if (currentHP == 0 && oldMaxHP == 0)
|
||||
currentHP = newMaxHP;
|
||||
else if (currentHP != 0)
|
||||
else if (currentHP != 0) {
|
||||
// BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch.
|
||||
currentHP += newMaxHP - oldMaxHP;
|
||||
#ifdef BUGFIX
|
||||
if (currentHP <= 0)
|
||||
currentHP = 1;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user