From ff0ae1c13be3a7eafd8dfcfd8f57403768d61a4b Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 22 Jul 2022 12:28:39 +0200 Subject: [PATCH] Fix dtMeshTile structure Removed old member that should had been removed earlier. All members align now. --- r5dev/thirdparty/recast/Detour/Include/DetourNavMesh.h | 2 +- r5dev/thirdparty/recast/Detour/Source/DetourNavMesh.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/r5dev/thirdparty/recast/Detour/Include/DetourNavMesh.h b/r5dev/thirdparty/recast/Detour/Include/DetourNavMesh.h index f4bee5d9..f0e5f88b 100644 --- a/r5dev/thirdparty/recast/Detour/Include/DetourNavMesh.h +++ b/r5dev/thirdparty/recast/Detour/Include/DetourNavMesh.h @@ -317,7 +317,6 @@ struct dtMeshTile /// The tile bounding volume nodes. [Size: dtMeshHeader::bvNodeCount] /// (Will be null if bounding volumes are disabled.) dtBVNode* bvTree; - void* meshLink; ///< Seems shifted with 8 bytes from here (the rest seems to line up with r2) see field assignments in 'r5apex.exe 0x140F44A00' dtOffMeshConnection* offMeshCons; ///< The tile off-mesh connections. [Size: dtMeshHeader::offMeshConCount] dtOffMeshConnection* offMeshConsEnd; ///< The tile off-mesh connections array end pointer. @@ -327,6 +326,7 @@ struct dtMeshTile int dataSize; ///< Size of the tile data. int flags; ///< Tile flags. (See: #dtTileFlags) dtMeshTile* next; ///< The next free tile, or the next tile in the spatial grid. + void* unused; private: dtMeshTile(const dtMeshTile&); dtMeshTile& operator=(const dtMeshTile&); diff --git a/r5dev/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/r5dev/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index 5be6a016..cb2d0abe 100644 --- a/r5dev/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/r5dev/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -1018,9 +1018,9 @@ dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags, // Init tile. tile->header = header; tile->data = data; - tile->meshLink = &data[offMeshLinksSize]; // tile + 58h = &v33[v17]; tile->dataSize = dataSize; tile->flags = flags; + tile->unused = nullptr; connectIntLinks(tile);