Merge pull request #88164 from smix8/fix_region_signals
Fix NavigationRegion errors from signal changes
This commit is contained in:
commit
effb35dfa7
4 changed files with 23 additions and 6 deletions
|
@ -275,6 +275,14 @@ void NavigationRegion2D::_navigation_map_changed(RID p_map) {
|
||||||
}
|
}
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED
|
||||||
|
void NavigationRegion2D::_navigation_debug_changed() {
|
||||||
|
if (is_inside_tree()) {
|
||||||
|
queue_redraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // DEBUG_ENABLED
|
||||||
|
|
||||||
Array NavigationRegion2D::get_configuration_warnings() const {
|
Array NavigationRegion2D::get_configuration_warnings() const {
|
||||||
Array warnings = Node2D::get_configuration_warnings();
|
Array warnings = Node2D::get_configuration_warnings();
|
||||||
|
|
||||||
|
@ -374,7 +382,7 @@ NavigationRegion2D::NavigationRegion2D() {
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
NavigationServer2D::get_singleton()->connect(SNAME("map_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed));
|
NavigationServer2D::get_singleton()->connect(SNAME("map_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed));
|
||||||
NavigationServer2D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed));
|
NavigationServer2D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_debug_changed));
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +399,7 @@ NavigationRegion2D::~NavigationRegion2D() {
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
NavigationServer2D::get_singleton()->disconnect(SNAME("map_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed));
|
NavigationServer2D::get_singleton()->disconnect(SNAME("map_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed));
|
||||||
NavigationServer2D::get_singleton()->disconnect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed));
|
NavigationServer2D::get_singleton()->disconnect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_debug_changed));
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ private:
|
||||||
void _update_debug_mesh();
|
void _update_debug_mesh();
|
||||||
void _update_debug_edge_connections_mesh();
|
void _update_debug_edge_connections_mesh();
|
||||||
void _navigation_map_changed(RID p_map);
|
void _navigation_map_changed(RID p_map);
|
||||||
|
void _navigation_debug_changed();
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -361,6 +361,15 @@ void NavigationRegion3D::_navigation_map_changed(RID p_map) {
|
||||||
}
|
}
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED
|
||||||
|
void NavigationRegion3D::_navigation_debug_changed() {
|
||||||
|
if (is_inside_tree()) {
|
||||||
|
_update_debug_mesh();
|
||||||
|
_update_debug_edge_connections_mesh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // DEBUG_ENABLED
|
||||||
|
|
||||||
void NavigationRegion3D::_region_enter_navigation_map() {
|
void NavigationRegion3D::_region_enter_navigation_map() {
|
||||||
if (!is_inside_tree()) {
|
if (!is_inside_tree()) {
|
||||||
return;
|
return;
|
||||||
|
@ -426,8 +435,7 @@ NavigationRegion3D::NavigationRegion3D() {
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
NavigationServer3D::get_singleton()->connect(SNAME("map_changed"), callable_mp(this, &NavigationRegion3D::_navigation_map_changed));
|
NavigationServer3D::get_singleton()->connect(SNAME("map_changed"), callable_mp(this, &NavigationRegion3D::_navigation_map_changed));
|
||||||
NavigationServer3D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_update_debug_mesh));
|
NavigationServer3D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_navigation_debug_changed));
|
||||||
NavigationServer3D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_update_debug_edge_connections_mesh));
|
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,8 +448,7 @@ NavigationRegion3D::~NavigationRegion3D() {
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
NavigationServer3D::get_singleton()->disconnect(SNAME("map_changed"), callable_mp(this, &NavigationRegion3D::_navigation_map_changed));
|
NavigationServer3D::get_singleton()->disconnect(SNAME("map_changed"), callable_mp(this, &NavigationRegion3D::_navigation_map_changed));
|
||||||
NavigationServer3D::get_singleton()->disconnect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_update_debug_mesh));
|
NavigationServer3D::get_singleton()->disconnect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_navigation_debug_changed));
|
||||||
NavigationServer3D::get_singleton()->disconnect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_update_debug_edge_connections_mesh));
|
|
||||||
|
|
||||||
ERR_FAIL_NULL(RenderingServer::get_singleton());
|
ERR_FAIL_NULL(RenderingServer::get_singleton());
|
||||||
if (debug_instance.is_valid()) {
|
if (debug_instance.is_valid()) {
|
||||||
|
|
|
@ -61,6 +61,7 @@ private:
|
||||||
void _update_debug_mesh();
|
void _update_debug_mesh();
|
||||||
void _update_debug_edge_connections_mesh();
|
void _update_debug_edge_connections_mesh();
|
||||||
void _navigation_map_changed(RID p_map);
|
void _navigation_map_changed(RID p_map);
|
||||||
|
void _navigation_debug_changed();
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Add table
Reference in a new issue