Quellcode durchsuchen

update v22.2 fix bewbs physics

meidomustard vor 6 Jahren
Ursprung
Commit
6f4690a910

+ 20 - 19
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Gui.cs

@@ -1008,7 +1008,7 @@ namespace CM3D2.MultipleMaids.Plugin
             {
                 foreach (string menuFile in GameUty.MenuFiles)
                 {
-                    string fileName = Path.GetFileNameWithoutExtension(menuFile) + ".menu";
+                    string fileName = Path.GetFileName(menuFile);
                     byte[] f_byBuf = (byte[]) null;
                     using (AFileBase afileBase = GameUty.FileOpen(fileName, (AFileSystemBase) null))
                     {
@@ -1025,16 +1025,16 @@ namespace CM3D2.MultipleMaids.Plugin
                     }
                     else
                     {
-                        binaryReader.ReadInt32();
-                        binaryReader.ReadString();
-                        binaryReader.ReadString();
-                        string str1 = binaryReader.ReadString();
-                        string s = "";
-                        binaryReader.ReadString();
-                        binaryReader.ReadInt32();
-                        string str2 = "";
                         try
                         {
+                            binaryReader.ReadInt32();
+                            binaryReader.ReadString();
+                            binaryReader.ReadString();
+                            string str1 = binaryReader.ReadString();
+                            string s = "";
+                            binaryReader.ReadString();
+                            binaryReader.ReadInt32();
+                            string str2 = "";
                             do
                             {
                                 int num2;
@@ -1046,7 +1046,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                 for (int index = 0; index < num2; ++index)
                                 {
                                     string str3 = binaryReader.ReadString();
-                                    if (str3 == "icons")
+                                    if (str3 == "icons" || str3 == "icon")
                                     {
                                         str2 = binaryReader.ReadString();
                                         break;
@@ -1058,7 +1058,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                         break;
                                     }
                                 }
-                            } while (!(str2 != ""));
+                            } while (str2 == "");
 
                             int result = 0;
                             int.TryParse(s, out result);
@@ -1086,16 +1086,15 @@ namespace CM3D2.MultipleMaids.Plugin
             {
                 try
                 {
-                    if ((Object) sortItem.tex == (Object) null)
-                    {
-                        byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, sortItem.name, false).data;
-                        Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGBA32, false);
-                        texture2D.LoadImage(data);
-                        sortItem.tex = texture2D;
-                    }
-
                     if (!(sortItem.menu == str4))
                     {
+                        if ((Object)sortItem.tex == (Object)null)
+                        {
+                            byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, sortItem.name, false).data;
+                            Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
+                            texture2D.LoadImage(data);
+                            sortItem.tex = texture2D;
+                        }
                         str4 = sortItem.menu;
                         sortItemList.Add(sortItem);
                     }
@@ -4573,6 +4572,8 @@ namespace CM3D2.MultipleMaids.Plugin
                     hantenn[selectMaidIndex] = false;
                     muneIKL[selectMaidIndex] = false;
                     muneIKR[selectMaidIndex] = false;
+                    maid.body0.jbMuneL.enabled = true;
+                    maid.body0.jbMuneR.enabled = true;
                     if (!GameMain.Instance.VRMode)
                     {
                         maidArray[selectMaidIndex].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[selectMaidIndex]];

+ 7 - 0
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.IK.cs

@@ -12,11 +12,13 @@ namespace CM3D2.MultipleMaids.Plugin
             mHead2[k] = gHead2[k].AddComponent<MouseDrag5>();
             mHead2[k].obj = gHead2[k];
             gHead2[k].transform.localScale = new Vector3(0.2f, 0.24f, 0.2f);
+            gHead2[k].layer = 8;
             gMaid2[k] = GameObject.CreatePrimitive(PrimitiveType.Capsule);
             gMaid2[k].GetComponent<Renderer>().enabled = false;
             mMaid2[k] = gMaid2[k].AddComponent<MouseDrag5>();
             mMaid2[k].obj = gMaid2[k];
             gMaid2[k].transform.localScale = new Vector3(0.2f, 0.3f, 0.24f);
+            gMaid2[k].layer = 8;
         }
 
         private void SetIKInit7(int k)
@@ -26,11 +28,13 @@ namespace CM3D2.MultipleMaids.Plugin
             mIKMuneL[k] = gIKMuneL[k].AddComponent<MouseDrag>();
             mIKMuneL[k].obj = gIKMuneL[k];
             gIKMuneL[k].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
+            gIKMuneL[k].layer = 8;
             gIKMuneR[k] = GameObject.CreatePrimitive(PrimitiveType.Sphere);
             gIKMuneR[k].GetComponent<Renderer>().enabled = false;
             mIKMuneR[k] = gIKMuneR[k].AddComponent<MouseDrag>();
             mIKMuneR[k].obj = gIKMuneR[k];
             gIKMuneR[k].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
+            gIKMuneR[k].layer = 8;
         }
 
         private void SetIKInit5(int k)
@@ -59,11 +63,13 @@ namespace CM3D2.MultipleMaids.Plugin
             mJotai[k] = gJotai[k].AddComponent<MouseDrag3>();
             mJotai[k].obj = gJotai[k];
             gJotai[k].transform.localScale = new Vector3(0.2f, 0.19f, 0.24f);
+            gJotai[k].layer = 8;
             gKahuku[k] = GameObject.CreatePrimitive(PrimitiveType.Capsule);
             gKahuku[k].GetComponent<Renderer>().enabled = false;
             mKahuku[k] = gKahuku[k].AddComponent<MouseDrag3>();
             mKahuku[k].obj = gKahuku[k];
             gKahuku[k].transform.localScale = new Vector3(0.2f, 0.15f, 0.24f);
+            gKahuku[k].layer = 8;
         }
 
         private void SetIKInit3(int k)
@@ -73,6 +79,7 @@ namespace CM3D2.MultipleMaids.Plugin
             mMaid[k] = gMaid[k].AddComponent<MouseDrag2>();
             mMaid[k].obj = gMaid[k];
             gMaid[k].transform.localScale = new Vector3(0.2f, 0.3f, 0.24f);
+            gMaid[k].layer = 8;
             gMaidC[k] = GameObject.CreatePrimitive(PrimitiveType.Cube);
             gMaidC[k].GetComponent<Renderer>().enabled = true;
             mMaidC[k] = gMaidC[k].AddComponent<MouseDrag2>();

+ 8 - 1
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Init.cs

@@ -48,6 +48,10 @@ namespace CM3D2.MultipleMaids.Plugin
                 {
                     maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
                     maidArray[index1].SetAutoTwistAll(true);
+                    maidArray[index1].body0.MuneYureL(1f);
+					maidArray[index1].body0.MuneYureR(1f);
+					maidArray[index1].body0.jbMuneL.enabled = true;
+					maidArray[index1].body0.jbMuneR.enabled = true;
                 }
 
                 if ((bool) maidArray[index1])
@@ -398,6 +402,7 @@ namespace CM3D2.MultipleMaids.Plugin
         public void init()
         {
             isInit = true;
+            isVR = GameMain.Instance.VRMode;
             for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1)
             {
                 Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1];
@@ -434,6 +439,8 @@ namespace CM3D2.MultipleMaids.Plugin
                     maidArray[index1].SetAutoTwistAll(true);
                     maidArray[index1].body0.MuneYureL(1f);
                     maidArray[index1].body0.MuneYureR(1f);
+                    maidArray[index1].body0.jbMuneL.enabled = true;
+                    maidArray[index1].body0.jbMuneR.enabled = true;
                 }
 
                 if ((bool) maidArray[index1])
@@ -1140,7 +1147,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
             var strArray1 = new string[1] {"Salon_Day"};
             var strArray2 = new string[2] {"SMRoom2", "LockerRoom"};
-            var strArray3 = new string[2] {"Oheya", "MyBedRoom_NightOff"};
+            var strArray3 = new string[4] {"Train", "Toilet", "Oheya", "MyBedRoom_NightOff"};
             var strArray4 = new string[4] {"ClassRoom", "ClassRoom_Play", "HoneymoonRoom", "OutletPark"};
             var strArray5 = new string[9]
             {

+ 7 - 4
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.MaidUpdate.cs

@@ -2706,6 +2706,8 @@ namespace CM3D2.MultipleMaids.Plugin
                                 {
                                     maid.body0.MuneYureL(1f);
                                     maid.body0.MuneYureR(1f);
+                                    maid.body0.jbMuneL.enabled = true;
+                                    maid.body0.jbMuneR.enabled = true;
                                 }
 
                                 int num6;
@@ -3237,6 +3239,8 @@ namespace CM3D2.MultipleMaids.Plugin
                                                 {
                                                     maid.body0.MuneYureL(0f);
                                                     maid.body0.MuneYureR(0f);
+                                                    maid.body0.jbMuneL.enabled = false;
+                                                    maid.body0.jbMuneR.enabled = false;
                                                     muneIKL[i] = false;
                                                     mIKMuneL[i].isMouseUp = false;
                                                 }
@@ -3261,6 +3265,8 @@ namespace CM3D2.MultipleMaids.Plugin
                                                 {
                                                     maid.body0.MuneYureL(0f);
                                                     maid.body0.MuneYureR(0f);
+                                                    maid.body0.jbMuneL.enabled = false;
+                                                    maid.body0.jbMuneR.enabled = false;
                                                     muneIKR[i] = false;
                                                     mIKMuneL[i].isMouseUp = false;
                                                 }
@@ -15997,10 +16003,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                     if (fieldValue8 != null)
                                     {
                                         fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
-                                        MethodInfo method = fieldValue8
-                                                            .GetType().GetMethod("UpdateParameters",
-                                                                                 BindingFlags.Instance | BindingFlags.NonPublic);
-                                        method.Invoke(fieldValue8, null);
+                                        fieldValue8.UpdateParameters();
                                     }
                                 }
                             }

+ 2 - 1
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.cs

@@ -13,7 +13,7 @@ using UnityInjector.Attributes;
 namespace CM3D2.MultipleMaids.Plugin
 {
     [PluginName("Multiple maids")]
-    [PluginVersion("22.1")]
+    [PluginVersion("22.2")]
     public partial class MultipleMaids : PluginBase
     {
         private bool allowUpdate;
@@ -5199,6 +5199,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
         public void Start()
         {
+            isVR = GameMain.Instance.VRMode;
             SceneManager.sceneLoaded += OnSceneLoaded;
             mainCameraTransform = GameMain.Instance.MainCamera.gameObject.transform;
         }