From 67590642c7ad2eefb76a5e5242fb9bf244a4eed4 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Thu, 14 Jan 2016 00:27:40 +0100 Subject: [PATCH] Add documentation about data to addTile dtNavMesh needs exclusive access to the data passed to addTile since it will make dynamic changes to this at runtime. For that reason the data should not be reused until the tile has been removed from the nav mesh again. Fix #149 --- Detour/Source/DetourNavMesh.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Detour/Source/DetourNavMesh.cpp b/Detour/Source/DetourNavMesh.cpp index b5c40a9..bb6c9e4 100644 --- a/Detour/Source/DetourNavMesh.cpp +++ b/Detour/Source/DetourNavMesh.cpp @@ -837,6 +837,11 @@ int dtNavMesh::queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, co /// tile will be restored to the same values they were before the tile was /// removed. /// +/// The nav mesh assumes exclusive access to the data passed and will make +/// changes to the dynamic portion of the data. For that reason the data +/// should not be reused in other nav meshes until the tile has been successfully +/// removed from this nav mesh. +/// /// @see dtCreateNavMeshData, #removeTile dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags, dtTileRef lastRef, dtTileRef* result)