File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
xivModdingFramework/Models/FileTypes Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -448,15 +448,16 @@ public async Task<XivMdl> GetRawMdlData(string mdlPath, bool getOriginal = false
448
448
var index = new Index ( _gameDirectory ) ;
449
449
var dat = new Dat ( _gameDirectory ) ;
450
450
var modding = new Modding ( _gameDirectory ) ;
451
+ var mod = await modding . TryGetModEntry ( mdlPath ) ;
452
+ var modded = mod != null && mod . enabled ;
451
453
var getShapeData = true ;
452
454
453
455
454
456
var offset = await index . GetDataOffset ( mdlPath ) ;
455
457
456
458
if ( getOriginal )
457
459
{
458
- var mod = await modding . TryGetModEntry ( mdlPath ) ;
459
- if ( mod != null && mod . enabled )
460
+ if ( modded )
460
461
{
461
462
offset = mod . data . originalOffset ;
462
463
}
@@ -684,6 +685,13 @@ public async Task<XivMdl> GetRawMdlData(string mdlPath, bool getOriginal = false
684
685
lod . MeshCount = 1 ;
685
686
}
686
687
688
+ // This is a simple check to identify old mods that may have broken shape data.
689
+ // Old mods still have LoD 1+ data.
690
+ if ( modded && i > 0 && lod . MeshCount > 0 )
691
+ {
692
+ getShapeData = false ;
693
+ }
694
+
687
695
//Adding to xivMdl
688
696
xivMdl . LoDList . Add ( lod ) ;
689
697
}
@@ -729,6 +737,7 @@ public async Task<XivMdl> GetRawMdlData(string mdlPath, bool getOriginal = false
729
737
}
730
738
}
731
739
740
+
732
741
// Now that we have the LoD data, we can go back and read the Vertex Data Structures
733
742
// First we save our current position
734
743
var savePosition = br . BaseStream . Position ;
You can’t perform that action at this time.
0 commit comments