Merge pull request #40063 from RandomShaper/clean_blend_times

Ignore (clean) blend times for non-existent animations
This commit is contained in:
Rémi Verschelde 2020-07-03 07:51:22 +02:00 committed by GitHub
commit 810aefb3ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;