mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 17:13:51 +00:00
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:
parent
49b7268dc9
commit
9d200fbe7b
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue