diff options
Diffstat (limited to 'modules/gdnavigation/nav_region.cpp')
-rw-r--r-- | modules/gdnavigation/nav_region.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/gdnavigation/nav_region.cpp b/modules/gdnavigation/nav_region.cpp index b91376f761..51fba67cc3 100644 --- a/modules/gdnavigation/nav_region.cpp +++ b/modules/gdnavigation/nav_region.cpp @@ -36,11 +36,6 @@ @author AndreaCatania */ -NavRegion::NavRegion() : - map(nullptr), - polygons_dirty(true) { -} - void NavRegion::set_map(NavMap *p_map) { map = p_map; polygons_dirty = true; @@ -75,13 +70,15 @@ void NavRegion::update_polygons() { return; } - if (mesh.is_null()) + if (mesh.is_null()) { return; + } Vector<Vector3> vertices = mesh->get_vertices(); int len = vertices.size(); - if (len == 0) + if (len == 0) { return; + } const Vector3 *vertices_r = vertices.ptr(); @@ -89,7 +86,6 @@ void NavRegion::update_polygons() { // Build for (size_t i(0); i < polygons.size(); i++) { - gd::Polygon &p = polygons[i]; p.owner = this; @@ -103,7 +99,6 @@ void NavRegion::update_polygons() { float sum(0); for (int j(0); j < mesh_poly.size(); j++) { - int idx = indices[j]; if (idx < 0 || idx >= len) { valid = false; |