From dbdcc8e96855ac519654752767afad869fa41528 Mon Sep 17 00:00:00 2001 From: huangjiamin Date: Tue, 3 Jan 2023 19:13:32 +0800 Subject: =?UTF-8?q?Fix=20for=20navmesh=20baking.=20Error=20message:=20Cond?= =?UTF-8?q?ition=20=E2=80=9C!shapes.has(p=5Fowner)=E2=80=9D=20is=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/navigation/navigation_mesh_generator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/navigation') diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 62db6ff4e9..0ae5bd42cc 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -207,11 +207,11 @@ void NavigationMeshGenerator::_parse_geometry(const Transform3D &p_navmesh_trans List shape_owners; static_body->get_shape_owners(&shape_owners); for (uint32_t shape_owner : shape_owners) { + if (static_body->is_shape_owner_disabled(shape_owner)) { + continue; + } const int shape_count = static_body->shape_owner_get_shape_count(shape_owner); for (int i = 0; i < shape_count; i++) { - if (static_body->is_shape_owner_disabled(i)) { - continue; - } Ref s = static_body->shape_owner_get_shape(shape_owner, i); if (s.is_null()) { continue; -- cgit v1.2.3