mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix mesh artifacts on vanilla/TBC M2 models when using expansion overlays
Vanilla (v256) and TBC (v263) M2 files embed skin data directly, parsed during M2Loader::load(). The code unconditionally loaded external .skin files afterwards, which resolved to WotLK-format .skin files (48-byte submeshes) from the base manifest — overwriting the correctly parsed embedded skin (32-byte submeshes) and causing mesh corruption on all character models. Guard all 13 loadSkin() call sites with version >= 264 so external .skin files are only loaded for WotLK M2s that need them.
This commit is contained in:
parent
a67dca5787
commit
ca3150e43d
3 changed files with 19 additions and 19 deletions
|
|
@ -135,10 +135,10 @@ bool CharacterPreview::loadCharacter(game::Race race, game::Gender gender,
|
|||
|
||||
auto model = pipeline::M2Loader::load(m2Data);
|
||||
|
||||
// Load skin file
|
||||
// Load skin file (only for WotLK M2s - vanilla has embedded skin)
|
||||
std::string skinPath = modelDir + baseName + "00.skin";
|
||||
auto skinData = assetManager_->readFile(skinPath);
|
||||
if (!skinData.empty()) {
|
||||
if (!skinData.empty() && model.version >= 264) {
|
||||
pipeline::M2Loader::loadSkin(skinData, model);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue