fix(wom): fromM2 always merges .skin file regardless of M2 isValid state

WotLK M2s store the header in .m2 but geometry in .skin. fromM2 only
loaded the skin when isValid() returned false, which it does for those
WotLK files — but missed the case where M2Loader::load happened to
populate enough that isValid() was true (older format M2s with newer
features). Now always merges skin data when present, matching the
editor's viewport loader behaviour.
This commit is contained in:
Kelsi 2026-05-06 02:12:45 -07:00
parent 49b7268dc9
commit 9d200fbe7b

View file

@ -259,7 +259,10 @@ WoweeModel WoweeModelLoader::fromM2(const std::string& m2Path, AssetManager* am)
auto m2 = M2Loader::load(data);
if (!m2.isValid()) {
// WotLK+ M2s store header in .m2 but geometry in .skin — always merge the
// skin file when present so we get vertices/indices/batches even for M2s
// that already report isValid() (older expansions).
{
std::string skinPath = m2Path;
auto dotPos = skinPath.rfind('.');
if (dotPos != std::string::npos)