Backported from godot4: Remove SceneTree debug avoidance hint

Removes SceneTree debug avoidance hint.
- smix8
f1d8ddd9bd
This commit is contained in:
Relintai 2023-09-04 21:43:06 +02:00
parent 7b52f0200e
commit 1e5f9895e7
4 changed files with 2 additions and 38 deletions

View File

@ -122,11 +122,6 @@
Returns [code]true[/code] if there is a [member network_peer] set.
</description>
</method>
<method name="is_debugging_avoidance_hint" qualifiers="const">
<return type="bool" />
<description>
</description>
</method>
<method name="is_input_handled">
<return type="bool" />
<description>
@ -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.
</description>
</method>
<method name="set_debug_avoidance_hint">
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
</description>
</method>
<method name="set_group">
<return type="void" />
<argument index="0" name="group" type="StringName" />

View File

@ -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

View File

@ -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));

View File

@ -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;