Bladeren bron

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)
Ninni Pipping 2 jaren geleden
bovenliggende
commit
2a52307936
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      scene/2d/animated_sprite_2d.cpp

+ 2 - 2
scene/2d/animated_sprite_2d.cpp

@@ -301,13 +301,13 @@ void AnimatedSprite2D::set_sprite_frames(const Ref<SpriteFrames> &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();
 			}
 		}
 	}