Skip to content

Commit f15ced3

Browse files
committed
Merge pull request #88679 from AThousandShips/nav_fix
[Navigation] Add some missing compile checks
2 parents 8e1fa57 + 12cecf7 commit f15ced3

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

modules/navigation/godot_navigation_server.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,11 @@ void GodotNavigationServer::bake_from_source_geometry_data_async(const Ref<Navig
11311131
}
11321132

11331133
bool GodotNavigationServer::is_baking_navigation_mesh(Ref<NavigationMesh> p_navigation_mesh) const {
1134+
#ifdef _3D_DISABLED
1135+
return false;
1136+
#else
11341137
return NavMeshGenerator3D::get_singleton()->is_baking(p_navigation_mesh);
1138+
#endif // _3D_DISABLED
11351139
}
11361140

11371141
COMMAND_1(free, RID, p_object) {

modules/navigation/godot_navigation_server_2d.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void GodotNavigationServer2D::bake_from_source_geometry_data_async(const Ref<Nav
222222
}
223223

224224
bool GodotNavigationServer2D::is_baking_navigation_polygon(Ref<NavigationPolygon> p_navigation_polygon) const {
225+
#ifdef CLIPPER2_ENABLED
225226
return NavMeshGenerator2D::get_singleton()->is_baking(p_navigation_polygon);
227+
#else
228+
return false;
229+
#endif
226230
}
227231

228232
GodotNavigationServer2D::GodotNavigationServer2D() {}

modules/navigation/nav_mesh_generator_2d.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31+
#ifdef CLIPPER2_ENABLED
32+
3133
#include "nav_mesh_generator_2d.h"
3234

3335
#include "core/config/project_settings.h"
@@ -902,3 +904,5 @@ void NavMeshGenerator2D::generator_bake_from_source_geometry_data(Ref<Navigation
902904
p_navigation_mesh->add_polygon(new_polygons[i]);
903905
}
904906
}
907+
908+
#endif // CLIPPER2_ENABLED

modules/navigation/nav_mesh_generator_2d.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#ifndef NAV_MESH_GENERATOR_2D_H
3232
#define NAV_MESH_GENERATOR_2D_H
3333

34+
#ifdef CLIPPER2_ENABLED
35+
3436
#include "core/object/class_db.h"
3537
#include "core/object/worker_thread_pool.h"
3638

@@ -98,4 +100,6 @@ class NavMeshGenerator2D : public Object {
98100
~NavMeshGenerator2D();
99101
};
100102

103+
#endif // CLIPPER2_ENABLED
104+
101105
#endif // NAV_MESH_GENERATOR_2D_H

0 commit comments

Comments
 (0)