From d0bde7b016e93a871d09f0045bab45558d4e5aac Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 28 May 2021 17:26:46 -0700 Subject: [PATCH] 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 --- game/navmesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/navmesh.py b/game/navmesh.py index 193dd31e..e18052d0 100644 --- a/game/navmesh.py +++ b/game/navmesh.py @@ -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