mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-16 17:13:52 +00:00
Filter WMO decorative geometry from collision, fix tram portal trigger IDs
Parse MOPY per-triangle flags in WMO groups and exclude detail/decorative triangles (flag 0x04) from collision detection. This prevents invisible walls from objects like gears and railings in WMO interiors. Add WotLK area trigger IDs 2173/2175 to extended-range tram triggers.
This commit is contained in:
parent
cefb05c027
commit
ee4e6a31ce
4 changed files with 30 additions and 3 deletions
|
|
@ -498,6 +498,16 @@ bool WMOLoader::loadGroup(const std::vector<uint8_t>& groupData,
|
|||
group.indices.push_back(read<uint16_t>(groupData, mogpOffset));
|
||||
}
|
||||
}
|
||||
else if (subChunkId == 0x4D4F5059) { // MOPY - Triangle material info
|
||||
// 2 bytes per triangle: flags (uint8) + materialId (uint8)
|
||||
// flag 0x04 = detail/decorative geometry (no collision)
|
||||
uint32_t triCount = subChunkSize / 2;
|
||||
group.triFlags.resize(triCount);
|
||||
for (uint32_t i = 0; i < triCount; i++) {
|
||||
group.triFlags[i] = read<uint8_t>(groupData, mogpOffset);
|
||||
read<uint8_t>(groupData, mogpOffset); // materialId (skip)
|
||||
}
|
||||
}
|
||||
else if (subChunkId == 0x4D4F4E52) { // MONR - Normals
|
||||
uint32_t normalCount = subChunkSize / 12;
|
||||
core::Logger::getInstance().debug(" MONR: ", normalCount, " normals for ", group.vertices.size(), " vertices");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue