From 0a93186cfd92e4e5fc17b5d01f193c5201239adf Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Feb 2026 18:21:04 -0800 Subject: [PATCH] Add cathedral WMO detection logging for duplicate model debugging Added detailed logging in ADT loader to identify cathedral WMO duplicates: - Log all WMO filenames from MWMO chunks with index numbers - Flag and highlight any WMO containing "cathedral" or "Cathedral" - Log cathedral placement positions from MODF chunks This will help identify if both WotLK and classic cathedral models are being loaded from the same ADT tile, causing the floating duplicate effect: - World\wmo\Azeroth\Buildings\Stormwind\SW_CathedralDistrict.wmo - world/wmo/azeroth/stormwind/zClassic/cathedral.wmo The logs will show which cathedral variants exist and their exact positions to determine if one should be filtered/hidden. --- src/pipeline/adt_loader.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/pipeline/adt_loader.cpp b/src/pipeline/adt_loader.cpp index 50b6cb60..fc4cf745 100644 --- a/src/pipeline/adt_loader.cpp +++ b/src/pipeline/adt_loader.cpp @@ -205,6 +205,12 @@ void ADTLoader::parseMWMO(const uint8_t* data, size_t size, ADTTerrain& terrain) LOG_DEBUG("Loaded ", terrain.wmoNames.size(), " WMO names"); for (size_t i = 0; i < terrain.wmoNames.size(); i++) { + LOG_DEBUG(" WMO[", i, "]: ", terrain.wmoNames[i]); + // Flag potential duplicate cathedral models + if (terrain.wmoNames[i].find("cathedral") != std::string::npos || + terrain.wmoNames[i].find("Cathedral") != std::string::npos) { + LOG_INFO("*** CATHEDRAL WMO FOUND: ", terrain.wmoNames[i]); + } } } @@ -261,6 +267,17 @@ void ADTLoader::parseMODF(const uint8_t* data, size_t size, ADTTerrain& terrain) placement.doodadSet = readUInt16(data, offset + 58); terrain.wmoPlacements.push_back(placement); + + // Log cathedral placements with their positions to identify duplicates + if (placement.nameId < terrain.wmoNames.size()) { + const std::string& wmoName = terrain.wmoNames[placement.nameId]; + if (wmoName.find("cathedral") != std::string::npos || + wmoName.find("Cathedral") != std::string::npos) { + LOG_INFO("*** CATHEDRAL PLACEMENT: ", wmoName, + " at (", placement.position[0], ", ", + placement.position[1], ", ", placement.position[2], ")"); + } + } } LOG_INFO("Loaded ", terrain.wmoPlacements.size(), " WMO placements");