From 17bf6238fc3dca1b2ec6c1a0bbe11d5e7d7a8113 Mon Sep 17 00:00:00 2001 From: Silc Renew Date: Sat, 21 Jan 2023 14:51:03 +0900 Subject: Make AnimatedSprite's playback API consistent with AnimationPlayer --- scene/resources/sprite_frames.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scene/resources/sprite_frames.cpp') diff --git a/scene/resources/sprite_frames.cpp b/scene/resources/sprite_frames.cpp index c101974248..818be38681 100644 --- a/scene/resources/sprite_frames.cpp +++ b/scene/resources/sprite_frames.cpp @@ -36,7 +36,7 @@ void SpriteFrames::add_frame(const StringName &p_anim, const Ref &p_t HashMap::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - p_duration = MAX(0.0, p_duration); + p_duration = MAX(SPRITE_FRAME_MINIMUM_DURATION, p_duration); Frame frame = { p_texture, p_duration }; @@ -57,7 +57,7 @@ void SpriteFrames::set_frame(const StringName &p_anim, int p_idx, const Ref