wowserhq / wowser

World of Warcraft in the browser using JavaScript and WebGL
MIT License
247 stars 63 forks source link

WMO doodad sets use wrong index when loading #152

Open fallenoak opened 8 years ago

fallenoak commented 8 years ago

Turns out MODR indices should be taken against MODD, and not against MODD-intersected-by-MODS.

We should adjust doodad loading in WMOHandler to subtract MODS.start from doodadIndex prior to pulling the entry out of the filtered doodad set.

timkurvers commented 8 years ago

I'm assuming the current implementation should result in some funky stuff by loading the wrong doodads? Do we have any examples? Would love to see that 😄

fallenoak commented 8 years ago

It's less that wrong doodads are loaded (although I'm sure if we looked closely, we'd see some wrong doodads), and more that doodads wind up associated with wrong WMO groups. I figured out this was happening when I implemented portal culling -> doodad visibility and wound up with very weird doodads disappearing or reappearing.