Check for interesection when localizing.

Apparently it is possible to place an objective exactly on the boundary
of a navpoly.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1140
This commit is contained in:
Dan Albert 2021-05-28 17:26:46 -07:00
parent 5b271df66f
commit d0bde7b016

View File

@ -103,7 +103,7 @@ class NavMesh:
# currently.
p = ShapelyPoint(point.x, point.y)
for navpoly in self.polys:
if navpoly.poly.contains(p):
if navpoly.poly.intersects(p):
return navpoly
return None