mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 00:03:50 +00:00
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.
This commit is contained in:
parent
027fb5c03e
commit
8788ab57ec
1 changed files with 12 additions and 6 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#include "core/logger.hpp"
|
#include "core/logger.hpp"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace wowee {
|
namespace wowee {
|
||||||
namespace pipeline {
|
namespace pipeline {
|
||||||
|
|
@ -268,14 +269,19 @@ void ADTLoader::parseMODF(const uint8_t* data, size_t size, ADTTerrain& terrain)
|
||||||
|
|
||||||
terrain.wmoPlacements.push_back(placement);
|
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()) {
|
if (placement.nameId < terrain.wmoNames.size()) {
|
||||||
const std::string& wmoName = terrain.wmoNames[placement.nameId];
|
const std::string& wmoName = terrain.wmoNames[placement.nameId];
|
||||||
if (wmoName.find("cathedral") != std::string::npos ||
|
std::string upperName = wmoName;
|
||||||
wmoName.find("Cathedral") != std::string::npos) {
|
std::transform(upperName.begin(), upperName.end(), upperName.begin(), ::toupper);
|
||||||
LOG_INFO("*** CATHEDRAL PLACEMENT: ", wmoName,
|
|
||||||
" at (", placement.position[0], ", ",
|
if (upperName.find("STORMWIND.WMO") != std::string::npos) {
|
||||||
placement.position[1], ", ", placement.position[2], ")");
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue