From 2f2aacaf845fb81186d2f9095451844bea1f3d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20K=C3=B6nig?= Date: Fri, 16 Jun 2023 21:50:15 +0200 Subject: [PATCH] Fix check in getTileByRef according to original recast sources. From https://github.com/CypherCore/Tools/issues/10 --- Source/Framework/RecastDetour/Detour/DetourNavMesh.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Framework/RecastDetour/Detour/DetourNavMesh.cs b/Source/Framework/RecastDetour/Detour/DetourNavMesh.cs index 3cf0a6559..37fc5e120 100644 --- a/Source/Framework/RecastDetour/Detour/DetourNavMesh.cs +++ b/Source/Framework/RecastDetour/Detour/DetourNavMesh.cs @@ -1292,7 +1292,7 @@ public static partial class Detour /// reference is invalid. public dtMeshTile getTileByRef(dtTileRef tileRef) { - if (tileRef != 0) + if (tileRef == 0) return null; uint tileIndex = decodePolyIdTile((dtPolyRef)tileRef); uint tileSalt = decodePolyIdSalt((dtPolyRef)tileRef);