Ver código fonte

Merge pull request #38086 from volzhs/seek-animation-finished

Emit signal when animation ends by seek
Rémi Verschelde 5 anos atrás
pai
commit
f989a43135
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      scene/animation/animation_player.cpp

+ 2 - 2
scene/animation/animation_player.cpp

@@ -950,13 +950,13 @@ void AnimationPlayer::_animation_process(float p_delta) {
 				play(queued.front()->get());
 				String new_name = playback.assigned;
 				queued.pop_front();
-				if (end_notify)
+				if (end_notify || playback.seeked)
 					emit_signal(SceneStringNames::get_singleton()->animation_changed, old, new_name);
 			} else {
 				//stop();
 				playing = false;
 				_set_process(false);
-				if (end_notify)
+				if (end_notify || playback.seeked)
 					emit_signal(SceneStringNames::get_singleton()->animation_finished, playback.assigned);
 			}
 			end_reached = false;