File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -331,14 +331,13 @@ void AnimationPlayer::_blend_capture(double p_delta) {
331331}
332332
333333void AnimationPlayer::_blend_post_process () {
334- if (!finished_anim.is_empty ()) {
335- emit_signal (SceneStringName (animation_finished), finished_anim);
336- }
337-
338334 if (end_reached) {
339335 // If the method track changes current animation, the animation is not finished.
340336 if (tmp_from == playback.current .from ->animation ->get_instance_id ()) {
341337 if (playback_queue.size ()) {
338+ if (!finished_anim.is_empty ()) {
339+ emit_signal (SceneStringName (animation_finished), finished_anim);
340+ }
342341 String old = playback.assigned ;
343342 play (playback_queue.front ()->get ());
344343 String new_name = playback.assigned ;
@@ -351,6 +350,9 @@ void AnimationPlayer::_blend_post_process() {
351350 playing = false ;
352351 _set_process (false );
353352 if (end_notify) {
353+ if (!finished_anim.is_empty ()) {
354+ emit_signal (SceneStringName (animation_finished), finished_anim);
355+ }
354356 emit_signal (SNAME (" current_animation_changed" ), " " );
355357 if (movie_quit_on_finish && OS::get_singleton ()->has_feature (" movie" )) {
356358 print_line (vformat (" Movie Maker mode is enabled. Quitting on animation finish as requested by: %s" , get_path ()));
You can’t perform that action at this time.
0 commit comments