// Token: 0x06000E23 RID: 3619 RVA: 0x000363C4 File Offset: 0x000345C4 public static bool RecursiveLinkTransformsByName(Transform ragdoll, Transform body, Transform bodyMatchTransform, out Transform ragdollMatchTransform) { if (!bodyMatchTransform) { ragdollMatchTransform = null; global::RagdollHelper.RecursiveLinkTransformsByName(ragdoll, body); return(false); } if (body == bodyMatchTransform) { ragdollMatchTransform = ragdoll; global::RagdollHelper.RecursiveLinkTransformsByName(ragdoll, body); return(true); } BoneStructure component = body.GetComponent <BoneStructure>(); if (component) { BoneStructure component2 = ragdoll.GetComponent <BoneStructure>(); if (component2) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator = component.parentDown.GetEnumerator()) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator2 = component2.parentDown.GetEnumerator()) { while (enumerator.MoveNext() && enumerator2.MoveNext()) { Transform transform = enumerator.Current; Transform transform2 = enumerator2.Current; transform2.position = transform.position; transform2.rotation = transform.rotation; if (transform == bodyMatchTransform) { ragdollMatchTransform = transform2; while (enumerator.MoveNext() && enumerator2.MoveNext()) { transform = enumerator.Current; transform2 = enumerator2.Current; transform2.position = transform.position; transform2.rotation = transform.rotation; } return(true); } } } } ragdollMatchTransform = null; return(false); } } bool result = false; ragdollMatchTransform = null; global::RagdollHelper._RecursiveLinkTransformsByName(ragdoll, body, bodyMatchTransform, ref ragdollMatchTransform, ref result); return(result); }
public static bool RecursiveLinkTransformsByName(Transform ragdoll, Transform body, Transform bodyMatchTransform, out Transform ragdollMatchTransform) { if (bodyMatchTransform == null) { ragdollMatchTransform = null; RecursiveLinkTransformsByName(ragdoll, body); return(false); } if (body == bodyMatchTransform) { ragdollMatchTransform = ragdoll; RecursiveLinkTransformsByName(ragdoll, body); return(true); } BoneStructure component = body.GetComponent <BoneStructure>(); if (component != null) { BoneStructure structure2 = ragdoll.GetComponent <BoneStructure>(); if (structure2 != null) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator = component.parentDown.GetEnumerator()) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator2 = structure2.parentDown.GetEnumerator()) { while (enumerator.MoveNext() && enumerator2.MoveNext()) { Transform current = enumerator.Current; Transform transform2 = enumerator2.Current; transform2.position = current.position; transform2.rotation = current.rotation; if (current == bodyMatchTransform) { ragdollMatchTransform = transform2; while (enumerator.MoveNext() && enumerator2.MoveNext()) { current = enumerator.Current; transform2 = enumerator2.Current; transform2.position = current.position; transform2.rotation = current.rotation; } return(true); } } } } ragdollMatchTransform = null; return(false); } } bool foundMatch = false; ragdollMatchTransform = null; _RecursiveLinkTransformsByName(ragdoll, body, bodyMatchTransform, ref ragdollMatchTransform, ref foundMatch); return(foundMatch); }
// Token: 0x06000E22 RID: 3618 RVA: 0x000362C8 File Offset: 0x000344C8 public static void RecursiveLinkTransformsByName(Transform ragdoll, Transform body) { BoneStructure component = body.GetComponent <BoneStructure>(); if (component) { BoneStructure component2 = ragdoll.GetComponent <BoneStructure>(); if (component2) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator = component.parentDown.GetEnumerator()) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator2 = component2.parentDown.GetEnumerator()) { while (enumerator.MoveNext() && enumerator2.MoveNext()) { Transform transform = enumerator.Current; Transform transform2 = enumerator2.Current; transform2.position = transform.position; transform2.rotation = transform.rotation; } } } return; } } global::RagdollHelper._RecursiveLinkTransformsByName(ragdoll, body); }
public static void RecursiveLinkTransformsByName(Transform ragdoll, Transform body) { BoneStructure component = body.GetComponent <BoneStructure>(); if (component != null) { BoneStructure structure2 = ragdoll.GetComponent <BoneStructure>(); if (structure2 != null) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator = component.parentDown.GetEnumerator()) { using (BoneStructure.ParentDownOrdered.Enumerator enumerator2 = structure2.parentDown.GetEnumerator()) { while (enumerator.MoveNext() && enumerator2.MoveNext()) { Transform current = enumerator.Current; Transform transform2 = enumerator2.Current; transform2.position = current.position; transform2.rotation = current.rotation; } } } return; } } _RecursiveLinkTransformsByName(ragdoll, body); }
public static void RecursiveLinkTransformsByName(Transform ragdoll, Transform body) { BoneStructure component = body.GetComponent <BoneStructure>(); if (component) { BoneStructure boneStructures = ragdoll.GetComponent <BoneStructure>(); if (boneStructures) { BoneStructure.ParentDownOrdered.Enumerator enumerator = component.parentDown.GetEnumerator(); try { BoneStructure.ParentDownOrdered.Enumerator enumerator1 = boneStructures.parentDown.GetEnumerator(); try { while (enumerator.MoveNext() && enumerator1.MoveNext()) { Transform current = enumerator.Current; Transform transforms = enumerator1.Current; transforms.position = current.position; transforms.rotation = current.rotation; } } finally { ((IDisposable)(object)enumerator1).Dispose(); } } finally { ((IDisposable)(object)enumerator).Dispose(); } return; } } RagdollHelper._RecursiveLinkTransformsByName(ragdoll, body); }
public static bool RecursiveLinkTransformsByName(Transform ragdoll, Transform body, Transform bodyMatchTransform, out Transform ragdollMatchTransform) { bool flag; if (!bodyMatchTransform) { ragdollMatchTransform = null; RagdollHelper.RecursiveLinkTransformsByName(ragdoll, body); return(false); } if (body == bodyMatchTransform) { ragdollMatchTransform = ragdoll; RagdollHelper.RecursiveLinkTransformsByName(ragdoll, body); return(true); } BoneStructure component = body.GetComponent <BoneStructure>(); if (component) { BoneStructure boneStructures = ragdoll.GetComponent <BoneStructure>(); if (boneStructures) { BoneStructure.ParentDownOrdered.Enumerator enumerator = component.parentDown.GetEnumerator(); try { BoneStructure.ParentDownOrdered.Enumerator enumerator1 = boneStructures.parentDown.GetEnumerator(); try { while (enumerator.MoveNext() && enumerator1.MoveNext()) { Transform current = enumerator.Current; Transform transforms = enumerator1.Current; transforms.position = current.position; transforms.rotation = current.rotation; if (current != bodyMatchTransform) { continue; } ragdollMatchTransform = transforms; while (enumerator.MoveNext() && enumerator1.MoveNext()) { current = enumerator.Current; transforms = enumerator1.Current; transforms.position = current.position; transforms.rotation = current.rotation; } flag = true; return(flag); } } finally { ((IDisposable)(object)enumerator1).Dispose(); } ragdollMatchTransform = null; return(false); } finally { ((IDisposable)(object)enumerator).Dispose(); } return(flag); } } bool flag1 = false; ragdollMatchTransform = null; RagdollHelper._RecursiveLinkTransformsByName(ragdoll, body, bodyMatchTransform, ref ragdollMatchTransform, ref flag1); return(flag1); }