Decompiled source of StyleOnBack v1.0.0

plugins/StyleOnBack/StyleOnBack.dll

Decompiled 8 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using MovementPlus.Patches;
using Reptile;
using StyleOnBack.Patches;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("BRC_HarmonyTemplate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BRC_HarmonyTemplate")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4a0b9165-9025-4453-91e7-2df8f7c2429a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
internal sealed class ConfigurationManagerAttributes
{
	public delegate void CustomHotkeyDrawerFunc(ConfigEntryBase setting, ref bool isCurrentlyAcceptingInput);

	public bool? ShowRangeAsPercent;

	public Action<ConfigEntryBase> CustomDrawer;

	public CustomHotkeyDrawerFunc CustomHotkeyDrawer;

	public bool? Browsable;

	public string Category;

	public object DefaultValue;

	public bool? HideDefaultButton;

	public bool? HideSettingName;

	public string Description;

	public string DispName;

	public int? Order;

	public bool? ReadOnly;

	public bool? IsAdvanced;

	public Func<object, string> ObjToStr;

	public Func<string, object> StrToObj;
}
namespace MovementPlus.Patches
{
	internal static class BoostAbilityPatch
	{
		[HarmonyPatch(typeof(BoostAbility), "OnStartAbility")]
		[HarmonyPrefix]
		private static bool BoostAbility_OnStartAbility_Prefix(BoostAbility __instance)
		{
			__instance.haveAirStartBoost = false;
			__instance.equippedMovestyleWasUsed = ((Ability)__instance).p.usingEquippedMovestyle;
			__instance.SetState((State)0);
			return false;
		}
	}
}
namespace StyleOnBack
{
	[BepInPlugin("com.yuril.StyleOnBack", "StyleOnBack", "1.0.0")]
	public class StyleOnBack : BaseUnityPlugin
	{
		private const string MyGUID = "com.yuril.StyleOnBack";

		private const string PluginName = "StyleOnBack";

		private const string VersionString = "1.0.0";

		private Harmony harmony;

		public static Player player;

		public static ConfigEntry<bool> placementMode;

		public static ConfigEntry<string> skateBoneName;

		public static ConfigEntry<Vector3> skateGlobalPos;

		public static ConfigEntry<Vector3> skateGlobalRot;

		public static ConfigEntry<float> skateGlobalScale;

		public static ConfigEntry<Vector3> skateLPos;

		public static ConfigEntry<Vector3> skateLRot;

		public static ConfigEntry<float> skateLScale;

		public static ConfigEntry<Vector3> skateRPos;

		public static ConfigEntry<Vector3> skateRRot;

		public static ConfigEntry<float> skateRScale;

		public static ConfigEntry<string> skateboardBoneName;

		public static ConfigEntry<Vector3> skateboardGlobalPos;

		public static ConfigEntry<Vector3> skateboardGlobalRot;

		public static ConfigEntry<float> skateboardGlobalScale;

		public static ConfigEntry<Vector3> skateboardPos;

		public static ConfigEntry<Vector3> skateboardRot;

		public static ConfigEntry<float> skateboardScale;

		public static ConfigEntry<string> bmxBoneName;

		public static ConfigEntry<Vector3> bmxGlobalPos;

		public static ConfigEntry<Vector3> bmxGlobalRot;

		public static ConfigEntry<float> bmxGlobalScale;

		public static ConfigEntry<Vector3> bmxFramePos;

		public static ConfigEntry<Vector3> bmxFrameRot;

		public static ConfigEntry<float> bmxFrameScale;

		public static ConfigEntry<Vector3> bmxHandPos;

		public static ConfigEntry<Vector3> bmxHandRot;

		public static ConfigEntry<float> bmxHandScale;

		public static ConfigEntry<Vector3> bmxWheelRPos;

		public static ConfigEntry<Vector3> bmxWheelRRot;

		public static ConfigEntry<float> bmxWheelRScale;

		public static ConfigEntry<Vector3> bmxWheelFPos;

		public static ConfigEntry<Vector3> bmxWheelFRot;

		public static ConfigEntry<float> bmxWheelFScale;

		public static ConfigEntry<Vector3> bmxGearPos;

		public static ConfigEntry<Vector3> bmxGearRot;

		public static ConfigEntry<float> bmxGearScale;

		public static ConfigEntry<Vector3> bmxPedLPos;

		public static ConfigEntry<Vector3> bmxPedLRot;

		public static ConfigEntry<float> bmxPedLScale;

		public static ConfigEntry<Vector3> bmxPedRPos;

		public static ConfigEntry<Vector3> bmxPedRRot;

		public static ConfigEntry<float> bmxPedRScale;

		private void Awake()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Expected O, but got Unknown
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Expected O, but got Unknown
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Expected O, but got Unknown
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Expected O, but got Unknown
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Expected O, but got Unknown
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Expected O, but got Unknown
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Expected O, but got Unknown
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Expected O, but got Unknown
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Expected O, but got Unknown
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Expected O, but got Unknown
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d4: Expected O, but got Unknown
			//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_041d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0427: Expected O, but got Unknown
			//IL_044b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0470: Unknown result type (might be due to invalid IL or missing references)
			//IL_047a: Expected O, but got Unknown
			//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04be: Expected O, but got Unknown
			//IL_04e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0507: Unknown result type (might be due to invalid IL or missing references)
			//IL_0511: Expected O, but got Unknown
			//IL_0535: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0564: Expected O, but got Unknown
			//IL_059e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a8: Expected O, but got Unknown
			//IL_05e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ec: Expected O, but got Unknown
			//IL_0610: Unknown result type (might be due to invalid IL or missing references)
			//IL_0635: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: Expected O, but got Unknown
			//IL_0663: Unknown result type (might be due to invalid IL or missing references)
			//IL_0688: Unknown result type (might be due to invalid IL or missing references)
			//IL_0692: Expected O, but got Unknown
			//IL_06cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d6: Expected O, but got Unknown
			//IL_06fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0729: Expected O, but got Unknown
			//IL_074d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0772: Unknown result type (might be due to invalid IL or missing references)
			//IL_077c: Expected O, but got Unknown
			//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c0: Expected O, but got Unknown
			//IL_07e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0809: Unknown result type (might be due to invalid IL or missing references)
			//IL_0813: Expected O, but got Unknown
			//IL_0837: Unknown result type (might be due to invalid IL or missing references)
			//IL_085c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0866: Expected O, but got Unknown
			//IL_08a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08aa: Expected O, but got Unknown
			//IL_08ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fd: Expected O, but got Unknown
			//IL_0921: Unknown result type (might be due to invalid IL or missing references)
			//IL_0946: Unknown result type (might be due to invalid IL or missing references)
			//IL_0950: Expected O, but got Unknown
			//IL_098a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0994: Expected O, but got Unknown
			//IL_09b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e7: Expected O, but got Unknown
			//IL_0a0b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3a: Expected O, but got Unknown
			//IL_0a74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7e: Expected O, but got Unknown
			//IL_0aa2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad1: Expected O, but got Unknown
			//IL_0af5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b24: Expected O, but got Unknown
			//IL_0b5e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b68: Expected O, but got Unknown
			//IL_0b8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbb: Expected O, but got Unknown
			//IL_0bdf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0e: Expected O, but got Unknown
			//IL_0c48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c52: Expected O, but got Unknown
			//IL_0c76: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca5: Expected O, but got Unknown
			//IL_0cc9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf8: Expected O, but got Unknown
			//IL_0d32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d3c: Expected O, but got Unknown
			harmony = new Harmony("com.yuril.StyleOnBack");
			harmony.PatchAll(typeof(PlayerPatch));
			harmony.PatchAll(typeof(CharacterVisualPatch));
			harmony.PatchAll(typeof(BoostAbilityPatch));
			placementMode = ((BaseUnityPlugin)this).Config.Bind<bool>("000", "Enable Placement Mode", false, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			skateBoneName = ((BaseUnityPlugin)this).Config.Bind<string>("Inline", "Inline Bone Name", "s2", new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateGlobalPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Inline", "Inline Global Position", new Vector3(0f, 0f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			skateGlobalRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Inline", "Inline Global Rotation", new Vector3(0f, 0f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			skateGlobalScale = ((BaseUnityPlugin)this).Config.Bind<float>("Inline", "Inline Global Scale", 1f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			skateLPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Inline", "Inline Left Position", new Vector3(0f, 0.05f, -0.17f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateLRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Inline", "Inline Left Rotation", new Vector3(295.05f, 318.04f, 61.09f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateLScale = ((BaseUnityPlugin)this).Config.Bind<float>("Inline", "Inline Left Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateRPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Inline", "Inline Right Position", new Vector3(-0.02f, -0.05f, -0.17f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateRRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Inline", "Inline Right Rotation", new Vector3(64.91f, 290f, 270f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateRScale = ((BaseUnityPlugin)this).Config.Bind<float>("Inline", "Inline Right Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateboardBoneName = ((BaseUnityPlugin)this).Config.Bind<string>("Skateboard", "Skateboard Bone Name", "s2", new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateboardGlobalPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Skateboard", "Skateboard Global Position", new Vector3(0f, 0f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			skateboardGlobalRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Skateboard", "Skateboard Global Rotation", new Vector3(0f, 0f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			skateboardGlobalScale = ((BaseUnityPlugin)this).Config.Bind<float>("Skateboard", "Skateboard Global Scale", 1f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			skateboardPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Skateboard", "Skateboard Position", new Vector3(-0.07f, 0f, -0.2f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateboardRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("Skateboard", "Skateboard Rotation", new Vector3(63.15f, 286.55f, 260f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			skateboardScale = ((BaseUnityPlugin)this).Config.Bind<float>("Skateboard", "Skateboard Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxBoneName = ((BaseUnityPlugin)this).Config.Bind<string>("BMX", "BMX Bone Name", "s2", new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxGlobalPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Global Position", new Vector3(0f, 0f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			bmxGlobalRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Global Rotation", new Vector3(0f, 0f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			bmxGlobalScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Global Scale", 1f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = false
				}
			}));
			bmxFramePos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Frame Position", new Vector3(-0.07f, 0f, -0.3f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxFrameRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Frame Rotation", new Vector3(180f, -50f, 90f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxFrameScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Frame Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxHandPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Handlebars Position", new Vector3(0.12f, 0.11f, -0.45f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxHandRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Handlebars Rotation", new Vector3(0f, 233f, 255f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxHandScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Handlebars Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxWheelRPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Wheel Rear Position", new Vector3(-0.35f, -0.12f, -0.06f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxWheelRRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Wheel Rear Rotation", new Vector3(0f, -50f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxWheelRScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Wheel Rear Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxWheelFPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Wheel Front Position", new Vector3(0.17f, -0.14f, -0.5f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxWheelFRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Wheel Front Rotation", new Vector3(0f, 319.4f, 0.35f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxWheelFScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Wheel Front Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxGearPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Gear Position", new Vector3(-0.13f, -0.1f, -0.26f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxGearRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Gear Rotation", new Vector3(0f, -50f, 0f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxGearScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Gear Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxPedLPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Pedal Left Position", new Vector3(-0.12f, -0.23f, -0.24f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxPedLRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Pedal Left Rotation", new Vector3(5.56f, 313.56f, 357.42f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxPedLScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Pedal Left Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxPedRPos = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Pedal Right Position", new Vector3(-0.14f, 0.02f, -0.3f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxPedRRot = ((BaseUnityPlugin)this).Config.Bind<Vector3>("BMX", "BMX Pedal Right Rotation", new Vector3(359.23f, 307.6f, 353.96f), new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
			bmxPedRScale = ((BaseUnityPlugin)this).Config.Bind<float>("BMX", "BMX Pedal Right Scale", 0.75f, new ConfigDescription("", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					IsAdvanced = true
				}
			}));
		}

		public static void DestroyTheChild(Transform parent)
		{
			for (int num = parent.childCount - 1; num >= 0; num--)
			{
				Transform child = parent.GetChild(num);
				Object.DestroyImmediate((Object)(object)((Component)child).gameObject);
			}
		}

		private void FixedUpdate()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected I4, but got Unknown
			if (!((Object)(object)player == (Object)null) && placementMode.Value)
			{
				MoveStyle moveStyleEquipped = player.moveStyleEquipped;
				MoveStyle val = moveStyleEquipped;
				switch (val - 1)
				{
				case 0:
					player.characterVisual.SetBMXPropsMode((MoveStylePropMode)0);
					break;
				case 1:
					player.characterVisual.SetSkateboardPropsMode((MoveStylePropMode)0);
					break;
				case 2:
					player.characterVisual.SetInlineSkatesPropsMode((MoveStylePropMode)0);
					break;
				}
			}
		}
	}
}
namespace StyleOnBack.Patches
{
	internal static class CharacterVisualPatch
	{
		public static GameObject inlineParent;

		public static GameObject skateboardParent;

		public static GameObject bmxParent;

		public static bool inlineDoOnce;

		public static bool skateboardDoOnce;

		public static bool bmxDoOnce;

		[HarmonyPatch(typeof(CharacterVisual), "SetInlineSkatesPropsMode")]
		[HarmonyPrefix]
		private static bool CharacterVisual_SetInlineSkatesPropsMode_Prefix(MoveStylePropMode mode, CharacterVisual __instance)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Invalid comparison between Unknown and I4
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Invalid comparison between Unknown and I4
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Invalid comparison between Unknown and I4
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Invalid comparison between Unknown and I4
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Expected O, but got Unknown
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0343: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)((Component)__instance).transform.root).GetComponent<Player>() != (Object)null && ((Component)((Component)__instance).transform.root).GetComponent<Player>().isAI)
			{
				return true;
			}
			__instance.moveStyleProps.skateL.SetActive((int)mode == 1);
			__instance.moveStyleProps.skateR.SetActive((int)mode == 1);
			if ((int)mode == 1)
			{
				__instance.moveStyleProps.skateL.transform.parent = __instance.footL;
				__instance.moveStyleProps.skateR.transform.parent = __instance.footR;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.skateL.transform);
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.skateR.transform);
				__instance.moveStyleProps.skateL.transform.localScale = Vector3.one * 1f;
				__instance.moveStyleProps.skateR.transform.localScale = Vector3.one * 1f;
				inlineDoOnce = true;
				return false;
			}
			if ((int)mode == 0)
			{
				if ((Object)(object)inlineParent == (Object)null)
				{
					inlineParent = new GameObject("inlineParent");
				}
				if (inlineDoOnce)
				{
					StyleOnBack.DestroyTheChild(inlineParent.transform);
					inlineDoOnce = false;
				}
				__instance.moveStyleProps.skateL.SetActive(true);
				__instance.moveStyleProps.skateR.SetActive(true);
				__instance.moveStyleProps.skateL.transform.parent = inlineParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.skateL.transform);
				__instance.moveStyleProps.skateL.transform.localPosition = StyleOnBack.skateLPos.Value;
				__instance.moveStyleProps.skateL.transform.localRotation = Quaternion.Euler(StyleOnBack.skateLRot.Value);
				__instance.moveStyleProps.skateL.transform.localScale = Vector3.one * StyleOnBack.skateLScale.Value;
				__instance.moveStyleProps.skateR.transform.parent = inlineParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.skateR.transform);
				__instance.moveStyleProps.skateR.transform.localPosition = StyleOnBack.skateRPos.Value;
				__instance.moveStyleProps.skateR.transform.localRotation = Quaternion.Euler(StyleOnBack.skateRRot.Value);
				__instance.moveStyleProps.skateR.transform.localScale = Vector3.one * StyleOnBack.skateRScale.Value;
				inlineParent.transform.parent = TransformExtentions.FindRecursive(__instance.root, StyleOnBack.skateBoneName.Value);
				inlineParent.transform.localPosition = StyleOnBack.skateGlobalPos.Value;
				inlineParent.transform.localRotation = Quaternion.Euler(StyleOnBack.skateGlobalRot.Value);
				inlineParent.transform.localScale = Vector3.one * StyleOnBack.skateGlobalScale.Value;
			}
			return false;
		}

		[HarmonyPatch(typeof(CharacterVisual), "SetSkateboardPropsMode")]
		[HarmonyPrefix]
		private static bool CharacterVisual_SetSkateboardPropsMode_Prefix(MoveStylePropMode mode, CharacterVisual __instance)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Invalid comparison between Unknown and I4
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Invalid comparison between Unknown and I4
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Invalid comparison between Unknown and I4
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Expected O, but got Unknown
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)((Component)__instance).transform.root).GetComponent<Player>() != (Object)null && ((Component)((Component)__instance).transform.root).GetComponent<Player>().isAI)
			{
				return true;
			}
			__instance.moveStyleProps.skateboard.SetActive((int)mode == 1);
			if ((int)mode == 1)
			{
				__instance.moveStyleProps.skateboard.transform.parent = __instance.skateboardBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.skateboard.transform);
				__instance.moveStyleProps.skateboard.transform.localScale = Vector3.one * 1f;
				skateboardDoOnce = true;
				return false;
			}
			if ((int)mode == 0)
			{
				if ((Object)(object)skateboardParent == (Object)null)
				{
					skateboardParent = new GameObject("skateboardParent");
				}
				if (skateboardDoOnce)
				{
					StyleOnBack.DestroyTheChild(skateboardParent.transform);
					skateboardDoOnce = false;
				}
				__instance.moveStyleProps.skateboard.SetActive(true);
				__instance.moveStyleProps.skateboard.transform.parent = skateboardParent.transform;
				__instance.moveStyleProps.skateboard.transform.localPosition = StyleOnBack.skateboardPos.Value;
				__instance.moveStyleProps.skateboard.transform.localRotation = Quaternion.Euler(StyleOnBack.skateboardRot.Value);
				__instance.moveStyleProps.skateboard.transform.localScale = Vector3.one * StyleOnBack.skateboardScale.Value;
				skateboardParent.transform.parent = TransformExtentions.FindRecursive(__instance.root, StyleOnBack.skateboardBoneName.Value);
				skateboardParent.transform.localPosition = StyleOnBack.skateboardGlobalPos.Value;
				skateboardParent.transform.localRotation = Quaternion.Euler(StyleOnBack.skateboardGlobalRot.Value);
				skateboardParent.transform.localScale = Vector3.one * StyleOnBack.skateboardGlobalScale.Value;
			}
			return false;
		}

		[HarmonyPatch(typeof(CharacterVisual), "SetBMXPropsMode")]
		[HarmonyPrefix]
		private static bool CharacterVisual_SetBMXPropsMode_Prefix(MoveStylePropMode mode, CharacterVisual __instance)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Invalid comparison between Unknown and I4
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Invalid comparison between Unknown and I4
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Invalid comparison between Unknown and I4
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Invalid comparison between Unknown and I4
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Invalid comparison between Unknown and I4
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Invalid comparison between Unknown and I4
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Invalid comparison between Unknown and I4
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Invalid comparison between Unknown and I4
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Invalid comparison between Unknown and I4
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Expected O, but got Unknown
			//IL_0364: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_0389: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_0429: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0449: Unknown result type (might be due to invalid IL or missing references)
			//IL_0458: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0553: Unknown result type (might be due to invalid IL or missing references)
			//IL_0573: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_0593: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_061d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0638: Unknown result type (might be due to invalid IL or missing references)
			//IL_0647: Unknown result type (might be due to invalid IL or missing references)
			//IL_069d: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0742: Unknown result type (might be due to invalid IL or missing references)
			//IL_0762: Unknown result type (might be due to invalid IL or missing references)
			//IL_0767: Unknown result type (might be due to invalid IL or missing references)
			//IL_0782: Unknown result type (might be due to invalid IL or missing references)
			//IL_0791: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0804: Unknown result type (might be due to invalid IL or missing references)
			//IL_0813: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)((Component)__instance).transform.root).GetComponent<Player>() != (Object)null && ((Component)((Component)__instance).transform.root).GetComponent<Player>().isAI)
			{
				return true;
			}
			__instance.moveStyleProps.bmxFrame.SetActive((int)mode == 1);
			__instance.moveStyleProps.bmxHandlebars.SetActive((int)mode == 1);
			__instance.moveStyleProps.bmxWheelR.SetActive((int)mode == 1);
			__instance.moveStyleProps.bmxWheelF.SetActive((int)mode == 1);
			__instance.moveStyleProps.bmxGear.SetActive((int)mode == 1);
			__instance.moveStyleProps.bmxPedalL.SetActive((int)mode == 1);
			__instance.moveStyleProps.bmxPedalR.SetActive((int)mode == 1);
			if ((int)mode == 1)
			{
				__instance.moveStyleProps.bmxFrame.transform.parent = __instance.bmxFrameBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxFrame.transform);
				__instance.moveStyleProps.bmxHandlebars.transform.parent = __instance.bmxHandlebarsBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxHandlebars.transform);
				__instance.moveStyleProps.bmxWheelR.transform.parent = __instance.bmxWheelRBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxWheelR.transform);
				__instance.moveStyleProps.bmxWheelF.transform.parent = __instance.bmxWheelFBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxWheelF.transform);
				__instance.moveStyleProps.bmxGear.transform.parent = __instance.bmxGearBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxGear.transform);
				__instance.moveStyleProps.bmxPedalL.transform.parent = __instance.bmxPedalLBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxPedalL.transform);
				__instance.moveStyleProps.bmxPedalR.transform.parent = __instance.bmxPedalRBone;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxPedalR.transform);
				bmxDoOnce = true;
				return false;
			}
			if ((int)mode == 0)
			{
				if ((Object)(object)bmxParent == (Object)null)
				{
					bmxParent = new GameObject("bmxParent");
				}
				if (bmxDoOnce)
				{
					StyleOnBack.DestroyTheChild(bmxParent.transform);
					bmxDoOnce = false;
				}
				__instance.moveStyleProps.bmxFrame.SetActive(true);
				__instance.moveStyleProps.bmxHandlebars.SetActive(true);
				__instance.moveStyleProps.bmxWheelR.SetActive(true);
				__instance.moveStyleProps.bmxWheelF.SetActive(true);
				__instance.moveStyleProps.bmxGear.SetActive(true);
				__instance.moveStyleProps.bmxPedalL.SetActive(true);
				__instance.moveStyleProps.bmxPedalR.SetActive(true);
				__instance.moveStyleProps.bmxFrame.transform.parent = bmxParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxFrame.transform);
				__instance.moveStyleProps.bmxFrame.transform.localPosition = StyleOnBack.bmxFramePos.Value;
				__instance.moveStyleProps.bmxFrame.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxFrameRot.Value);
				__instance.moveStyleProps.bmxFrame.transform.localScale = Vector3.one * StyleOnBack.bmxFrameScale.Value;
				__instance.moveStyleProps.bmxHandlebars.transform.parent = bmxParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxHandlebars.transform);
				__instance.moveStyleProps.bmxHandlebars.transform.localPosition = StyleOnBack.bmxHandPos.Value;
				__instance.moveStyleProps.bmxHandlebars.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxHandRot.Value);
				__instance.moveStyleProps.bmxHandlebars.transform.localScale = Vector3.one * StyleOnBack.bmxHandScale.Value;
				__instance.moveStyleProps.bmxWheelR.transform.parent = bmxParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxWheelR.transform);
				__instance.moveStyleProps.bmxWheelR.transform.localPosition = StyleOnBack.bmxWheelRPos.Value;
				__instance.moveStyleProps.bmxWheelR.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxWheelRRot.Value);
				__instance.moveStyleProps.bmxWheelR.transform.localScale = Vector3.one * StyleOnBack.bmxWheelRScale.Value;
				__instance.moveStyleProps.bmxWheelF.transform.parent = bmxParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxWheelF.transform);
				__instance.moveStyleProps.bmxWheelF.transform.localPosition = StyleOnBack.bmxWheelFPos.Value;
				__instance.moveStyleProps.bmxWheelF.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxWheelFRot.Value);
				__instance.moveStyleProps.bmxWheelF.transform.localScale = Vector3.one * StyleOnBack.bmxWheelFScale.Value;
				__instance.moveStyleProps.bmxGear.transform.parent = bmxParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxGear.transform);
				__instance.moveStyleProps.bmxGear.transform.localPosition = StyleOnBack.bmxGearPos.Value;
				__instance.moveStyleProps.bmxGear.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxGearRot.Value);
				__instance.moveStyleProps.bmxGear.transform.localScale = Vector3.one * StyleOnBack.bmxGearScale.Value;
				__instance.moveStyleProps.bmxPedalL.transform.parent = bmxParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxPedalL.transform);
				__instance.moveStyleProps.bmxPedalL.transform.localPosition = StyleOnBack.bmxPedLPos.Value;
				__instance.moveStyleProps.bmxPedalL.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxPedLRot.Value);
				__instance.moveStyleProps.bmxPedalL.transform.localScale = Vector3.one * StyleOnBack.bmxPedLScale.Value;
				__instance.moveStyleProps.bmxPedalR.transform.parent = bmxParent.transform;
				TransformExtentions.SetToIdentity(__instance.moveStyleProps.bmxPedalR.transform);
				__instance.moveStyleProps.bmxPedalR.transform.localPosition = StyleOnBack.bmxPedRPos.Value;
				__instance.moveStyleProps.bmxPedalR.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxPedRRot.Value);
				__instance.moveStyleProps.bmxPedalR.transform.localScale = Vector3.one * StyleOnBack.bmxPedRScale.Value;
				bmxParent.transform.parent = TransformExtentions.FindRecursive(__instance.root, StyleOnBack.bmxBoneName.Value);
				bmxParent.transform.localPosition = StyleOnBack.bmxGlobalPos.Value;
				bmxParent.transform.localRotation = Quaternion.Euler(StyleOnBack.bmxGlobalRot.Value);
				bmxParent.transform.localScale = Vector3.one * StyleOnBack.bmxGlobalScale.Value;
			}
			return false;
		}
	}
	internal static class PlayerPatch
	{
		[HarmonyPatch(typeof(Player), "Init")]
		[HarmonyPostfix]
		private static void Player_Init_Postfix(Player __instance)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected I4, but got Unknown
			if (!__instance.isAI)
			{
				StyleOnBack.player = __instance;
				MoveStyle moveStyleEquipped = __instance.moveStyleEquipped;
				MoveStyle val = moveStyleEquipped;
				switch (val - 1)
				{
				case 0:
					__instance.characterVisual.SetBMXPropsMode((MoveStylePropMode)0);
					break;
				case 1:
					__instance.characterVisual.SetSkateboardPropsMode((MoveStylePropMode)0);
					break;
				case 2:
					__instance.characterVisual.SetInlineSkatesPropsMode((MoveStylePropMode)0);
					break;
				}
			}
		}
	}
}