summaryrefslogtreecommitdiff
path: root/src/battle_gfx_sfx_util.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-03-15 20:17:47 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-03-15 20:17:47 -0400
commit14aa5bf52f5e6bfe93b41afcd0f9ccd6bb796d68 (patch)
treec5ceea26b5526c6ccc11d8b757800076680c3a7f /src/battle_gfx_sfx_util.c
parent81da6acff56cadc5e2b7b5572aba944bf0f1c8ad (diff)
Remove unused, unneeded fields from BattleHealthboxInfo
Diffstat (limited to 'src/battle_gfx_sfx_util.c')
-rw-r--r--src/battle_gfx_sfx_util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c
index db172b4a1..06c6aaaa9 100644
--- a/src/battle_gfx_sfx_util.c
+++ b/src/battle_gfx_sfx_util.c
@@ -296,15 +296,18 @@ bool8 IsBattleSEPlaying(u8 battlerId)
if (IsSEPlaying())
{
- ++gBattleSpritesDataPtr->healthBoxesData[battlerId].field_8;
- if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_8 < 30)
+ ++gBattleSpritesDataPtr->healthBoxesData[battlerId].soundTimer;
+ // UB: Uses gActiveBattler instead of battlerId.
+ // In practice, this is never a problem, as this routine
+ // is only ever passed gActiveBattler.
+ if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].soundTimer < 30)
return TRUE;
m4aMPlayStop(&gMPlayInfo_SE1);
m4aMPlayStop(&gMPlayInfo_SE2);
}
if (zero == 0)
{
- gBattleSpritesDataPtr->healthBoxesData[battlerId].field_8 = 0;
+ gBattleSpritesDataPtr->healthBoxesData[battlerId].soundTimer = 0;
return FALSE;
}
else