diff options
Diffstat (limited to 'scene/resources/2d/polygon_path_finder.cpp')
-rw-r--r-- | scene/resources/2d/polygon_path_finder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/resources/2d/polygon_path_finder.cpp b/scene/resources/2d/polygon_path_finder.cpp index 617a53f0a3..3aa292431d 100644 --- a/scene/resources/2d/polygon_path_finder.cpp +++ b/scene/resources/2d/polygon_path_finder.cpp @@ -64,8 +64,7 @@ void PolygonPathFinder::setup(const Vector<Vector2> &p_points, const Vector<int> points.write[i].pos = p_points[i]; points.write[i].penalty = 0; - outside_point.x = i == 0 ? p_points[0].x : (MAX(p_points[i].x, outside_point.x)); - outside_point.y = i == 0 ? p_points[0].y : (MAX(p_points[i].y, outside_point.y)); + outside_point = i == 0 ? p_points[0] : p_points[i].max(outside_point); if (i == 0) { bounds.position = points[i].pos; |