aboutsummaryrefslogtreecommitdiff
path: root/src/server/collision/Management/MMapManager.cpp
diff options
context:
space:
mode:
authorkaelima <kaelima@live.se>2013-06-17 05:11:24 +0200
committerkaelima <kaelima@live.se>2013-06-17 05:11:56 +0200
commitaa645683b8b25bfb35cb977678daf5c56c1531e6 (patch)
treefc01096899f9a538966bd227fbf69606f7e6d91a /src/server/collision/Management/MMapManager.cpp
parent9b4f14ca6771930d376498b7e57968fceca887df (diff)
Core/MMAPS: Update recastnavigation!
* Complete changelog can be found at http://code.google.com/p/recastnavigation/ * Adjusted a few config values Important: * New mmaps extraction is required * Folder size will be increased
Diffstat (limited to 'src/server/collision/Management/MMapManager.cpp')
-rw-r--r--src/server/collision/Management/MMapManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/collision/Management/MMapManager.cpp b/src/server/collision/Management/MMapManager.cpp
index a3f89f42443..65c13c07e66 100644
--- a/src/server/collision/Management/MMapManager.cpp
+++ b/src/server/collision/Management/MMapManager.cpp
@@ -63,7 +63,7 @@ namespace MMAP
dtNavMesh* mesh = dtAllocNavMesh();
ASSERT(mesh);
- if (DT_SUCCESS != mesh->init(&params))
+ if (dtStatusFailed(mesh->init(&params)))
{
dtFreeNavMesh(mesh);
TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMapData: Failed to initialize dtNavMesh for mmap %03u from file %s", mapId, fileName);
@@ -152,7 +152,7 @@ namespace MMAP
dtTileRef tileRef = 0;
// memory allocated for data is now managed by detour, and will be deallocated when the tile is removed
- if (DT_SUCCESS == mmap->navMesh->addTile(data, fileHeader.size, DT_TILE_FREE_DATA, 0, &tileRef))
+ if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, DT_TILE_FREE_DATA, 0, &tileRef)))
{
mmap->mmapLoadedTiles.insert(std::pair<uint32, dtTileRef>(packedGridPos, tileRef));
++loadedTiles;
@@ -193,7 +193,7 @@ namespace MMAP
dtTileRef tileRef = mmap->mmapLoadedTiles[packedGridPos];
// unload, and mark as non loaded
- if (DT_SUCCESS != mmap->navMesh->removeTile(tileRef, NULL, NULL))
+ if (dtStatusFailed(mmap->navMesh->removeTile(tileRef, NULL, NULL)))
{
// this is technically a memory leak
// if the grid is later reloaded, dtNavMesh::addTile will return error but no extra memory is used
@@ -227,7 +227,7 @@ namespace MMAP
{
uint32 x = (i->first >> 16);
uint32 y = (i->first & 0x0000FFFF);
- if (DT_SUCCESS != mmap->navMesh->removeTile(i->second, NULL, NULL))
+ if (dtStatusFailed(mmap->navMesh->removeTile(i->second, NULL, NULL)))
TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
else
{
@@ -288,7 +288,7 @@ namespace MMAP
// allocate mesh query
dtNavMeshQuery* query = dtAllocNavMeshQuery();
ASSERT(query);
- if (DT_SUCCESS != query->init(mmap->navMesh, 1024))
+ if (dtStatusFailed(query->init(mmap->navMesh, 1024)))
{
dtFreeNavMeshQuery(query);
TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);