Explorar o código

Update free look serialization

habeebweeb %!s(int64=4) %!d(string=hai) anos
pai
achega
22242005a6
Modificáronse 1 ficheiros con 9 adicións e 5 borrados
  1. 9 5
      Converter/Program.cs

+ 9 - 5
Converter/Program.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.IO;
 using System.Collections.Generic;
 using System.Linq;
@@ -335,10 +335,14 @@ namespace COM3D2.MeidoPhotoStudio.Converter
 
                     string[] freeLookData = maidData[64].Split(',');
 
-                    tempWriter.Write(int.Parse(freeLookData[0]) == 1);
-                    tempWriter.WriteVector3(new Vector3(
-                        float.Parse(freeLookData[2]), 1f, float.Parse(freeLookData[1])
-                    ));
+                    bool isFreeLook = int.Parse(freeLookData[0]) == 1;
+                    tempWriter.Write(isFreeLook);
+                    if (isFreeLook)
+                    {
+                        tempWriter.WriteVector3(new Vector3(
+                            float.Parse(freeLookData[2]), 1f, float.Parse(freeLookData[1])
+                        ));
+                    }
 
                     string[] faceValues = maidData[63].Split(',');