Implemented clear animation for also overworld pokemon (#5825)

This commit is contained in:
lordraindance2 2025-01-28 18:04:16 -05:00 committed by GitHub
parent 72edeeffad
commit 392a16651b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1005,7 +1005,8 @@ bool8 ScrCmd_applymovement(struct ScriptContext *ctx)
struct ObjectEvent *objEvent;
// 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)
if ((localId == OBJ_EVENT_ID_FOLLOWER && (objEvent = GetFollowerObject()) && objEvent->frozen)
|| ((objEvent = &gObjectEvents[GetObjectEventIdByLocalId(localId)]) && IS_OW_MON_OBJ(objEvent)))
{
ClearObjectEventMovement(objEvent, &gSprites[objEvent->spriteId]);
gSprites[objEvent->spriteId].animCmdIndex = 0; // Reset start frame of animation