瀏覽代碼

Fix animation not stopping after seeking to the end

Pedro J. Estébanez 8 年之前
父節點
當前提交
2d2467c0ff
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      scene/animation/animation_player.cpp

+ 2 - 2
scene/animation/animation_player.cpp

@@ -529,12 +529,12 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, float p_delta, f
 
 		if (&cd == &playback.current) {
 
-			if (!backwards && cd.pos < len && next_pos == len /*&& playback.blend.empty()*/) {
+			if (!backwards && cd.pos <= len && next_pos == len /*&& playback.blend.empty()*/) {
 				//playback finished
 				end_notify = true;
 			}
 
-			if (backwards && cd.pos > 0 && next_pos == 0 /*&& playback.blend.empty()*/) {
+			if (backwards && cd.pos >= 0 && next_pos == 0 /*&& playback.blend.empty()*/) {
 				//playback finished
 				end_notify = true;
 			}