Skip to content

Call stop after setting new sprite frames#117655

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
pkowal1982:frame_duration
Mar 23, 2026
Merged

Call stop after setting new sprite frames#117655
akien-mga merged 1 commit into
godotengine:masterfrom
pkowal1982:frame_duration

Conversation

@pkowal1982
Copy link
Copy Markdown
Contributor

Fixes #86058

Calling stop after setting new sprite frames fixes the bug by calling indirectly set_frame_and_progress after new frame duration data is available.
Order of emitted signals is preserved, at least I couldn't find a way to change it in the test code.
Fixing it like this does not introduce any new code.

There's old stale PR #86277 which could be closed if this one gets merged.

Test project: frameduration.zip

@pkowal1982 pkowal1982 requested review from a team as code owners March 19, 2026 21:19
@Nintorch Nintorch added this to the 4.x milestone Mar 20, 2026
@KoBeWi
Copy link
Copy Markdown
Member

KoBeWi commented Mar 20, 2026

Test project: frameduration.zip

That project still fails xd

image

But the MPR from the issue confirms the fix.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.7 Mar 20, 2026
@akien-mga akien-mga merged commit 8d0b238 into godotengine:master Mar 23, 2026
20 checks passed
@akien-mga
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The frame duration setting of the first frame of AnimatedSprite2D is ignored in the first loop

4 participants