You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix GridMap free navigation RID error spam
Fixes GridMap free navigation RID error spam.
This commit is contained in:
@@ -557,10 +557,14 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//erase navigation
|
//erase navigation
|
||||||
for (const KeyValue<IndexKey, Octant::NavigationCell> &E : g.navigation_cell_ids) {
|
for (KeyValue<IndexKey, Octant::NavigationCell> &E : g.navigation_cell_ids) {
|
||||||
|
if (E.value.region.is_valid()) {
|
||||||
NavigationServer3D::get_singleton()->free(E.value.region);
|
NavigationServer3D::get_singleton()->free(E.value.region);
|
||||||
|
E.value.region = RID();
|
||||||
|
}
|
||||||
if (E.value.navigation_mesh_debug_instance.is_valid()) {
|
if (E.value.navigation_mesh_debug_instance.is_valid()) {
|
||||||
RS::get_singleton()->free(E.value.navigation_mesh_debug_instance);
|
RS::get_singleton()->free(E.value.navigation_mesh_debug_instance);
|
||||||
|
E.value.navigation_mesh_debug_instance = RID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.navigation_cell_ids.clear();
|
g.navigation_cell_ids.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user