소스 검색

Ignore blend times for inexistent animations

(cherry picked from commit fdf1977e8fe3683338dea68ff985bd511b86998f)
Pedro J. Estébanez 5 년 전
부모
커밋
a235bab96c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      scene/animation/animation_player.cpp

+ 2 - 1
scene/animation/animation_player.cpp

@@ -1096,7 +1096,8 @@ void AnimationPlayer::get_animation_list(List<StringName> *p_animations) const {
 }
 
 void AnimationPlayer::set_blend_time(const StringName &p_animation1, const StringName &p_animation2, float p_time) {
-
+	ERR_FAIL_COND(!animation_set.has(p_animation1));
+	ERR_FAIL_COND(!animation_set.has(p_animation2));
 	ERR_FAIL_COND_MSG(p_time < 0, "Blend time cannot be smaller than 0.");
 
 	BlendKey bk;