diff options
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r-- | scene/animation/animation_player.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index c659447c23..030f3f27e0 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -637,14 +637,15 @@ void AnimationPlayer::_animation_process(float p_delta) { play(queued.front()->get()); String new_name = playback.assigned; queued.pop_front(); + end_notify=false; emit_signal(SceneStringNames::get_singleton()->animation_changed, old, new_name); } else { //stop(); playing = false; _set_process(false); + end_notify=false; emit_signal(SceneStringNames::get_singleton()->finished); } - } } else { @@ -907,12 +908,13 @@ void AnimationPlayer::play(const StringName& p_name, float p_custom_blend, float } } - c.current.pos=p_from_end ? c.current.from->animation->get_length() : 0; c.current.from=&animation_set[name]; + c.current.pos=p_from_end ? c.current.from->animation->get_length() : 0; c.current.speed_scale=p_custom_scale; c.assigned=p_name; - queued.clear(); + if (!end_notify) + queued.clear(); _set_process(true); // always process when starting an animation playing = true; |