diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-05-16 12:24:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-16 12:24:04 -0400 |
commit | 9e690c07edb2219c6c19fc5869a9558cc9df973d (patch) | |
tree | 79e3819ea798c409d5903ae252cc97609eba581c /src/battle_anim_sound_tasks.c | |
parent | ab8318cc79de60413085b104125490cbae344169 (diff) | |
parent | a7e3da2301aa7913f2437fe2152efcec6e96faef (diff) |
Merge pull request #1437 from ExpoSeed/bugfixes
Various BUGFIXes and UBFIXes
Diffstat (limited to 'src/battle_anim_sound_tasks.c')
-rw-r--r-- | src/battle_anim_sound_tasks.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index 8fc93c3aa..39d6729e8 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -135,8 +135,10 @@ void SoundTask_PlayCryHighPitch(u8 taskId) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) species = gContestResources->moveAnim->species; + #ifndef UBFIX else - DestroyAnimVisualTask(taskId); // UB: function should return upon destroying task. + DestroyAnimVisualTask(taskId); // UB: task gets destroyed twice. + #endif } else { @@ -179,8 +181,10 @@ void SoundTask_PlayDoubleCry(u8 taskId) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) species = gContestResources->moveAnim->species; + #ifndef UBFIX else - DestroyAnimVisualTask(taskId); // UB: function should return upon destroying task. + DestroyAnimVisualTask(taskId); // UB: task gets destroyed twice. + #endif } else { |