summaryrefslogtreecommitdiff
path: root/core/math/bsp_tree.cpp
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-07-01 12:59:42 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-07-01 12:59:42 +0200
commit3c154eb93b3a098354bf6d18a9428826ec193f90 (patch)
treed9c8c44f13883ceadaefc95953f9cb077137b7c8 /core/math/bsp_tree.cpp
parenteaaff9da3178fa515a0f051fda932c1dd04d53db (diff)
Remove unnecessary code and add some error explanations
Diffstat (limited to 'core/math/bsp_tree.cpp')
-rw-r--r--core/math/bsp_tree.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp
index d7e6e82cd9..a12f9fee2e 100644
--- a/core/math/bsp_tree.cpp
+++ b/core/math/bsp_tree.cpp
@@ -142,7 +142,7 @@ int BSP_Tree::_get_points_inside(int p_node, const Vector3 *p_points, int *p_ind
}
return _get_points_inside(node->over, p_points, p_indices, p_center, p_half_extents, p_indices_count);
- } else if (dist_min <= 0) { //all points behind plane
+ } else { //all points behind plane
if (node->under == UNDER_LEAF) {
@@ -150,8 +150,6 @@ int BSP_Tree::_get_points_inside(int p_node, const Vector3 *p_points, int *p_ind
}
return _get_points_inside(node->under, p_points, p_indices, p_center, p_half_extents, p_indices_count);
}
-
- return 0;
}
int BSP_Tree::get_points_inside(const Vector3 *p_points, int p_point_count) const {
@@ -271,8 +269,6 @@ bool BSP_Tree::point_is_inside(const Vector3 &p_point) const {
ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, false);
#endif
}
-
- return false;
}
static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_indices, real_t p_tolerance) {