Remove UBFIX related to task destruction

This commit is contained in:
GriffinR
2022-06-17 15:47:56 -04:00
parent 78b0c20738
commit 7a6b417b8e
3 changed files with 12 additions and 15 deletions
+10 -6
View File
@@ -135,10 +135,12 @@ void SoundTask_PlayCryHighPitch(u8 taskId)
{
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
species = gContestResources->moveAnim->species;
#ifndef UBFIX
// Destroying the task twice (here and at end of function)
// results in an incorrect value for gAnimVisualTaskCount
#ifndef BUGFIX
else
DestroyAnimVisualTask(taskId); // UB: task gets destroyed twice.
#endif
DestroyAnimVisualTask(taskId);
#endif
}
else
{
@@ -181,10 +183,12 @@ void SoundTask_PlayDoubleCry(u8 taskId)
{
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
species = gContestResources->moveAnim->species;
#ifndef UBFIX
// Destroying the task twice (here and at end of function)
// results in an incorrect value for gAnimVisualTaskCount
#ifndef BUGFIX
else
DestroyAnimVisualTask(taskId); // UB: task gets destroyed twice.
#endif
DestroyAnimVisualTask(taskId);
#endif
}
else
{