From 7c90262829682166c4fa37fc7462aeb55f138424 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 2 Jul 2024 01:28:58 +0200 Subject: [PATCH] Recast: remove unused and incorrect code Should no longer be used as tiles are now built correctly after the change in a2d5d52dc4e571388b9b86f21e40a5110a69665e --- .../recast/Detour/Source/DetourNavMesh.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index e025e45d..d79d728c 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -1085,23 +1085,12 @@ const dtMeshTile* dtNavMesh::getTileAt(const int x, const int y, const int layer } return 0; } -#define FLIP_NEIGHBOURS 0 + int dtNavMesh::getNeighbourTilesAt(const int x, const int y, const int side, dtMeshTile** tiles, const int maxTiles) const { int nx = x, ny = y; switch (side) - { -#if FLIP_NEIGHBOURS - case 0: nx--; break; - case 1: nx--; ny++; break; - case 2: ny++; break; - case 3: nx++; ny++; break; - case 4: nx++; break; - case 5: nx++; ny--; break; - case 6: ny--; break; - case 7: nx--; ny--; break; -#else - + { case 0: nx++; break; case 1: nx++; ny++; break; case 2: ny++; break; @@ -1110,7 +1099,6 @@ int dtNavMesh::getNeighbourTilesAt(const int x, const int y, const int side, dtM case 5: nx--; ny--; break; case 6: ny--; break; case 7: nx++; ny--; break; -#endif }; return getTilesAt(nx, ny, tiles, maxTiles);