Explorar o código

Fix missing return on Navigation2D::get_closest_point_owner

Marcelo Fernandez %!s(int64=7) %!d(string=hai) anos
pai
achega
b9023715e2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scene/2d/navigation2d.cpp

+ 1 - 1
scene/2d/navigation2d.cpp

@@ -671,7 +671,7 @@ Object *Navigation2D::get_closest_point_owner(const Vector2 &p_point) {
 
 				if (Geometry::is_point_in_triangle(p_point, _get_vertex(p.edges[0].point), _get_vertex(p.edges[i - 1].point), _get_vertex(p.edges[i].point))) {
 
-					E->get().owner;
+					return E->get().owner;
 				}
 			}
 		}