From b482dbb031621d1cfb609ae6387dd122f7801781 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 15 Oct 2022 17:19:46 -0700 Subject: [PATCH] Stop using shapely's almost_equals. The docs say it was deprecated in favor of equals_exact with an explicit tolerance. --- game/navmesh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/navmesh.py b/game/navmesh.py index 3c109411..e2b18f03 100644 --- a/game/navmesh.py +++ b/game/navmesh.py @@ -59,7 +59,9 @@ class NavPoint: if not isinstance(other, NavPoint): return False - if not self.point.almost_equals(other.point): + # The tolerance value used here is the same that was used by the now deprecated + # almost_equals. + if not self.point.equals_exact(other.point, 0.5 * 10 ** (-6)): return False return self.poly == other.poly