From 2a52307936f11aede9c8968f8c02c8e8f9ee29e1 Mon Sep 17 00:00:00 2001 From: Ninni Pipping Date: Thu, 23 Mar 2023 14:31:46 +0100 Subject: Fix `AnimatedSprite2D` autoplay warning Changing of autoplay when changing `SpriteFrames` is not done by the user and warning is unhelpful (cherry picked from commit 4d4342e018367499c6b6709e6dc3ca60c4f3dd7a) --- scene/2d/animated_sprite_2d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/2d') diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index 8f7006caca..7de6219b10 100644 --- a/scene/2d/animated_sprite_2d.cpp +++ b/scene/2d/animated_sprite_2d.cpp @@ -301,13 +301,13 @@ void AnimatedSprite2D::set_sprite_frames(const Ref &p_frames) { frames->get_animation_list(&al); if (al.size() == 0) { set_animation(StringName()); - set_autoplay(String()); + autoplay = String(); } else { if (!frames->has_animation(animation)) { set_animation(al[0]); } if (!frames->has_animation(autoplay)) { - set_autoplay(String()); + autoplay = String(); } } } -- cgit v1.2.3