소스 검색

Fix AnimationPlayer bug where it wouldn't reset its position when finished

Luiz 6 년 전
부모
커밋
5ec4f14a24
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/animation/animation_player.cpp

+ 1 - 0
scene/animation/animation_player.cpp

@@ -938,6 +938,7 @@ void AnimationPlayer::_animation_process(float p_delta) {
 			} else {
 				//stop();
 				playing = false;
+				playback.current.pos = 0;
 				_set_process(false);
 				if (end_notify)
 					emit_signal(SceneStringNames::get_singleton()->animation_finished, playback.assigned);