浏览代码

Merge pull request #57353 from KoBeWi/tween_stop()

Rémi Verschelde 3 年之前
父节点
当前提交
e3a644ee37
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scene/animation/tween.cpp

+ 1 - 2
scene/animation/tween.cpp

@@ -249,8 +249,6 @@ bool Tween::custom_step(float p_delta) {
 }
 
 bool Tween::step(float p_delta) {
-	ERR_FAIL_COND_V_MSG(tweeners.is_empty(), false, "Tween started, but has no Tweeners.");
-
 	if (dead) {
 		return false;
 	}
@@ -271,6 +269,7 @@ bool Tween::step(float p_delta) {
 	}
 
 	if (!started) {
+		ERR_FAIL_COND_V_MSG(tweeners.is_empty(), false, "Tween started, but has no Tweeners.");
 		current_step = 0;
 		loops_done = 0;
 		start_tweeners();