diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-10-02 13:43:45 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-10-02 13:43:45 +0200 |
| commit | 6b41c3d3274653605b42f1144f554fe43eee344e (patch) | |
| tree | c8d515ce67ade9b7f360e157c3798d25ffb7aa23 /src/tools/mmaps_generator | |
| parent | ca70a5c1a0b597b201603e48051d5a0623bd5248 (diff) | |
Core/MMaps: Improve mmap debugging experience for terrain swap maps
* Output terrain map id in `.mmap loc` command
* Suppress file not found errors for terrain swap maps
* Fix generating single tiles for terrain swap maps (--tile argument)
Diffstat (limited to 'src/tools/mmaps_generator')
| -rw-r--r-- | src/tools/mmaps_generator/MapBuilder.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp index 03e8e88c763..a133b364059 100644 --- a/src/tools/mmaps_generator/MapBuilder.cpp +++ b/src/tools/mmaps_generator/MapBuilder.cpp @@ -866,7 +866,7 @@ namespace MMAP // DT_TILE_FREE_DATA tells detour to unallocate memory when the tile // is removed via removeTile() dtStatus dtResult = navMesh->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, &tileRef); - if (!tileRef || dtResult != DT_SUCCESS) + if (!tileRef || !dtStatusSucceed(dtResult)) { printf("%s Failed adding tile to navmesh! \n", tileString.c_str()); break; @@ -942,7 +942,19 @@ namespace MMAP bool MapBuilder::shouldSkipMap(uint32 mapID) const { if (m_mapid >= 0) - return static_cast<uint32>(m_mapid) != mapID; + { + int32 parentMapId = m_mapid; + do + { + if (static_cast<uint32>(parentMapId) == mapID) + return false; + + parentMapId = sMapStore[parentMapId].ParentMapID; + + } while (parentMapId != -1); + + return true; + } if (m_skipContinents) if (isContinentMap(mapID)) |
