summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-07-03 07:51:22 +0200
committerGitHub <noreply@github.com>2020-07-03 07:51:22 +0200
commit810aefb3ede8ee71ab09017c0919db6fe25ba31c (patch)
tree1a79ca9f38ab882456a8b61acc3953c0f0ba910b
parenteeb61ec8964f841ffa35855386dc3cbfbaea3eb0 (diff)
parentfdf1977e8fe3683338dea68ff985bd511b86998f (diff)
Merge pull request #40063 from RandomShaper/clean_blend_times
Ignore (clean) blend times for non-existent animations
-rw-r--r--scene/animation/animation_player.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 2f39c973a0..66c587e2d4 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1055,6 +1055,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;