mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
fix(wom): fromM2 sets version=3 when batches were extracted
Without this fromM2 always wrote version=2 even when batches were populated, causing the version field on the in-memory model to lie about its content. The save() magic-byte selection happens off the batches/animation flags directly so the on-disk file is still correct, but loaders that key off model.version saw stale info.
This commit is contained in:
parent
9eae67d574
commit
23951d4075
1 changed files with 4 additions and 1 deletions
|
|
@ -390,7 +390,10 @@ WoweeModel WoweeModelLoader::fromM2(const std::string& m2Path, AssetManager* am)
|
|||
if (anim.durationMs > 0) model.animations.push_back(anim);
|
||||
}
|
||||
|
||||
model.version = model.hasAnimation() ? 2 : 1;
|
||||
// Version reflects highest feature in use: WOM3 if multi-batch, WOM2 if
|
||||
// animated, WOM1 if just static geometry. The save() function picks magic
|
||||
// off this same hierarchy.
|
||||
model.version = model.hasBatches() ? 3 : (model.hasAnimation() ? 2 : 1);
|
||||
return model;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue