1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Add agent and map tests for 'NavigationServer3D'

This commits fixes a bug in `free()` function as well.
This commit is contained in:
Pawel Lampe
2023-06-19 23:41:24 +02:00
parent 7b170d12cf
commit e1bdde911c
2 changed files with 107 additions and 2 deletions

View File

@@ -997,8 +997,10 @@ COMMAND_1(free, RID, p_object) {
}
int map_index = active_maps.find(map);
active_maps.remove_at(map_index);
active_maps_update_id.remove_at(map_index);
if (map_index >= 0) {
active_maps.remove_at(map_index);
active_maps_update_id.remove_at(map_index);
}
map_owner.free(p_object);
} else if (region_owner.owns(p_object)) {