Jelajahi Sumber

small quick fix

meidomustard 6 tahun lalu
induk
melakukan
ab638b79c4

+ 32 - 34
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

@@ -4266,7 +4266,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         if (str1.Contains(".menu"))
                         {
                             string str2 = str1;
-                            byte[] f_byBuf;
+                            byte[] f_byBuf = null;
                             using (AFileBase afileBase = GameUty.FileOpen(str2, (AFileSystemBase) null))
                             {
                                 if (flag1 = afileBase.IsValid())
@@ -4274,43 +4274,41 @@ namespace CM3D2.MultipleMaids.Plugin
                                     f_byBuf = new byte[afileBase.GetSize()];
                                     afileBase.Read(ref f_byBuf, afileBase.GetSize());
                                 }
-                                else
-                                {
-                                    f_byBuf = null;
-                                }
                             }
-
-                            string[] filename2 = ProcScriptBin(maidArray[0], f_byBuf, str2, false);
-                            original1 = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, "", maidArray[0].body0.goSlot[8], 1);
-                            doguBObject.Add(original1);
-                            original1.name = str2;
-                            Vector3 zero1 = Vector3.zero;
-                            Vector3 zero2 = Vector3.zero;
-                            zero1.z = 0.4f;
-                            if (str1.Contains("HandItem"))
-                            {
-                                switch (str1)
+                            if (flag1) {
+                                string[] filename2 = ProcScriptBin(maidArray[0], f_byBuf, str2, false);
+                                original1 = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, "", maidArray[0].body0.goSlot[8], 1);
+                                doguBObject.Add(original1);
+                                original1.name = str2;
+                                Vector3 zero1 = Vector3.zero;
+                                Vector3 zero2 = Vector3.zero;
+                                zero1.z = 0.4f;
+                            
+                                if (str1.Contains("HandItem"))
                                 {
-                                    case "HandItemR_WineGlass_I_.menu":
-                                        zero2.z = 90f;
-                                        zero1.y = 0.04f;
-                                        goto case "HandItemL_Dance_Hataki_I_.menu";
-                                    case "HandItemR_WineBottle_I_.menu":
-                                        zero2.z = 90f;
-                                        goto case "HandItemL_Dance_Hataki_I_.menu";
-                                    case "HandItemR_Mop_I_.menu":
-                                        zero2.x = 90f;
-                                        goto case "HandItemL_Dance_Hataki_I_.menu";
-                                    case "HandItemL_Dance_Hataki_I_.menu":
-                                    case "HandItemL_Dance_Mop_I_.menu": break;
-                                    default:
-                                        zero2.x = -90f;
-                                        goto case "HandItemL_Dance_Hataki_I_.menu";
+                                    switch (str1)
+                                    {
+                                        case "HandItemR_WineGlass_I_.menu":
+                                            zero2.z = 90f;
+                                            zero1.y = 0.04f;
+                                            goto case "HandItemL_Dance_Hataki_I_.menu";
+                                        case "HandItemR_WineBottle_I_.menu":
+                                            zero2.z = 90f;
+                                            goto case "HandItemL_Dance_Hataki_I_.menu";
+                                        case "HandItemR_Mop_I_.menu":
+                                            zero2.x = 90f;
+                                            goto case "HandItemL_Dance_Hataki_I_.menu";
+                                        case "HandItemL_Dance_Hataki_I_.menu":
+                                        case "HandItemL_Dance_Mop_I_.menu": break;
+                                        default:
+                                            zero2.x = -90f;
+                                            goto case "HandItemL_Dance_Hataki_I_.menu";
+                                    }
                                 }
-                            }
 
-                            original1.transform.localPosition = zero1;
-                            original1.transform.localRotation = Quaternion.Euler(zero2);
+                                original1.transform.localPosition = zero1;
+                                original1.transform.localRotation = Quaternion.Euler(zero2);
+                            }
                         }
                         else
                         {