Added a max macro to avoid softlocks when maxValue/x is less than 1.

Eduardo Quezada D'Ottone 2021-12-12 12:16:40 -03:00
parent 7c7d8e02f1
commit a7682664df
1 changed files with 1 additions and 1 deletions

@ -15,7 +15,7 @@ In [src/battle_interface.c](../blob/master/src/battle_interface.c) , around Line
gBattleSpritesDataPtr->battleBars[battlerId].receivedValue,
&gBattleSpritesDataPtr->battleBars[battlerId].currValue,
- B_HEALTHBAR_PIXELS / 8, 1);
+ B_HEALTHBAR_PIXELS / 8, gBattleSpritesDataPtr->battleBars[battlerId].maxValue / x);
+ B_HEALTHBAR_PIXELS / 8, max(gBattleSpritesDataPtr->battleBars[battlerId].maxValue / x, 1));
```
With [x] being whatever value you want