mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05:00
Merge pull request #101728 from smix8/obstacle_exit
Fix NavigationObstacle3D debug clear regression
This commit is contained in:
commit
4fb4f05b48
2 changed files with 13 additions and 1 deletions
|
@ -116,7 +116,7 @@ void NavigationObstacle3D::_notification(int p_what) {
|
|||
set_physics_process_internal(false);
|
||||
_update_map(RID());
|
||||
#ifdef DEBUG_ENABLED
|
||||
_update_debug();
|
||||
_clear_debug();
|
||||
#endif // DEBUG_ENABLED
|
||||
} break;
|
||||
|
||||
|
@ -710,3 +710,14 @@ void NavigationObstacle3D::_update_static_obstacle_debug() {
|
|||
}
|
||||
}
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
void NavigationObstacle3D::_clear_debug() {
|
||||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
ERR_FAIL_NULL(rs);
|
||||
rs->mesh_clear(fake_agent_radius_debug_mesh_rid);
|
||||
rs->mesh_clear(static_obstacle_debug_mesh_rid);
|
||||
rs->instance_set_scenario(fake_agent_radius_debug_instance_rid, RID());
|
||||
rs->instance_set_scenario(static_obstacle_debug_instance_rid, RID());
|
||||
}
|
||||
#endif // DEBUG_ENABLED
|
||||
|
|
|
@ -74,6 +74,7 @@ private:
|
|||
void _update_debug();
|
||||
void _update_fake_agent_radius_debug();
|
||||
void _update_static_obstacle_debug();
|
||||
void _clear_debug();
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue