Add detail to NavigationPolygon outline error msg

Adds additional information to the error msg when the convex partition fails due to invalid outline arrays.

(cherry picked from commit f30ebacbe8)
This commit is contained in:
smix8 2022-11-10 20:47:35 +01:00 committed by Haoyu Qiu
parent 9e6f9a451e
commit 2ead966f87

View file

@ -295,7 +295,9 @@ void NavigationPolygon::make_polygons_from_outlines() {
TriangulatorPartition tpart;
if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
ERR_PRINT("NavigationPolygon: Convex partition failed!");
ERR_PRINT("NavigationPolygon: Convex partition failed! Failed to convert outlines to a valid NavigationMesh."
"\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 opposite winding order.");
return;
}