You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
[Navigation] Add some missing compile checks
This commit is contained in:
@@ -1131,7 +1131,11 @@ void GodotNavigationServer::bake_from_source_geometry_data_async(const Ref<Navig
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GodotNavigationServer::is_baking_navigation_mesh(Ref<NavigationMesh> p_navigation_mesh) const {
|
bool GodotNavigationServer::is_baking_navigation_mesh(Ref<NavigationMesh> p_navigation_mesh) const {
|
||||||
|
#ifdef _3D_DISABLED
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
return NavMeshGenerator3D::get_singleton()->is_baking(p_navigation_mesh);
|
return NavMeshGenerator3D::get_singleton()->is_baking(p_navigation_mesh);
|
||||||
|
#endif // _3D_DISABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
COMMAND_1(free, RID, p_object) {
|
COMMAND_1(free, RID, p_object) {
|
||||||
|
|||||||
@@ -222,7 +222,11 @@ void GodotNavigationServer2D::bake_from_source_geometry_data_async(const Ref<Nav
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GodotNavigationServer2D::is_baking_navigation_polygon(Ref<NavigationPolygon> p_navigation_polygon) const {
|
bool GodotNavigationServer2D::is_baking_navigation_polygon(Ref<NavigationPolygon> p_navigation_polygon) const {
|
||||||
|
#ifdef CLIPPER2_ENABLED
|
||||||
return NavMeshGenerator2D::get_singleton()->is_baking(p_navigation_polygon);
|
return NavMeshGenerator2D::get_singleton()->is_baking(p_navigation_polygon);
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
GodotNavigationServer2D::GodotNavigationServer2D() {}
|
GodotNavigationServer2D::GodotNavigationServer2D() {}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CLIPPER2_ENABLED
|
||||||
|
|
||||||
#include "nav_mesh_generator_2d.h"
|
#include "nav_mesh_generator_2d.h"
|
||||||
|
|
||||||
#include "core/config/project_settings.h"
|
#include "core/config/project_settings.h"
|
||||||
@@ -902,3 +904,5 @@ void NavMeshGenerator2D::generator_bake_from_source_geometry_data(Ref<Navigation
|
|||||||
p_navigation_mesh->add_polygon(new_polygons[i]);
|
p_navigation_mesh->add_polygon(new_polygons[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // CLIPPER2_ENABLED
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
#ifndef NAV_MESH_GENERATOR_2D_H
|
#ifndef NAV_MESH_GENERATOR_2D_H
|
||||||
#define NAV_MESH_GENERATOR_2D_H
|
#define NAV_MESH_GENERATOR_2D_H
|
||||||
|
|
||||||
|
#ifdef CLIPPER2_ENABLED
|
||||||
|
|
||||||
#include "core/object/class_db.h"
|
#include "core/object/class_db.h"
|
||||||
#include "core/object/worker_thread_pool.h"
|
#include "core/object/worker_thread_pool.h"
|
||||||
|
|
||||||
@@ -98,4 +100,6 @@ public:
|
|||||||
~NavMeshGenerator2D();
|
~NavMeshGenerator2D();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // CLIPPER2_ENABLED
|
||||||
|
|
||||||
#endif // NAV_MESH_GENERATOR_2D_H
|
#endif // NAV_MESH_GENERATOR_2D_H
|
||||||
|
|||||||
Reference in New Issue
Block a user