Fixed glitch when going in/out of pokeball a lot

Before this fix, if the follower did their into/out of pokeball animation enough times without the map being reloaded, both the follower and the sparkle sprites would start to glitch out a lot. This fixes that.
This commit is contained in:
W1serV1ser committed 2022-03-27 22:13:59 -07:00
1 parent 0ed7064e62
commit 4f18a3fa89
1 file changed
+2 -1
+2 -1
View File
@@ -10445,6 +10445,7 @@ u8 MovementAction_FollowingPokemon_Shrink_Step1(struct ObjectEvent *objectEvent,
if (sprite->data[7] >= 11) if (sprite->data[7] >= 11)
{ {
FreeSpriteOamMatrix(sprite);
gObjectEvents[gPlayerAvatar.objectEventId].fixedPriority = FALSE; gObjectEvents[gPlayerAvatar.objectEventId].fixedPriority = FALSE;
objectEvent->invisible = TRUE; objectEvent->invisible = TRUE;
sprite->data[2]++; sprite->data[2]++;
@@ -10571,8 +10572,8 @@ u8 MovementAction_FollowingPokemon_Grow_Step1(struct ObjectEvent *objectEvent, s
sprite->y2 = 0; sprite->y2 = 0;
} }
FreeSpriteOamMatrix(sprite);
sprite->data[2]++; sprite->data[2]++;
sprite->oam.affineMode = 0;
} }
return FALSE; return FALSE;