瀏覽代碼

Make activating on ready in AnimationPlayer respect the property value

Silc Lizard (Tokage) Renew 1 年之前
父節點
當前提交
470c2f24e9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/animation/animation_player.cpp

+ 1 - 1
scene/animation/animation_player.cpp

@@ -149,7 +149,7 @@ void AnimationPlayer::_notification(int p_what) {
 	switch (p_what) {
 	switch (p_what) {
 		case NOTIFICATION_READY: {
 		case NOTIFICATION_READY: {
 			if (!Engine::get_singleton()->is_editor_hint() && animation_set.has(autoplay)) {
 			if (!Engine::get_singleton()->is_editor_hint() && animation_set.has(autoplay)) {
-				set_active(true);
+				set_active(active);
 				play(autoplay);
 				play(autoplay);
 				_check_immediately_after_start();
 				_check_immediately_after_start();
 			}
 			}