This repository was archived by the owner on Feb 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
This repository was archived by the owner on Feb 2, 2022. It is now read-only.
Converter messes particles/ribbons up #3
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Heya, see picture.
Converter, for some reason messes particle/ribbon emitter count up. Effectively has the file error.
nRibbonEmitters pre-conversion: 0
nRibbonEmitters post-conversion: 1
nParticleEmitters pre-conversion: 1
nParticleEmitters post-conversion: 2
Base file from 7.3.5
Example file: world\expansion05\doodads\torch2.m2
Additional note: I added a TXID check. Attaching it in diff.
diff --git a/Backup/MultiConverterLib/ModelConverter.cs b/Backup/MultiConverterLib/ModelConverter.cs
index 1d971d1..1042c5c 100644
--- a/Backup/MultiConverterLib/ModelConverter.cs
+++ b/Backup/MultiConverterLib/ModelConverter.cs
@@ -126,7 +126,8 @@ namespace MultiConverterLib
RemoveLegionChunks();
- FixTXID();
+ if (LocateTXIDChunk() > 0)
+ FixTXID();
FixCamera();
FixAnimations();
FixSkins();
@@ -656,6 +657,18 @@ namespace MultiConverterLib
if (Data[i] == 0x4D && Data[i + 1] == 0x44 && Data[i + 2] == 0x32 && Data[i + 3] == 0x30)
return i;
+ // todo : add error log
+ return 0;
+ }
+
+ // Rienix
+ // Hackfix
+ private int LocateTXIDChunk()
+ {
+ for (int i = 0; i < Size() - 3; i++)
+ if (Data[i] == 0x54 && Data[i + 1] == 0x58 && Data[i + 2] == 0x49 && Data[i + 3] == 0x44)
+ return i;
+
// todo : add error log
return 0;
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
