aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-10-02 13:43:45 +0200
committerShauren <shauren.trinity@gmail.com>2025-10-02 13:43:45 +0200
commit6b41c3d3274653605b42f1144f554fe43eee344e (patch)
treec8d515ce67ade9b7f360e157c3798d25ffb7aa23 /src/server/scripts/Commands
parentca70a5c1a0b597b201603e48051d5a0623bd5248 (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/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_mmaps.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp
index 94004eb8125..2b4fc01675e 100644
--- a/src/server/scripts/Commands/cs_mmaps.cpp
+++ b/src/server/scripts/Commands/cs_mmaps.cpp
@@ -138,11 +138,12 @@ public:
float x, y, z;
player->GetPosition(x, y, z);
- handler->PSendSysMessage("%04u%02i%02i.mmtile", player->GetMapId(), gx, gy);
- handler->PSendSysMessage("tileloc [%i, %i]", gy, gx);
-
// calculate navmesh tile location
uint32 terrainMapId = PhasingHandler::GetTerrainMapId(player->GetPhaseShift(), player->GetMapId(), player->GetMap()->GetTerrain(), x, y);
+
+ handler->PSendSysMessage("%04u%02i%02i.mmtile", terrainMapId, gx, gy);
+ handler->PSendSysMessage("tileloc [%i, %i]", gy, gx);
+
dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(terrainMapId);
dtNavMeshQuery const* navmeshquery = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMeshQuery(terrainMapId, player->GetMapId(), player->GetInstanceId());
if (!navmesh || !navmeshquery)