mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix grey WMO curtains by skipping window/sky materials, fix /unstuck
- Skip WMO batches with material flags F_SIDN (0x20) or F_WINDOW (0x40) which are transparent sky/window panes that render as grey curtains - Fix /unstuck: always nudge 5 units forward first, then sample floor at destination instead of teleporting back to last safe position (which could be the stuck location itself)
This commit is contained in:
parent
dd99dd8bad
commit
ef0b1b45ef
2 changed files with 17 additions and 20 deletions
|
|
@ -379,10 +379,16 @@ bool WMORenderer::loadModel(const pipeline::WMOModel& model, uint32_t id) {
|
|||
}
|
||||
|
||||
bool unlit = false;
|
||||
uint32_t matFlags = 0;
|
||||
if (batch.materialId < modelData.materialFlags.size()) {
|
||||
unlit = (modelData.materialFlags[batch.materialId] & 0x01) != 0;
|
||||
matFlags = modelData.materialFlags[batch.materialId];
|
||||
unlit = (matFlags & 0x01) != 0;
|
||||
}
|
||||
|
||||
// Skip materials that are sky/window panes (render as grey curtains if drawn opaque)
|
||||
// 0x20 = F_SIDN (night sky window), 0x40 = F_WINDOW
|
||||
if (matFlags & 0x60) continue;
|
||||
|
||||
// Merge key: texture ID + alphaTest + unlit (unlit batches must not merge with lit)
|
||||
uint64_t key = (static_cast<uint64_t>(texId) << 2)
|
||||
| (alphaTest ? 1ULL : 0ULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue