Browse Source

Merge branch 'master' of https://git.coder.horse/meidomustard/modifiedMM

habeebweeb 4 years ago
parent
commit
c172b5db70

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

@@ -92,8 +92,9 @@ namespace CM3D2.MultipleMaids.Plugin
             isDance = false;
             isDanceChu = false;
             isSavePose = false;
-            bgIndex = 0;
-            bgIndexB = 0;
+            // bgIndex = 0;
+            // bgIndexB = 0;
+            bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
             bg.localScale = new Vector3(1f, 1f, 1f);
             softG = new Vector3(0.0f, -3f / 1000f, 0.0f);
             softG2 = new Vector3(0.0f, -0.005f, 0.0f);
@@ -439,9 +440,9 @@ namespace CM3D2.MultipleMaids.Plugin
             lightComboList[0] = new GUIContent("メイン");
             lightCombo.selectedItemIndex = 0;
             selectLightIndex = 0;
-            bgCombo.selectedItemIndex = 0;
+            // bgCombo.selectedItemIndex = 0;
             kankyoCombo.selectedItemIndex = 0;
-            bgCombo2.selectedItemIndex = 0;
+            // bgCombo2.selectedItemIndex = 0;
             itemCombo2.selectedItemIndex = 0;
             slotCombo.selectedItemIndex = 0;
             sortList.Clear();
@@ -599,8 +600,8 @@ namespace CM3D2.MultipleMaids.Plugin
             isDance = false;
             isDanceChu = false;
             isSavePose = false;
-            bgIndex = 0;
-            bgIndexB = 0;
+            // bgIndex = 0;
+            // bgIndexB = 0;
             bg.localScale = new Vector3(1f, 1f, 1f);
             softG = new Vector3(0.0f, -3f / 1000f, 0.0f);
             softG2 = new Vector3(0.0f, -0.005f, 0.0f);
@@ -960,9 +961,9 @@ namespace CM3D2.MultipleMaids.Plugin
             lightComboList[0] = new GUIContent("メイン");
             lightCombo.selectedItemIndex = 0;
             selectLightIndex = 0;
-            bgCombo.selectedItemIndex = 0;
+            // bgCombo.selectedItemIndex = 0;
             kankyoCombo.selectedItemIndex = 0;
-            bgCombo2.selectedItemIndex = 0;
+            // bgCombo2.selectedItemIndex = 0;
             itemCombo2.selectedItemIndex = 0;
             slotCombo.selectedItemIndex = 0;
             sortList.Clear();
@@ -1508,6 +1509,7 @@ namespace CM3D2.MultipleMaids.Plugin
             }
 
             bgArray = stringList8.ToArray();
+            bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
             string[] strArray8 = new string[3] { "dokidokifallinlove_short_inst", "dokidokifallinlove_short", "entrancetoyou_short" };
             string[] strArray9 = new string[1] { "scarlet leap_short" };
             string[] strArray11 = new string[1] { "RhythmixToYou" };

+ 36 - 25
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.MaidUpdate.cs

@@ -688,31 +688,40 @@ namespace CM3D2.MultipleMaids.Plugin
                     subcamera.cullingMask = 256;
                     subcamera.depth = 1f;
                     subcamera.transform.parent = mainCamera.transform;
-                    float num2 = 2f;
-                    if (Application.unityVersion.StartsWith("4"))
-                    {
-                        num2 = 1f;
-                    }
-
-                    GameObject gameObject3 = new GameObject("Light");
-                    gameObject3.AddComponent<Light>();
-                    lightList.Add(gameObject3);
-                    lightColorR.Add(1f);
-                    lightColorG.Add(1f);
-                    lightColorB.Add(1f);
-                    lightIndex.Add(0);
-                    lightX.Add(40f);
-                    lightY.Add(180f);
-                    lightAkarusa.Add(num2);
-                    lightKage.Add(0.098f);
-                    lightRange.Add(50f);
-                    gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
-                    gameObject3.GetComponent<Light>().intensity = num2;
-                    gameObject3.GetComponent<Light>().spotAngle = 50f;
-                    gameObject3.GetComponent<Light>().range = 10f;
-                    gameObject3.GetComponent<Light>().type = LightType.Directional;
-                    gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
-                    gameObject3.GetComponent<Light>().cullingMask = 256;
+
+                    if (lightList.Count == 0)
+                    {
+                        float num2 = 2f;
+                        if (Application.unityVersion.StartsWith("4"))
+                        {
+                            num2 = 1f;
+                        }
+
+                        GameObject gameObject3 = new GameObject("Light");
+                        gameObject3.AddComponent<Light>();
+                        lightList.Add(gameObject3);
+                        lightColorR.Add(1f);
+                        lightColorG.Add(1f);
+                        lightColorB.Add(1f);
+                        lightIndex.Add(0);
+                        lightX.Add(40f);
+                        lightY.Add(180f);
+                        lightAkarusa.Add(num2);
+                        lightKage.Add(0.098f);
+                        lightRange.Add(50f);
+                        gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
+                        gameObject3.GetComponent<Light>().intensity = num2;
+                        gameObject3.GetComponent<Light>().spotAngle = 50f;
+                        gameObject3.GetComponent<Light>().range = 10f;
+                        gameObject3.GetComponent<Light>().type = LightType.Directional;
+                        gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
+                        gameObject3.GetComponent<Light>().cullingMask = 256;
+
+                        // lightComboList = new GUIContent[lightList.Count];
+                        // lightComboList[0] = new GUIContent("メイン");
+                        // lightCombo.selectedItemIndex = 0;
+                        // selectLightIndex = 0;
+                    }
                 }
 
                 if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
@@ -5211,6 +5220,8 @@ namespace CM3D2.MultipleMaids.Plugin
                                                 gizmoHandR[i].Visible = false;
                                                 gizmoFootL[i].Visible = false;
                                                 gizmoFootR[i].Visible = false;
+                                                gizmoNeck[i].Visible = false;
+                                                gizmoPelvis[i].Visible = false;
                                             }
 
                                             if (flag13)

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

@@ -4358,31 +4358,40 @@ namespace CM3D2.MultipleMaids.Plugin
                     subcamera.cullingMask = 256;
                     subcamera.depth = 1f;
                     subcamera.transform.parent = mainCamera.transform;
-                    float num = 2f;
-                    if (Application.unityVersion.StartsWith("4"))
-                    {
-                        num = 1f;
-                    }
-
-                    GameObject gameObject = new GameObject("Light");
-                    gameObject.AddComponent<Light>();
-                    lightList.Add(gameObject);
-                    lightColorR.Add(1f);
-                    lightColorG.Add(1f);
-                    lightColorB.Add(1f);
-                    lightIndex.Add(0);
-                    lightX.Add(40f);
-                    lightY.Add(180f);
-                    lightAkarusa.Add(num);
-                    lightKage.Add(0.098f);
-                    lightRange.Add(50f);
-                    gameObject.transform.position = GameMain.Instance.MainLight.transform.position;
-                    gameObject.GetComponent<Light>().intensity = 2f;
-                    gameObject.GetComponent<Light>().spotAngle = 50f;
-                    gameObject.GetComponent<Light>().range = 10f;
-                    gameObject.GetComponent<Light>().type = LightType.Directional;
-                    gameObject.GetComponent<Light>().color = new Color(0.5f, 1f, 0.0f);
-                    gameObject.GetComponent<Light>().cullingMask = 256;
+
+                    if (lightList.Count == 0)
+                    {
+                        float num = 2f;
+                        if (Application.unityVersion.StartsWith("4"))
+                        {
+                            num = 1f;
+                        }
+
+                        GameObject gameObject = new GameObject("Light");
+                        gameObject.AddComponent<Light>();
+                        lightList.Add(gameObject);
+                        lightColorR.Add(1f);
+                        lightColorG.Add(1f);
+                        lightColorB.Add(1f);
+                        lightIndex.Add(0);
+                        lightX.Add(40f);
+                        lightY.Add(180f);
+                        lightAkarusa.Add(num);
+                        lightKage.Add(0.098f);
+                        lightRange.Add(50f);
+                        gameObject.transform.position = GameMain.Instance.MainLight.transform.position;
+                        gameObject.GetComponent<Light>().intensity = 2f;
+                        gameObject.GetComponent<Light>().spotAngle = 50f;
+                        gameObject.GetComponent<Light>().range = 10f;
+                        gameObject.GetComponent<Light>().type = LightType.Directional;
+                        gameObject.GetComponent<Light>().color = new Color(0.5f, 1f, 0.0f);
+                        gameObject.GetComponent<Light>().cullingMask = 256;
+
+                        // lightComboList = new GUIContent[lightList.Count];
+                        // lightComboList[0] = new GUIContent("メイン");
+                        // lightCombo.selectedItemIndex = 0;
+                        // selectLightIndex = 0;
+                    }
                 }
 
                 if ((!isF6S || !getModKeyPressing(modKey.Shift) || !Input.GetKeyDown(KeyCode.F6))