denikson 5 years ago
parent
commit
f6906bf2de
43 changed files with 809 additions and 194 deletions
  1. 5 5
      Assembly-CSharp.sln
  2. 1 1
      Assembly-CSharp/Assembly-CSharp.csproj
  3. 357 15
      Assembly-CSharp/BaseKagManager.cs
  4. 1 1
      Assembly-CSharp/BasePhotoCustomObject.cs
  5. 1 1
      Assembly-CSharp/BasePhotoWindowManager.cs
  6. 130 4
      Assembly-CSharp/BipedIKCtrlData.cs
  7. 7 7
      Assembly-CSharp/BodyCtrlData.cs
  8. 4 4
      Assembly-CSharp/CMSystem.cs
  9. 3 3
      Assembly-CSharp/CharacterMgr.cs
  10. 2 2
      Assembly-CSharp/ControllerShortcutSettingData.cs
  11. 8 5
      Assembly-CSharp/DanceMain.cs
  12. 1 1
      Assembly-CSharp/DanceSelect.cs
  13. 1 1
      Assembly-CSharp/DeskManager.cs
  14. 3 3
      Assembly-CSharp/DynamicBone.cs
  15. 1 1
      Assembly-CSharp/DynamicSkirtBone.cs
  16. 1 1
      Assembly-CSharp/EditMod.cs
  17. 1 1
      Assembly-CSharp/FABRIKCtrlData.cs
  18. 1 1
      Assembly-CSharp/FacilityManager.cs
  19. 60 30
      Assembly-CSharp/FullBodyIKCtrl.cs
  20. 2 2
      Assembly-CSharp/GameMain.cs
  21. 2 2
      Assembly-CSharp/GameUty.cs
  22. 2 2
      Assembly-CSharp/HandSignShortcut.cs
  23. 4 4
      Assembly-CSharp/HeightIKCtrlData.cs
  24. 116 54
      Assembly-CSharp/IKCtrlData.cs
  25. 21 14
      Assembly-CSharp/IKManager.cs
  26. 22 1
      Assembly-CSharp/KaraokeDataManager.cs
  27. 1 1
      Assembly-CSharp/Kasizuki/KasizukiManager.cs
  28. 8 8
      Assembly-CSharp/Maid.cs
  29. 1 1
      Assembly-CSharp/MaidParts.cs
  30. 1 1
      Assembly-CSharp/MaidProp.cs
  31. 1 1
      Assembly-CSharp/MaidStatus/Status.cs
  32. 1 1
      Assembly-CSharp/Menu.cs
  33. 1 1
      Assembly-CSharp/Misc.cs
  34. 1 1
      Assembly-CSharp/ModCompile.cs
  35. 2 2
      Assembly-CSharp/OvrIK.cs
  36. 1 1
      Assembly-CSharp/PhotoModeSaveAndLoad.cs
  37. 1 1
      Assembly-CSharp/PlayerStatus/Status.cs
  38. 6 0
      Assembly-CSharp/ScenarioData.cs
  39. 1 0
      Assembly-CSharp/SceneVRCommunication.cs
  40. 14 4
      Assembly-CSharp/ScriptManager.cs
  41. 7 3
      Assembly-CSharp/VRCanvasManager.cs
  42. 1 1
      Assembly-CSharp/WindowPartsFingerPreset.cs
  43. 4 1
      Assembly-CSharp/uGUIKaraokeSelect.cs

+ 5 - 5
Assembly-CSharp.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
 VisualStudioVersion = 15.0.26228.4
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{8DCC3E84-9584-4D72-87B5-7E89D4EBDF34}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{7F31A4C4-ED55-47E7-9932-5EF84C7E61DE}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +11,10 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{8DCC3E84-9584-4D72-87B5-7E89D4EBDF34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{8DCC3E84-9584-4D72-87B5-7E89D4EBDF34}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{8DCC3E84-9584-4D72-87B5-7E89D4EBDF34}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{8DCC3E84-9584-4D72-87B5-7E89D4EBDF34}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7F31A4C4-ED55-47E7-9932-5EF84C7E61DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7F31A4C4-ED55-47E7-9932-5EF84C7E61DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7F31A4C4-ED55-47E7-9932-5EF84C7E61DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7F31A4C4-ED55-47E7-9932-5EF84C7E61DE}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 1 - 1
Assembly-CSharp/Assembly-CSharp.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{8DCC3E84-9584-4D72-87B5-7E89D4EBDF34}</ProjectGuid>
+    <ProjectGuid>{7F31A4C4-ED55-47E7-9932-5EF84C7E61DE}</ProjectGuid>
     <OutputType>Library</OutputType>
     <RootNamespace>Assembly-CSharp</RootNamespace>
     <AssemblyName>Assembly-CSharp</AssemblyName>

+ 357 - 15
Assembly-CSharp/BaseKagManager.cs

@@ -55,6 +55,7 @@ public class BaseKagManager : IDisposable
 		this.kag_.AddTagCallBack("ikattachikbone", new KagScript.KagTagCallBack(this.TagIKAttachIKBone));
 		this.kag_.AddTagCallBack("setbodypos", new KagScript.KagTagCallBack(this.TagSetBodyPos));
 		this.kag_.AddTagCallBack("ikcheckthrough", new KagScript.KagTagCallBack(this.TagIKCheckThrough));
+		this.kag_.AddTagCallBack("bendbonectrl", new KagScript.KagTagCallBack(this.TagBendBoneCtrl));
 		this.kag_.AddTagCallBack("nextikflag", new KagScript.KagTagCallBack(this.TagNextIKFlag));
 		this.kag_.AddTagCallBack("ikattachpointnext", new KagScript.KagTagCallBack(this.TagIKAttachPointNext));
 		this.kag_.AddTagCallBack("ikattachbonenext", new KagScript.KagTagCallBack(this.TagIKAttachBoneNext));
@@ -956,7 +957,7 @@ public class BaseKagManager : IDisposable
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
 		string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -974,10 +975,54 @@ public class BaseKagManager : IDisposable
 		{
 			zero.z = tag_data.GetTagProperty("offsetz").AsReal();
 		}
-		IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point;
+		IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
 		if (tag_data.IsValid("attach_type"))
 		{
-			attach_type = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
+			ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
+		}
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
+		{
+			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
+			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_28C:
+				i++;
+				continue;
+				goto IL_28C;
+			}
 		}
 		string axisbone = string.Empty;
 		if (tag_data.IsValid("axisbone"))
@@ -994,7 +1039,7 @@ public class BaseKagManager : IDisposable
 		{
 			do_animation = true;
 		}
-		maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, attach_type, axisbone, blend_time, do_animation, false);
+		maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, blend_time, do_animation, false);
 		return false;
 	}
 
@@ -1015,7 +1060,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1044,6 +1089,45 @@ public class BaseKagManager : IDisposable
 			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
 			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
 		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_27F:
+				i++;
+				continue;
+				goto IL_27F;
+			}
+		}
 		float blend_time = 0f;
 		if (tag_data.IsValid("blendtime"))
 		{
@@ -1071,7 +1155,7 @@ public class BaseKagManager : IDisposable
 			return false;
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1120,7 +1204,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string odogu_name = tag_data.GetTagProperty("odogu").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1153,6 +1237,45 @@ public class BaseKagManager : IDisposable
 			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
 			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
 		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_267:
+				i++;
+				continue;
+				goto IL_267;
+			}
+		}
 		float blend_time = 0f;
 		if (tag_data.IsValid("blendtime"))
 		{
@@ -1184,7 +1307,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string bone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1212,6 +1335,45 @@ public class BaseKagManager : IDisposable
 			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
 			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
 		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_272:
+				i++;
+				continue;
+				goto IL_272;
+			}
+		}
 		float blend_time = 0f;
 		if (tag_data.IsValid("blendtime"))
 		{
@@ -1323,7 +1485,7 @@ public class BaseKagManager : IDisposable
 			return false;
 		}
 		string tag_name = tag_data.GetTagProperty("srcbone").AsString();
-		BipedIKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData<BipedIKCtrlData>(tag_name);
+		BipedIKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData<BipedIKCtrlData>(tag_name, false);
 		if (tag_data.IsValid("correctbone"))
 		{
 			ikdata.ToCorrectBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("correctbone").AsString());
@@ -1375,6 +1537,30 @@ public class BaseKagManager : IDisposable
 		return false;
 	}
 
+	public bool TagBendBoneCtrl(KagTagSupport tag_data)
+	{
+		this.CheckAbsolutelyNecessaryTag(tag_data, "bendbonectrl", new string[]
+		{
+			"src",
+			"srcbone",
+			"flagobj"
+		});
+		Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
+		if (maidAndMan == null)
+		{
+			return false;
+		}
+		string tag_name = tag_data.GetTagProperty("srcbone").AsString();
+		BipedIKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData<BipedIKCtrlData>(tag_name, false);
+		if (!ikdata)
+		{
+			return false;
+		}
+		string bendweightCtrl = tag_data.GetTagProperty("flagobj").AsString();
+		ikdata.SetBendweightCtrl(bendweightCtrl);
+		return false;
+	}
+
 	public bool TagNextIKFlag(KagTagSupport tag_data)
 	{
 		this.CheckAbsolutelyNecessaryTag(tag_data, "nextikflag", new string[]
@@ -1389,7 +1575,7 @@ public class BaseKagManager : IDisposable
 			return false;
 		}
 		string tag_name = tag_data.GetTagProperty("srcbone").AsString();
-		IKCtrlData ik_data = maidAndMan.IKCtrl.GetIKData(tag_name);
+		IKCtrlData ik_data = maidAndMan.IKCtrl.GetIKData(tag_name, false);
 		if (!ik_data)
 		{
 			return false;
@@ -1440,7 +1626,7 @@ public class BaseKagManager : IDisposable
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
 		string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1468,6 +1654,45 @@ public class BaseKagManager : IDisposable
 			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
 			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
 		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_28C:
+				i++;
+				continue;
+				goto IL_28C;
+			}
+		}
 		string axisbone = string.Empty;
 		if (tag_data.IsValid("axisbone"))
 		{
@@ -1504,7 +1729,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1533,6 +1758,45 @@ public class BaseKagManager : IDisposable
 			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
 			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
 		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_27F:
+				i++;
+				continue;
+				goto IL_27F;
+			}
+		}
 		float blend_time = 0f;
 		if (tag_data.IsValid("blendtime"))
 		{
@@ -1562,7 +1826,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string odogu_name = tag_data.GetTagProperty("odogu").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1595,6 +1859,45 @@ public class BaseKagManager : IDisposable
 			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
 			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
 		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_267:
+				i++;
+				continue;
+				goto IL_267;
+			}
+		}
 		float blend_time = 0f;
 		if (tag_data.IsValid("blendtime"))
 		{
@@ -1626,7 +1929,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string bone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
 		if (!ikdata)
 		{
 			return false;
@@ -1654,6 +1957,45 @@ public class BaseKagManager : IDisposable
 			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
 			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
 		}
+		ikdata.GetIKEnable(ikattachType).Recet();
+		if (tag_data.IsValid("disable"))
+		{
+			string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
+			{
+				','
+			});
+			int i = 0;
+			while (i < array.Length)
+			{
+				string text2 = array[i];
+				string text3 = text2.ToLower();
+				if (text3 != null)
+				{
+					if (!(text3 == "x"))
+					{
+						if (!(text3 == "y"))
+						{
+							if (text3 == "z")
+							{
+								ikdata.GetIKEnable(ikattachType).EnableZ = false;
+							}
+						}
+						else
+						{
+							ikdata.GetIKEnable(ikattachType).EnableY = false;
+						}
+					}
+					else
+					{
+						ikdata.GetIKEnable(ikattachType).EnableX = false;
+					}
+				}
+				IL_272:
+				i++;
+				continue;
+				goto IL_272;
+			}
+		}
 		float blend_time = 0f;
 		if (tag_data.IsValid("blendtime"))
 		{
@@ -4732,7 +5074,7 @@ public class BaseKagManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_KAG");
-		binary.Write(1170);
+		binary.Write(1180);
 		byte[] array = this.kag_.Serialize();
 		int value = array.Length;
 		binary.Write(value);

+ 1 - 1
Assembly-CSharp/BasePhotoCustomObject.cs

@@ -173,7 +173,7 @@ public abstract class BasePhotoCustomObject : MonoBehaviour, IComparable<BasePho
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write("COM3D2_PHOTO_CUSTOM_OBJECT");
-				binaryWriter.Write(1170);
+				binaryWriter.Write(1180);
 				binaryWriter.Write(this.type.ToString());
 				binaryWriter.Write(this.scale_);
 				binaryWriter.Write(this.enabledTextureColor_);

+ 1 - 1
Assembly-CSharp/BasePhotoWindowManager.cs

@@ -153,7 +153,7 @@ public abstract class BasePhotoWindowManager : MonoBehaviour
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write(this.save_header_uidata);
-				binaryWriter.Write(1170);
+				binaryWriter.Write(1180);
 				binaryWriter.Write(this.save_data_.Count);
 				foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair3 in this.save_data_)
 				{

+ 130 - 4
Assembly-CSharp/BipedIKCtrlData.cs

@@ -20,7 +20,8 @@ public class BipedIKCtrlData : IKCtrlData
 		this.RootEffector.target = this.CreateSubTarget("ChainRootBone");
 		this.m_RootBoneTgtPair = new IKCtrlData.BoneTgtPair(this.RootEffector.bone, this.RootEffector.target);
 		this.m_ForceIKEnable = true;
-		this.ToCorrectBone = base.TargetBone;
+		this.ToCorrectBone = this.TargetBone;
+		this.m_BendweitCtrl.Axis = Vector3.up;
 	}
 
 	public Transform BendBone
@@ -31,6 +32,38 @@ public class BipedIKCtrlData : IKCtrlData
 		}
 	}
 
+	public Transform RootBone
+	{
+		get
+		{
+			return this.m_RootBoneTgtPair.Bone;
+		}
+	}
+
+	public IKCtrlData.ChangeFlagData BendweightCtrl
+	{
+		get
+		{
+			return this.m_BendweitCtrl;
+		}
+	}
+
+	public override Transform TargetBone
+	{
+		get
+		{
+			if (this.IsRootIK)
+			{
+				return this.RootBone;
+			}
+			if (this.IsBendIK)
+			{
+				return this.BendBone;
+			}
+			return base.TargetBone;
+		}
+	}
+
 	public override Transform[] ChainBones
 	{
 		get
@@ -112,10 +145,69 @@ public class BipedIKCtrlData : IKCtrlData
 		}
 	}
 
+	protected override void SetTargetTransform(IKCtrlData.IKParam data, Vector3 pos, Quaternion rot)
+	{
+		base.SetTargetTransform(data, pos, rot);
+		Transform target = this.m_BoneBendGoal.Target;
+		Transform target2 = this.m_RootBoneTgtPair.Target;
+		Vector3 position = target2.InverseTransformPoint(target.position);
+		Vector3 position2 = this.m_BoneBendGoal.Bone.InverseTransformPoint(base.TargetBone.position);
+		if (this.IsRootIK)
+		{
+			if (data.IsPointAttach)
+			{
+				this.RootEffector.positionWeight = this.PositionWeight;
+				target2.position = base.IKTarget.position;
+			}
+			else
+			{
+				this.RootEffector.rotationWeight = this.RotationWeight;
+				target2.rotation = base.IKTarget.rotation;
+				base.IKTarget.rotation = base.TargetBone.rotation;
+			}
+			target.position = target2.TransformPoint(position);
+			base.IKTarget.position = target.TransformPoint(position2);
+		}
+		else if (this.IsBendIK)
+		{
+			if (data.IsPointAttach)
+			{
+				this.Chain.bendConstraint.weight = this.PositionWeight;
+				this.RootEffector.positionWeight = (this.RootEffector.rotationWeight = this.PositionWeight);
+				target2.rotation = Quaternion.FromToRotation(target.position - target2.position, base.IKTarget.position - target2.position) * target2.rotation;
+				Vector3 b = base.IKTarget.position - target2.TransformPoint(position);
+				target2.position += b;
+				target.position = base.IKTarget.position;
+			}
+			else
+			{
+				this.m_BoneBendGoal.Target.rotation = base.IKTarget.rotation;
+				base.IKTarget.rotation = base.TargetBone.rotation;
+			}
+			base.IKTarget.position = this.m_BoneBendGoal.Target.TransformPoint(position2);
+		}
+	}
+
+	public void SetBendweightCtrl(string name)
+	{
+		if (this.MyIKCtrl.TgtMaid.boMAN)
+		{
+			this.BendweightCtrl.Target = this.MyIKCtrl.TgtBody.GetBone(name);
+		}
+		else
+		{
+			this.BendweightCtrl.Target = this.MyIKCtrl.GetSTFlagObj(name);
+		}
+	}
+
 	public override void ApplyIKSetting()
 	{
 		this.m_BoneBendGoal.Cppy();
 		this.m_RootBoneTgtPair.Cppy();
+		if (!this.IsBendIK && !this.IsRootIK && this.m_BendweitCtrl.IsEnable)
+		{
+			this.Chain.bendConstraint.weight = 1f - this.m_BendweitCtrl.Value01();
+		}
 		base.ApplyIKSetting();
 		if (base.ForceIK)
 		{
@@ -124,9 +216,23 @@ public class BipedIKCtrlData : IKCtrlData
 		}
 	}
 
+	public override void SetIKSetting(IKCtrlData.IKAttachType attachType, bool is_next, Maid tgt_maid, int slot_no, string attach_name, Transform axis_bone, Transform target, Vector3 f_vecOffset, bool do_animation = false, float blend_time = 0f)
+	{
+		base.SetIKSetting(attachType, is_next, tgt_maid, slot_no, attach_name, axis_bone, target, f_vecOffset, do_animation, blend_time);
+		if (this.IsRootIK)
+		{
+			base.BlendPosRot.Copy(this.m_lastRootPosRot);
+		}
+		else if (this.IsBendIK)
+		{
+			base.BlendPosRot.Copy(this.m_lastBendPosRot);
+		}
+	}
+
 	public override void Detach(IKCtrlData.IKAttachType attachType, float blend_time = 0f)
 	{
 		base.Detach(attachType, blend_time);
+		this.IsRootIK = (this.IsBendIK = false);
 		this.Chain.bendConstraint.weight = 1f;
 		this.RootEffector.positionWeight = 0f;
 		this.RootEffector.rotationWeight = 0f;
@@ -134,8 +240,9 @@ public class BipedIKCtrlData : IKCtrlData
 		this.m_RootBoneTgtPair.PosOffset = Vector3.zero;
 		this.WallCorrect.Reset();
 		this.FloorCorrect.Reset();
-		this.ToCorrectBone = base.TargetBone;
+		this.ToCorrectBone = this.TargetBone;
 		this.CorrectType = BipedIKCtrlData.BorderCorrectType.Bone;
+		this.m_BendweitCtrl.Reset();
 	}
 
 	public override void SetTargetOffset(Vector3 offset, bool inverse = false)
@@ -145,14 +252,27 @@ public class BipedIKCtrlData : IKCtrlData
 			return;
 		}
 		base.SetTargetOffset(offset, inverse);
-		this.m_BoneBendGoal.PosOffset = this.m_OffsetEnable.GetEnablePos(offset, inverse);
-		this.m_RootBoneTgtPair.PosOffset = this.m_OffsetEnable.GetEnablePos(offset, inverse);
+		this.m_BoneBendGoal.PosOffset = this.m_OffsetEnable.GetEnable(offset, inverse);
+		this.m_RootBoneTgtPair.PosOffset = this.m_OffsetEnable.GetEnable(offset, inverse);
+	}
+
+	public override void LateUpdate()
+	{
+		base.LateUpdate();
+		this.m_lastBendPosRot.Copy(this.m_BoneBendGoal.Bone);
+		this.m_lastRootPosRot.Copy(this.m_RootBoneTgtPair.Bone);
 	}
 
 	private IKCtrlData.BoneTgtPair m_BoneBendGoal;
 
+	private IKCtrlData.PosRotPair m_lastBendPosRot = new IKCtrlData.PosRotPair();
+
+	private IKCtrlData.ChangeFlagData m_BendweitCtrl = new IKCtrlData.ChangeFlagData();
+
 	private IKCtrlData.BoneTgtPair m_RootBoneTgtPair;
 
+	private IKCtrlData.PosRotPair m_lastRootPosRot = new IKCtrlData.PosRotPair();
+
 	[Header("壁・床補正情報")]
 	public BipedIKCtrlData.BorderCorrectData WallCorrect = new BipedIKCtrlData.BorderCorrectData(Vector3.forward);
 
@@ -162,6 +282,12 @@ public class BipedIKCtrlData : IKCtrlData
 
 	public Transform ToCorrectBone;
 
+	[Header("肘・膝をターゲットに合わせるフラグ")]
+	public bool IsBendIK;
+
+	[Header("肘・膝をターゲットに合わせるフラグ")]
+	public bool IsRootIK;
+
 	public readonly IKEffector Effector;
 
 	public readonly FBIKChain Chain;

+ 7 - 7
Assembly-CSharp/BodyCtrlData.cs

@@ -6,7 +6,7 @@ public class BodyCtrlData : IKCtrlData
 {
 	public BodyCtrlData(FullBodyIKCtrl ik_ctrl) : base(ik_ctrl, ik_ctrl.GetIKBone(IKManager.BoneType.Root), false, false)
 	{
-		this.PosBaseBone = base.TargetBone;
+		this.PosBaseBone = this.TargetBone;
 		this.m_ForceIKEnable = false;
 	}
 
@@ -94,8 +94,8 @@ public class BodyCtrlData : IKCtrlData
 			}
 			else if (this.OffsetBone)
 			{
-				KasaiUtility.DrawAxis(pos, base.TargetBone.rotation, 0.0625f);
-				base.IKTarget.position = pos + base.TargetBone.rotation * data.TgtOffset;
+				KasaiUtility.DrawAxis(pos, this.TargetBone.rotation, 0.0625f);
+				base.IKTarget.position = pos + this.TargetBone.rotation * data.TgtOffset;
 			}
 			else
 			{
@@ -103,18 +103,18 @@ public class BodyCtrlData : IKCtrlData
 			}
 			Debug.DrawLine(pos, base.IKTarget.position, Color.white);
 		}
-		Vector3 enablePos = this.m_OffsetEnable.GetEnablePos(base.IKTarget.position - b, false);
+		Vector3 enable = this.m_OffsetEnable.GetEnable(base.IKTarget.position - b, false);
 		if (data.BlendType == IKCtrlData.IKBlendType.IK_To_IK)
 		{
-			this.m_PosOffset += Vector3.Lerp(this.m_lastPosOffset, enablePos, data.BlendWeight);
+			this.m_PosOffset += Vector3.Lerp(this.m_lastPosOffset, enable, data.BlendWeight);
 		}
 		else if (data.BlendType == IKCtrlData.IKBlendType.IK_To_Detach)
 		{
-			this.m_PosOffset += Vector3.Lerp(Vector3.zero, enablePos, 1f - data.BlendWeight);
+			this.m_PosOffset += Vector3.Lerp(Vector3.zero, enable, 1f - data.BlendWeight);
 		}
 		else
 		{
-			this.m_PosOffset += Vector3.Lerp(Vector3.zero, enablePos, data.BlendWeight);
+			this.m_PosOffset += Vector3.Lerp(Vector3.zero, enable, data.BlendWeight);
 		}
 	}
 

+ 4 - 4
Assembly-CSharp/CMSystem.cs

@@ -808,7 +808,7 @@ public class CMSystem
 	{
 		XElement xelement = new XElement("Config", new object[]
 		{
-			new XAttribute("Version", 1170),
+			new XAttribute("Version", 1180),
 			new XElement("System", new XElement("SysButtonShowAlways", this.SysButtonShowAlways)),
 			new XElement("Screen", new object[]
 			{
@@ -1125,7 +1125,7 @@ public class CMSystem
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_SYSTEM2");
-		binaryWriter.Write(1170);
+		binaryWriter.Write(1180);
 		binaryWriter.Write(this.m_dicEditColorPresetData.Count);
 		foreach (KeyValuePair<int, Dictionary<string, int>> keyValuePair in this.m_dicEditColorPresetData)
 		{
@@ -1697,7 +1697,7 @@ public class CMSystem
 
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1170;
+			this.m_nVersion = 1180;
 		}
 
 		public void OnAfterDeserialize()
@@ -1705,7 +1705,7 @@ public class CMSystem
 		}
 
 		[SerializeField]
-		private int m_nVersion = 1170;
+		private int m_nVersion = 1180;
 
 		[SerializeField]
 		private string m_strDShowFilter = "Microsoft DTV-DVD Video Decoder";

+ 3 - 3
Assembly-CSharp/CharacterMgr.cs

@@ -949,7 +949,7 @@ public class CharacterMgr : MonoBehaviour
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		string result = string.Empty;
 		binaryWriter.Write("CM3D2_PRESET_S");
-		binaryWriter.Write(1170);
+		binaryWriter.Write(1180);
 		binaryWriter.Write((char)presset_type);
 		maid.SerializePropLowCapacity(binaryWriter);
 		maid.SerializeMultiColor(binaryWriter);
@@ -966,7 +966,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1170);
+		binaryWriter.Write(1180);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1246,7 +1246,7 @@ public class CharacterMgr : MonoBehaviour
 	public bool Serialize(BinaryWriter bwWrite)
 	{
 		bwWrite.Write("CM3D2_CHR_MGR");
-		bwWrite.Write(1170);
+		bwWrite.Write(1180);
 		this.m_PlayerStatus.Serialize(bwWrite);
 		bwWrite.Write(this.m_listStockMan.Count);
 		for (int i = 0; i < this.m_listStockMan.Count; i++)

+ 2 - 2
Assembly-CSharp/ControllerShortcutSettingData.cs

@@ -33,7 +33,7 @@ public static class ControllerShortcutSettingData
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1170;
+			this.m_nVersion = 1180;
 		}
 
 		public void OnAfterDeserialize()
@@ -261,7 +261,7 @@ public static class ControllerShortcutSettingData
 		private const string CONF_NAME = "OvrControllerShortcutConfig.json";
 
 		[SerializeField]
-		private int m_nVersion = 1170;
+		private int m_nVersion = 1180;
 
 		[SerializeField]
 		private bool IsDirectShortcutMode = true;

+ 8 - 5
Assembly-CSharp/DanceMain.cs

@@ -204,7 +204,7 @@ public class DanceMain : MonoBehaviour
 				}
 			}
 		}
-		if (RhythmAction_Mgr.Instance.FactOrderList.Any((Maid e) => !e))
+		if (RhythmAction_Mgr.Instance.FactOrderList.Any((Maid e) => !e) || DanceMain.SelectDanceData == null)
 		{
 			for (int num2 = 0; num2 < this.m_listTestPreset.Count; num2++)
 			{
@@ -230,12 +230,15 @@ public class DanceMain : MonoBehaviour
 					maid2.Visible = true;
 				}
 			}
-			for (int num3 = 0; num3 < DanceMain.SelectDanceData.maid_order.Count; num3++)
+			if (DanceMain.SelectDanceData != null)
 			{
-				int index2 = DanceMain.SelectDanceData.maid_order[num3];
-				if (!RhythmAction_Mgr.Instance.FactOrderList[index2])
+				for (int num3 = 0; num3 < DanceMain.SelectDanceData.maid_order.Count; num3++)
 				{
-					RhythmAction_Mgr.Instance.FactOrderList[index2] = GameMain.Instance.CharacterMgr.GetMaid(num3);
+					int index2 = DanceMain.SelectDanceData.maid_order[num3];
+					if (!RhythmAction_Mgr.Instance.FactOrderList[index2])
+					{
+						RhythmAction_Mgr.Instance.FactOrderList[index2] = GameMain.Instance.CharacterMgr.GetMaid(num3);
+					}
 				}
 			}
 		}

+ 1 - 1
Assembly-CSharp/DanceSelect.cs

@@ -666,7 +666,7 @@ public class DanceSelect : WfScreenChildren
 				for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
 				{
 					Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
-					if (!stockMaid.status.mainChara || stockMaid.status.heroineType != HeroineType.Original)
+					if (!stockMaid.status.mainChara || stockMaid.status.heroineType != HeroineType.Original || !ScenarioData.IsMainPersonal(stockMaid))
 					{
 						this.chara_select_mgr_.RemoveMaidPlate(stockMaid);
 					}

+ 1 - 1
Assembly-CSharp/DeskManager.cs

@@ -143,7 +143,7 @@ internal class DeskManager
 	public static void SerializeSingleSaveData(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_DeskCustomize");
-		binary.Write(1170);
+		binary.Write(1180);
 		binary.Write(DeskManager.item_inst_data_.Count);
 		for (int i = 0; i < DeskManager.item_inst_data_.Count; i++)
 		{

+ 3 - 3
Assembly-CSharp/DynamicBone.cs

@@ -30,7 +30,7 @@ public class DynamicBone : MonoBehaviour
 			return false;
 		};
 		f_bw.Write("CM3D21_PHY");
-		f_bw.Write(1170);
+		f_bw.Write(1180);
 		if (this.m_Root == null)
 		{
 			NDebug.MessageBox("エラー", "×物理ルートボーンが設定されていません。");
@@ -94,7 +94,7 @@ public class DynamicBone : MonoBehaviour
 	public bool SerializeWriteCollider(BinaryWriter f_bw, string f_strFileName)
 	{
 		f_bw.Write("CM3D21_COL");
-		f_bw.Write(1170);
+		f_bw.Write(1180);
 		if (this.m_Colliders == null || this.m_Colliders.Count == 0)
 		{
 			NDebug.MessageBox("エラー", "×物理Collidersは空です。");
@@ -110,7 +110,7 @@ public class DynamicBone : MonoBehaviour
 			else
 			{
 				f_bw.Write(this.m_Colliders[i].TypeName);
-				this.m_Colliders[i].Serialize(f_bw, 1170);
+				this.m_Colliders[i].Serialize(f_bw, 1180);
 			}
 		}
 		this.m_ColliderFileName = f_strFileName;

+ 1 - 1
Assembly-CSharp/DynamicSkirtBone.cs

@@ -18,7 +18,7 @@ public class DynamicSkirtBone : MonoBehaviour
 	public bool SerializeWrite(BinaryWriter f_bw)
 	{
 		f_bw.Write("CM3D21_PSK");
-		f_bw.Write(1170);
+		f_bw.Write(1180);
 		f_bw.Write(this.m_fPanierRadius);
 		this.SerializeWriteAnimationCurve(f_bw, this.m_PanierRadiusDistrib);
 		int num = (this.m_PanierRadiusDistribGroup == null) ? 0 : this.m_PanierRadiusDistribGroup.Length;

+ 1 - 1
Assembly-CSharp/EditMod.cs

@@ -265,7 +265,7 @@ public class EditMod : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MOD");
-		binaryWriter.Write(1170);
+		binaryWriter.Write(1180);
 		binaryWriter.Write(value);
 		binaryWriter.Write(text2.ToLower());
 		binaryWriter.Write(value2);

+ 1 - 1
Assembly-CSharp/FABRIKCtrlData.cs

@@ -55,7 +55,7 @@ public class FABRIKCtrlData : IKCtrlData
 		this.FABRIK.solver.Update();
 		if (base.RotateIK.IsIKExec)
 		{
-			base.TargetBone.rotation = Quaternion.Lerp(base.TargetBone.rotation, base.IKTarget.rotation, this.RotationWeight);
+			this.TargetBone.rotation = Quaternion.Lerp(this.TargetBone.rotation, base.IKTarget.rotation, this.RotationWeight);
 		}
 	}
 

+ 1 - 1
Assembly-CSharp/FacilityManager.cs

@@ -657,7 +657,7 @@ public class FacilityManager : MonoBehaviour
 		Stopwatch stopwatch = new Stopwatch();
 		stopwatch.Start();
 		brWrite.Write("CM3D21_FACILITY_MGR");
-		brWrite.Write(1170);
+		brWrite.Write(1180);
 		brWrite.Write("5");
 		int num = 0;
 		for (int i = 0; i < this.m_FacilityArray.Count; i++)

+ 60 - 30
Assembly-CSharp/FullBodyIKCtrl.cs

@@ -118,18 +118,20 @@ public class FullBodyIKCtrl : MonoBehaviour
 		return (BodyCtrlData)this.m_strIKDataPair[key_str];
 	}
 
-	private BipedIKCtrlData SafeAddFullbodyIKData(string key_str, IKEffector effector, FBIKChain chain, IKMappingLimb ik_mapping, IKEffector sub_effector, bool use_old = false)
+	private BipedIKCtrlData SafeAddFullbodyIKData(string key_str, string bend_key, string root_key, IKEffector effector, FBIKChain chain, IKMappingLimb ik_mapping, IKEffector sub_effector, bool use_old = false)
 	{
-		BipedIKCtrlData value = new BipedIKCtrlData(effector, chain, ik_mapping, this, effector.bone, sub_effector, use_old);
+		BipedIKCtrlData bipedIKCtrlData = new BipedIKCtrlData(effector, chain, ik_mapping, this, effector.bone, sub_effector, use_old);
 		if (this.m_strIKDataPair.ContainsKey(key_str))
 		{
-			this.m_strIKDataPair[key_str] = value;
+			this.m_strIKDataPair[key_str] = bipedIKCtrlData;
 		}
 		else
 		{
-			this.m_strIKDataPair.Add(key_str, value);
+			this.m_strIKDataPair.Add(key_str, bipedIKCtrlData);
 		}
-		this.m_FullbodyDataList.Add((BipedIKCtrlData)this.m_strIKDataPair[key_str]);
+		this.m_FullbodyDataList.Add(bipedIKCtrlData);
+		this.m_ForearmCalfIKList.Add(bend_key, bipedIKCtrlData);
+		this.m_SholderThighIKList.Add(root_key, bipedIKCtrlData);
 		return (BipedIKCtrlData)this.m_strIKDataPair[key_str];
 	}
 
@@ -218,6 +220,9 @@ public class FullBodyIKCtrl : MonoBehaviour
 		this.m_CCDDataList.Clear();
 		this.m_ForearmCalfIKList.Clear();
 		this.m_FABRDataList.Clear();
+		this.m_ForearmCalfIKList.Clear();
+		this.m_SholderThighIKList.Clear();
+		this.m_NameFlagObjpair.Clear();
 		this.m_IKBoneDic = IKManager.CreateBoneDic(this.TgtMaid);
 		this.m_FullbodyIK.references.root = this.m_TgtBody.m_trBones;
 		this.m_FullbodyIK.references.pelvis = this.GetIKBone(IKManager.BoneType.Root);
@@ -262,15 +267,11 @@ public class FullBodyIKCtrl : MonoBehaviour
 			fbikchain.bendConstraint.weight = 0f;
 		}
 		this.m_BodyCtrlData = this.SafeAddBodyCtrlData("体全体");
-		this.SafeAddFullbodyIKData("左手", this.m_FullbodyIK.solver.leftHandEffector, this.m_FullbodyIK.solver.leftArmChain, this.m_FullbodyIK.solver.leftArmMapping, this.m_FullbodyIK.solver.leftShoulderEffector, true);
-		this.SafeAddFullbodyIKData("右手", this.m_FullbodyIK.solver.rightHandEffector, this.m_FullbodyIK.solver.rightArmChain, this.m_FullbodyIK.solver.rightArmMapping, this.m_FullbodyIK.solver.rightShoulderEffector, true);
-		this.SafeAddFullbodyIKData("左足", this.m_FullbodyIK.solver.leftFootEffector, this.m_FullbodyIK.solver.leftLegChain, this.m_FullbodyIK.solver.leftLegMapping, this.m_FullbodyIK.solver.leftThighEffector, false);
-		this.SafeAddFullbodyIKData("右足", this.m_FullbodyIK.solver.rightFootEffector, this.m_FullbodyIK.solver.rightLegChain, this.m_FullbodyIK.solver.rightLegMapping, this.m_FullbodyIK.solver.rightThighEffector, false);
+		this.SafeAddFullbodyIKData("左手", "左肘", "左肩", this.m_FullbodyIK.solver.leftHandEffector, this.m_FullbodyIK.solver.leftArmChain, this.m_FullbodyIK.solver.leftArmMapping, this.m_FullbodyIK.solver.leftShoulderEffector, true);
+		this.SafeAddFullbodyIKData("右手", "右肘", "右肩", this.m_FullbodyIK.solver.rightHandEffector, this.m_FullbodyIK.solver.rightArmChain, this.m_FullbodyIK.solver.rightArmMapping, this.m_FullbodyIK.solver.rightShoulderEffector, true);
+		this.SafeAddFullbodyIKData("左足", "左膝", "左腿", this.m_FullbodyIK.solver.leftFootEffector, this.m_FullbodyIK.solver.leftLegChain, this.m_FullbodyIK.solver.leftLegMapping, this.m_FullbodyIK.solver.leftThighEffector, false);
+		this.SafeAddFullbodyIKData("右足", "右膝", "右腿", this.m_FullbodyIK.solver.rightFootEffector, this.m_FullbodyIK.solver.rightLegChain, this.m_FullbodyIK.solver.rightLegMapping, this.m_FullbodyIK.solver.rightThighEffector, false);
 		this.SafeAddCCDIKData("口", ref this.m_MouthIK, true, true, IKManager.BoneType.Mouth, true);
-		this.m_ForearmCalfIKList.Add(this.SafeAddFABRIKData("右肘", ref this.m_ForearmRIK, false, true, IKManager.BoneType.Forearm_R, false));
-		this.m_ForearmCalfIKList.Add(this.SafeAddFABRIKData("左肘", ref this.m_ForearmLIK, false, true, IKManager.BoneType.Forearm_L, false));
-		this.m_ForearmCalfIKList.Add(this.SafeAddFABRIKData("右膝", ref this.m_CalfRIK, false, true, IKManager.BoneType.Calf_R, false));
-		this.m_ForearmCalfIKList.Add(this.SafeAddFABRIKData("左膝", ref this.m_CalfLIK, false, true, IKManager.BoneType.Calf_L, false));
 		if (!this.BodyTarget)
 		{
 			Transform transform = this.m_IKTgtRoot.Find(this.BodyEffector.bone.name);
@@ -334,17 +335,7 @@ public class FullBodyIKCtrl : MonoBehaviour
 		{
 			Vector3 position = this.m_FullbodyIK.references.spine[0].InverseTransformPoint(this.m_FullbodyIK.references.spine[1].position);
 			this.m_FullbodyIK.solver.Update();
-			if (this.GetIKData("右足").IsIKExec || this.GetIKData("左足").IsIKExec)
-			{
-				this.m_FullbodyIK.references.spine[1].position = this.m_FullbodyIK.references.spine[0].TransformPoint(position);
-			}
-		}
-		for (int i = 0; i < this.m_ForearmCalfIKList.Count; i++)
-		{
-			if (this.m_ForearmCalfIKList[i].IsIKExec)
-			{
-				this.m_ForearmCalfIKList[i].Update();
-			}
+			this.m_FullbodyIK.references.spine[1].position = this.m_FullbodyIK.references.spine[0].TransformPoint(position);
 		}
 		foreach (IKCtrlData ikctrlData in this.m_strIKDataPair.Values)
 		{
@@ -578,27 +569,62 @@ public class FullBodyIKCtrl : MonoBehaviour
 		return result;
 	}
 
-	public IKCtrlData GetIKData(string tag_name)
+	public IKCtrlData GetIKData(string tag_name, bool flagcheck = false)
 	{
 		if (this.m_strIKDataPair.ContainsKey(tag_name))
 		{
 			return this.m_strIKDataPair[tag_name];
 		}
+		if (this.m_ForearmCalfIKList.ContainsKey(tag_name))
+		{
+			if (flagcheck)
+			{
+				this.m_ForearmCalfIKList[tag_name].IsBendIK = true;
+			}
+			return this.m_ForearmCalfIKList[tag_name];
+		}
+		if (this.m_SholderThighIKList.ContainsKey(tag_name))
+		{
+			if (flagcheck)
+			{
+				this.m_SholderThighIKList[tag_name].IsRootIK = true;
+			}
+			return this.m_SholderThighIKList[tag_name];
+		}
 		return null;
 	}
 
-	public T GetIKData<T>(string tag_name) where T : IKCtrlData
+	public T GetIKData<T>(string tag_name, bool flagcheck = false) where T : IKCtrlData
 	{
-		if (this.m_strIKDataPair.ContainsKey(tag_name) && this.m_strIKDataPair[tag_name] is T)
+		IKCtrlData ikdata = this.GetIKData(tag_name, flagcheck);
+		if (ikdata != null && ikdata is T)
 		{
-			return this.m_strIKDataPair[tag_name] as T;
+			return ikdata as T;
 		}
 		return (T)((object)null);
 	}
 
 	public Transform GetSTFlagObj(string name)
 	{
-		return this.m_STRoot.Find(name);
+		if (this.m_NameFlagObjpair.ContainsKey(name))
+		{
+			return this.m_NameFlagObjpair[name];
+		}
+		Transform transform = this.m_STRoot.Find(name);
+		if (!transform)
+		{
+			transform = this.TgtBody.GetBone(name);
+			if (!transform)
+			{
+				Debug.LogErrorFormat("{0}は存在しません", new object[]
+				{
+					name
+				});
+				return null;
+			}
+		}
+		this.m_NameFlagObjpair.Add(name, transform);
+		return transform;
 	}
 
 	[SerializeField]
@@ -649,7 +675,11 @@ public class FullBodyIKCtrl : MonoBehaviour
 
 	private Dictionary<string, IKCtrlData> m_strIKDataPair = new Dictionary<string, IKCtrlData>();
 
-	private List<FABRIKCtrlData> m_ForearmCalfIKList = new List<FABRIKCtrlData>();
+	private Dictionary<string, BipedIKCtrlData> m_ForearmCalfIKList = new Dictionary<string, BipedIKCtrlData>();
+
+	private Dictionary<string, BipedIKCtrlData> m_SholderThighIKList = new Dictionary<string, BipedIKCtrlData>();
+
+	private Dictionary<string, Transform> m_NameFlagObjpair = new Dictionary<string, Transform>();
 
 	public bool IKActive = true;
 

+ 2 - 2
Assembly-CSharp/GameMain.cs

@@ -668,7 +668,7 @@ public class GameMain : MonoSingleton<GameMain>
 		serializeHeader.nMaidNum = this.m_CharacterMgr.GetStockMaidCount();
 		serializeHeader.strComment = f_strComment;
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1170);
+		binaryWriter.Write(1180);
 		this.SerializeWriteHeader(binaryWriter, serializeHeader);
 		binaryWriter.Write("bookmark_kk_01");
 		GameMain.BinaryBookmark binaryBookmark = new GameMain.BinaryBookmark(binaryWriter);
@@ -782,7 +782,7 @@ public class GameMain : MonoSingleton<GameMain>
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1170);
+		binaryWriter.Write(1180);
 		this.SerializeWriteHeader(binaryWriter, saveDataHeader);
 		binaryWriter.Write(array, (int)saveDataHeader.lHeaderSize, (int)((long)array.Length - saveDataHeader.lHeaderSize));
 		File.WriteAllBytes(path, memoryStream.ToArray());

+ 2 - 2
Assembly-CSharp/GameUty.cs

@@ -912,14 +912,14 @@ public class GameUty
 
 	public static string GetBuildVersionText()
 	{
-		int num = 1170;
+		int num = 1180;
 		return (num >= 1000) ? ((float)num / 1000f).ToString("F2") : ((float)num / 100f).ToString("F2");
 	}
 
 	public static string GetGameVersionText()
 	{
 		string text = "COM3D2x64.exe";
-		int num = 1170;
+		int num = 1180;
 		string path = Path.GetFullPath(".\\") + "update.lst";
 		string[] array = new string[0];
 		if (File.Exists(path))

+ 2 - 2
Assembly-CSharp/HandSignShortcut.cs

@@ -494,7 +494,7 @@ public class HandSignShortcut : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1170;
+			this.m_nVersion = 1180;
 		}
 
 		public void OnAfterDeserialize()
@@ -803,7 +803,7 @@ public class HandSignShortcut : MonoBehaviour
 		private const string CONF_NAME = "MaidFingerDataList.json";
 
 		[SerializeField]
-		private int m_nVersion = 1170;
+		private int m_nVersion = 1180;
 
 		[SerializeField]
 		private List<HandSignShortcut.MaidFingerData> MaidFingerDataList = new List<HandSignShortcut.MaidFingerData>();

+ 4 - 4
Assembly-CSharp/HeightIKCtrlData.cs

@@ -15,7 +15,7 @@ public class HeightIKCtrlData : CCDIKCtrlData
 		{
 			return;
 		}
-		float num = Vector3.Distance(base.IKTarget.position, base.TargetBone.position);
+		float num = Vector3.Distance(base.IKTarget.position, this.TargetBone.position);
 		if (num <= 0.05f || (num > 1f && base.PointIK.BlendNow))
 		{
 			return;
@@ -24,16 +24,16 @@ public class HeightIKCtrlData : CCDIKCtrlData
 		int value2 = base.PointIK.TgtMaid.GetProp(MPN.sintyou).value;
 		if (this.m_EachOtherIK && value < value2)
 		{
-			IKCtrlData ikdata = base.PointIK.TgtMaid.IKCtrl.GetIKData(base.PointIK.Tgt_AttachName);
+			IKCtrlData ikdata = base.PointIK.TgtMaid.IKCtrl.GetIKData(base.PointIK.Tgt_AttachName, false);
 			if (base.PointIK.TgtMaid.IKCtrl.IsUpdateEnd)
 			{
-				ikdata.IKTarget.position += (base.TargetBone.position - base.IKTarget.position) * ikdata.PointIK.BlendWeight;
+				ikdata.IKTarget.position += (this.TargetBone.position - base.IKTarget.position) * ikdata.PointIK.BlendWeight;
 				base.PointIK.TgtMaid.IKCtrl.SolverUpdate();
 			}
 		}
 		else if (!this.MyIKCtrl.DoHeightCover && !base.PointIK.BlendNow)
 		{
-			Vector3 vector = base.IKTarget.position - base.TargetBone.position;
+			Vector3 vector = base.IKTarget.position - this.TargetBone.position;
 			this.MyIKCtrl.BodyTarget.position += vector;
 			foreach (IKCtrlData ikctrlData in this.MyIKCtrl.strIKDataPair.Values)
 			{

+ 116 - 54
Assembly-CSharp/IKCtrlData.cs

@@ -72,35 +72,43 @@ public abstract class IKCtrlData
 		}
 	}
 
-	public bool IsIKExec
+	public IKCtrlData.Vec3Enable PosEnable
 	{
 		get
 		{
-			return this.PointIK.IsIKExec || this.RotateIK.IsIKExec || this.ForceIK;
+			return this.m_PosEnable;
 		}
 	}
 
-	public bool OldIkExec
+	public IKCtrlData.Vec3Enable RotEnable
 	{
 		get
 		{
-			return this.PointIK.IsIKExec && this.PointIK.IsOldIK;
+			return this.m_RotEnable;
 		}
 	}
 
-	public bool AttachPointIK
+	public bool IsIKExec
 	{
 		get
 		{
-			return this.m_AttachPointIK;
+			return this.PointIK.IsIKExec || this.RotateIK.IsIKExec || this.ForceIK;
 		}
 	}
 
-	public Transform TargetBone
+	public bool OldIkExec
 	{
 		get
 		{
-			return this.m_TargetBone;
+			return this.PointIK.IsIKExec && this.PointIK.IsOldIK;
+		}
+	}
+
+	public bool AttachPointIK
+	{
+		get
+		{
+			return this.m_AttachPointIK;
 		}
 	}
 
@@ -136,6 +144,14 @@ public abstract class IKCtrlData
 		}
 	}
 
+	public virtual Transform TargetBone
+	{
+		get
+		{
+			return this.m_TargetBone;
+		}
+	}
+
 	public abstract Transform[] ChainBones { get; }
 
 	public abstract float PositionWeight { get; set; }
@@ -163,7 +179,7 @@ public abstract class IKCtrlData
 		{
 			return;
 		}
-		this.IKCmo.Init(this.m_TargetBone.parent.parent, this.m_TargetBone.parent, this.m_TargetBone, this.MyIKCtrl.TgtBody);
+		this.IKCmo.Init(this.TargetBone.parent.parent, this.TargetBone.parent, this.TargetBone, this.MyIKCtrl.TgtBody);
 	}
 
 	private void IkCmoPorc(Vector3 tgt, Vector3 vechand_offset)
@@ -174,7 +190,7 @@ public abstract class IKCtrlData
 		}
 		for (int i = 0; i < 3; i++)
 		{
-			this.IKCmo.Porc(this.m_TargetBone.parent.parent, this.m_TargetBone.parent, this.m_TargetBone, tgt, vechand_offset, this);
+			this.IKCmo.Porc(this.TargetBone.parent.parent, this.TargetBone.parent, this.TargetBone, tgt, vechand_offset, this);
 		}
 	}
 
@@ -219,30 +235,33 @@ public abstract class IKCtrlData
 		{
 			data.IsIKExec = false;
 		}
-		if (data.IsIKExec && include_offset && !data.DoSetOffset)
+		if (data.IsIKExec)
 		{
-			data.DoSetOffset = true;
-			if (data.IsPointAttach)
+			pos = this.GetIKEnable(data.MyType).GetEnable(this.TargetBone.position, pos, false);
+			if (include_offset && !data.DoSetOffset)
 			{
-				Vector3 start = pos;
-				if (this.OffsetWorld)
-				{
-					pos += data.TgtOffset;
-				}
-				else if (this.OffsetBone)
+				data.DoSetOffset = true;
+				if (data.IsPointAttach)
 				{
-					KasaiUtility.DrawAxis(pos, this.TargetBone.rotation, 0.0625f);
-					pos += this.TargetBone.rotation * data.TgtOffset;
+					Vector3 start = pos;
+					if (this.OffsetWorld)
+					{
+						pos += data.TgtOffset;
+					}
+					else if (this.OffsetBone)
+					{
+						pos -= this.TargetBone.rotation * data.TgtOffset;
+					}
+					else
+					{
+						pos += rot * data.TgtOffset;
+					}
+					Debug.DrawLine(start, pos, Color.white);
 				}
 				else
 				{
-					pos += rot * data.TgtOffset;
+					rot *= Quaternion.Euler(this.GetIKEnable(data.MyType).GetEnable(data.TgtOffset, false));
 				}
-				Debug.DrawLine(start, pos, Color.white);
-			}
-			else
-			{
-				rot *= Quaternion.Euler(data.TgtOffset);
 			}
 		}
 	}
@@ -255,7 +274,7 @@ public abstract class IKCtrlData
 		}
 		if (data.TgtMaid && data.TgtMaid != this.MyIKCtrl.TgtMaid)
 		{
-			IKCtrlData ikdata = data.TgtMaid.IKCtrl.GetIKData(data.Tgt_AttachName);
+			IKCtrlData ikdata = data.TgtMaid.IKCtrl.GetIKData(data.Tgt_AttachName, false);
 			if (ikdata != null && ikdata.IsIKExec)
 			{
 				IKCtrlData.IKParam ikparam = ikdata.GetIKParam(data.MyType, false, false);
@@ -295,15 +314,15 @@ public abstract class IKCtrlData
 				Vector3 b = vector;
 				Quaternion b2 = quaternion;
 				this.SetIKPosRot(ikparam3, ref b, ref b2, true);
-				float t = this.GetFlagData(data.MyType).Value01();
-				data.IsIKExec = true;
+				float num = this.GetFlagData(data.MyType).Value01();
+				data.IsIKExec = (num != 0f);
 				if (data.IsPointAttach)
 				{
-					vector = Vector3.Lerp(a, b, t);
+					vector = Vector3.Lerp(a, b, num);
 				}
 				else
 				{
-					quaternion = Quaternion.Lerp(a2, b2, t);
+					quaternion = Quaternion.Lerp(a2, b2, num);
 				}
 			}
 			else if (this.GetFlagData(data.MyType).IsFlagChange())
@@ -366,7 +385,7 @@ public abstract class IKCtrlData
 			{
 				if (!data.DoSetPosRot)
 				{
-					Transform targetBone = this.m_TargetBone;
+					Transform targetBone = this.TargetBone;
 					if (data.IsPointAttach)
 					{
 						if (!data.FirstFrame)
@@ -409,6 +428,11 @@ public abstract class IKCtrlData
 		}
 	}
 
+	protected bool IsEachBoneIK(IKCtrlData.IKParam param)
+	{
+		return param.IsIKExec && param.Target == this.TargetBone;
+	}
+
 	protected virtual void SetTargetTransform(IKCtrlData.IKParam data, Vector3 pos, Quaternion rot)
 	{
 		switch (data.MyType)
@@ -429,7 +453,7 @@ public abstract class IKCtrlData
 			rot *= this.m_PosRotOffset.rot;
 			if (!data.DoSetOffset)
 			{
-				rot *= Quaternion.Euler(data.TgtOffset);
+				rot *= Quaternion.Euler(this.GetIKEnable(data.MyType).GetEnable(data.TgtOffset, false));
 			}
 			this.m_IKTarget.rotation = rot;
 			if (data.BlendType == IKCtrlData.IKBlendType.IK_To_IK)
@@ -457,8 +481,7 @@ public abstract class IKCtrlData
 				}
 				else if (this.OffsetBone)
 				{
-					KasaiUtility.DrawAxis(pos, this.TargetBone.rotation, 0.0625f);
-					pos += this.TargetBone.rotation * data.TgtOffset;
+					pos -= this.TargetBone.rotation * data.TgtOffset;
 				}
 				else
 				{
@@ -505,6 +528,11 @@ public abstract class IKCtrlData
 		}
 	}
 
+	public IKCtrlData.IKParam GetNextIKParam(IKCtrlData.IKAttachType attach_type)
+	{
+		return this.GetIKParam(attach_type, true, true);
+	}
+
 	public IKCtrlData.ChangeFlagData GetFlagData(IKCtrlData.IKAttachType attach_type)
 	{
 		if (attach_type == IKCtrlData.IKAttachType.Rotate)
@@ -514,6 +542,15 @@ public abstract class IKCtrlData
 		return this.m_PointFlagData;
 	}
 
+	public IKCtrlData.Vec3Enable GetIKEnable(IKCtrlData.IKAttachType attach_type)
+	{
+		if (attach_type == IKCtrlData.IKAttachType.Rotate)
+		{
+			return this.RotEnable;
+		}
+		return this.PosEnable;
+	}
+
 	public void SetFlagTarget(IKCtrlData.IKAttachType attach_type, string name)
 	{
 		if (this.MyIKCtrl.TgtMaid.boMAN)
@@ -601,7 +638,7 @@ public abstract class IKCtrlData
 	{
 		if (this.IsIKExec && this.m_DrawLine && !this.MyIKCtrl.IsUpdateLate)
 		{
-			KasaiUtility.DrawObjAxis(this.m_TargetBone, 0.0625f);
+			KasaiUtility.DrawObjAxis(this.TargetBone, 0.0625f);
 			if (!this.OldIkExec)
 			{
 				Color color = (!this.PointIK.IsIKExec) ? Color.cyan : Color.yellow;
@@ -621,7 +658,7 @@ public abstract class IKCtrlData
 		{
 			return;
 		}
-		this.m_BoneTgtPair.PosOffset = this.m_OffsetEnable.GetEnablePos(offset, inverse);
+		this.m_BoneTgtPair.PosOffset = this.m_OffsetEnable.GetEnable(offset, inverse);
 	}
 
 	[SerializeField]
@@ -632,12 +669,18 @@ public abstract class IKCtrlData
 	private IKCtrlData.IKParam m_NextPointIK = new IKCtrlData.IKParam(IKCtrlData.IKAttachType.NewPoint, true);
 
 	[SerializeField]
+	private IKCtrlData.Vec3Enable m_PosEnable = new IKCtrlData.Vec3Enable();
+
+	[SerializeField]
 	[Header("回転IK")]
 	private IKCtrlData.IKParam m_RotateIK = new IKCtrlData.IKParam(IKCtrlData.IKAttachType.Rotate, false);
 
 	[SerializeField]
 	private IKCtrlData.IKParam m_NextRotateIK = new IKCtrlData.IKParam(IKCtrlData.IKAttachType.Rotate, true);
 
+	[SerializeField]
+	private IKCtrlData.Vec3Enable m_RotEnable = new IKCtrlData.Vec3Enable();
+
 	private TBody.IKCMO m_IKCmo = new TBody.IKCMO();
 
 	private IKCtrlData.PosRotPair m_BlendPosRot = new IKCtrlData.PosRotPair();
@@ -713,7 +756,15 @@ public abstract class IKCtrlData
 	[Serializable]
 	public class Vec3Enable
 	{
-		public Vector3 GetEnablePos(Vector3 pos, bool inverse = false)
+		public bool AnyDisable
+		{
+			get
+			{
+				return !this.EnableX || !this.EnableY || !this.EnableZ;
+			}
+		}
+
+		public Vector3 GetEnable(Vector3 pos, bool inverse = false)
 		{
 			if (this.EnableX == inverse)
 			{
@@ -730,11 +781,35 @@ public abstract class IKCtrlData
 			return pos;
 		}
 
+		public Vector3 GetEnable(Vector3 from, Vector3 to, bool inverse = false)
+		{
+			if (this.EnableX == inverse)
+			{
+				to.x = from.x;
+			}
+			if (this.EnableY == inverse)
+			{
+				to.y = from.y;
+			}
+			if (this.EnableZ == inverse)
+			{
+				to.z = from.z;
+			}
+			return to;
+		}
+
 		public void Recet()
 		{
 			this.EnableX = (this.EnableY = (this.EnableZ = true));
 		}
 
+		public void Copy(IKCtrlData.Vec3Enable cpy)
+		{
+			this.EnableX = cpy.EnableX;
+			this.EnableY = cpy.EnableY;
+			this.EnableZ = cpy.EnableZ;
+		}
+
 		public bool EnableX = true;
 
 		public bool EnableY = true;
@@ -842,8 +917,6 @@ public abstract class IKCtrlData
 		public void Reset()
 		{
 			this.Target = null;
-			this.Axis = Vector3.forward;
-			this.OnValue = 1f;
 			this.m_CunnretFlag = false;
 			this.BlendCtrlSelf = false;
 		}
@@ -854,7 +927,7 @@ public abstract class IKCtrlData
 
 		public Vector3 Axis = Vector3.forward;
 
-		public float OnValue = 1f;
+		public float OnValue = 0.1f;
 
 		[HideInInspector]
 		public bool BlendCtrlSelf;
@@ -876,8 +949,6 @@ public abstract class IKCtrlData
 
 		public bool DoIKBlend { get; private set; }
 
-		public bool DoDetach { get; private set; }
-
 		public bool IsPointAttach
 		{
 			get
@@ -1001,11 +1072,7 @@ public abstract class IKCtrlData
 
 		public void SetIKSetting(Maid tgt_maid, int slot_no, string attach_name, Transform axis_bone, Transform target, Vector3 f_vecOffset, bool do_animation, float blend_time)
 		{
-			if (!this.DoDetach)
-			{
-				this.SetLastTarget(this.Tgt_AttachName, this.TgtMaid, this.Target);
-			}
-			this.DoDetach = false;
+			this.SetLastTarget(this.Tgt_AttachName, this.TgtMaid, this.Target);
 			this.TgtMaid = tgt_maid;
 			this.Tgt_AttachSlot = slot_no;
 			this.Tgt_AttachName = attach_name;
@@ -1029,13 +1096,8 @@ public abstract class IKCtrlData
 
 		public void Detach(float blend_time = 0f)
 		{
-			if (this.DoDetach)
-			{
-				return;
-			}
 			this.BlendRecet(false);
 			this.BlendTime = blend_time;
-			this.DoDetach = true;
 			this.SetLastTarget(this.Tgt_AttachName, this.TgtMaid, this.Target);
 			this.TgtMaid = null;
 			this.Tgt_AttachSlot = -1;

+ 21 - 14
Assembly-CSharp/IKManager.cs

@@ -262,6 +262,10 @@ public class IKManager : MonoBehaviour
 			{
 				IKManager.notFlipTypes.Add((IKManager.BoneType)i);
 			}
+			for (int j = 69; j <= 73; j++)
+			{
+				IKManager.notFlipTypes.Add((IKManager.BoneType)j);
+			}
 		}
 		if (IKManager.swapFlipDic == null || IKManager.swapFlipDic.Count <= 0)
 		{
@@ -283,9 +287,9 @@ public class IKManager : MonoBehaviour
 			}
 		}
 		Dictionary<IKManager.BoneType, Vector3> dictionary = new Dictionary<IKManager.BoneType, Vector3>();
-		for (int j = 0; j <= 68; j++)
+		for (int k = 0; k <= 68; k++)
 		{
-			IKManager.BoneType boneType = (IKManager.BoneType)j;
+			IKManager.BoneType boneType = (IKManager.BoneType)k;
 			if (!IKManager.notFlipTypes.Contains(boneType))
 			{
 				Transform transform = this.bone_dic_[boneType].Value.transform;
@@ -294,25 +298,28 @@ public class IKManager : MonoBehaviour
 		}
 		Quaternion rotation = Quaternion.identity;
 		Vector3 vector = Vector3.zero;
-		for (int k = 0; k < this.sort_bone_list_.Count; k++)
+		for (int l = 0; l < this.sort_bone_list_.Count; l++)
 		{
-			IKManager.BoneType key = this.sort_bone_list_[k].Key;
+			IKManager.BoneType key = this.sort_bone_list_[l].Key;
 			if (!IKManager.notFlipTypes.Contains(key))
 			{
-				vector = dictionary[key];
-				if (key == IKManager.BoneType.Root)
-				{
-					rotation = Quaternion.Euler(360f - (vector.x + 270f) - 270f, 360f - (vector.y + 90f) - 90f, 360f - vector.z);
-				}
-				else
+				if (dictionary.ContainsKey(key))
 				{
-					if (IKManager.swapFlipDic.ContainsKey(key))
+					vector = dictionary[key];
+					if (key == IKManager.BoneType.Root)
+					{
+						rotation = Quaternion.Euler(360f - (vector.x + 270f) - 270f, 360f - (vector.y + 90f) - 90f, 360f - vector.z);
+					}
+					else
 					{
-						vector = dictionary[IKManager.swapFlipDic[key]];
+						if (IKManager.swapFlipDic.ContainsKey(key))
+						{
+							vector = dictionary[IKManager.swapFlipDic[key]];
+						}
+						rotation = Quaternion.Euler(360f - vector.x, 360f - (vector.y + 90f) - 90f, vector.z);
 					}
-					rotation = Quaternion.Euler(360f - vector.x, 360f - (vector.y + 90f) - 90f, vector.z);
+					this.bone_dic_[key].Value.transform.rotation = rotation;
 				}
-				this.bone_dic_[key].Value.transform.rotation = rotation;
 			}
 		}
 		byte[] binary = this.finger_blend_.right_arm_finger.GetBinary();

+ 22 - 1
Assembly-CSharp/KaraokeDataManager.cs

@@ -206,6 +206,11 @@ public class KaraokeDataManager : MonoBehaviour
 		return KaraokeDataManager.IsEnablePersonalKaraoke003(maid.status.personal.uniqueName);
 	}
 
+	public static bool IsEnablePersonalKaraoke004(Maid maid)
+	{
+		return KaraokeDataManager.IsEnablePersonalKaraoke004(maid.status.personal.uniqueName);
+	}
+
 	public static bool IsEnablePersonalKaraoke003(string personalUniqueName)
 	{
 		List<string> list = new List<string>
@@ -220,6 +225,20 @@ public class KaraokeDataManager : MonoBehaviour
 		return list.Contains(personalUniqueName);
 	}
 
+	public static bool IsEnablePersonalKaraoke004(string personalUniqueName)
+	{
+		List<string> list = new List<string>
+		{
+			"Muku",
+			"Majime",
+			"Rindere",
+			"Pure",
+			"Cool",
+			"Pride"
+		};
+		return list.Contains(personalUniqueName);
+	}
+
 	public static void GetMaidListAdditional(List<Maid> draw_list)
 	{
 		List<Maid> list = new List<Maid>();
@@ -649,7 +668,7 @@ public class KaraokeDataManager : MonoBehaviour
 			parentCanvas.blocksRaycasts = false;
 			parentCanvas.alpha = 0f;
 		}
-		else
+		else if (!uiNoHomeMode)
 		{
 			parentCanvas.interactable = true;
 			parentCanvas.blocksRaycasts = true;
@@ -804,6 +823,8 @@ public class KaraokeDataManager : MonoBehaviour
 		private bool isEnableID;
 
 		public static readonly int ID_BUTTON_MAID_ADDITIONAL = 140;
+
+		public static readonly int ID_BUTTON_MAID_ = 150;
 	}
 
 	public class MusicData

+ 1 - 1
Assembly-CSharp/Kasizuki/KasizukiManager.cs

@@ -804,7 +804,7 @@ namespace Kasizuki
 		public void Serialize(BinaryWriter bw)
 		{
 			bw.Write("COM3D2_KASIZUKI");
-			bw.Write(1170);
+			bw.Write(1180);
 			this.SerializeOriginHeader(bw);
 			foreach (KeyValuePair<int, KasizukiManager.SaveData> keyValuePair in this.m_SaveDataArray)
 			{

+ 8 - 8
Assembly-CSharp/Maid.cs

@@ -1214,7 +1214,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeProp(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP_LIST");
-		f_bwWrite.Write(1170);
+		f_bwWrite.Write(1180);
 		f_bwWrite.Write(this.m_dicMaidProp.Count);
 		foreach (KeyValuePair<string, MaidProp> keyValuePair in this.m_dicMaidProp)
 		{
@@ -1246,7 +1246,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeMisc(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_MISC");
-		f_bwWrite.Write(1170);
+		f_bwWrite.Write(1180);
 		f_bwWrite.Write(this.m_nActiveSlotNo);
 		if (this.m_texIcon != null)
 		{
@@ -1271,7 +1271,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeBody(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_BODY");
-		f_bwWrite.Write(1170);
+		f_bwWrite.Write(1180);
 		return true;
 	}
 
@@ -1967,7 +1967,7 @@ public class Maid : MonoBehaviour
 
 	public void IKTargetToAttachPoint(string tag, Maid tgt_maid, string tgt_name, string attachpoint_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, string axisbone = "", float blend_time = 0f, bool do_animation = false, bool is_next = false)
 	{
-		IKCtrlData ikdata = this.body0.IKCtrl.GetIKData(tag);
+		IKCtrlData ikdata = this.body0.IKCtrl.GetIKData(tag, true);
 		Transform axis_bone = null;
 		if (attach_type != IKCtrlData.IKAttachType.Rotate && !string.IsNullOrEmpty(axisbone))
 		{
@@ -1978,7 +1978,7 @@ public class Maid : MonoBehaviour
 
 	public void IKTargetToBone(string tag, Maid tgt_maid, string tgtbone_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, bool search_sm = false, float blend_time = 0f, bool do_animation = false, bool is_next = false)
 	{
-		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag);
+		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag, true);
 		if (tgtbone_name != "無し")
 		{
 			Transform target;
@@ -2034,19 +2034,19 @@ public class Maid : MonoBehaviour
 				});
 			}
 		}
-		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag);
+		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag, true);
 		ikdata.SetIKSetting(attach_type, is_next, transform, f_vecOffset, do_animation, blend_time);
 	}
 
 	public void IKTargetToIKBone(string my_tag, Maid f_maidTarget, string bone_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, float blend_time = 0f, bool do_animation = false, bool is_next = false)
 	{
-		IKCtrlData ikdata = f_maidTarget.IKCtrl.GetIKData(bone_name);
+		IKCtrlData ikdata = f_maidTarget.IKCtrl.GetIKData(bone_name, true);
 		if (!ikdata)
 		{
 			return;
 		}
 		Transform targetBone = ikdata.TargetBone;
-		IKCtrlData ikdata2 = this.IKCtrl.GetIKData(my_tag);
+		IKCtrlData ikdata2 = this.IKCtrl.GetIKData(my_tag, true);
 		ikdata2.SetIKSetting(attach_type, is_next, f_maidTarget, bone_name, targetBone, f_vecOffset, do_animation, blend_time);
 	}
 

+ 1 - 1
Assembly-CSharp/MaidParts.cs

@@ -35,7 +35,7 @@ public class MaidParts : MonoBehaviour
 	public unsafe bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MULTI_COL");
-		f_bwWrite.Write(1170);
+		f_bwWrite.Write(1180);
 		f_bwWrite.Write(this.m_aryPartsColor.Length);
 		for (int i = 0; i < this.m_aryPartsColor.Length; i++)
 		{

+ 1 - 1
Assembly-CSharp/MaidProp.cs

@@ -8,7 +8,7 @@ public class MaidProp
 	public bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP");
-		f_bwWrite.Write(1170);
+		f_bwWrite.Write(1180);
 		f_bwWrite.Write(this.idx);
 		f_bwWrite.Write(this.name);
 		f_bwWrite.Write(this.type);

+ 1 - 1
Assembly-CSharp/MaidStatus/Status.cs

@@ -1215,7 +1215,7 @@ namespace MaidStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_MAID_STATUS");
-			binary.Write(1170);
+			binary.Write(1180);
 			binary.Write(this.guid);
 			binary.Write(this.creationTime);
 			binary.Write((short)this.heroineType);

+ 1 - 1
Assembly-CSharp/Menu.cs

@@ -753,7 +753,7 @@ public class Menu : MonoBehaviour
 			Directory.CreateDirectory(text);
 		}
 		StreamWriter streamWriter = new StreamWriter(text + "\\" + text2 + ".txt", false, Encoding.UTF8);
-		streamWriter.WriteLine("出力バージョン\t" + 1170);
+		streamWriter.WriteLine("出力バージョン\t" + 1180);
 		streamWriter.WriteLine("基本アイテム\t" + filename.Replace(" ", ":"));
 		try
 		{

+ 1 - 1
Assembly-CSharp/Misc.cs

@@ -2,7 +2,7 @@
 
 public class Misc
 {
-	public const int GAME_VERSION = 1170;
+	public const int GAME_VERSION = 1180;
 
 	public const string GAME_DATA_PATH = "GameData";
 

+ 1 - 1
Assembly-CSharp/ModCompile.cs

@@ -604,7 +604,7 @@ public class ModCompile : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MESH");
-		binaryWriter.Write(1170);
+		binaryWriter.Write(1180);
 		string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(f_strMqoFile);
 		binaryWriter.Write(fileNameWithoutExtension);
 		binaryWriter.Write(exObjIn2.strName);

+ 2 - 2
Assembly-CSharp/OvrIK.cs

@@ -1438,7 +1438,7 @@ public class OvrIK : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1170;
+			this.m_nVersion = 1180;
 		}
 
 		public void OnAfterDeserialize()
@@ -1498,7 +1498,7 @@ public class OvrIK : MonoBehaviour
 		private const string CONF_NAME = "OvrIK.json";
 
 		[SerializeField]
-		private int m_nVersion = 1170;
+		private int m_nVersion = 1180;
 
 		[SerializeField]
 		private float solver_locomotion_weight = 1f;

+ 1 - 1
Assembly-CSharp/PhotoModeSaveAndLoad.cs

@@ -450,7 +450,7 @@ public class PhotoModeSaveAndLoad : MonoBehaviour
 	private XElement CreateCommonData(string title, string comment)
 	{
 		string value = DateTime.ParseExact(DateTime.Now.ToString("yyyyMMddHHmmss"), "yyyyMMddHHmmss", null).ToString("yyyy.MM.dd HH:mm");
-		XElement xelement = new XElement("GameVersion", 1170);
+		XElement xelement = new XElement("GameVersion", 1180);
 		XElement xelement2 = new XElement("SaveTime", value);
 		XElement xelement3 = new XElement("Title", title);
 		XElement xelement4 = new XElement("Comment", comment);

+ 1 - 1
Assembly-CSharp/PlayerStatus/Status.cs

@@ -827,7 +827,7 @@ namespace PlayerStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_PLAYER_STATUS");
-			binary.Write(1170);
+			binary.Write(1180);
 			binary.Write(this.playerName_);
 			binary.Write(this.days_);
 			binary.Write(this.totalPurchasePrice_);

+ 6 - 0
Assembly-CSharp/ScenarioData.cs

@@ -727,6 +727,12 @@ public class ScenarioData
 		this.IsOncePlayed = false;
 	}
 
+	public static bool IsMainPersonal(Maid maid)
+	{
+		string convertPersonal = GameMain.Instance.ScenarioSelectMgr.GetConvertPersonal(maid);
+		return ScenarioData.m_MainMaidList.Contains(convertPersonal);
+	}
+
 	private static string[] m_MainMaidList = new string[]
 	{
 		"無垢",

+ 1 - 0
Assembly-CSharp/SceneVRCommunication.cs

@@ -394,6 +394,7 @@ public class SceneVRCommunication : MonoBehaviour
 				this.StartFreeSceneText();
 			}
 			this.m_strFreeSceneEndScriptName = string.Empty;
+			this.UiNoHomeMode = false;
 		}
 		GameMain.Instance.OvrMgr.OvrCamera.HandLimitMode = ((!f_bFreeMode) ? AVRControllerBehavior.LIMIT_MODE.NO_WARP : AVRControllerBehavior.LIMIT_MODE.NORMAL);
 		if (!this.m_bFreeMode || !f_bFreeMode)

+ 14 - 4
Assembly-CSharp/ScriptManager.cs

@@ -692,14 +692,24 @@ public class ScriptManager : IDisposable
 
 	private void TJSFuncGetMaidFlag(TJSVariantRef[] param, TJSVariantRef result)
 	{
-		NDebug.Assert(param.Length == 1 || 2 == param.Length, "GetMaidFlag args count error.");
+		NDebug.Assert(param.Length == 1 || param.Length == 2 || 3 == param.Length, "GetMaidFlag args count error.");
 		if (result == null)
 		{
 			return;
 		}
 		int nMaidNo = 0;
 		string flagName = string.Empty;
-		if (param.Length == 2)
+		bool flag = false;
+		if (param.Length == 3)
+		{
+			nMaidNo = param[0].AsInteger();
+			flagName = param[1].AsString();
+			if (param[2].AsBool())
+			{
+				flag = true;
+			}
+		}
+		else if (param.Length == 2)
 		{
 			nMaidNo = param[0].AsInteger();
 			flagName = param[1].AsString();
@@ -709,7 +719,7 @@ public class ScriptManager : IDisposable
 			flagName = param[0].AsString();
 		}
 		Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
-		if (this.compatibilityMode || this.tjsLegacyMode)
+		if ((this.compatibilityMode || this.tjsLegacyMode) && !flag)
 		{
 			result.SetInteger(maid.status.OldStatus.GetFlag(flagName));
 		}
@@ -2952,7 +2962,7 @@ public class ScriptManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_SCRIPT");
-		binary.Write(1170);
+		binary.Write(1180);
 		this.adv_kag_.Serialize(binary);
 	}
 

+ 7 - 3
Assembly-CSharp/VRCanvasManager.cs

@@ -344,10 +344,14 @@ public class VRCanvasManager : MonoBehaviour
 		{
 			bool isFreeMode = SceneVRCommunication.Instance.IsFreeMode;
 			bool uiNoHomeMode = SceneVRCommunication.Instance.UiNoHomeMode;
-			if (isFreeMode && !uiNoHomeMode)
+			if (isFreeMode && !uiNoHomeMode && this.m_CanvasArray != null)
 			{
-				UICanvasFade component = this.m_CanvasArray[VRCanvasManager.VRCanvasType.MainMenu].GetComponent<UICanvasFade>();
-				component.FadeIn();
+				Canvas canvas3 = null;
+				if (this.m_CanvasArray.TryGetValue(VRCanvasManager.VRCanvasType.MainMenu, out canvas3))
+				{
+					UICanvasFade component = this.m_CanvasArray[VRCanvasManager.VRCanvasType.MainMenu].GetComponent<UICanvasFade>();
+					component.FadeIn();
+				}
 			}
 		}
 	}

+ 1 - 1
Assembly-CSharp/WindowPartsFingerPreset.cs

@@ -182,7 +182,7 @@ public class WindowPartsFingerPreset : MonoBehaviour
 	{
 		WindowPartsFingerBlend.Type blendType = tareget_blend.BlendType;
 		FingerBlend.BaseFinger baseFingerClass = tareget_blend.GetBaseFingerClass(tareget_blend.mgr.select_maid, blendType);
-		XElement xelement = new XElement("GameVersion", 1170);
+		XElement xelement = new XElement("GameVersion", 1180);
 		XElement xelement2 = new XElement("RightData", blendType == WindowPartsFingerBlend.Type.RightArm || blendType == WindowPartsFingerBlend.Type.RightLeg);
 		XElement xelement3 = new XElement("BinaryData", Convert.ToBase64String(baseFingerClass.GetBinary()));
 		XNode[] contents = new XNode[]

+ 4 - 1
Assembly-CSharp/uGUIKaraokeSelect.cs

@@ -384,7 +384,10 @@ public class uGUIKaraokeSelect : MonoBehaviour
 		{
 			if (foodData.ID != KaraokeDataManager.FoodData.ID_BUTTON_MAID_ADDITIONAL || KaraokeDataManager.IsEnablePersonalKaraoke003(GameMain.Instance.CharacterMgr.GetMaid(0)))
 			{
-				list.Add(foodData);
+				if (foodData.ID != KaraokeDataManager.FoodData.ID_BUTTON_MAID_ || KaraokeDataManager.IsEnablePersonalKaraoke004(GameMain.Instance.CharacterMgr.GetMaid(0)))
+				{
+					list.Add(foodData);
+				}
 			}
 		}
 		return list.ToArray();