浏览代码

Merge pull request #90670 from timothyqiu/scene-tree-return

[3.x] Fix SceneTree not respecting virtual process methods
lawnjelly 1 年之前
父节点
当前提交
5f7e65ef05
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      scene/main/scene_tree.cpp

+ 6 - 2
scene/main/scene_tree.cpp

@@ -579,7 +579,9 @@ bool SceneTree::iteration(float p_time) {
 
 	flush_transform_notifications();
 
-	MainLoop::iteration(p_time);
+	if (MainLoop::iteration(p_time)) {
+		_quit = true;
+	}
 	physics_process_time = p_time;
 
 	emit_signal("physics_frame");
@@ -620,7 +622,9 @@ bool SceneTree::idle(float p_time) {
 
 	root_lock++;
 
-	MainLoop::idle(p_time);
+	if (MainLoop::idle(p_time)) {
+		_quit = true;
+	}
 
 	idle_process_time = p_time;