summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-27 18:11:29 +0100
committerGitHub <noreply@github.com>2019-01-27 18:11:29 +0100
commiteb1e3ee2328c05f40652021cea0db01f8e83d307 (patch)
tree0d43a468c266d20bf98c8a243f42b68dde60f223 /scene/2d
parent86e1de71dfc7280446c472c9109515cd9d55d23e (diff)
parent30dd1815e49f8060686a5df7103161ac2753077b (diff)
Merge pull request #25382 from groud/change_frame_before_signal
Change the frame number before triggering the animation_finished signal
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/animated_sprite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index 707e95e271..28ddf6b5f8 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -395,8 +395,8 @@ void AnimatedSprite::_notification(int p_what) {
int fc = frames->get_frame_count(animation);
if (frame >= fc - 1) {
if (frames->get_animation_loop(animation)) {
- emit_signal(SceneStringNames::get_singleton()->animation_finished);
frame = 0;
+ emit_signal(SceneStringNames::get_singleton()->animation_finished);
} else {
frame = fc - 1;
if (!is_over) {