diff --git a/Plugins/SliderUnlocker/Hooks.cs b/Plugins/SliderUnlocker/Hooks.cs index 2c90b48..0fc5720 100644 --- a/Plugins/SliderUnlocker/Hooks.cs +++ b/Plugins/SliderUnlocker/Hooks.cs @@ -137,11 +137,7 @@ namespace SliderUnlocker value = SliderMath.CalculatePosition(list, rate); break; case 1: - if ((!name.StartsWith("cf_a_bust") && !name.EndsWith("_size")) || //breast fix - !(name.Contains("thigh") && name.Contains("01"))) //thigh fix - { - value = SliderMath.CalculateRotation(list, rate); - } + value = SliderMath.SafeCalculateRotation(value, name, list, rate); break; default: value = SliderMath.CalculateScale(list, rate); @@ -170,11 +166,7 @@ namespace SliderUnlocker } if (flag[1]) { - if (!(name.StartsWith("cf_a_bust") && name.EndsWith("_size")) && //breast fix - !(name.Contains("thigh") && name.Contains("01"))) //thigh fix - { - value[1] = SliderMath.CalculateRotation(list, rate); - } + value[1] = SliderMath.SafeCalculateRotation(value[1], name, list, rate); } if (flag[2]) { diff --git a/Plugins/SliderUnlocker/SliderMath.cs b/Plugins/SliderUnlocker/SliderMath.cs index 987e71e..fcdfcff 100644 --- a/Plugins/SliderUnlocker/SliderMath.cs +++ b/Plugins/SliderUnlocker/SliderMath.cs @@ -70,5 +70,18 @@ namespace SliderUnlocker return rot3 + vector2 * Mathf.Abs(rate - 1f); } + + public static Vector3 SafeCalculateRotation(Vector3 original, string name, List list, float rate) + { + if (!(name.StartsWith("cf_a_bust") && name.EndsWith("_size")) && //breast fix + !(name.Contains("thigh") && name.Contains("01"))) //thigh fix + { + return CalculateRotation(list, rate); + } + else + { + return original; + } + } } }