mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #105718 from aaronfranke/nav-const-caps
Capitalize global navigation constants
This commit is contained in:
@@ -301,7 +301,7 @@ PackedStringArray NavigationRegion2D::get_configuration_warnings() const {
|
||||
|
||||
if (is_visible_in_tree() && is_inside_tree()) {
|
||||
if (navigation_polygon.is_null()) {
|
||||
warnings.push_back(RTR("A NavigationMesh resource must be set or created for this node to work. Please set a property or draw a polygon."));
|
||||
warnings.push_back(RTR("A NavigationPolygon resource must be set or created for this node to work. Please set a property or draw a polygon."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1251,7 +1251,7 @@ void TileMapLayer::_navigation_update(bool p_force_cleanup) {
|
||||
// Create a dedicated map for each layer.
|
||||
RID new_layer_map = ns->map_create();
|
||||
// Set the default NavigationPolygon cell_size on the new map as a mismatch causes an error.
|
||||
ns->map_set_cell_size(new_layer_map, NavigationDefaults2D::navmesh_cell_size);
|
||||
ns->map_set_cell_size(new_layer_map, NavigationDefaults2D::NAV_MESH_CELL_SIZE);
|
||||
ns->map_set_active(new_layer_map, true);
|
||||
navigation_map_override = new_layer_map;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ void NavigationPolygon::make_polygons_from_outlines() {
|
||||
|
||||
TPPLPartition tpart;
|
||||
if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
|
||||
ERR_PRINT("NavigationPolygon: Convex partition failed! Failed to convert outlines to a valid NavigationMesh."
|
||||
ERR_PRINT("NavigationPolygon: Convex partition failed! Failed to convert outlines to a valid NavigationPolygon."
|
||||
"\nNavigationPolygon outlines can not overlap vertices or edges inside same outline or with other outlines or have any intersections."
|
||||
"\nAdd the outmost and largest outline first. To add holes inside this outline add the smaller outlines with same winding order.");
|
||||
return;
|
||||
|
||||
@@ -50,7 +50,7 @@ class NavigationPolygon : public Resource {
|
||||
// Navigation mesh
|
||||
Ref<NavigationMesh> navigation_mesh;
|
||||
|
||||
real_t cell_size = NavigationDefaults2D::navmesh_cell_size;
|
||||
real_t cell_size = NavigationDefaults2D::NAV_MESH_CELL_SIZE;
|
||||
real_t border_size = 0.0f;
|
||||
|
||||
Rect2 baking_rect;
|
||||
|
||||
@@ -77,8 +77,8 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
float cell_size = NavigationDefaults3D::navmesh_cell_size;
|
||||
float cell_height = NavigationDefaults3D::navmesh_cell_height;
|
||||
float cell_size = NavigationDefaults3D::NAV_MESH_CELL_SIZE;
|
||||
float cell_height = NavigationDefaults3D::NAV_MESH_CELL_HEIGHT;
|
||||
float border_size = 0.0f;
|
||||
float agent_height = 1.5f;
|
||||
float agent_radius = 0.5f;
|
||||
|
||||
Reference in New Issue
Block a user