diff options
author | lupoDharkael <izhe@hotmail.es> | 2020-03-08 17:33:34 +0100 |
---|---|---|
committer | lupoDharkael <izhe@hotmail.es> | 2020-03-08 17:33:34 +0100 |
commit | d63bf6dea5b94d7f74b8ea22c4a182d205b1d93f (patch) | |
tree | 2cfccca1ffc05e8e15984826805e04c92a71b9eb /scene | |
parent | 7579a792bed9881a6afd73c058dfd57441fb5c7a (diff) |
Complete NavigationMeshInstance rename
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/navigation_region.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/3d/navigation_region.cpp b/scene/3d/navigation_region.cpp index d96d095797..53b707a29a 100644 --- a/scene/3d/navigation_region.cpp +++ b/scene/3d/navigation_region.cpp @@ -162,22 +162,22 @@ Ref<NavigationMesh> NavigationRegion::get_navigation_mesh() const { } struct BakeThreadsArgs { - NavigationRegion *nav_mesh_instance; + NavigationRegion *nav_region; }; void _bake_navigation_mesh(void *p_user_data) { BakeThreadsArgs *args = static_cast<BakeThreadsArgs *>(p_user_data); - if (args->nav_mesh_instance->get_navigation_mesh().is_valid()) { - Ref<NavigationMesh> nav_mesh = args->nav_mesh_instance->get_navigation_mesh()->duplicate(); + if (args->nav_region->get_navigation_mesh().is_valid()) { + Ref<NavigationMesh> nav_mesh = args->nav_region->get_navigation_mesh()->duplicate(); - NavigationServer::get_singleton()->region_bake_navmesh(nav_mesh, args->nav_mesh_instance); - args->nav_mesh_instance->call_deferred("_bake_finished", nav_mesh); + NavigationServer::get_singleton()->region_bake_navmesh(nav_mesh, args->nav_region); + args->nav_region->call_deferred("_bake_finished", nav_mesh); memdelete(args); } else { ERR_PRINT("Can't bake the navigation mesh if the `NavigationMesh` resource doesn't exist"); - args->nav_mesh_instance->call_deferred("_bake_finished", Ref<NavigationMesh>()); + args->nav_region->call_deferred("_bake_finished", Ref<NavigationMesh>()); memdelete(args); } } @@ -186,7 +186,7 @@ void NavigationRegion::bake_navigation_mesh() { ERR_FAIL_COND(bake_thread != NULL); BakeThreadsArgs *args = memnew(BakeThreadsArgs); - args->nav_mesh_instance = this; + args->nav_region = this; bake_thread = Thread::create(_bake_navigation_mesh, args); ERR_FAIL_COND(bake_thread == NULL); |