Mugen87 / three-m2loader

three.js loader for importing M2 assets from World of Warcraft.
MIT License
25 stars 8 forks source link

Fix reading `boneCountMax` out of bounds. #10

Closed Mat2095 closed 10 months ago

Mat2095 commented 10 months ago

So I noticed the airelemental.m2 from WotLK (3.3.5a, not classic) is different from the I got from https://wow.tools (the WotLK-version actually has MORE geometry). But the skin for the WotLK-Version could not be loaded, since the parser was reading out-of-bounds because the offset was incorrect at that point. This is fixed by reading boneCountMax together with the header instead of after the content.