From 9d200fbe7b91795ed2679127da4085037c47fda8 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 6 May 2026 02:12:45 -0700 Subject: [PATCH] fix(wom): fromM2 always merges .skin file regardless of M2 isValid state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/pipeline/wowee_model.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipeline/wowee_model.cpp b/src/pipeline/wowee_model.cpp index 962d678c..65b4c30b 100644 --- a/src/pipeline/wowee_model.cpp +++ b/src/pipeline/wowee_model.cpp @@ -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)