mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 08:30:13 +00:00
Add WMO portal culling infrastructure and fix single-player character flow
Portal-based visibility culling for WMO rendering (disabled by default, needs debugging for complex WMOs like Stormwind). Skip character creation screen when characters already exist in single-player mode.
This commit is contained in:
parent
669d89c108
commit
77a21609a8
6 changed files with 262 additions and 3 deletions
|
|
@ -356,6 +356,21 @@ WMOModel WMOLoader::load(const std::vector<uint8_t>& wmoData) {
|
|||
break;
|
||||
}
|
||||
|
||||
case MOPR: {
|
||||
// Portal references - links groups via portals
|
||||
uint32_t nRefs = chunkSize / 8; // Each reference is 8 bytes
|
||||
for (uint32_t i = 0; i < nRefs; i++) {
|
||||
WMOPortalRef ref;
|
||||
ref.portalIndex = read<uint16_t>(wmoData, offset);
|
||||
ref.groupIndex = read<uint16_t>(wmoData, offset);
|
||||
ref.side = read<int16_t>(wmoData, offset);
|
||||
ref.padding = read<uint16_t>(wmoData, offset);
|
||||
model.portalRefs.push_back(ref);
|
||||
}
|
||||
core::Logger::getInstance().info("WMO portal refs: ", model.portalRefs.size());
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
// Unknown chunk, skip it
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue