From 0e8b225279333708feb8c7995ddf9243e9cc1fe3 Mon Sep 17 00:00:00 2001 From: Archez Date: Wed, 8 May 2024 16:37:40 -0400 Subject: [PATCH] document bug in talk wait animation (#1625) --- src/overlays/actors/ovl_player_actor/z_player.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 7932383c2f..b1d04291be 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -20681,6 +20681,9 @@ s32 func_8085B930(PlayState* play, PlayerAnimationHeader* talkAnim, AnimationMod return false; } + //! @bug When func_8082ED20 is used to get a wait animation, NULL is still passed to Animation_GetLastFrame, + // causing it to read the frame count from address 0x80000000 casted to AnimationHeaderCommon via + // Lib_SegmentedToVirtual operating on NULL, which ends up returning 15385 as the last frame PlayerAnimation_Change(play, &player->skelAnime, (talkAnim == NULL) ? func_8082ED20(player) : talkAnim, PLAYER_ANIM_ADJUSTED_SPEED, 0.0f, Animation_GetLastFrame(talkAnim), animMode, -6.0f); return true;