瀏覽代碼

Properly keep track of dogu for deserialization

habeebweeb 4 年之前
父節點
當前提交
18e23b0c85
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/PropManager.cs

+ 4 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/PropManager.cs

@@ -95,6 +95,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             Dictionary<string, string> modToModPath = null;
             ClearDogu();
             int numberOfProps = binaryReader.ReadInt32();
+
+            int doguIndex = 0;
+
             for (int i = 0; i < numberOfProps; i++)
             {
                 string assetName = binaryReader.ReadString();
@@ -115,7 +118,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
                 Vector3 scale = binaryReader.ReadVector3();
                 if (result)
                 {
-                    DragPointDogu dogu = doguList[i];
+                    DragPointDogu dogu = doguList[doguIndex++];
                     Transform obj = dogu.MyObject;
                     obj.position = position;
                     obj.rotation = rotation;