Implemented clear animation for also ow pokemon sprites
This commit is contained in:
parent
99ba36b446
commit
b580dec6a3
1 changed files with 7 additions and 2 deletions
|
@ -1007,8 +1007,13 @@ bool8 ScrCmd_applymovement(struct ScriptContext *ctx)
|
|||
// When applying script movements to follower, it may have frozen animation that must be cleared
|
||||
if (localId == OBJ_EVENT_ID_FOLLOWER && (objEvent = GetFollowerObject()) && objEvent->frozen)
|
||||
{
|
||||
ClearObjectEventMovement(objEvent, &gSprites[objEvent->spriteId]);
|
||||
gSprites[objEvent->spriteId].animCmdIndex = 0; // Reset start frame of animation
|
||||
goto clear_animation;
|
||||
}
|
||||
if ((objEvent = &gObjectEvents[GetObjectEventIdByLocalId(localId)]) && IS_OW_MON_OBJ(objEvent))
|
||||
{
|
||||
clear_animation:
|
||||
ClearObjectEventMovement(objEvent, &gSprites[objEvent->spriteId]);
|
||||
gSprites[objEvent->spriteId].animCmdIndex = 0; // Reset start frame of animation
|
||||
}
|
||||
|
||||
gObjectEvents[GetObjectEventIdByLocalId(localId)].directionOverwrite = DIR_NONE;
|
||||
|
|
Loading…
Reference in a new issue