mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Fix Light Of Ruin freeze and potentially other move anims (#3084)
This commit is contained in:
commit
e21fcda54c
@ -457,7 +457,7 @@ static u8 GetBattleAnimMoveTargets(u8 battlerArgIndex, u8 *targets)
|
||||
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(BATTLE_OPPOSITE(targets[0]))))
|
||||
{
|
||||
targets[2] = BATTLE_PARTNER(BATTLE_OPPOSITE(targets[0]));
|
||||
targets[2] = BATTLE_PARTNER(BATTLE_OPPOSITE(targets[0]));
|
||||
numTargets++;
|
||||
}
|
||||
break;
|
||||
@ -525,12 +525,13 @@ static void Cmd_createsprite(void)
|
||||
|
||||
subpriority = GetSubpriorityForMoveAnim(argVar);
|
||||
|
||||
CreateSpriteAndAnimate(
|
||||
template,
|
||||
if (CreateSpriteAndAnimate(template,
|
||||
GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2),
|
||||
GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET),
|
||||
subpriority);
|
||||
gAnimVisualTaskCount++;
|
||||
subpriority) != MAX_SPRITES) // Don't increment the task count if the sprite couldn't be created(i.e. there are too many created sprites atm).
|
||||
{
|
||||
gAnimVisualTaskCount++;
|
||||
}
|
||||
}
|
||||
|
||||
static void CreateSpriteOnTargets(const struct SpriteTemplate *template, u8 argVar, u8 battlerArgIndex, u8 argsCount, bool32 overwriteAnimTgt)
|
||||
@ -555,12 +556,13 @@ static void CreateSpriteOnTargets(const struct SpriteTemplate *template, u8 argV
|
||||
if (overwriteAnimTgt)
|
||||
gBattleAnimArgs[battlerArgIndex] = targets[i];
|
||||
|
||||
CreateSpriteAndAnimate(
|
||||
template,
|
||||
if (CreateSpriteAndAnimate(template,
|
||||
GetBattlerSpriteCoord(targets[i], BATTLER_COORD_X_2),
|
||||
GetBattlerSpriteCoord(targets[i], BATTLER_COORD_Y_PIC_OFFSET),
|
||||
subpriority);
|
||||
gAnimVisualTaskCount++;
|
||||
subpriority) != MAX_SPRITES) // Don't increment the task count if the sprite couldn't be created(i.e. there are too many created sprites atm).
|
||||
{
|
||||
gAnimVisualTaskCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user