From 890d6f1b2887d08cf42b5f82ee191242fa734602 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 6 Jun 2023 09:36:19 +0200 Subject: [PATCH] Removed region_bake_navmesh from the NavigationServer. --- doc/classes/NavigationServer.xml | 8 -------- modules/navigation/pandemonium_navigation_server.cpp | 10 ---------- modules/navigation/pandemonium_navigation_server.h | 1 - modules/navigation_dummy/dummy_navigation_server.cpp | 2 -- modules/navigation_dummy/dummy_navigation_server.h | 1 - servers/navigation_server.cpp | 1 - servers/navigation_server.h | 3 --- 7 files changed, 26 deletions(-) diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml index 639119cca..432e1a7d2 100644 --- a/doc/classes/NavigationServer.xml +++ b/doc/classes/NavigationServer.xml @@ -292,14 +292,6 @@ [b]Note:[/b] This function is not thread safe. - - - - - - Bakes the navigation mesh. - - diff --git a/modules/navigation/pandemonium_navigation_server.cpp b/modules/navigation/pandemonium_navigation_server.cpp index cdd2be45b..6433382f4 100644 --- a/modules/navigation/pandemonium_navigation_server.cpp +++ b/modules/navigation/pandemonium_navigation_server.cpp @@ -413,16 +413,6 @@ COMMAND_2(region_set_navmesh, RID, p_region, Ref, p_nav_mesh) { region->set_mesh(p_nav_mesh); } -void PandemoniumNavigationServer::region_bake_navmesh(Ref r_mesh, Node *p_node) const { - ERR_FAIL_COND(r_mesh.is_null()); - ERR_FAIL_COND(p_node == nullptr); - -#ifndef _3D_DISABLED - //NavigationMeshGenerator::get_singleton()->clear(r_mesh); - //NavigationMeshGenerator::get_singleton()->bake(r_mesh, p_node); -#endif -} - int PandemoniumNavigationServer::region_get_connections_count(RID p_region) const { NavRegion *region = region_owner.getornull(p_region); ERR_FAIL_COND_V(!region, 0); diff --git a/modules/navigation/pandemonium_navigation_server.h b/modules/navigation/pandemonium_navigation_server.h index 43000e154..c436e1977 100644 --- a/modules/navigation/pandemonium_navigation_server.h +++ b/modules/navigation/pandemonium_navigation_server.h @@ -127,7 +127,6 @@ public: virtual uint32_t region_get_navigation_layers(RID p_region) const; COMMAND_2(region_set_transform, RID, p_region, Transform, p_transform); COMMAND_2(region_set_navmesh, RID, p_region, Ref, p_nav_mesh); - virtual void region_bake_navmesh(Ref r_mesh, Node *p_node) const; virtual int region_get_connections_count(RID p_region) const; virtual Vector3 region_get_connection_pathway_start(RID p_region, int p_connection_id) const; diff --git a/modules/navigation_dummy/dummy_navigation_server.cpp b/modules/navigation_dummy/dummy_navigation_server.cpp index c82532d3a..c0934aa43 100644 --- a/modules/navigation_dummy/dummy_navigation_server.cpp +++ b/modules/navigation_dummy/dummy_navigation_server.cpp @@ -5,8 +5,6 @@ void DummyNavigationServer::region_set_navmesh(RID p_region, Ref p_nav_mesh) const { } -void DummyNavigationServer::region_bake_navmesh(Ref r_mesh, Node *p_node) const { -} DummyNavigationServer::DummyNavigationServer() { } diff --git a/modules/navigation_dummy/dummy_navigation_server.h b/modules/navigation_dummy/dummy_navigation_server.h index 3d4823fe2..d1667bc3b 100644 --- a/modules/navigation_dummy/dummy_navigation_server.h +++ b/modules/navigation_dummy/dummy_navigation_server.h @@ -42,7 +42,6 @@ public: virtual uint32_t region_get_navigation_layers(RID p_region) const { return 0; } virtual void region_set_transform(RID p_region, Transform p_transform) const {} virtual void region_set_navmesh(RID p_region, Ref p_nav_mesh) const; - virtual void region_bake_navmesh(Ref r_mesh, Node *p_node) const; virtual int region_get_connections_count(RID p_region) const { return 0; } virtual Vector3 region_get_connection_pathway_start(RID p_region, int p_connection_id) const { return Vector3(); } virtual Vector3 region_get_connection_pathway_end(RID p_region, int p_connection_id) const { return Vector3(); } diff --git a/servers/navigation_server.cpp b/servers/navigation_server.cpp index f2448d68b..4884af6d2 100644 --- a/servers/navigation_server.cpp +++ b/servers/navigation_server.cpp @@ -82,7 +82,6 @@ void NavigationServer::_bind_methods() { ClassDB::bind_method(D_METHOD("region_set_transform", "region", "transform"), &NavigationServer::region_set_transform); ClassDB::bind_method(D_METHOD("region_set_navmesh", "region", "nav_mesh"), &NavigationServer::region_set_navmesh); - ClassDB::bind_method(D_METHOD("region_bake_navmesh", "mesh", "node"), &NavigationServer::region_bake_navmesh); ClassDB::bind_method(D_METHOD("region_get_connections_count", "region"), &NavigationServer::region_get_connections_count); ClassDB::bind_method(D_METHOD("region_get_connection_pathway_start", "region", "connection"), &NavigationServer::region_get_connection_pathway_start); diff --git a/servers/navigation_server.h b/servers/navigation_server.h index 9c1e8becf..551a41453 100644 --- a/servers/navigation_server.h +++ b/servers/navigation_server.h @@ -134,9 +134,6 @@ public: /// Set the navigation mesh of this region. virtual void region_set_navmesh(RID p_region, Ref p_nav_mesh) const = 0; - /// Bake the navigation mesh. - virtual void region_bake_navmesh(Ref r_mesh, Node *p_node) const = 0; - /// Get a list of a region's connection to other regions. virtual int region_get_connections_count(RID p_region) const = 0; virtual Vector3 region_get_connection_pathway_start(RID p_region, int p_connection_id) const = 0;