mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 09:33:51 +00:00
feat(editor): collectWMOTextures recurses into WMO doodad M2 textures
WMO buildings reference M2 doodads (chairs, candles, banners) via the MODD chunk. Their textures live in those M2 files, not the WMO root. Now collectWMOTextures walks every doodad name and collects M2 textures recursively so exported buildings include all their interior decoration textures.
This commit is contained in:
parent
f1d332825e
commit
4fd285b5c4
1 changed files with 11 additions and 0 deletions
|
|
@ -73,6 +73,17 @@ std::vector<std::string> TextureExporter::collectWMOTextures(pipeline::AssetMana
|
|||
[](unsigned char c) { return std::tolower(c); });
|
||||
unique.insert(p);
|
||||
}
|
||||
|
||||
// WMO doodads (props inside the building) are M2 models — their textures
|
||||
// also need to ship with the zone or the building will render with missing
|
||||
// chairs/decorations.
|
||||
std::unordered_set<std::string> seenDoodadM2;
|
||||
for (const auto& [offset, name] : wmo.doodadNames) {
|
||||
(void)offset;
|
||||
if (name.empty() || !seenDoodadM2.insert(name).second) continue;
|
||||
for (auto& t : collectM2Textures(am, name)) unique.insert(std::move(t));
|
||||
}
|
||||
|
||||
out.assign(unique.begin(), unique.end());
|
||||
std::sort(out.begin(), out.end());
|
||||
return out;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue