Decompiled source of HuotAutomatic v1.0.0

HuotAutomatic.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using OtherLoader;
using TheNext;
using UnityEditor;
using UnityEngine;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
public class DeferredNightVisionEffect : MonoBehaviour
{
	[SerializeField]
	[Tooltip("The main color of the NV effect")]
	public Color m_NVColor = new Color(0f, 1f, 0.1724138f, 0f);

	[SerializeField]
	[Tooltip("The color that the NV effect will 'bleach' towards (white = default)")]
	public Color m_TargetBleachColor = new Color(1f, 1f, 1f, 0f);

	[Range(0f, 0.1f)]
	[Tooltip("How much base lighting does the NV effect pick up")]
	public float m_baseLightingContribution = 0.025f;

	[Range(0f, 128f)]
	[Tooltip("The higher this value, the more bright areas will get 'bleached out'")]
	public float m_LightSensitivityMultiplier = 100f;

	private Material m_Material;

	private Shader m_Shader;

	[Tooltip("Do we want to apply a vignette to the edges of the screen?")]
	public bool useVignetting = true;

	public Shader NightVisionShader => m_Shader;

	private void DestroyMaterial(Material mat)
	{
		if (Object.op_Implicit((Object)(object)mat))
		{
			Object.DestroyImmediate((Object)(object)mat);
			mat = null;
		}
	}

	private void CreateMaterials()
	{
		if ((Object)(object)m_Shader == (Object)null)
		{
			m_Shader = Shader.Find("Custom/DeferredNightVisionShader");
		}
		if ((Object)(object)m_Material == (Object)null && (Object)(object)m_Shader != (Object)null && m_Shader.isSupported)
		{
			m_Material = CreateMaterial(m_Shader);
		}
	}

	private Material CreateMaterial(Shader shader)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		if (!Object.op_Implicit((Object)(object)shader))
		{
			return null;
		}
		Material val = new Material(shader);
		((Object)val).hideFlags = (HideFlags)61;
		return val;
	}

	private void OnDisable()
	{
		DestroyMaterial(m_Material);
		m_Material = null;
		m_Shader = null;
	}

	[ContextMenu("UpdateShaderValues")]
	public void UpdateShaderValues()
	{
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)m_Material == (Object)null))
		{
			m_Material.SetVector("_NVColor", Color.op_Implicit(m_NVColor));
			m_Material.SetVector("_TargetWhiteColor", Color.op_Implicit(m_TargetBleachColor));
			m_Material.SetFloat("_BaseLightingContribution", m_baseLightingContribution);
			m_Material.SetFloat("_LightSensitivityMultiplier", m_LightSensitivityMultiplier);
			m_Material.shaderKeywords = null;
			if (useVignetting)
			{
				Shader.EnableKeyword("USE_VIGNETTE");
			}
			else
			{
				Shader.DisableKeyword("USE_VIGNETTE");
			}
		}
	}

	private void OnEnable()
	{
		CreateMaterials();
		UpdateShaderValues();
	}

	public void ReloadShaders()
	{
		OnDisable();
	}

	private void OnRenderImage(RenderTexture source, RenderTexture destination)
	{
		UpdateShaderValues();
		CreateMaterials();
		Graphics.Blit((Texture)(object)source, destination, m_Material);
	}
}
namespace JerryAr.HuotAutomatic
{
	[BepInPlugin("JerryAr.HuotAutomatic", "HuotAutomatic", "1.0.0")]
	[BepInProcess("h3vr.exe")]
	[Description("Built with MeatKit")]
	[BepInDependency("h3vr.otherloader", "1.3.0")]
	public class HuotAutomaticPlugin : BaseUnityPlugin
	{
		private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

		internal static ManualLogSource Logger;

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			LoadAssets();
		}

		private void LoadAssets()
		{
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "JerryAr.HuotAutomatic");
			OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.HuotAutomatic", "", "", "huotautomatic", "");
		}
	}
}
public class MagPosChange : MonoBehaviour
{
	private void Start()
	{
	}

	private void Update()
	{
	}
}
public class BearControl : MonoBehaviour
{
	public CapsuleCollider bearCollider;

	public Collider planeCollider;

	public Collider terrianCollider;

	private Vector3 prevPos;

	private Vector3 v = Vector3.zero;

	private bool cached = false;

	private float g = -5f;

	private void Start()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		prevPos = ((Component)bearCollider).transform.position;
	}

	private void FixedUpdate()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		Ray val = Camera.main.ScreenPointToRay(Input.mousePosition);
		Rigidbody component = ((Component)this).GetComponent<Rigidbody>();
		if (component.useGravity)
		{
			Transform transform = ((Component)bearCollider).transform;
			transform.position += v;
		}
		else
		{
			v = Vector3.zero;
			RaycastHit val2 = default(RaycastHit);
			if (planeCollider.Raycast(val, ref val2, 100f))
			{
				Vector3 point = ((RaycastHit)(ref val2)).point;
				point.y = ((!(point.y < -0.04f)) ? point.y : (-0.04f));
				((Component)bearCollider).transform.position = point;
				v = ((Component)bearCollider).transform.position - prevPos;
			}
		}
		prevPos = ((Component)bearCollider).transform.position;
	}

	private void Update()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		Ray val = Camera.main.ScreenPointToRay(Input.mousePosition);
		Rigidbody component = ((Component)this).GetComponent<Rigidbody>();
		RaycastHit val2 = default(RaycastHit);
		if (Input.GetMouseButton(0) && ((Collider)bearCollider).Raycast(val, ref val2, 100f))
		{
			cached = true;
			component.useGravity = false;
		}
		if (Input.GetMouseButtonUp(0))
		{
			cached = false;
			component.useGravity = true;
		}
	}

	public void ButtonDown()
	{
		Application.LoadLevel(0);
	}

	public void OnCollisionEnter(Collision other)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		v = Vector3.zero;
	}

	public void OnCollisionStay(Collision other)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		v = Vector3.zero;
	}
}
public class BodyController : MonoBehaviour
{
	public Transform windObj;

	private Animator animator;

	private Vector3 velocity;

	private Rigidbody rig;

	public float MoveSpeed = 5f;

	private void Start()
	{
		animator = ((Component)this).GetComponent<Animator>();
		rig = ((Component)this).GetComponent<Rigidbody>();
	}

	private void Update()
	{
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_016b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_019e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_01df: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: 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_0213: Unknown result type (might be due to invalid IL or missing references)
		//IL_0218: Unknown result type (might be due to invalid IL or missing references)
		//IL_0224: Unknown result type (might be due to invalid IL or missing references)
		//IL_022a: Unknown result type (might be due to invalid IL or missing references)
		//IL_022f: 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_0246: Unknown result type (might be due to invalid IL or missing references)
		//IL_024b: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)animator == (Object)null)
		{
			return;
		}
		if (Input.GetButton("Jump"))
		{
			animator.SetBool("Jump", true);
		}
		else
		{
			animator.SetBool("Jump", false);
		}
		if (Input.GetKeyDown((KeyCode)49))
		{
			animator.SetInteger("Action", 1);
		}
		if (Input.GetKeyDown((KeyCode)50))
		{
			animator.SetInteger("Action", 2);
		}
		if (Input.GetKey((KeyCode)113))
		{
			windObj.Rotate(Vector3.up, 1f);
		}
		if (Input.GetKey((KeyCode)101))
		{
			windObj.Rotate(Vector3.up, -1f);
		}
		AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
		if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsTag("spActions"))
		{
			animator.SetInteger("Action", 0);
		}
		float axis = Input.GetAxis("Horizontal");
		float axis2 = Input.GetAxis("Vertical");
		float num = Mathf.Sqrt(axis * axis + axis2 * axis2);
		if (num > 1f)
		{
			num = 1f;
		}
		animator.SetFloat("Speed", num);
		if (num > 0.1f)
		{
			rig.useGravity = true;
			velocity = new Vector3(0f, 0f, num);
			float num2 = Mathf.Atan(axis / axis2);
			num2 *= 57.29578f;
			if (axis2 < 0f)
			{
				num2 -= 180f;
			}
			Vector3 zero = Vector3.zero;
			CharacterController component = ((Component)this).GetComponent<CharacterController>();
			((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, num2, 0f)), Time.deltaTime * 10f);
			velocity = ((Component)this).transform.TransformDirection(velocity);
			velocity *= MoveSpeed * Time.deltaTime;
			Transform transform = ((Component)this).transform;
			transform.position += velocity;
			Transform obj = windObj;
			obj.position += velocity;
		}
	}

	public void ButtonDown()
	{
		Application.LoadLevel(0);
	}
}
public class Demo02Camera : MonoBehaviour
{
	public Transform follow;

	public float followHeight = 1.3f;

	public float distanceAway = 5f;

	public float distanceUp = 2f;

	public float smooth = 1f;

	public bool Inverse = false;

	private Vector3 targetPosition;

	private Vector3 followPosition;

	private Vector3 forward;

	private float rotateSpeed = 2f;

	public Vector3 cameraRot;

	private Vector3 cameraPitch;

	private Quaternion rotSpeed;

	private float[] distanseArray = new float[4] { 0.8f, 0.6f, 0.4f, 0.2f };

	private void Start()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: 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_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		cameraPitch = Vector3.zero;
		cameraRot = Vector3.zero;
		forward = Vector3.forward;
		followPosition = Vector3.zero;
		Application.targetFrameRate = 10;
	}

	private void LateUpdate()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		followPosition.y = followHeight;
		float num = distanceAway;
		targetPosition = follow.position + Vector3.up * distanceUp + (float)(Inverse ? 1 : (-1)) * forward * num;
		((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, targetPosition, Time.deltaTime * smooth);
		((Component)this).transform.LookAt(follow.position + followPosition);
	}
}
public class Attach : MonoBehaviour
{
	public Transform ropeEnd;

	public Transform bear;

	public Vector3 offset;

	private void LateUpdate()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		bear.position = ropeEnd.position + offset;
	}
}
public class RopeController : MonoBehaviour
{
	public SphereCollider ropeCollider;

	public Collider planeCollider;

	private Ray mouseRay;

	private bool cached = false;

	private Vector3 pos = Vector3.zero;

	private Vector3 prevPos = Vector3.zero;

	private void Start()
	{
	}

	private void Update()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: 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_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		Ray val = (mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition));
		Vector3 zero = Vector3.zero;
		RaycastHit val2 = default(RaycastHit);
		if (Input.GetMouseButton(0) && ((Collider)ropeCollider).Raycast(val, ref val2, 100f))
		{
			zero = ((RaycastHit)(ref val2)).point - ((Component)this).transform.position;
			cached = true;
		}
		if (Input.GetMouseButtonUp(0))
		{
			cached = false;
			prevPos = Vector3.zero;
			pos = Vector3.zero;
		}
		if (cached && planeCollider.Raycast(val, ref val2, 100f))
		{
			prevPos = pos;
			pos = ((RaycastHit)(ref val2)).point;
			if (prevPos != Vector3.zero)
			{
				Transform transform = ((Component)this).transform;
				transform.position += pos - prevPos;
			}
		}
	}

	private void OnDrawGizmos()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: 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)
		Gizmos.color = Color.red;
		Gizmos.DrawLine(((Component)Camera.main).transform.position, pos);
	}
}
public class DynamicalSetup : MonoBehaviour
{
	private PhysicalBoneManager manager;

	private PhysicalBone hairRoot;

	private BoneAttribute attribute;

	private GameObject sphere;

	private SphereCollider sphereCollider;

	private GameObject wind;

	private PhysicalBoneCollider spherePhyCollider;

	private void Start()
	{
	}

	private void Update()
	{
		if ((Object)(object)manager == (Object)null)
		{
			manager = ((Component)this).gameObject.AddComponent<PhysicalBoneManager>();
			hairRoot = GameObject.FindGameObjectWithTag("HairTest").AddComponent<PhysicalBone>();
			hairRoot.Initialize();
			manager.addBoneRoot(hairRoot);
			hairRoot.stiffness = 10f;
			hairRoot.airFriction = 14f;
			hairRoot.radius = 0.04f;
			attribute = hairRoot.getBoneAttribute("hairPlait_L");
			if (attribute == null)
			{
				attribute = new BoneAttribute();
			}
			attribute.freezed = true;
			hairRoot.setBoneAttribute("hairPlait_L", attribute);
			sphere = GameObject.FindGameObjectWithTag("Sphere");
			sphereCollider = sphere.AddComponent<SphereCollider>();
			sphereCollider.radius = 0.5f;
			spherePhyCollider = sphere.AddComponent<PhysicalBoneCollider>();
			manager.addGlobalCollider(spherePhyCollider);
			wind = GameObject.FindGameObjectWithTag("Wind");
			wind.AddComponent<PhysicalBoneWindZone>();
		}
	}
}
namespace TheNext
{
	[Serializable]
	public class BoneAttribute
	{
		public bool freezed = false;

		public bool useIndividualAttribute = false;

		public bool useIndividualVelocityScale = false;

		public Vector3 velocityScale = Vector3.one;

		public float mass = 1f;

		public float stiffness = 20f;

		public float airFriction = 5f;

		public bool useIndividualRadius = false;

		public float radius = 0.1f;

		public bool rotationLimit = false;

		public Vector3 rotationAxis = Vector3.zero;

		public float maxRotationAngle = 180f;
	}
	public enum AxisEnum
	{
		x,
		xReverse,
		y,
		yReverse,
		z,
		zReverse
	}
	[ExecuteInEditMode]
	public class PhysicalBone : MonoBehaviour
	{
		private const int MAX_BONE_COUNT = 500;

		private PhysicalBoneBase[] softBones = new PhysicalBoneBase[500];

		[SerializeField]
		private Transform[] boneTransform = (Transform[])(object)new Transform[500];

		[SerializeField]
		private BoneAttribute[] boneAttribute = new BoneAttribute[500];

		private Vector3[] prevBonePos = (Vector3[])(object)new Vector3[500];

		private int boneCount = 0;

		public Vector3 globalVelocityScale = new Vector3(1f, 1f, 1f);

		public float gravity = 9.8f;

		public float mass = 1f;

		public bool smoothTweening = true;

		public bool highStiffnessTweenFix = false;

		[Range(0f, 1f)]
		public float energyDecay = 0.99f;

		public float stiffness = 10f;

		public float airFriction = 5f;

		public float radius = 0.1f;

		public float radiusScale = 1f;

		public bool rotationLimit = false;

		public float maxRotationAngle = 180f;

		public Vector3 rotationAxis = new Vector3(0f, 0f, 0f);

		public Vector3 boneAxisValue = new Vector3(0f, 1f, 0f);

		public AxisEnum boneAxis = AxisEnum.y;

		public AxisEnum prevBoneAxis = AxisEnum.y;

		public bool selfCollision = false;

		public bool useGlobalColliders = true;

		public bool colliderFriction = true;

		private Vector3 globalPos;

		private int maxDeep = 0;

		public List<PhysicalBoneCollider> localColliders = new List<PhysicalBoneCollider>();

		private int colliderCount = 0;

		public void Initialize()
		{
			if (maxDeep == 0)
			{
				boneCount = 0;
				maxDeep = setupBone(((Component)this).transform, 0);
			}
		}

		private void Start()
		{
			if (maxDeep == 0)
			{
				boneCount = 0;
				maxDeep = setupBone(((Component)this).transform, 0);
				int num = 0;
			}
		}

		private int setupBone(Transform tf, int deep)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			if (tf.childCount == 0)
			{
				return deep;
			}
			if (boneCount >= 500)
			{
				throw new UnityException("Warning: The bone count can't greater than " + 500 + " :" + ((Object)((Component)this).gameObject).name);
			}
			Vector3 val = Vector3.zero;
			for (int i = 0; i < tf.childCount; i++)
			{
				if ((Object)(object)tf.GetChild(i) != (Object)null)
				{
					val += tf.GetChild(i).position;
				}
			}
			int childCount = tf.childCount;
			if (childCount == 0)
			{
				val = Vector3.zero;
				softBones[boneCount] = null;
				return deep;
			}
			val /= (float)childCount;
			deep++;
			boneTransform[boneCount] = tf;
			if (boneAttribute[boneCount] == null)
			{
				boneAttribute[boneCount] = new BoneAttribute();
			}
			softBones[boneCount] = new PhysicalBoneBase(tf, boneAttribute[boneCount], val, deep, boneCount);
			boneCount++;
			int num = 0;
			for (int j = 0; j < tf.childCount; j++)
			{
				if ((Object)(object)tf.GetChild(j) != (Object)null)
				{
					int num2 = setupBone(tf.GetChild(j), deep);
					if (num2 > num)
					{
						num = num2;
					}
				}
			}
			return num;
		}

		public void DoSimpleUpdate(Vector3 globalPos, float dt)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			this.globalPos = globalPos;
			Vector3 fixMotion = Vector3.zero;
			int i = 0;
			int num = 0;
			for (; i < boneCount; i++)
			{
				if (softBones[i] != null && !boneAttribute[i].freezed)
				{
					if (highStiffnessTweenFix && num == 0)
					{
						fixMotion = boneTransform[i].position - prevBonePos[i];
						num = 1;
					}
					Vector3 val = (boneAttribute[i].rotationLimit ? boneAttribute[i].rotationAxis : ((!rotationLimit) ? Vector3.zero : rotationAxis));
					float maxAngle = (boneAttribute[i].rotationLimit ? boneAttribute[i].maxRotationAngle : ((!rotationLimit) ? 360f : maxRotationAngle));
					Vector3 val2 = ((!boneAttribute[i].useIndividualVelocityScale) ? globalVelocityScale : boneAttribute[i].velocityScale);
					if (smoothTweening)
					{
						softBones[i].smoothUpdate(((Component)this).transform.TransformDirection(((Vector3)(ref val)).normalized), maxAngle, boneAxisValue, globalPos, val2, fixMotion, dt);
					}
					else
					{
						softBones[i].simpleUpdate(((Component)this).transform.TransformDirection(((Vector3)(ref val)).normalized), maxAngle, boneAxisValue, globalPos, val2);
					}
				}
			}
		}

		public void DoUpdate(Vector3 force, List<PhysicalBoneCollider> globalColliders, float loop, Vector3 globalPos, float dt)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: 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_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0438: Unknown result type (might be due to invalid IL or missing references)
			//IL_043d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0352: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03db: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < localColliders.Count; i++)
			{
				PhysicalBoneCollider physicalBoneCollider = localColliders[i];
				if (Object.op_Implicit((Object)(object)physicalBoneCollider) && ((Behaviour)physicalBoneCollider).isActiveAndEnabled)
				{
					physicalBoneCollider.DoUpdate();
				}
			}
			this.globalPos = globalPos;
			if (boneAxis != prevBoneAxis)
			{
				if (boneAxis == AxisEnum.x)
				{
					boneAxisValue = Vector3.right;
				}
				else if (boneAxis == AxisEnum.xReverse)
				{
					boneAxisValue = Vector3.left;
				}
				else if (boneAxis == AxisEnum.y)
				{
					boneAxisValue = Vector3.up;
				}
				else if (boneAxis == AxisEnum.yReverse)
				{
					boneAxisValue = Vector3.down;
				}
				else if (boneAxis == AxisEnum.z)
				{
					boneAxisValue = Vector3.forward;
				}
				else if (boneAxis == AxisEnum.zReverse)
				{
					boneAxisValue = Vector3.back;
				}
				prevBoneAxis = boneAxis;
			}
			for (int j = 0; j < boneCount; j++)
			{
				if (softBones[j] != null && !boneAttribute[j].freezed)
				{
					Vector3 val = (boneAttribute[j].rotationLimit ? boneAttribute[j].rotationAxis : ((!rotationLimit) ? Vector3.zero : rotationAxis));
					float maxAngle = (boneAttribute[j].rotationLimit ? boneAttribute[j].maxRotationAngle : ((!rotationLimit) ? 360f : maxRotationAngle));
					Vector3 val2 = ((!boneAttribute[j].useIndividualVelocityScale) ? globalVelocityScale : boneAttribute[j].velocityScale);
					softBones[j].DoUpdate(gravity, energyDecay, mass, stiffness, airFriction, radius, radiusScale, ((Component)this).transform.TransformDirection(((Vector3)(ref val)).normalized), maxAngle, boneAxisValue, force, val2, selfCollision, softBones, colliderFriction, (!useGlobalColliders) ? null : globalColliders, localColliders, loop, globalPos, softBones[0].transform.position, dt);
				}
			}
			if (!smoothTweening)
			{
				return;
			}
			Vector3 fixMotion = Vector3.zero;
			int k = 0;
			int num = 0;
			for (; k < boneCount; k++)
			{
				if (softBones[k] != null && !boneAttribute[k].freezed)
				{
					if (highStiffnessTweenFix && num == 0)
					{
						fixMotion = boneTransform[k].position - prevBonePos[k];
						num = 1;
					}
					Vector3 val3 = (boneAttribute[k].rotationLimit ? boneAttribute[k].rotationAxis : ((!rotationLimit) ? Vector3.zero : rotationAxis));
					float maxAngle2 = (boneAttribute[k].rotationLimit ? boneAttribute[k].maxRotationAngle : ((!rotationLimit) ? 360f : maxRotationAngle));
					Vector3 val4 = ((!boneAttribute[k].useIndividualVelocityScale) ? globalVelocityScale : boneAttribute[k].velocityScale);
					softBones[k].preSmoothUpdate(((Component)this).transform.TransformDirection(((Vector3)(ref val3)).normalized), maxAngle2, boneAxisValue, val4, globalPos, fixMotion);
				}
			}
			if (highStiffnessTweenFix)
			{
				for (int l = 0; l < boneCount; l++)
				{
					ref Vector3 reference = ref prevBonePos[l];
					reference = boneTransform[l].position;
				}
			}
		}

		public bool setBoneAttribute(string boneName, BoneAttribute attr)
		{
			if (attr == null)
			{
				return false;
			}
			for (int i = 0; i < boneTransform.Length; i++)
			{
				if ((Object)(object)boneTransform[i] == (Object)null)
				{
					return false;
				}
				if (((Object)boneTransform[i]).name == boneName)
				{
					boneAttribute[i] = attr;
					return true;
				}
			}
			return false;
		}

		public BoneAttribute getBoneAttribute(string boneName)
		{
			for (int i = 0; i < boneTransform.Length; i++)
			{
				if ((Object)(object)boneTransform[i] == (Object)null)
				{
					return null;
				}
				if (((Object)boneTransform[i]).name == boneName)
				{
					return boneAttribute[i];
				}
			}
			return null;
		}

		public void addLocalCollider(PhysicalBoneCollider collider)
		{
			localColliders.Add(collider);
		}

		public void removeLocalCollider(PhysicalBoneCollider collider)
		{
			localColliders.Remove(collider);
		}

		private void OnDrawGizmos()
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: 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_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			if (softBones == null)
			{
				return;
			}
			for (int i = 0; i < boneCount; i++)
			{
				if (softBones[i] == null)
				{
					continue;
				}
				float num = radiusScale * ((!boneAttribute[i].useIndividualRadius) ? radius : boneAttribute[i].radius);
				if (Application.isPlaying && !boneAttribute[i].freezed)
				{
					Vector3 val = globalPos;
					Vector3 val2 = ((!boneAttribute[i].useIndividualVelocityScale) ? globalVelocityScale : boneAttribute[i].velocityScale);
					val.x *= val2.x;
					val.y *= val2.y;
					val.z *= val2.z;
					Vector3 val3 = softBones[i].bonePos - val + globalPos;
					Gizmos.color = ((softBones[i].contactColliderCount != 0) ? Color.green : Color.red);
					Gizmos.DrawWireSphere(val3, radiusScale * ((!softBones[i].attribute.useIndividualRadius) ? radius : softBones[i].attribute.radius));
					Vector3 val4 = (boneAttribute[i].rotationLimit ? boneAttribute[i].rotationAxis : ((!rotationLimit) ? Vector3.zero : rotationAxis));
					if (val4 != Vector3.zero)
					{
						Gizmos.color = Color.yellow;
						Vector3 val5 = ((Component)this).transform.TransformDirection(((Vector3)(ref val4)).normalized) * ((!boneAttribute[i].useIndividualAttribute) ? radius : boneAttribute[i].radius) * 10f;
						Gizmos.DrawLine(val3 - val5, val3 + val5);
					}
				}
				else
				{
					drawChildGizmo(boneTransform[i], num, boneAttribute[i]);
				}
			}
		}

		private void drawChildGizmo(Transform tf, float radius, BoneAttribute attri)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			if (tf.childCount <= 0)
			{
				return;
			}
			Vector3 val = Vector3.zero;
			for (int i = 0; i < tf.childCount; i++)
			{
				val += tf.GetChild(i).position;
			}
			val /= (float)tf.childCount;
			Gizmos.color = ((!attri.freezed) ? Color.red : Color.gray);
			Gizmos.DrawWireSphere(val, radius);
			if (!attri.freezed)
			{
				Gizmos.color = Color.yellow;
				Vector3 val2 = (attri.rotationLimit ? attri.rotationAxis : ((!rotationLimit) ? Vector3.zero : rotationAxis));
				if (val2 != Vector3.zero)
				{
					Vector3 val3 = ((Component)this).transform.TransformDirection(((Vector3)(ref val2)).normalized) * 0.1f;
					Gizmos.DrawLine(val - val3, val + val3);
				}
			}
		}
	}
	[CustomEditor(typeof(PhysicalBone))]
	public class PhysicalBoneInspector : Editor
	{
		public override void OnInspectorGUI()
		{
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("boneAxis"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("globalVelocityScale"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("gravity"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("mass"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			SerializedProperty val = ((Editor)this).serializedObject.FindProperty("smoothTweening");
			EditorGUILayout.PropertyField(val, (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUI.BeginDisabledGroup(!val.boolValue);
			EditorGUI.indentLevel += 1;
			SerializedProperty val2 = ((Editor)this).serializedObject.FindProperty("highStiffnessTweenFix");
			EditorGUILayout.PropertyField(val2, (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUI.indentLevel -= 1;
			EditorGUI.EndDisabledGroup();
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("energyDecay"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("stiffness"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("airFriction"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("radius"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("radiusScale"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			SerializedProperty val3 = ((Editor)this).serializedObject.FindProperty("rotationLimit");
			EditorGUILayout.PropertyField(val3, (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUI.BeginDisabledGroup(!val3.boolValue);
			EditorGUI.indentLevel += 1;
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("rotationAxis"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("maxRotationAngle"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUI.indentLevel -= 1;
			EditorGUI.EndDisabledGroup();
			DrawAttributeList(((Editor)this).serializedObject.FindProperty("boneAttribute"), ((Editor)this).serializedObject.FindProperty("boneTransform"));
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("selfCollision"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("useGlobalColliders"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("colliderFriction"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(((Editor)this).serializedObject.FindProperty("localColliders"), true, (GUILayoutOption[])(object)new GUILayoutOption[0]);
			((Editor)this).serializedObject.ApplyModifiedProperties();
		}

		private void DrawAttributeList(SerializedProperty alist, SerializedProperty tlist)
		{
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			EditorGUILayout.PropertyField(alist, (GUILayoutOption[])(object)new GUILayoutOption[0]);
			if (!alist.isExpanded)
			{
				return;
			}
			EditorGUI.indentLevel += 1;
			for (int i = 0; i < alist.arraySize; i++)
			{
				SerializedProperty arrayElementAtIndex = tlist.GetArrayElementAtIndex(i);
				if (arrayElementAtIndex.objectReferenceValue != (Object)null)
				{
					Object objectReferenceValue = arrayElementAtIndex.objectReferenceValue;
					Transform val = (Transform)(object)((objectReferenceValue is Transform) ? objectReferenceValue : null);
					SerializedProperty arrayElementAtIndex2 = alist.GetArrayElementAtIndex(i);
					EditorGUILayout.PropertyField(arrayElementAtIndex2, new GUIContent(((Object)val).name), (GUILayoutOption[])(object)new GUILayoutOption[0]);
					if (arrayElementAtIndex2.isExpanded)
					{
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("freezed"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						SerializedProperty val2 = arrayElementAtIndex2.FindPropertyRelative("useIndividualVelocityScale");
						EditorGUILayout.PropertyField(val2, (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.BeginDisabledGroup(!val2.boolValue);
						EditorGUI.indentLevel += 1;
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("velocityScale"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.indentLevel -= 1;
						EditorGUI.EndDisabledGroup();
						SerializedProperty val3 = arrayElementAtIndex2.FindPropertyRelative("useIndividualRadius");
						EditorGUILayout.PropertyField(val3, (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.BeginDisabledGroup(!val3.boolValue);
						EditorGUI.indentLevel += 1;
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("radius"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.indentLevel -= 1;
						EditorGUI.EndDisabledGroup();
						SerializedProperty val4 = arrayElementAtIndex2.FindPropertyRelative("useIndividualAttribute");
						EditorGUILayout.PropertyField(val4, (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.BeginDisabledGroup(!val4.boolValue);
						EditorGUI.indentLevel += 1;
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("mass"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("stiffness"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("airFriction"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.indentLevel -= 1;
						EditorGUI.EndDisabledGroup();
						SerializedProperty val5 = arrayElementAtIndex2.FindPropertyRelative("rotationLimit");
						EditorGUILayout.PropertyField(val5, (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.BeginDisabledGroup(!val5.boolValue);
						EditorGUI.indentLevel += 1;
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("rotationAxis"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUILayout.PropertyField(arrayElementAtIndex2.FindPropertyRelative("maxRotationAngle"), (GUILayoutOption[])(object)new GUILayoutOption[0]);
						EditorGUI.indentLevel -= 1;
						EditorGUI.EndDisabledGroup();
					}
				}
			}
			EditorGUI.indentLevel -= 1;
		}
	}
	public class PhysicalBoneBase
	{
		public GameObject gameObject;

		public Transform transform;

		protected float bLength;

		public Vector3 prevPosition;

		protected Quaternion prevRotation;

		protected Quaternion tRot;

		protected Vector3 tmpBPos;

		public Vector3 prevBPos;

		public Vector3 prevBPos2;

		public Vector3 bonePos;

		public readonly Vector3 oriPos;

		public readonly Vector3 oriVec;

		protected Vector3 pBPos = Vector3.zero;

		protected float energeValue;

		protected float prevEnergeDecay;

		public readonly int deep;

		public readonly int id;

		protected Quaternion oriRotation;

		protected Vector3 oriPosition;

		private PhysicalBoneCollider contactCollider;

		public BoneAttribute attribute;

		public int contactColliderCount = 0;

		public PhysicalBoneBase(Transform transform, BoneAttribute attribute, Vector3 bonePos, int boneDeep, int boneID)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			this.transform = transform;
			gameObject = ((Component)transform).gameObject;
			this.attribute = attribute;
			this.bonePos = bonePos;
			tmpBPos = bonePos;
			prevBPos = bonePos;
			prevBPos2 = bonePos;
			pBPos = bonePos;
			oriPos = bonePos;
			oriVec = bonePos - transform.position;
			prevPosition = transform.position;
			bLength = Vector3.Distance(transform.position, bonePos);
			oriRotation = transform.localRotation;
			oriPosition = transform.localPosition;
			deep = boneDeep;
			id = boneID;
		}

		public void smoothUpdate(Vector3 rotAxis, float maxAngle, Vector3 boneAxis, Vector3 globalPosition, Vector3 globalVelocityScale, Vector3 fixMotion, float dt)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = globalPosition;
			val.x *= globalVelocityScale.x;
			val.y *= globalVelocityScale.y;
			val.z *= globalVelocityScale.z;
			fixMotion.x *= globalVelocityScale.x;
			fixMotion.y *= globalVelocityScale.y;
			fixMotion.z *= globalVelocityScale.z;
			Vector3 val2 = transform.position - globalPosition + val;
			transform.localRotation = Quaternion.identity * oriRotation;
			pBPos = Vector3.Lerp(prevBPos2, bonePos, dt) + fixMotion;
			Vector3 val3 = pBPos - val2;
			pBPos = ((Vector3)(ref val3)).normalized * bLength + val2;
			if (rotAxis != Vector3.zero)
			{
				Plane val4 = default(Plane);
				((Plane)(ref val4))..ctor(rotAxis, val2);
				pBPos -= ((Plane)(ref val4)).normal * ((Plane)(ref val4)).GetDistanceToPoint(pBPos);
			}
			Quaternion val5 = Quaternion.FromToRotation(transform.TransformDirection(boneAxis), pBPos - val2);
			if (maxAngle < 180f)
			{
				float num = Quaternion.Angle(Quaternion.identity, val5);
				if (num > maxAngle)
				{
					val5 = Quaternion.Lerp(Quaternion.identity, val5, maxAngle / num);
				}
			}
			transform.rotation = val5 * transform.rotation;
		}

		public void simpleUpdate(Vector3 rotAxis, float maxAngle, Vector3 boneAxis, Vector3 globalPosition, Vector3 globalVelocityScale)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: 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_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = globalPosition;
			val.x *= globalVelocityScale.x;
			val.y *= globalVelocityScale.y;
			val.z *= globalVelocityScale.z;
			Vector3 val2 = transform.position - globalPosition + val;
			transform.localRotation = Quaternion.identity * oriRotation;
			if (rotAxis != Vector3.zero)
			{
				Plane val3 = default(Plane);
				((Plane)(ref val3))..ctor(rotAxis, val2);
				bonePos -= ((Plane)(ref val3)).normal * ((Plane)(ref val3)).GetDistanceToPoint(bonePos);
			}
			Quaternion val4 = Quaternion.FromToRotation(transform.TransformDirection(boneAxis), bonePos - val2);
			if (maxAngle < 180f)
			{
				float num = Quaternion.Angle(Quaternion.identity, val4);
				if (num > maxAngle)
				{
					val4 = Quaternion.Lerp(Quaternion.identity, val4, maxAngle / num);
				}
			}
			transform.rotation = val4 * transform.rotation;
		}

		public void DoUpdate(float gravity, float energeDecay, float mass, float stiffness, float airFriction, float gRadius, float radiusScale, Vector3 rotAxis, float maxAngle, Vector3 boneAxis, Vector3 force, Vector3 globalVelocityScale, bool selfCollision, PhysicalBoneBase[] bone, bool useFriction, List<PhysicalBoneCollider> globalColliders, List<PhysicalBoneCollider> localColliders, float loop, Vector3 globalPosition, Vector3 rootPosition, float dt)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0748: Unknown result type (might be due to invalid IL or missing references)
			//IL_074a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: 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_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: 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_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_0797: Unknown result type (might be due to invalid IL or missing references)
			//IL_079d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_07da: Unknown result type (might be due to invalid IL or missing references)
			//IL_07df: Unknown result type (might be due to invalid IL or missing references)
			//IL_075c: Unknown result type (might be due to invalid IL or missing references)
			//IL_075e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0766: Unknown result type (might be due to invalid IL or missing references)
			//IL_076d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0775: Unknown result type (might be due to invalid IL or missing references)
			//IL_077f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0784: Unknown result type (might be due to invalid IL or missing references)
			//IL_0789: Unknown result type (might be due to invalid IL or missing references)
			//IL_0364: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0372: Unknown result type (might be due to invalid IL or missing references)
			//IL_0378: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: 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_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_0396: Unknown result type (might be due to invalid IL or missing references)
			//IL_039b: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: 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_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0402: Unknown result type (might be due to invalid IL or missing references)
			//IL_0407: Unknown result type (might be due to invalid IL or missing references)
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_040c: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Unknown result type (might be due to invalid IL or missing references)
			//IL_041a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: 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_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0587: Unknown result type (might be due to invalid IL or missing references)
			//IL_058c: Unknown result type (might be due to invalid IL or missing references)
			//IL_058e: 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_0594: Unknown result type (might be due to invalid IL or missing references)
			//IL_059a: Unknown result type (might be due to invalid IL or missing references)
			//IL_059f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0513: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Unknown result type (might be due to invalid IL or missing references)
			//IL_051b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0521: Unknown result type (might be due to invalid IL or missing references)
			//IL_0526: Unknown result type (might be due to invalid IL or missing references)
			//IL_0528: Unknown result type (might be due to invalid IL or missing references)
			//IL_052d: Unknown result type (might be due to invalid IL or missing references)
			//IL_052e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_0535: Unknown result type (might be due to invalid IL or missing references)
			//IL_0537: Unknown result type (might be due to invalid IL or missing references)
			//IL_053c: Unknown result type (might be due to invalid IL or missing references)
			//IL_053d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0542: Unknown result type (might be due to invalid IL or missing references)
			//IL_054e: 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_0555: 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_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0560: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_048a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_049b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_045b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0465: Unknown result type (might be due to invalid IL or missing references)
			//IL_0467: Unknown result type (might be due to invalid IL or missing references)
			//IL_046c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0471: Unknown result type (might be due to invalid IL or missing references)
			//IL_0439: Unknown result type (might be due to invalid IL or missing references)
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_044a: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0724: Unknown result type (might be due to invalid IL or missing references)
			//IL_0729: Unknown result type (might be due to invalid IL or missing references)
			//IL_0730: Unknown result type (might be due to invalid IL or missing references)
			//IL_0735: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c0: 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_06c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06da: Unknown result type (might be due to invalid IL or missing references)
			//IL_06db: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0703: Unknown result type (might be due to invalid IL or missing references)
			//IL_0705: Unknown result type (might be due to invalid IL or missing references)
			//IL_070a: Unknown result type (might be due to invalid IL or missing references)
			//IL_070b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0655: Unknown result type (might be due to invalid IL or missing references)
			//IL_065f: Unknown result type (might be due to invalid IL or missing references)
			//IL_067a: Unknown result type (might be due to invalid IL or missing references)
			//IL_067f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0687: Unknown result type (might be due to invalid IL or missing references)
			//IL_068e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0693: Unknown result type (might be due to invalid IL or missing references)
			float num = gRadius;
			Vector3 val = globalPosition;
			val.x *= globalVelocityScale.x;
			val.y *= globalVelocityScale.y;
			val.z *= globalVelocityScale.z;
			Vector3 val2 = transform.position - globalPosition + val;
			prevBPos = bonePos;
			if (attribute.useIndividualAttribute)
			{
				mass = attribute.mass;
				stiffness = attribute.stiffness;
				airFriction = attribute.airFriction;
			}
			if (attribute.useIndividualRadius)
			{
				num = attribute.radius;
			}
			num *= radiusScale;
			for (int i = 0; (float)i < loop; i++)
			{
				transform.localRotation = Quaternion.identity * oriRotation;
				Vector3 val3 = Vector3.Lerp(prevPosition, val2, (float)(i + 1) / loop);
				Quaternion rotation = transform.rotation;
				float num2 = dt * dt;
				Vector3 val4 = bonePos - tmpBPos;
				Vector3 val5 = val4 / dt;
				Vector3 val6 = rotation * (boneAxis * stiffness);
				val6 += -val5 * airFriction;
				if (energeDecay != prevEnergeDecay)
				{
					energeValue = Mathf.Pow(energeDecay, (float)deep);
					prevEnergeDecay = energeDecay;
				}
				val4 *= energeValue;
				val6 += new Vector3(0f, 0f - gravity, 0f);
				val6 += force;
				pBPos = bonePos;
				pBPos += val4 + val6 * num2;
				Vector3 val7 = pBPos - val3;
				pBPos = ((Vector3)(ref val7)).normalized * bLength + val3;
				if (useFriction && (Object)(object)contactCollider != (Object)null)
				{
					Vector3 colliderFriction = getColliderFriction(bonePos + globalPosition - val, mass, val6, ((Vector3)(ref val4)).magnitude, contactCollider);
					if (colliderFriction != Vector3.zero)
					{
						Vector3 colliderNormal = getColliderNormal(bonePos + globalPosition - val, contactCollider);
						Vector3 val8 = val6 - Vector3.Dot(val6, colliderNormal) / ((Vector3)(ref colliderNormal)).magnitude * ((Vector3)(ref colliderNormal)).magnitude * colliderNormal;
						Vector3 val9 = pBPos - bonePos;
						Vector3 val10 = Vector3.Dot(val9, colliderNormal) / (((Vector3)(ref colliderNormal)).magnitude * ((Vector3)(ref colliderNormal)).magnitude) * colliderNormal;
						pBPos = bonePos + Vector3.Lerp(Vector3.zero, val9 - val10, 1f - ((Vector3)(ref colliderFriction)).magnitude / ((Vector3)(ref val8)).magnitude) + val10;
						Vector3 val11 = pBPos - val3;
						pBPos = ((Vector3)(ref val11)).normalized * bLength + val3;
					}
				}
				if (maxAngle < 180f)
				{
					Vector3 val12 = pBPos - val3;
					float num3 = Quaternion.Angle(Quaternion.identity, Quaternion.FromToRotation(oriVec, val12));
					if (num3 > maxAngle)
					{
						Vector3 val13 = pBPos - val3;
						Vector3 val14 = Vector3.Dot(val13, oriVec) / Vector3.Dot(oriVec, oriVec) * oriVec;
						Vector3 val15 = pBPos - (val14 + val3);
						Vector3 val16 = ((Vector3)(ref val15)).normalized * (((Vector3)(ref val14)).magnitude * Mathf.Tan((float)Math.PI / 180f * maxAngle));
						pBPos = val16 + (val14 + val3);
						if (num3 > 90f)
						{
							if (maxAngle < 90f)
							{
								pBPos += -2f * val14;
							}
							else
							{
								pBPos += -2f * val16;
							}
						}
						else if (maxAngle > 90f)
						{
							pBPos += -2f * val16;
							pBPos += -2f * val14;
						}
						Vector3 val17 = pBPos - val3;
						pBPos = ((Vector3)(ref val17)).normalized * bLength + val3;
					}
				}
				contactColliderCount = 0;
				if (globalColliders != null)
				{
					for (int j = 0; j < globalColliders.Count; j++)
					{
						pBPos = DoCollision(pBPos + globalPosition - val, bonePos + globalPosition - val, val3 + globalPosition - val, rootPosition, num, globalColliders[j]) - globalPosition + val;
					}
				}
				for (int k = 0; k < localColliders.Count; k++)
				{
					pBPos = DoCollision(pBPos + globalPosition - val, bonePos + globalPosition - val, val3 + globalPosition - val, rootPosition, num, localColliders[k]) - globalPosition + val;
				}
				if (selfCollision)
				{
					for (int l = 0; l < bone.Length; l++)
					{
						if (bone[l] != null && bone[l].id < id)
						{
							float num4 = ((!bone[l].attribute.useIndividualRadius) ? gRadius : bone[l].attribute.radius);
							if (!(Vector3.Distance(oriPos, bone[l].oriPos) < num + num4))
							{
								pBPos = DoSelfSphereCollision(pBPos, val3, num, bone[l].bonePos, num4);
							}
						}
					}
				}
				if (useFriction && pBPos == DoCollision(pBPos + globalPosition - val, bonePos + globalPosition - val, val3 + globalPosition - val, rootPosition, num * 1.1f, contactCollider) - globalPosition + val)
				{
					contactCollider = null;
				}
				tmpBPos = bonePos;
				bonePos = pBPos;
			}
			if (rotAxis != Vector3.zero)
			{
				Plane val18 = default(Plane);
				((Plane)(ref val18))..ctor(rotAxis, val2);
				bonePos -= ((Plane)(ref val18)).normal * ((Plane)(ref val18)).GetDistanceToPoint(bonePos);
			}
			Quaternion val19 = Quaternion.FromToRotation(transform.TransformDirection(boneAxis), bonePos - val2);
			transform.rotation = val19 * transform.rotation;
			prevPosition = val2;
			prevRotation = transform.rotation;
		}

		public void preSmoothUpdate(Vector3 rotAxis, float maxAngle, Vector3 boneAxis, Vector3 globalVelocityScale, Vector3 globalPosition, Vector3 fixMotion)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: 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_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = globalPosition;
			val.x *= globalVelocityScale.x;
			val.y *= globalVelocityScale.y;
			val.z *= globalVelocityScale.z;
			fixMotion.x *= globalVelocityScale.x;
			fixMotion.y *= globalVelocityScale.y;
			fixMotion.z *= globalVelocityScale.z;
			Vector3 val2 = transform.position - globalPosition + val;
			prevBPos2 = prevBPos + fixMotion;
			if (rotAxis != Vector3.zero)
			{
				Plane val3 = default(Plane);
				((Plane)(ref val3))..ctor(rotAxis, val2);
				prevBPos2 -= ((Plane)(ref val3)).normal * ((Plane)(ref val3)).GetDistanceToPoint(prevBPos2);
			}
			transform.localPosition = oriPosition;
			Quaternion val4 = Quaternion.FromToRotation(transform.TransformDirection(boneAxis), prevBPos2 - val2);
			transform.rotation = val4 * transform.rotation;
		}

		private Vector3 getColliderNormal(Vector3 position, PhysicalBoneCollider collider)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0320: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing refer