diff options
| author | Juan Linietsky | 2018-06-08 13:42:04 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2018-06-08 13:42:45 -0300 |
| commit | 9cb17d7af8c9e49bc7baee2e70144490d6548b1d (patch) | |
| tree | 83e4db9779ed6a9893732f165f984ba430f04611 /scene | |
| parent | 3aed396a30d4cbcfb4a63c14b8416dad024808b2 (diff) | |
| download | godot-9cb17d7af8c9e49bc7baee2e70144490d6548b1d.tar.gz godot-9cb17d7af8c9e49bc7baee2e70144490d6548b1d.tar.zst godot-9cb17d7af8c9e49bc7baee2e70144490d6548b1d.zip | |
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/resources/animation.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 9c95cba35..fe4d687c2 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -32,6 +32,8 @@ #include "geometry.h" +#define ANIM_MIN_LENGTH 0.001 + bool Animation::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; @@ -2524,7 +2526,9 @@ StringName Animation::animation_track_get_key_animation(int p_track, int p_key) void Animation::set_length(float p_length) { - ERR_FAIL_COND(length < 0); + if (p_length < ANIM_MIN_LENGTH) { + p_length = ANIM_MIN_LENGTH; + } length = p_length; emit_changed(); } |
