From c7d9a6d511ebbed9bd535e7ff1b903b60fa980cb Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Feb 2026 18:33:08 -0800 Subject: [PATCH] Add detailed MODF placement logging for STORMWIND.WMO Log all MODF placements of STORMWIND.WMO with complete details: - uniqueId (should be unique per instance) - position (x, y, z) - to detect duplicate placements at different Z - rotation (pitch, yaw, roll) - doodadSet and flags This will immediately reveal if the floating cathedral is caused by duplicate MODF placements at different heights vs a renderer issue. If multiple entries have same XY but different Z, that's the culprit. --- src/pipeline/adt_loader.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/pipeline/adt_loader.cpp b/src/pipeline/adt_loader.cpp index 295d3ded..4bf260af 100644 --- a/src/pipeline/adt_loader.cpp +++ b/src/pipeline/adt_loader.cpp @@ -2,6 +2,7 @@ #include "core/logger.hpp" #include #include +#include namespace wowee { namespace pipeline { @@ -268,14 +269,19 @@ void ADTLoader::parseMODF(const uint8_t* data, size_t size, ADTTerrain& terrain) terrain.wmoPlacements.push_back(placement); - // Log cathedral placements with their positions to identify duplicates + // Log STORMWIND.WMO placements to detect duplicates at different Z heights 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], ")"); + std::string upperName = wmoName; + std::transform(upperName.begin(), upperName.end(), upperName.begin(), ::toupper); + + if (upperName.find("STORMWIND.WMO") != std::string::npos) { + LOG_INFO("*** STORMWIND.WMO PLACEMENT:", + " uniqueId=", placement.uniqueId, + " pos=(", placement.position[0], ", ", placement.position[1], ", ", placement.position[2], ")", + " rot=(", placement.rotation[0], ", ", placement.rotation[1], ", ", placement.rotation[2], ")", + " doodadSet=", placement.doodadSet, + " flags=0x", std::hex, placement.flags, std::dec); } } }