From 318f2559189d1cfff5cc191628463aa7a4011a73 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 6 May 2026 02:09:24 -0700 Subject: [PATCH] fix(wob): emit default doodadSet so WMO renderer draws WoB doodads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WMORenderer uses doodadSets[0] to select which slice of the doodads array to render. Without a set entry the renderer skipped every doodad even when toWMOModel populated them. Now emits a default set named 'Set_$DefaultGlobal' covering all doodads — matches Blizzard's default set name and convention. --- src/pipeline/wowee_building.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pipeline/wowee_building.cpp b/src/pipeline/wowee_building.cpp index 6bab5e36..aed82865 100644 --- a/src/pipeline/wowee_building.cpp +++ b/src/pipeline/wowee_building.cpp @@ -276,6 +276,7 @@ bool WoweeBuildingLoader::toWMOModel(const WoweeBuilding& building, WMOModel& ou // assign sequential offsets here since none of our paths share suffixes. outModel.doodads.clear(); outModel.doodadNames.clear(); + outModel.doodadSets.clear(); uint32_t doodadOffset = 0; for (const auto& dp : building.doodads) { // Convert WOM extension back to M2 for the runtime that may not have a @@ -303,6 +304,18 @@ bool WoweeBuildingLoader::toWMOModel(const WoweeBuilding& building, WMOModel& ou doodadOffset += static_cast(mp.size() + 1); } + // Renderer uses doodadSets[0] to know which slice of doodads to render. + // Without it, even with doodads populated, nothing draws. Emit a default + // "Set_$DefaultGlobal" set covering every doodad. + if (!outModel.doodads.empty()) { + WMODoodadSet ds{}; + std::strncpy(ds.name, "Set_$DefaultGlobal", sizeof(ds.name) - 1); + ds.startIndex = 0; + ds.count = static_cast(outModel.doodads.size()); + ds.padding = 0; + outModel.doodadSets.push_back(ds); + } + return true; }