[3.5+] Fix GridMap free navigation RID error spam
Fixes GridMap free navigation RID error spam.
This commit is contained in:
parent
26a584179c
commit
befdafdbf6
1 changed files with 4 additions and 1 deletions
|
@ -473,7 +473,10 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
||||||
|
|
||||||
//erase navigation
|
//erase navigation
|
||||||
for (Map<IndexKey, Octant::NavMesh>::Element *E = g.navmesh_ids.front(); E; E = E->next()) {
|
for (Map<IndexKey, Octant::NavMesh>::Element *E = g.navmesh_ids.front(); E; E = E->next()) {
|
||||||
|
if (E->get().region.is_valid()) {
|
||||||
NavigationServer::get_singleton()->free(E->get().region);
|
NavigationServer::get_singleton()->free(E->get().region);
|
||||||
|
E->get().region = RID();
|
||||||
|
}
|
||||||
if (E->get().navmesh_debug_instance.is_valid()) {
|
if (E->get().navmesh_debug_instance.is_valid()) {
|
||||||
VS::get_singleton()->free(E->get().navmesh_debug_instance);
|
VS::get_singleton()->free(E->get().navmesh_debug_instance);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue