using System;
using System.Collections;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using FistVR;
using H3MP;
using H3MP.Scripts;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using OpenScripts2;
using RootMotion.FinalIK;
using UnityEditor;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("H3VR_PlayerBody_System")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("H3VR_PlayerBody_System")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("97acd6e1-cb70-435d-af5c-67b73019ad9c")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace PlayerBodySystem
{
[CustomEditor(typeof(MirrorRotationOnXAxis))]
public class MirrorRotationOnXAxisEditor : Editor
{
public override void OnInspectorGUI()
{
((Editor)this).DrawDefaultInspector();
MirrorRotationOnXAxis mirrorRotationOnXAxis = (MirrorRotationOnXAxis)(object)((Editor)this).target;
if ((Object)(object)mirrorRotationOnXAxis.ToMirror == (Object)null)
{
EditorGUILayout.HelpBox("Please assign thing to mirror!", (MessageType)2);
}
else if ((Object)(object)mirrorRotationOnXAxis.MirrorRoot == (Object)null)
{
EditorGUILayout.HelpBox("Please assign thing to mirror around!", (MessageType)2);
}
else if (GUILayout.Button("Mirror Position and Rotation", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
Undo.RecordObject((Object)(object)((Component)mirrorRotationOnXAxis).transform, "Mirrored position and rotation from other transform.");
mirrorRotationOnXAxis.Mirror();
}
}
}
[CustomEditor(typeof(PlayerBodyCopyTools))]
public class PlayerBodyCopyToolsEditor : Editor
{
public override void OnInspectorGUI()
{
((Editor)this).DrawDefaultInspector();
PlayerBodyCopyTools playerBodyCopyTools = (PlayerBodyCopyTools)(object)((Editor)this).target;
if ((Object)(object)playerBodyCopyTools.NewPlayerBodyAnimator == (Object)null)
{
EditorGUILayout.HelpBox("Please assign animator on new player body rig!", (MessageType)2);
return;
}
if (GUILayout.Button("Setup new animator", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
Undo.SetCurrentGroupName("Setup New Animator");
int currentGroup = Undo.GetCurrentGroup();
SetupNewAnimator(playerBodyCopyTools);
Undo.CollapseUndoOperations(currentGroup);
}
if (GUILayout.Button("Adjust Head IK Position", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
Undo.SetCurrentGroupName("Adjust Head IK Position");
int currentGroup2 = Undo.GetCurrentGroup();
AdjustHeadIKPosition(playerBodyCopyTools);
Undo.CollapseUndoOperations(currentGroup2);
}
if (GUILayout.Button("Copy PlayerBody components to new rig", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
Undo.SetCurrentGroupName("Copy Player Body Components");
int currentGroup3 = Undo.GetCurrentGroup();
CopyPlayerBodyComponents(playerBodyCopyTools);
Undo.CollapseUndoOperations(currentGroup3);
}
if (GUILayout.Button("Move colliders and hitboxes to new rig", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
Undo.SetCurrentGroupName("Move Colliders");
int currentGroup4 = Undo.GetCurrentGroup();
MoveCollidersContextMenu(playerBodyCopyTools);
Undo.CollapseUndoOperations(currentGroup4);
}
if (GUILayout.Button("Mirror left hand IK targets to right hand", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
Undo.SetCurrentGroupName("Mirror IK Left Right");
int currentGroup5 = Undo.GetCurrentGroup();
MirrorIKLeftRight(playerBodyCopyTools);
Undo.CollapseUndoOperations(currentGroup5);
}
if (GUILayout.Button("Mirror right hand IK targets to left hand", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
Undo.SetCurrentGroupName("Mirror IK Right Left");
int currentGroup6 = Undo.GetCurrentGroup();
MirrorIKRightLeft(playerBodyCopyTools);
Undo.CollapseUndoOperations(currentGroup6);
}
}
public void SetupNewAnimator(PlayerBodyCopyTools t)
{
//IL_0037: 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_0076: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)t.NewPlayerBodyAnimator != (Object)null && (Object)(object)t.OldPlayerBodyAnimator != (Object)null)
{
Undo.RecordObject((Object)(object)t.NewPlayerBodyAnimator, "Setup new Animator");
Vector3 position = ((Component)t.NewPlayerBodyAnimator).transform.position;
t.NewPlayerBodyAnimator.runtimeAnimatorController = t.OldPlayerBodyAnimator.runtimeAnimatorController;
t.NewPlayerBodyAnimator.cullingMode = (AnimatorCullingMode)0;
t.NewPlayerBodyAnimator.applyRootMotion = false;
((Component)t.NewPlayerBodyAnimator).transform.position = position;
}
else if ((Object)(object)t.OldPlayerBodyAnimator == (Object)null)
{
Debug.LogError((object)"Could not setup new animator, missing OldPlayerBodyAnimator reference!");
}
else if ((Object)(object)t.NewPlayerBodyAnimator == (Object)null)
{
Debug.LogError((object)"Could not setup new animator, missing NewPlayerBodyAnimator reference!");
}
}
public void AdjustHeadIKPosition(PlayerBodyCopyTools t)
{
//IL_006c: 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)
if ((Object)(object)t.HeadTarget != (Object)null && (Object)(object)t.NewPlayerBodyAnimator != (Object)null)
{
if ((Object)(object)t.NewPlayerBodyAnimator.avatar != (Object)null && t.NewPlayerBodyAnimator.avatar.isHuman)
{
Transform boneTransform = t.NewPlayerBodyAnimator.GetBoneTransform((HumanBodyBones)10);
Undo.RecordObject((Object)(object)t.HeadTarget, "Adjust Head IK Position");
t.HeadTarget.position = boneTransform.position;
t.HeadTarget.rotation = boneTransform.rotation;
}
else if ((Object)(object)t.NewPlayerBodyAnimator.avatar == (Object)null)
{
Debug.LogError((object)"Could not move head, Animator is missing Avatar!");
}
else if ((Object)(object)t.NewPlayerBodyAnimator.avatar != (Object)null && !t.NewPlayerBodyAnimator.avatar.isHuman)
{
Debug.LogError((object)"Could not move head, Player body not imported as humanoid rig!");
}
}
else if ((Object)(object)t.HeadTarget == (Object)null)
{
Debug.LogError((object)"Could not adjust head IK position, missing HeadTarget reference!");
}
else if ((Object)(object)t.NewPlayerBodyAnimator == (Object)null)
{
Debug.LogError((object)"Could not adjust head IK position, missing NewPlayerBodyAnimator reference!");
}
}
public void CopyPlayerBodyComponents(PlayerBodyCopyTools t)
{
string name = ((Object)((Component)t.NewPlayerBodyAnimator).gameObject).name;
if ((Object)(object)t.NewPlayerBodyAnimator != (Object)null && (Object)(object)t.OldPlayerBodyAnimator != (Object)null)
{
GameObject gameObject = ((Component)t.NewPlayerBodyAnimator).gameObject;
PlayerBodyHandController componentInParent = ((Component)t.NewPlayerBodyAnimator).GetComponentInParent<PlayerBodyHandController>();
Undo.RecordObject((Object)(object)componentInParent, "");
if ((Object)(object)componentInParent != (Object)null)
{
componentInParent.PlayerBodyAnimator = t.NewPlayerBodyAnimator;
}
else
{
Debug.LogError((object)"Couldn't find PlayerBodyAnimationController component in NewPlayerBodyAnimator parent!");
}
PlayerBodyLegsController componentInParent2 = ((Component)t.NewPlayerBodyAnimator).GetComponentInParent<PlayerBodyLegsController>();
Undo.RecordObject((Object)(object)componentInParent2, "");
if ((Object)(object)componentInParent2 != (Object)null)
{
componentInParent2.PlayerBodyAnimator = t.NewPlayerBodyAnimator;
}
else
{
Debug.LogError((object)"Couldn't find PlayerBodyLegsController component in NewPlayerBodyAnimator parent!");
}
VRIK component = ((Component)t.OldPlayerBodyAnimator).GetComponent<VRIK>();
Undo.RecordObject((Object)(object)component, "");
if ((Object)(object)component != (Object)null)
{
component = PlayerBodyCopyToolsEditor.CopyComponentToGameObject<VRIK>(component, gameObject);
component.AutoDetectReferences();
if ((Object)(object)componentInParent != (Object)null)
{
componentInParent.VRIKInstance = component;
}
}
else
{
Debug.LogError((object)"VRIK component missing on source rig!");
}
PlayerBodyFootPlacementData[] components = ((Component)t.OldPlayerBodyAnimator).GetComponents<PlayerBodyFootPlacementData>();
PlayerBodyFootPlacementData[] components2 = ((Component)t.NewPlayerBodyAnimator).GetComponents<PlayerBodyFootPlacementData>();
Object[] array = (Object[])(object)components2;
Undo.RecordObjects(array, "");
if (components.Length == 2 && components2.Length == 0)
{
components2 = new PlayerBodyFootPlacementData[2]
{
gameObject.AddComponent<PlayerBodyFootPlacementData>(),
gameObject.AddComponent<PlayerBodyFootPlacementData>()
};
for (int i = 0; i < components.Length; i++)
{
PlayerBodyCopyToolsEditor.CopyComponent<PlayerBodyFootPlacementData>((Component)(object)components2[i], components[i]);
}
}
else if (components.Length == 2 && components2.Length == 2)
{
for (int j = 0; j < components.Length; j++)
{
PlayerBodyCopyToolsEditor.CopyComponent<PlayerBodyFootPlacementData>((Component)(object)components2[j], components[j]);
}
}
else if (components.Length < 2)
{
Debug.LogError((object)$"Not enough PlayerBodyFootPlacementData components on source rig! ({components.Length} < 2)");
}
else if (components.Length < 2)
{
Debug.LogError((object)$"Too many PlayerBodyFootPlacementData components on source rig! ({components.Length} > 2)");
}
PlayerBodyFootPlacer component2 = ((Component)t.OldPlayerBodyAnimator).GetComponent<PlayerBodyFootPlacer>();
Undo.RecordObject((Object)(object)component2, "");
if ((Object)(object)component2 != (Object)null)
{
PlayerBodyCopyToolsEditor.CopyComponentToGameObject<PlayerBodyFootPlacer>(component2, gameObject);
}
else
{
Debug.LogError((object)"PlayerBodyFootPlacer component missing on source rig!");
}
((Object)((Component)t.NewPlayerBodyAnimator).gameObject).name = name;
}
else
{
Debug.LogError((object)"Could not copy components, missing Animator reference!");
}
}
public static T CopyComponentToGameObject<T>(T original, GameObject destination) where T : Component
{
destination.SetActive(false);
Type type = ((object)original).GetType();
Component val = destination.GetComponent(type) ?? Undo.AddComponent(destination, type);
Undo.RecordObject((Object)(object)val, "Copy component to game object");
BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public;
FieldInfo[] fields = type.GetFields(bindingAttr);
foreach (FieldInfo fieldInfo in fields)
{
fieldInfo.SetValue(val, fieldInfo.GetValue(original));
}
destination.SetActive(true);
return (T)(object)((val is T) ? val : null);
}
public static T CopyComponent<T>(Component target, T reference) where T : Component
{
Undo.RecordObject((Object)(object)target, "Copy component");
Type type = ((object)reference).GetType();
BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public;
PropertyInfo[] properties = type.GetProperties(bindingAttr);
foreach (PropertyInfo propertyInfo in properties)
{
if (propertyInfo.CanWrite)
{
try
{
propertyInfo.SetValue(target, propertyInfo.GetValue(reference, null), null);
}
catch
{
}
}
}
FieldInfo[] fields = type.GetFields(bindingAttr);
foreach (FieldInfo fieldInfo in fields)
{
fieldInfo.SetValue(target, fieldInfo.GetValue(reference));
}
return (T)(object)((target is T) ? target : null);
}
public void MoveCollidersContextMenu(PlayerBodyCopyTools t)
{
if ((Object)(object)t.NewPlayerBodyAnimator != (Object)null)
{
if ((Object)(object)t.NewPlayerBodyAnimator.avatar != (Object)null && t.NewPlayerBodyAnimator.avatar.isHuman)
{
MoveColliders(t);
}
else if ((Object)(object)t.NewPlayerBodyAnimator.avatar == (Object)null)
{
Debug.LogError((object)"Could not move colliders, Animator is missing Avatar!");
}
else if ((Object)(object)t.NewPlayerBodyAnimator.avatar != (Object)null && !t.NewPlayerBodyAnimator.avatar.isHuman)
{
Debug.LogError((object)"Could not move colliders, Player body not imported as humanoid rig!");
}
}
else
{
Debug.LogError((object)"Could not move colliders, missing NewPlayerBodyAnimator reference!");
}
}
private void MoveColliders(PlayerBodyCopyTools t)
{
Transform boneTransform = t.NewPlayerBodyAnimator.GetBoneTransform((HumanBodyBones)10);
Transform boneTransform2 = t.NewPlayerBodyAnimator.GetBoneTransform((HumanBodyBones)0);
Transform boneTransform3 = t.NewPlayerBodyAnimator.GetBoneTransform((HumanBodyBones)7);
Transform boneTransform4 = t.NewPlayerBodyAnimator.GetBoneTransform((HumanBodyBones)8);
if ((Object)(object)boneTransform != (Object)null)
{
ReparentAndZero(t.HeadHitbox, boneTransform);
ReparentAndZero(t.HeadAIEntity, boneTransform);
}
else
{
Debug.LogError((object)"Humanoid rig doesn't have head bone assigned!");
}
if ((Object)(object)boneTransform2 != (Object)null)
{
ReparentAndZero(t.HipHitbox, boneTransform2);
}
else
{
Debug.LogError((object)"Humanoid rig doesn't have hips bone assigned!");
}
if ((Object)(object)boneTransform3 != (Object)null)
{
ReparentAndZero(t.SpineHitbox, boneTransform3);
ReparentAndZero(t.CenterAIEntitiy, boneTransform3);
}
else
{
Debug.LogError((object)"Humanoid rig doesn't have spine bone assigned!");
}
if ((Object)(object)boneTransform4 != (Object)null)
{
ReparentAndZero(t.ChestHitbox, boneTransform4);
}
else
{
Debug.LogError((object)"Humanoid rig doesn't have chest bone assigned!");
}
}
private void ReparentAndZero(Transform transform, Transform parent)
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
Undo.RecordObject((Object)(object)transform, "Reparent and zero");
transform.SetParent(parent);
transform.localPosition = Vector3.zero;
transform.localRotation = Quaternion.identity;
}
[ContextMenu("MirrorIKFromLeftToRight")]
public void MirrorIKLeftRight(PlayerBodyCopyTools t)
{
PlayerBodyHandController componentInParent = ((Component)t.NewPlayerBodyAnimator).GetComponentInParent<PlayerBodyHandController>();
Transform transform = ((Component)componentInParent).transform;
for (int i = 0; i < componentInParent.HandConfigs[0].HandIKTargets.Length; i++)
{
Transform original = componentInParent.HandConfigs[0].HandIKTargets[i];
Transform toReflect = componentInParent.HandConfigs[1].HandIKTargets[i];
ReflectTransform(original, toReflect, transform);
}
}
[ContextMenu("MirrorIKFromRightToLeft")]
public void MirrorIKRightLeft(PlayerBodyCopyTools t)
{
PlayerBodyHandController componentInParent = ((Component)t.NewPlayerBodyAnimator).GetComponentInParent<PlayerBodyHandController>();
Transform transform = ((Component)componentInParent).transform;
for (int i = 0; i < componentInParent.HandConfigs[1].HandIKTargets.Length; i++)
{
Transform original = componentInParent.HandConfigs[1].HandIKTargets[i];
Transform toReflect = componentInParent.HandConfigs[0].HandIKTargets[i];
ReflectTransform(original, toReflect, transform);
}
}
private void ReflectTransform(Transform original, Transform toReflect, Transform center)
{
//IL_000e: 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_0021: 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)
Undo.RecordObject((Object)(object)toReflect, "");
toReflect.position = ReflectPosition(original.position, center);
toReflect.rotation = ReflectRotation(original.rotation, center);
}
private Vector3 ReflectPosition(Vector3 position, Transform center)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//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)
return Vector3.Reflect(position - center.position, center.right) + center.position;
}
private Quaternion ReflectRotation(Quaternion source, Transform center)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//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_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: 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_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: 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)
return Quaternion.LookRotation(Vector3.Reflect(source * Vector3.forward, center.right), Vector3.Reflect(source * Vector3.up, center.right));
}
}
public class PlayerBodyFootPlacementData : MonoBehaviour
{
public enum LimbID
{
LEFT_FOOT,
RIGHT_FOOT,
LEFT_HAND,
RIGHT_HAND
}
public enum Target
{
FOOT,
TOE,
HEEL
}
[Header("This component contains data used to modify foot placement.")]
[Header("There should be one for each foot on this game object.")]
[Header("You can try changing settings if your feet aren't being correctly planted on the ground.")]
private Animator _playerBodyAnimator;
public LimbID mFootID;
public bool mPlantFoot = true;
public Vector3 mForwardVector = new Vector3(0f, 0f, 1f);
public Vector3 mIKHintOffset = new Vector3(0f, 0f, 0f);
public Vector3 mUpVector = new Vector3(0f, 1f, 0f);
public float mFootOffsetDist = 0.5f;
public float mFootLength = 0.22f;
public float mFootHalfWidth = 0.05f;
public float mFootHeight = 0.1f;
public float mFootRotationLimit = 45f;
public float mTransitionTime = 0.2f;
public float mExtraRayDistanceCheck;
public bool mSetExtraRaydistanceCheckAutomatically;
public float mErrorThreshold = 0.05f;
public float mExtraRayDistanceCheckMin;
public float mExtraRayDistanceCheckMax = 2f;
protected bool mFootPlantIsOnTransition;
protected float mFootPlantBlendSpeed;
protected Vector3 mTargetPos = new Vector3(0f, 0f, 0f);
protected Vector3 mTargetToePos = new Vector3(0f, 0f, 0f);
protected Vector3 mTargetHeelPos = new Vector3(0f, 0f, 0f);
protected Vector3 mRotatedFwdVec;
protected Vector3 mRotatedIKHintOffset;
protected float mTargetFootWeight;
protected float mCurrentFootWeight;
protected float mGoalBlendSpeed;
protected float mPlantBlendFactor;
private Vector3 mFootPlantedPos;
private Quaternion mFootPlantedRot;
private bool mFootPlanted;
private Vector3 mPreviousFootPos = Vector3.zero;
public void SetTargetPos(Target target, Vector3 target_pos)
{
//IL_0014: 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_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: 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)
switch (target)
{
case Target.FOOT:
mTargetPos = target_pos;
break;
case Target.TOE:
mTargetToePos = target_pos;
break;
case Target.HEEL:
mTargetHeelPos = target_pos;
break;
}
}
public Vector3 GetTargetPos(Target target)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
return (Vector3)(target switch
{
Target.FOOT => mTargetPos,
Target.TOE => mTargetToePos,
Target.HEEL => mTargetHeelPos,
_ => Vector3.zero,
});
}
public void CalculateRotatedFwdVec()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: 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_0035: 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_003f: 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_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)
//IL_00f2: 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_00ac: 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_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
AvatarIKGoal val = (AvatarIKGoal)0;
switch (mFootID)
{
case LimbID.RIGHT_FOOT:
val = (AvatarIKGoal)1;
break;
case LimbID.LEFT_HAND:
val = (AvatarIKGoal)2;
break;
case LimbID.RIGHT_HAND:
val = (AvatarIKGoal)3;
break;
}
float num = 0f;
Quaternion iKRotation = _playerBodyAnimator.GetIKRotation(val);
num = ((Quaternion)(ref iKRotation)).eulerAngles.y * (float)Math.PI / 180f;
Quaternion val2 = default(Quaternion);
((Quaternion)(ref val2))..ctor(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f));
if (mFootPlanted && mPlantFoot)
{
num = ((Quaternion)(ref mFootPlantedRot)).eulerAngles.y * (float)Math.PI / 180f;
val2 = Quaternion.Slerp(val2, new Quaternion(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f)), mPlantBlendFactor);
}
mRotatedFwdVec = val2 * ((Vector3)(ref mForwardVector)).normalized;
}
public Vector3 GetRotatedFwdVec()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return mRotatedFwdVec;
}
public void CalculateRotatedIKHint()
{
//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_000e: 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_0051: 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)
Quaternion rotation = ((Component)this).transform.rotation;
float num = ((Quaternion)(ref rotation)).eulerAngles.y * (float)Math.PI / 180f;
Quaternion val = default(Quaternion);
((Quaternion)(ref val))..ctor(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f));
mRotatedIKHintOffset = val * mIKHintOffset;
}
public Vector3 GetRotatedIKHint()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return mRotatedIKHintOffset;
}
public void SetTargetFootWeight(float weight)
{
mTargetFootWeight = weight;
}
public float GetTargetFootWeight()
{
return mTargetFootWeight;
}
public void SetCurrentFootWeight(float weight)
{
mCurrentFootWeight = weight;
}
public float GetCurrentFootWeight()
{
return mCurrentFootWeight;
}
public void SetGoalBlendSpeed(float speed)
{
mGoalBlendSpeed = speed;
}
public float GetGoalBlendSpeed()
{
return mGoalBlendSpeed;
}
public float GetPlantBlendFactor()
{
return mPlantBlendFactor;
}
public void SetPlantBlendFactor(float factor)
{
mPlantBlendFactor = factor;
}
public void EnablePlantBlend(float blend_speed)
{
mFootPlantBlendSpeed = Mathf.Abs(blend_speed);
mFootPlantIsOnTransition = true;
}
public void DisablePlantBlend(float blend_speed)
{
mFootPlantBlendSpeed = 0f - Mathf.Abs(blend_speed);
mFootPlantIsOnTransition = true;
}
public float GetFootPlantBlendSpeed()
{
return mFootPlantBlendSpeed;
}
public void PlantBlendTransitionEnded()
{
mFootPlantIsOnTransition = false;
}
public bool IsPlantOnTransition()
{
return mFootPlantIsOnTransition;
}
public void SetFootPlanted(bool planted)
{
mFootPlanted = planted;
}
public bool GetFootPlanted()
{
return mFootPlanted;
}
public void SetPlantedPos(Vector3 planted_pos)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
mFootPlantedPos = planted_pos;
}
public Vector3 GetPlantedPos()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return mFootPlantedPos;
}
public void SetPlantedRot(Quaternion planted_rot)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
mFootPlantedRot = planted_rot;
}
public Quaternion GetPlantedRot()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return mFootPlantedRot;
}
public void Awake()
{
_playerBodyAnimator = ((Component)this).GetComponent<Animator>();
}
public void Start()
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: 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)
if (!((Object)(object)_playerBodyAnimator == (Object)null))
{
HumanBodyBones val = (HumanBodyBones)5;
switch (mFootID)
{
case LimbID.RIGHT_FOOT:
val = (HumanBodyBones)6;
break;
case LimbID.RIGHT_HAND:
val = (HumanBodyBones)18;
break;
case LimbID.LEFT_HAND:
val = (HumanBodyBones)17;
break;
}
mPreviousFootPos = _playerBodyAnimator.GetBoneTransform(val).position;
}
}
protected bool IsErrorHigh(HumanBodyBones bone, Vector3 current_position, Vector3 previous_pos)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//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)
Vector3 val = previous_pos - current_position;
float magnitude = ((Vector3)(ref val)).magnitude;
float num = mErrorThreshold;
if (Time.deltaTime < 0.033f)
{
num = mErrorThreshold * 30f * Time.deltaTime;
}
if (magnitude > num)
{
return true;
}
return false;
}
private void OnAnimatorIK()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: 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_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: 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_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_0084: 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)
if (mSetExtraRaydistanceCheckAutomatically && !((Object)(object)_playerBodyAnimator == (Object)null))
{
HumanBodyBones val = (HumanBodyBones)5;
switch (mFootID)
{
case LimbID.RIGHT_FOOT:
val = (HumanBodyBones)6;
break;
case LimbID.RIGHT_HAND:
val = (HumanBodyBones)18;
break;
case LimbID.LEFT_HAND:
val = (HumanBodyBones)17;
break;
}
if (IsErrorHigh(val, _playerBodyAnimator.GetBoneTransform(val).position, mPreviousFootPos))
{
mExtraRayDistanceCheck = mExtraRayDistanceCheckMin;
}
else
{
mExtraRayDistanceCheck = mExtraRayDistanceCheckMax;
}
mPreviousFootPos = _playerBodyAnimator.GetBoneTransform(val).position;
}
}
}
[BepInPlugin("h3vr.cityrobo.H3VRPlayerBodySystem", "H3VR PlayerBody System", "1.2.0")]
public class H3VRPlayerBodySystem_BepInEx : BaseUnityPlugin
{
[HideInInspector]
public static bool H3MPLoaded;
public void Awake()
{
Harmony.CreateAndPatchAll(typeof(PlayerBodyFaceController), (string)null);
H3MPLoaded = Chainloader.PluginInfos.ContainsKey("VIP.TommySoucy.H3MP");
}
}
public class PlayerBodyFaceController : MonoBehaviour
{
public Animator PlayerBodyAnimator;
[Header("Blink Animation System")]
public string BlinkAnimationTriggerPropertyName = "Blink";
[Tooltip("Found these values online for the average time between blinks.\nFeel free to change them.")]
public Vector2 RandomBlinkIntervalRange = new Vector2(2f, 6f);
[Header("Pain Animation System")]
public string PainAnimationTriggerPropertyName = "Pain";
private static PlayerBodyFaceController PlayerInstance;
public void Start()
{
if (!OpenScripts2_BasePlugin.IsInEditor)
{
((MonoBehaviour)this).StartCoroutine(WaitForBlink());
if ((Object)(object)Mod.managerObject == (Object)null)
{
PlayerInstance = this;
}
else if ((Object)(object)GameManager.currentPlayerBody == (Object)(object)((Component)this).GetComponentInParent<FVRPlayerBody>())
{
PlayerInstance = this;
}
else
{
Object.Destroy((Object)(object)this);
}
}
}
private IEnumerator WaitForBlink()
{
while (true)
{
float num = Random.Range(RandomBlinkIntervalRange.x, RandomBlinkIntervalRange.y);
yield return (object)new WaitForSeconds(num);
PlayerBodyAnimator.SetTrigger(BlinkAnimationTriggerPropertyName);
}
}
[HarmonyPrefix]
[HarmonyPatch(typeof(FVRPlayerBody), "RegisterPlayerHit")]
public static void FVRPlayerBodyRegisterPlayerHitPatch()
{
PlayerBodyFaceController playerInstance = PlayerInstance;
if (playerInstance != null)
{
playerInstance.PlayerBodyAnimator.SetTrigger(PlayerInstance.PainAnimationTriggerPropertyName);
}
}
}
public class PlayerBodyLegsController : MonoBehaviour
{
[Header("This component controls the leg movement animation.")]
[Header("Has some tooltips for your pleasure.")]
[Tooltip("Speed at which the animation starts playing.")]
public float AnimationActivationSpeedTreshold = 0.7f;
[Tooltip("Animation Smoothing between different speed values.")]
[Range(0f, 1f)]
public float AnimationSmoothing = 0.2f;
[Tooltip("Animator on the PlayerBody rig.")]
public Animator PlayerBodyAnimator;
[Header("Animation transition names:")]
public string IsMovingAnimationStateName = "IsMoving";
public string LeftRightAnimationFloatName = "D_X";
public string ForwardBackAnimationFloatName = "D_Y";
private Vector3 _lastPos;
private float _lastD_X;
private float _lastD_Y;
public void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
_lastPos = ((Component)this).transform.position;
}
public void Update()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: 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_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: 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_00e9: 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)
Vector3 val = (((Component)this).transform.position - _lastPos) / Time.deltaTime;
val.y = 0f;
Vector3 val2 = ((Component)this).transform.InverseTransformDirection(val);
_lastD_X = Mathf.Lerp(_lastD_X, Mathf.Clamp(val2.x, -1f, 1f), AnimationSmoothing);
_lastD_Y = Mathf.Lerp(_lastD_Y, Mathf.Clamp(val2.z, -1f, 1f), AnimationSmoothing);
bool flag = ((Vector3)(ref val2)).magnitude > AnimationActivationSpeedTreshold;
PlayerBodyAnimator.SetBool(IsMovingAnimationStateName, flag);
PlayerBodyAnimator.SetFloat(LeftRightAnimationFloatName, _lastD_X);
PlayerBodyAnimator.SetFloat(ForwardBackAnimationFloatName, _lastD_Y);
_lastPos = ((Component)this).transform.position;
}
}
public class PlayerBodyFootPlacer : MonoBehaviour
{
[Header("This component provides the foot placement functionality.")]
[Header("It tries to keep the feet touching the ground.")]
[Header("You can try changing settings if your feet aren't being correctly planted on the ground.")]
private Animator _playerBodyAnimator;
public bool mAdjustPelvisVertically;
public bool mDampPelvis;
public float mMaxLegLength = 1f;
public float mMinLegLength = 0.2f;
public float mPelvisAdjustmentSpeed = 1f;
public string[] mLayersToIgnore;
protected PlayerBodyFootPlacementData mLeftFoot;
protected PlayerBodyFootPlacementData mRightFoot;
protected PlayerBodyFootPlacementData mLeftHand;
protected PlayerBodyFootPlacementData mRightHand;
protected LayerMask mLayerMask = LayerMask.op_Implicit(-1);
private const float mEpsilon = 0.005f;
private float mCurrentRootVertError;
private float mTargetRootVertError;
private float mCurrentPelvisSpeed;
private Vector3 mLeftFootContact_Ontransition_Disable;
private Vector3 mLeftToeContact_Ontransition_Disable;
private Vector3 mLeftHeelContact_Ontransition_Disable;
private Vector3 mRightFootContact_Ontransition_Disable;
private Vector3 mRightToeContact_Ontransition_Disable;
private Vector3 mRightHeelContact_Ontransition_Disable;
private Vector3 mLeftHandContact_Ontransition_Disable;
private Vector3 mLeftHandToeContact_Ontransition_Disable;
private Vector3 mLeftHandHeelContact_Ontransition_Disable;
private Vector3 mRightHandContact_Ontransition_Disable;
private Vector3 mRightHandToeContact_Ontransition_Disable;
private Vector3 mRightHandHeelContact_Ontransition_Disable;
private bool mRootPosLeftRightFoot;
private bool mLeftFootActive = true;
private bool mRightFootActive = true;
private bool mLeftHandActive = true;
private bool mRightHandActive = true;
public void SetActive(AvatarIKGoal foot_id, bool active)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Invalid comparison between Unknown and I4
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Invalid comparison between Unknown and I4
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Invalid comparison between Unknown and I4
//IL_001e: 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_0076: 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)
if ((int)foot_id == 0)
{
if ((Object)(object)mLeftFoot == (Object)null)
{
return;
}
if (active && !mLeftFootActive)
{
ResetIKParams(foot_id);
}
mLeftFootActive = active;
}
if ((int)foot_id == 1)
{
if ((Object)(object)mRightFoot == (Object)null)
{
return;
}
if (active && !mRightFootActive)
{
ResetIKParams(foot_id);
}
mRightFootActive = active;
}
if ((int)foot_id == 2)
{
if ((Object)(object)mRightHand == (Object)null)
{
return;
}
if (active && !mLeftHandActive)
{
ResetIKParams(foot_id);
}
mLeftHandActive = active;
}
if ((int)foot_id == 3 && !((Object)(object)mRightHand == (Object)null))
{
if (active && !mRightHandActive)
{
ResetIKParams(foot_id);
}
mRightHandActive = active;
}
}
public bool IsActive(AvatarIKGoal foot_id)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Invalid comparison between Unknown and I4
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Invalid comparison between Unknown and I4
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Invalid comparison between Unknown and I4
if ((int)foot_id == 0)
{
return mLeftFootActive;
}
if ((int)foot_id == 1)
{
return mRightFootActive;
}
if ((int)foot_id == 2)
{
return mLeftHandActive;
}
if ((int)foot_id == 3)
{
return mRightHandActive;
}
return false;
}
public void SetLayerMask(LayerMask layer_mask)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
mLayerMask = layer_mask;
}
public LayerMask GetLayerMask()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return mLayerMask;
}
public float GetPlantBlendWeight(AvatarIKGoal foot_id)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
default:
return -1f;
}
return playerBodyFootPlacementData.GetPlantBlendFactor();
}
public void SetPlantBlendWeight(AvatarIKGoal foot_id, float weight)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
default:
return;
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
}
playerBodyFootPlacementData.SetPlantBlendFactor(weight);
}
public void EnablePlant(AvatarIKGoal foot_id, float blend_speed)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
default:
return;
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
}
playerBodyFootPlacementData.EnablePlantBlend(blend_speed);
}
public void DisablePlant(AvatarIKGoal foot_id, float blend_speed)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
default:
return;
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
}
playerBodyFootPlacementData.DisablePlantBlend(blend_speed);
}
private void ResetIKParams(AvatarIKGoal foot_id)
{
//IL_0000: 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_00e3: Invalid comparison between Unknown and I4
//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_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_0062: 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_007d: 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_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: 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_00b2: 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_00c2: 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_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_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01c5: Invalid comparison between Unknown and I4
//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_0137: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_0154: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: 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_0179: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: 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_01b4: 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_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
//IL_02a8: Invalid comparison between Unknown and I4
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
//IL_021a: 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_0227: 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_0242: Unknown result type (might be due to invalid IL or missing references)
//IL_0252: 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_025c: Unknown result type (might be due to invalid IL or missing references)
//IL_0262: Unknown result type (might be due to invalid IL or missing references)
//IL_0277: Unknown result type (might be due to invalid IL or missing references)
//IL_0282: Unknown result type (might be due to invalid IL or missing references)
//IL_0287: Unknown result type (might be due to invalid IL or missing references)
//IL_0297: Unknown result type (might be due to invalid IL or missing references)
//IL_029c: Unknown result type (might be due to invalid IL or missing references)
//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: 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_0325: Unknown result type (might be due to invalid IL or missing references)
//IL_0335: Unknown result type (might be due to invalid IL or missing references)
//IL_033a: Unknown result type (might be due to invalid IL or missing references)
//IL_033f: Unknown result type (might be due to invalid IL or missing references)
//IL_0345: Unknown result type (might be due to invalid IL or missing references)
//IL_035a: Unknown result type (might be due to invalid IL or missing references)
//IL_0365: Unknown result type (might be due to invalid IL or missing references)
//IL_036a: Unknown result type (might be due to invalid IL or missing references)
//IL_037a: 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_0384: Unknown result type (might be due to invalid IL or missing references)
if ((int)foot_id == 0)
{
Vector3 position = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)5).position;
mLeftFoot.SetTargetFootWeight(0f);
mLeftFoot.SetCurrentFootWeight(0f);
mLeftFoot.SetGoalBlendSpeed(0f);
mLeftFoot.SetFootPlanted(planted: false);
mLeftFootContact_Ontransition_Disable = position;
mLeftToeContact_Ontransition_Disable = mLeftFoot.mUpVector * mLeftFoot.mFootOffsetDist + mLeftFoot.GetRotatedFwdVec() * mLeftFoot.mFootLength;
mLeftHeelContact_Ontransition_Disable = position + new Quaternion(0f, 0.7071f, 0f, 0.7071f) * mLeftFoot.GetRotatedFwdVec() * mLeftFoot.mFootHalfWidth;
}
if ((int)foot_id == 1)
{
Vector3 position2 = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)6).position;
mRightFoot.SetTargetFootWeight(0f);
mRightFoot.SetCurrentFootWeight(0f);
mRightFoot.SetGoalBlendSpeed(0f);
mRightFoot.SetFootPlanted(planted: false);
mRightFootContact_Ontransition_Disable = position2;
mRightToeContact_Ontransition_Disable = mRightFoot.mUpVector * mRightFoot.mFootOffsetDist + mRightFoot.GetRotatedFwdVec() * mRightFoot.mFootLength;
mRightHeelContact_Ontransition_Disable = position2 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mRightFoot.GetRotatedFwdVec() * mRightFoot.mFootHalfWidth;
}
if ((int)foot_id == 2)
{
Vector3 position3 = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)17).position;
mLeftHand.SetTargetFootWeight(0f);
mLeftHand.SetCurrentFootWeight(0f);
mLeftHand.SetGoalBlendSpeed(0f);
mLeftHand.SetFootPlanted(planted: false);
mLeftHandContact_Ontransition_Disable = position3;
mLeftHandToeContact_Ontransition_Disable = mLeftHand.mUpVector * mLeftHand.mFootOffsetDist + mLeftHand.GetRotatedFwdVec() * mLeftHand.mFootLength;
mLeftHandHeelContact_Ontransition_Disable = position3 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mLeftHand.GetRotatedFwdVec() * mLeftHand.mFootHalfWidth;
}
if ((int)foot_id == 3)
{
Vector3 position4 = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)18).position;
mRightHand.SetTargetFootWeight(0f);
mRightHand.SetCurrentFootWeight(0f);
mRightHand.SetGoalBlendSpeed(0f);
mRightHand.SetFootPlanted(planted: false);
mRightHandContact_Ontransition_Disable = position4;
mRightHandToeContact_Ontransition_Disable = mRightHand.mUpVector * mRightHand.mFootOffsetDist + mRightHand.GetRotatedFwdVec() * mRightHand.mFootLength;
mRightHandHeelContact_Ontransition_Disable = position4 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mRightHand.GetRotatedFwdVec() * mRightHand.mFootHalfWidth;
}
}
protected void SetIKWeight(AvatarIKGoal foot_id, float target_weight, float transition_time)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
switch ((int)foot_id)
{
case 0:
if (Mathf.Abs(target_weight - mLeftFoot.GetTargetFootWeight()) > 0.005f)
{
if (transition_time != 0f)
{
mLeftFoot.SetGoalBlendSpeed((target_weight - mLeftFoot.GetCurrentFootWeight()) / transition_time);
}
else
{
mLeftFoot.SetGoalBlendSpeed(0.1f);
mLeftFoot.SetCurrentFootWeight(target_weight);
}
}
mLeftFoot.SetTargetFootWeight(target_weight);
break;
case 1:
if (Mathf.Abs(target_weight - mRightFoot.GetTargetFootWeight()) > 0.005f)
{
if (transition_time != 0f)
{
mRightFoot.SetGoalBlendSpeed((target_weight - mRightFoot.GetCurrentFootWeight()) / transition_time);
}
else
{
mRightFoot.SetGoalBlendSpeed(0.1f);
mRightFoot.SetCurrentFootWeight(target_weight);
}
}
mRightFoot.SetTargetFootWeight(target_weight);
break;
case 2:
if (Mathf.Abs(target_weight - mLeftHand.GetTargetFootWeight()) > 0.005f)
{
if (transition_time != 0f)
{
mLeftHand.SetGoalBlendSpeed((target_weight - mLeftHand.GetCurrentFootWeight()) / transition_time);
}
else
{
mLeftHand.SetGoalBlendSpeed(0.1f);
mLeftHand.SetCurrentFootWeight(target_weight);
}
}
mLeftHand.SetTargetFootWeight(target_weight);
break;
case 3:
if (Mathf.Abs(target_weight - mRightHand.GetTargetFootWeight()) > 0.005f)
{
if (transition_time != 0f)
{
mRightHand.SetGoalBlendSpeed((target_weight - mRightHand.GetCurrentFootWeight()) / transition_time);
}
else
{
mRightHand.SetGoalBlendSpeed(0.1f);
mRightHand.SetCurrentFootWeight(target_weight);
}
}
mRightHand.SetTargetFootWeight(target_weight);
break;
}
}
protected void CalculateIKGoalWeights(AvatarIKGoal foot_id)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
default:
return;
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
}
float num = Mathf.Sign(playerBodyFootPlacementData.GetTargetFootWeight() - playerBodyFootPlacementData.GetCurrentFootWeight());
playerBodyFootPlacementData.SetCurrentFootWeight(playerBodyFootPlacementData.GetCurrentFootWeight() + playerBodyFootPlacementData.GetGoalBlendSpeed() * Time.deltaTime);
if (num * Mathf.Sign(playerBodyFootPlacementData.GetTargetFootWeight() - playerBodyFootPlacementData.GetCurrentFootWeight()) < 1f || Mathf.Abs(playerBodyFootPlacementData.GetCurrentFootWeight() - playerBodyFootPlacementData.GetTargetFootWeight()) < 0.005f)
{
playerBodyFootPlacementData.SetCurrentFootWeight(playerBodyFootPlacementData.GetTargetFootWeight());
}
else if (playerBodyFootPlacementData.GetCurrentFootWeight() > 1f || playerBodyFootPlacementData.GetCurrentFootWeight() < 0f)
{
playerBodyFootPlacementData.SetCurrentFootWeight(Mathf.Clamp(playerBodyFootPlacementData.GetTargetFootWeight(), 0f, 1f));
}
}
protected void CheckForLimits(AvatarIKGoal foot_id)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
//IL_0039: 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_0040: 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_0046: 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_00d7: 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_00d9: 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_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: 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_0084: 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_00f3: 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)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: 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_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: 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_013c: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: 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_0149: 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_014f: 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_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
default:
return;
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
}
Vector3 zero = Vector3.zero;
Vector3 rotatedFwdVec = playerBodyFootPlacementData.GetRotatedFwdVec();
if (Vector3.Angle(rotatedFwdVec, playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.TOE)) > playerBodyFootPlacementData.mFootRotationLimit)
{
zero = playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootLength * Mathf.Tan(playerBodyFootPlacementData.mFootRotationLimit * ((float)Math.PI / 180f));
if (Vector3.Angle(playerBodyFootPlacementData.mUpVector, playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.TOE)) > 90f)
{
zero = -zero;
}
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.TOE, rotatedFwdVec * playerBodyFootPlacementData.mFootLength + zero);
}
Quaternion val = default(Quaternion);
((Quaternion)(ref val))..ctor(0f, 0.7071f, 0f, 0.7071f);
if (Vector3.Angle(val * rotatedFwdVec, playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.HEEL)) > playerBodyFootPlacementData.mFootRotationLimit)
{
zero = playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootHalfWidth * Mathf.Tan(playerBodyFootPlacementData.mFootRotationLimit * ((float)Math.PI / 180f));
if (Vector3.Angle(playerBodyFootPlacementData.mUpVector, playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.HEEL)) > 90f)
{
zero = -zero;
}
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.HEEL, val * rotatedFwdVec * playerBodyFootPlacementData.mFootHalfWidth + zero);
}
}
protected void UpdateFootPlantBlendWeights(AvatarIKGoal foot_id)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected I4, but got Unknown
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
default:
return;
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
}
if (!playerBodyFootPlacementData.IsPlantOnTransition())
{
return;
}
playerBodyFootPlacementData.SetPlantBlendFactor(playerBodyFootPlacementData.GetPlantBlendFactor() + playerBodyFootPlacementData.GetFootPlantBlendSpeed() * Time.deltaTime);
if (playerBodyFootPlacementData.GetFootPlantBlendSpeed() > 0f)
{
if (playerBodyFootPlacementData.GetPlantBlendFactor() > 1f)
{
playerBodyFootPlacementData.SetPlantBlendFactor(1f);
playerBodyFootPlacementData.PlantBlendTransitionEnded();
}
}
else if (playerBodyFootPlacementData.GetPlantBlendFactor() < 0f)
{
playerBodyFootPlacementData.SetPlantBlendFactor(0f);
playerBodyFootPlacementData.PlantBlendTransitionEnded();
}
}
protected void FindContactPoints(AvatarIKGoal foot_id)
{
//IL_0006: 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_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected I4, but got Unknown
//IL_0048: 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_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_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_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
//IL_0196: Unknown result type (might be due to invalid IL or missing references)
//IL_01ac: Expected I4, but got Unknown
//IL_0096: 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_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_01c1: 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_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_0127: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Expected I4, but got Unknown
//IL_01da: Unknown result type (might be due to invalid IL or missing references)
//IL_01db: Unknown result type (might be due to invalid IL or missing references)
//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: 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_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_016c: 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_00c1: 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_00d2: 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_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: 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)
//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
//IL_01f0: 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_0200: Unknown result type (might be due to invalid IL or missing references)
//IL_0206: Unknown result type (might be due to invalid IL or missing references)
//IL_0211: Unknown result type (might be due to invalid IL or missing references)
//IL_0216: Unknown result type (might be due to invalid IL or missing references)
//IL_021c: 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_023d: Unknown result type (might be due to invalid IL or missing references)
//IL_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_035c: Unknown result type (might be due to invalid IL or missing references)
//IL_0372: Expected I4, but got Unknown
//IL_0255: Unknown result type (might be due to invalid IL or missing references)
//IL_025a: Unknown result type (might be due to invalid IL or missing references)
//IL_0375: Unknown result type (might be due to invalid IL or missing references)
//IL_037a: Unknown result type (might be due to invalid IL or missing references)
//IL_037e: Unknown result type (might be due to invalid IL or missing references)
//IL_0383: Unknown result type (might be due to invalid IL or missing references)
//IL_0387: Unknown result type (might be due to invalid IL or missing references)
//IL_038c: Unknown result type (might be due to invalid IL or missing references)
//IL_0390: Unknown result type (might be due to invalid IL or missing references)
//IL_0395: Unknown result type (might be due to invalid IL or missing references)
//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0315: Expected I4, but got Unknown
//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
//IL_03b1: 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_0398: 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_031d: Unknown result type (might be due to invalid IL or missing references)
//IL_0322: 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_0341: Unknown result type (might be due to invalid IL or missing references)
//IL_0346: Unknown result type (might be due to invalid IL or missing references)
//IL_0350: Unknown result type (might be due to invalid IL or missing references)
//IL_0355: 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_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_028c: Unknown result type (might be due to invalid IL or missing references)
//IL_0297: Unknown result type (might be due to invalid IL or missing references)
//IL_029c: Unknown result type (might be due to invalid IL or missing references)
//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
//IL_03dd: 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_03ea: 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_03f4: Unknown result type (might be due to invalid IL or missing references)
//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0401: Unknown result type (might be due to invalid IL or missing references)
//IL_0405: 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_041b: Unknown result type (might be due to invalid IL or missing references)
//IL_0420: Unknown result type (might be due to invalid IL or missing references)
//IL_043c: Unknown result type (might be due to invalid IL or missing references)
//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
//IL_02e3: 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_0568: Unknown result type (might be due to invalid IL or missing references)
//IL_057e: Expected I4, but got Unknown
//IL_0454: Unknown result type (might be due to invalid IL or missing references)
//IL_0459: Unknown result type (might be due to invalid IL or missing references)
//IL_0581: Unknown result type (might be due to invalid IL or missing references)
//IL_0586: Unknown result type (might be due to invalid IL or missing references)
//IL_058a: Unknown result type (might be due to invalid IL or missing references)
//IL_058f: 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_0598: Unknown result type (might be due to invalid IL or missing references)
//IL_059c: 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_04fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0502: Unknown result type (might be due to invalid IL or missing references)
//IL_0507: Unknown result type (might be due to invalid IL or missing references)
//IL_0511: Unknown result type (might be due to invalid IL or missing references)
//IL_0527: Expected I4, but got Unknown
//IL_05ac: Unknown result type (might be due to invalid IL or missing references)
//IL_05af: Unknown result type (might be due to invalid IL or missing references)
//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
//IL_05bf: Unknown result type (might be due to invalid IL or missing references)
//IL_05c4: Unknown result type (might be due to invalid IL or missing references)
//IL_05cb: Unknown result type (might be due to invalid IL or missing references)
//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
//IL_052c: Unknown result type (might be due to invalid IL or missing references)
//IL_0531: Unknown result type (might be due to invalid IL or missing references)
//IL_053a: Unknown result type (might be due to invalid IL or missing references)
//IL_053f: Unknown result type (might be due to invalid IL or missing references)
//IL_0548: Unknown result type (might be due to invalid IL or missing references)
//IL_054d: Unknown result type (might be due to invalid IL or missing references)
//IL_0556: 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_0472: Unknown result type (might be due to invalid IL or missing references)
//IL_0478: Unknown result type (might be due to invalid IL or missing references)
//IL_0483: Unknown result type (might be due to invalid IL or missing references)
//IL_0488: Unknown result type (might be due to invalid IL or missing references)
//IL_048d: Unknown result type (might be due to invalid IL or missing references)
//IL_0490: Unknown result type (might be due to invalid IL or missing references)
//IL_0495: Unknown result type (might be due to invalid IL or missing references)
//IL_049a: Unknown result type (might be due to invalid IL or missing references)
//IL_049e: Unknown result type (might be due to invalid IL or missing references)
//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
//IL_04b9: 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_0561: Unknown result type (might be due to invalid IL or missing references)
//IL_0566: Unknown result type (might be due to invalid IL or missing references)
//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
//IL_04f5: Unknown result type (might be due to invalid IL or missing references)
//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
Vector3 iKPosition = _playerBodyAnimator.GetIKPosition(foot_id);
bool flag = true;
PlayerBodyFootPlacementData playerBodyFootPlacementData;
switch ((int)foot_id)
{
default:
return;
case 0:
playerBodyFootPlacementData = mLeftFoot;
break;
case 1:
playerBodyFootPlacementData = mRightFoot;
break;
case 2:
playerBodyFootPlacementData = mLeftHand;
break;
case 3:
playerBodyFootPlacementData = mRightHand;
break;
}
RaycastHit val = default(RaycastHit);
if (Physics.Raycast(iKPosition + playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootOffsetDist, -playerBodyFootPlacementData.mUpVector, ref val, playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.mFootHeight + playerBodyFootPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)))
{
SetIKWeight(foot_id, 1f, playerBodyFootPlacementData.mTransitionTime);
Vector3 val2 = ((RaycastHit)(ref val)).point;
if (playerBodyFootPlacementData.mPlantFoot && playerBodyFootPlacementData.GetFootPlanted() && Physics.Raycast(playerBodyFootPlacementData.GetPlantedPos() + playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootOffsetDist, -playerBodyFootPlacementData.mUpVector, ref val, playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.mFootHeight + playerBodyFootPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)))
{
val2 = Vector3.Lerp(val2, ((RaycastHit)(ref val)).point, playerBodyFootPlacementData.GetPlantBlendFactor());
}
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.FOOT, val2);
switch ((int)foot_id)
{
case 0:
mLeftFootContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.FOOT);
break;
case 1:
mRightFootContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.FOOT);
break;
case 2:
mLeftHandContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.FOOT);
break;
case 3:
mRightHandContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.FOOT);
break;
}
flag = true;
}
else
{
SetIKWeight(foot_id, 0f, playerBodyFootPlacementData.mTransitionTime);
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.FOOT, Vector3.Lerp(iKPosition, (Vector3)((int)foot_id switch
{
0 => mLeftFootContact_Ontransition_Disable,
1 => mRightFootContact_Ontransition_Disable,
2 => mLeftHandContact_Ontransition_Disable,
3 => mRightHandContact_Ontransition_Disable,
_ => Vector3.zero,
}), playerBodyFootPlacementData.GetCurrentFootWeight()));
flag = false;
}
if (Physics.Raycast(iKPosition + playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.GetRotatedFwdVec() * playerBodyFootPlacementData.mFootLength, -playerBodyFootPlacementData.mUpVector, ref val, playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.mFootLength + playerBodyFootPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)) && flag)
{
Vector3 val3 = ((RaycastHit)(ref val)).point;
if (playerBodyFootPlacementData.mPlantFoot && playerBodyFootPlacementData.GetFootPlanted() && Physics.Raycast(playerBodyFootPlacementData.GetPlantedPos() + playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.GetRotatedFwdVec() * playerBodyFootPlacementData.mFootLength, -playerBodyFootPlacementData.mUpVector, ref val, playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.mFootLength + playerBodyFootPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)))
{
val3 = Vector3.Lerp(val3, ((RaycastHit)(ref val)).point, playerBodyFootPlacementData.GetPlantBlendFactor());
}
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.TOE, val3 - playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.FOOT));
switch ((int)foot_id)
{
case 0:
mLeftToeContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.TOE);
break;
case 1:
mRightToeContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.TOE);
break;
case 2:
mLeftHandToeContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.TOE);
break;
case 3:
mRightHandToeContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.TOE);
break;
}
}
else
{
Vector3 val4 = (Vector3)((int)foot_id switch
{
0 => mLeftToeContact_Ontransition_Disable,
1 => mRightToeContact_Ontransition_Disable,
2 => mLeftHandToeContact_Ontransition_Disable,
3 => mRightHandToeContact_Ontransition_Disable,
_ => Vector3.zero,
});
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.TOE, Vector3.Slerp(playerBodyFootPlacementData.GetRotatedFwdVec() * playerBodyFootPlacementData.mFootLength, val4, playerBodyFootPlacementData.GetCurrentFootWeight()));
}
Quaternion val5 = default(Quaternion);
((Quaternion)(ref val5))..ctor(0f, 0.7071f, 0f, 0.7071f);
Vector3 val6 = iKPosition + playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootOffsetDist;
Vector3 val7 = val5 * playerBodyFootPlacementData.GetRotatedFwdVec();
if (Physics.Raycast(val6 + ((Vector3)(ref val7)).normalized * playerBodyFootPlacementData.mFootHalfWidth, -playerBodyFootPlacementData.mUpVector, ref val, playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.mFootLength + playerBodyFootPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)) && flag)
{
Vector3 val8 = ((RaycastHit)(ref val)).point;
if (playerBodyFootPlacementData.mPlantFoot && playerBodyFootPlacementData.GetFootPlanted())
{
Vector3 val9 = playerBodyFootPlacementData.GetPlantedPos() + playerBodyFootPlacementData.mUpVector * playerBodyFootPlacementData.mFootOffsetDist;
val7 = val5 * playerBodyFootPlacementData.GetRotatedFwdVec();
if (Physics.Raycast(val9 + ((Vector3)(ref val7)).normalized * playerBodyFootPlacementData.mFootHalfWidth, -playerBodyFootPlacementData.mUpVector, ref val, playerBodyFootPlacementData.mFootOffsetDist + playerBodyFootPlacementData.mFootLength + playerBodyFootPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)))
{
val8 = Vector3.Lerp(val8, ((RaycastHit)(ref val)).point, playerBodyFootPlacementData.GetPlantBlendFactor());
}
}
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.HEEL, val8 - playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.FOOT));
switch ((int)foot_id)
{
case 0:
mLeftHeelContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.HEEL);
break;
case 1:
mRightHeelContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.HEEL);
break;
case 2:
mLeftHandHeelContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.HEEL);
break;
case 3:
mRightHeelContact_Ontransition_Disable = playerBodyFootPlacementData.GetTargetPos(PlayerBodyFootPlacementData.Target.HEEL);
break;
default:
{
Vector3 val4 = Vector3.zero;
break;
}
}
}
else
{
Vector3 val4 = (Vector3)((int)foot_id switch
{
0 => mLeftHeelContact_Ontransition_Disable,
1 => mRightHeelContact_Ontransition_Disable,
2 => mLeftHandHeelContact_Ontransition_Disable,
3 => mRightHandHeelContact_Ontransition_Disable,
_ => Vector3.zero,
});
playerBodyFootPlacementData.SetTargetPos(PlayerBodyFootPlacementData.Target.HEEL, Vector3.Slerp(val5 * playerBodyFootPlacementData.GetRotatedFwdVec() * playerBodyFootPlacementData.mFootHalfWidth, val4, playerBodyFootPlacementData.GetCurrentFootWeight()));
}
}
protected void RootPositioningCheck()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: 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_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: 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_008c: 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_0096: 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_00bd: 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_03ce: Unknown result type (might be due to invalid IL or missing references)
//IL_03d9: 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_03e9: Unknown result type (might be due to invalid IL or missing references)
//IL_0401: 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_0417: Unknown result type (might be due to invalid IL or missing references)
//IL_041c: Unknown result type (might be due to invalid IL or missing references)
//IL_0434: Unknown result type (might be due to invalid IL or missing references)
//IL_043f: 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_0467: Unknown result type (might be due to invalid IL or missing references)
//IL_0472: Unknown result type (might be due to invalid IL or missing references)
//IL_047d: Unknown result type (might be due to invalid IL or missing references)
//IL_0482: Unknown result type (might be due to invalid IL or missing references)
//IL_0301: Unknown result type (might be due to invalid IL or missing references)
//IL_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_0317: 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_0334: Unknown result type (might be due to invalid IL or missing references)
//IL_033f: 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_0367: 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_037d: Unknown result type (might be due to invalid IL or missing references)
//IL_0382: Unknown result type (might be due to invalid IL or missing references)
//IL_039a: Unknown result type (might be due to invalid IL or missing references)
//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
//IL_010c: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: 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_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: Unknown result type (might be due to invalid IL or missing references)
//IL_0212: 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_0223: 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_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_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_0256: 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_0274: Unknown result type (might be due to invalid IL or missing references)
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Unknown result type (might be due to invalid IL or missing references)
//IL_029c: Unknown result type (might be due to invalid IL or missing references)
//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
//IL_02ad: 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_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_0189: Unknown result type (might be due to invalid IL or missing references)
//IL_018e: 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)
AnimateRootVertError();
if (mAdjustPelvisVertically)
{
Vector3 val = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)2).position - _playerBodyAnimator.GetIKPosition((AvatarIKGoal)1);
float magnitude = ((Vector3)(ref val)).magnitude;
PlayerBodyFootPlacementData playerBodyFootPlacementData = mRightFoot;
mRootPosLeftRightFoot = true;
val = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)1).position - _playerBodyAnimator.GetIKPosition((AvatarIKGoal)0);
float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude;
val = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)2).position - _playerBodyAnimator.GetIKPosition((AvatarIKGoal)1);
if (sqrMagnitude > ((Vector3)(ref val)).sqrMagnitude)
{
val = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)1).position - _playerBodyAnimator.GetIKPosition((AvatarIKGoal)0);
magnitude = ((Vector3)(ref val)).magnitude;
playerBodyFootPlacementData = mLeftFoot;
mRootPosLeftRightFoot = false;
}
if (magnitude > mMaxLegLength)
{
mTargetRootVertError = magnitude - mMaxLegLength;
float num = 0f;
float num2 = 0f;
val = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)1).position - (_playerBodyAnimator.GetIKPosition((AvatarIKGoal)0) + mLeftFoot.mUpVector * mTargetRootVertError);
float magnitude2 = ((Vector3)(ref val)).magnitude;
if (magnitude2 < mMinLegLength)
{
num = mMinLegLength - magnitude2;
}
val = _playerBodyAnimator.GetBoneTransform((HumanBodyBones)2).position - (_playerBodyAnimator.GetIKPosition((AvatarIKGoal)1) + mLeftFoot.mUpVector * mTargetRootVertError);
magnitude2 = ((Vector3)(ref val)).magnitude;
if (magnitude2 < mMinLegLength)
{
num2 = mMinLegLength - magnitude2;
}
if (num2 != 0f || num != 0f)
{
if (num2 > num)
{
mTargetRootVertError -= num2;
}
else
{
mTargetRootVertError -= num;
}
}
}
else
{
mTargetRootVertError = 0f;
mCurrentPelvisSpeed = 0f;
}
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)0, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)0) + playerBodyFootPlacementData.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)1, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)1) + playerBodyFootPlacementData.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)2, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)2) + playerBodyFootPlacementData.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)3, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)3) + playerBodyFootPlacementData.mUpVector * mCurrentRootVertError);
return;
}
mTargetRootVertError = 0f;
mCurrentPelvisSpeed = 0f;
if (Mathf.Abs(mCurrentRootVertError) >= 0.005f)
{
if (mRootPosLeftRightFoot)
{
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)0, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)0) + mRightFoot.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)1, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)1) + mRightFoot.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)2, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)2) + mRightFoot.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)3, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)3) + mRightFoot.mUpVector * mCurrentRootVertError);
}
else
{
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)0, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)0) + mRightFoot.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)1, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)1) + mRightFoot.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)2, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)2) + mRightFoot.mUpVector * mCurrentRootVertError);
_playerBodyAnimator.SetIKPosition((AvatarIKGoal)3, _playerBodyAnimator.GetIKPosition((AvatarIKGoal)3) + mRightFoot.mUpVector * mCurrentRootVertError);
}
}
}
protected void AnimateRootVertError()
{
float num = Mathf.Abs(mCurrentRootVertError - mTargetRootVertError);
if (num < 0.005f)
{
mCurrentRootVertError = mTargetRootVertError;
mCurrentPelvisSpeed = 0f;
return;
}
float num2 = Mathf.Sign(mTargetRootVertError - mCurrentRootVertError);
if (mDampPelvis)
{
if (num < mTargetRootVertError * 0.3f)
{
mCurrentPelvisSpeed -= mPelvisAdjustmentSpeed * Time.deltaTime;
if (mCurrentPelvisSpeed < mPelvisAdjustmentSpeed * 0.5f)
{
mCurrentPelvisSpeed = mPelvisAdjustmentSpeed * 0.5f;
}
mCurrentRootVertError += num2 * mCurrentPelvisSpeed * Time.deltaTime;
}
else
{
mCurrentRootVertError += num2 * mPelvisAdjustmentSpeed * Time.deltaTime;
}
}
else
{
mCurrentRootVertError += num2 * mPelvisAdjustmentSpeed * Time.deltaTime;
mCurrentPelvisSpeed = 0f;
}
if (Mathf.Sign(mTargetRootVertError - mCurrentRootVertError) * num2 <= 0f)
{
mCurrentRootVertError = mTargetRootVertError;
}
}
public void FootPlacement(AvatarIKGoal foot_id)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Expected I4, but got Unknown
//IL_0089: 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_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: 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_00aa: 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_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_00f0: 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_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_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: 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_0163: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: Unknown result type (might be due to invalid IL or missing references)
//IL_016a: 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_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Unknown result type (might be due to invalid IL or missing references)
//IL_0184: 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_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: 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_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_0157: Unknown result type (might be due to invalid IL or missing references)
//IL_015b: Unknown result type (might be due to invalid IL or missing references)
//IL_0160: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: 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_01a0: Unknown result type (might be due to invalid IL or missing references)
//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
//IL_01aa: Unknown result type