From 1e5f9895e7699f55f08554b2c7b10c4251dba301 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 4 Sep 2023 21:43:06 +0200 Subject: [PATCH] Backported from godot4: Remove SceneTree debug avoidance hint Removes SceneTree debug avoidance hint. - smix8 https://github.com/godotengine/godot/commit/f1d8ddd9bd03ff4debb5345ca302652b5a7858bc --- doc/classes/SceneTree.xml | 11 ----------- main/main.cpp | 9 ++------- scene/main/scene_tree.cpp | 11 ----------- scene/main/scene_tree.h | 9 --------- 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 2c3b9becb..d2f1a8b1a 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -122,11 +122,6 @@ Returns [code]true[/code] if there is a [member network_peer] set. - - - - - @@ -176,12 +171,6 @@ Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated. - - - - - - diff --git a/main/main.cpp b/main/main.cpp index 248664a93..b39c3124f 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1947,9 +1947,10 @@ bool Main::start() { } if (debug_navigation) { sml->set_debug_navigation_hint(true); + NavigationServer::get_singleton()->set_debug_navigation_enabled(true); } if (debug_avoidance) { - sml->set_debug_avoidance_hint(true); + NavigationServer::get_singleton()->set_debug_avoidance_enabled(true); } if (debug_paths) { sml->set_debug_paths_hint(true); @@ -1957,12 +1958,6 @@ bool Main::start() { if (debug_navigation || debug_avoidance) { NavigationServer::get_singleton()->set_active(true); NavigationServer::get_singleton()->set_debug_enabled(true); - if (debug_navigation) { - NavigationServer::get_singleton()->set_debug_navigation_enabled(true); - } - if (debug_avoidance) { - NavigationServer::get_singleton()->set_debug_avoidance_enabled(true); - } } #endif diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 2dcded0bd..d3668c5a6 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -985,14 +985,6 @@ bool SceneTree::is_debugging_navigation_hint() const { return debug_navigation_hint; } -void SceneTree::set_debug_avoidance_hint(bool p_enabled) { - debug_avoidance_hint = p_enabled; -} - -bool SceneTree::is_debugging_avoidance_hint() const { - return debug_avoidance_hint; -} - void SceneTree::set_debug_paths_hint(bool p_enabled) { debug_paths_hint = p_enabled; } @@ -2193,8 +2185,6 @@ void SceneTree::_bind_methods() { ClassDB::bind_method(D_METHOD("is_debugging_collisions_hint"), &SceneTree::is_debugging_collisions_hint); ClassDB::bind_method(D_METHOD("set_debug_navigation_hint", "enable"), &SceneTree::set_debug_navigation_hint); ClassDB::bind_method(D_METHOD("is_debugging_navigation_hint"), &SceneTree::is_debugging_navigation_hint); - ClassDB::bind_method(D_METHOD("set_debug_avoidance_hint", "enable"), &SceneTree::set_debug_avoidance_hint); - ClassDB::bind_method(D_METHOD("is_debugging_avoidance_hint"), &SceneTree::is_debugging_avoidance_hint); ClassDB::bind_method(D_METHOD("set_debug_paths_hint", "enable"), &SceneTree::set_debug_paths_hint); ClassDB::bind_method(D_METHOD("is_debugging_paths_hint"), &SceneTree::is_debugging_paths_hint); @@ -2401,7 +2391,6 @@ SceneTree::SceneTree() { #ifdef DEBUG_ENABLED debug_collisions_hint = false; debug_navigation_hint = false; - debug_avoidance_hint = false; debug_paths_hint = false; #endif debug_collisions_color = GLOBAL_DEF("debug/shapes/collision/shape_color", Color(0.0, 0.6, 0.7, 0.42)); diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 30c2a4385..042dd41ec 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -118,7 +118,6 @@ private: #ifdef DEBUG_ENABLED bool debug_collisions_hint; bool debug_navigation_hint; - bool debug_avoidance_hint; bool debug_paths_hint; #endif bool pause; @@ -354,9 +353,6 @@ public: void set_debug_navigation_hint(bool p_enabled); bool is_debugging_navigation_hint() const; - void set_debug_avoidance_hint(bool p_enabled); - bool is_debugging_avoidance_hint() const; - void set_debug_paths_hint(bool p_enabled); bool is_debugging_paths_hint() const; #else @@ -370,11 +366,6 @@ public: return false; } - void set_debug_avoidance_hint(bool p_enabled) {} - bool is_debugging_avoidance_hint() const { - return false; - } - void set_debug_paths_hint(bool p_enabled) {} bool is_debugging_paths_hint() const { return false;