Decompiled source of CloneBending v1.5.0

Mods/CloneBending.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using CloneBending;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppLIV.SDK.Unity;
using Il2CppRUMBLE.Managers;
using Il2CppRUMBLE.MoveSystem;
using Il2CppRUMBLE.Players;
using Il2CppRUMBLE.Players.Scaling;
using Il2CppRUMBLE.Players.Subsystems;
using Il2CppRUMBLE.Utilities;
using Il2CppRootMotion.FinalIK;
using MelonLoader;
using Microsoft.CodeAnalysis;
using RumbleModdingAPI;
using UnityEngine;
using UnityEngine.InputSystem.XR;
using UnityEngine.SpatialTracking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(MainClass), "CloneBending", "1.0.0", "Saveforth", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: MelonColor(255, 246, 96, 223)]
[assembly: AssemblyTitle("CloneBending")]
[assembly: AssemblyDescription("Record a Clone")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Your Company")]
[assembly: AssemblyProduct("Your Product")]
[assembly: AssemblyCopyright("Copyright © Your Company Year")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace CloneBending
{
	public class MainClass : MelonMod
	{
		[HarmonyPatch(typeof(PlayerStackProcessor), "Execute", new Type[]
		{
			typeof(Stack),
			typeof(StackConfiguration)
		})]
		public static class stackPatch
		{
			public static void Postfix(Stack stack, StackConfiguration overrideConfig)
			{
				currentStack = stack;
				stackConfig = overrideConfig;
			}
		}

		private static Stack currentStack = null;

		private static string classSceneName = "";

		private static bool isRecording = false;

		private static bool isROnCooldown = false;

		private static bool isPOnCooldown = false;

		private static bool isRecorded = false;

		private static bool isPlaying = false;

		private LinkedList<float[]> handPositions = new LinkedList<float[]>();

		private LinkedList<Quaternion[]> allRotations = new LinkedList<Quaternion[]>();

		private int curFrame = 0;

		private LinkedList<float[]>.Enumerator handIt = default(LinkedList<float[]>.Enumerator);

		private LinkedList<Quaternion[]>.Enumerator rotIt = default(LinkedList<Quaternion[]>.Enumerator);

		private LinkedList<Stack>.Enumerator stackIt = default(LinkedList<Stack>.Enumerator);

		private LinkedList<Stack> recordedStacks = new LinkedList<Stack>();

		private GameObject rHand = null;

		private GameObject lHand = null;

		private GameObject head = null;

		private PlayerStackProcessor pSP = null;

		private GameObject clonePlayer = null;

		private GameObject indicator;

		private static StackConfiguration stackConfig;

		private PlayerController ogPC;

		private bool isCloneSetup = false;

		private GameObject playerForFollow;

		private LIV liv;

		private bool livSingle = false;

		private GameObject rPHand = null;

		private GameObject lPHand = null;

		private GameObject pHead = null;

		private GameObject vrOverall = null;

		public override void OnLateInitializeMelon()
		{
			Calls.onMapInitialized += indicatorCircle;
		}

		public override void OnSceneWasLoaded(int buildIndex, string sceneName)
		{
			if (sceneName == "Gym")
			{
				MelonLogger.Msg("[Clone Bending] " + Managers.GetPlayerManager().localPlayer.Data.GeneralData.PublicUsername + " Version 2");
				MelonCoroutines.Start(setup());
			}
			else
			{
				isRecording = false;
				isRecorded = false;
				isROnCooldown = true;
				isPOnCooldown = true;
				isPlaying = false;
				if ((Object)(object)indicator != (Object)null)
				{
					indicator.SetActive(false);
				}
				if (handPositions != null)
				{
					handPositions.Clear();
					allRotations.Clear();
					recordedStacks.Clear();
				}
			}
			classSceneName = sceneName;
		}

		private IEnumerator setup()
		{
			yield return (object)new WaitForSeconds(10f);
			createClone();
			clonePlayer.SetActive(false);
			isROnCooldown = false;
		}

		public override void OnUpdate()
		{
			((MelonBase)this).OnUpdate();
			if (!(classSceneName == "Gym"))
			{
				return;
			}
			if ((RightController.GetJoystickClick() == 1f || Input.GetKeyDown((KeyCode)114)) && !isROnCooldown)
			{
				if (!isRecording)
				{
					MelonLogger.Msg("[CloneBending] Recording");
					handPositions.Clear();
					allRotations.Clear();
					recordedStacks.Clear();
					isRecording = true;
					indicator.SetActive(true);
				}
				else
				{
					isRecorded = true;
					isRecording = false;
					isPOnCooldown = false;
					indicator.SetActive(false);
				}
				isROnCooldown = true;
			}
			else if (RightController.GetJoystickClick() == 0f)
			{
				isROnCooldown = false;
			}
			if ((LeftController.GetJoystickClick() == 1f || Input.GetKeyDown((KeyCode)108)) && !isRecording && isRecorded && !isPOnCooldown)
			{
				MelonLogger.Msg("[CloneBending] Playing");
				curFrame = 0;
				isPlaying = true;
				isPOnCooldown = true;
			}
			else if (LeftController.GetJoystickClick() == 0f)
			{
				isPOnCooldown = false;
			}
		}

		public override void OnFixedUpdate()
		{
			//IL_00e3: 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_010b: 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_0131: 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_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: 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_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: 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)
			((MelonBase)this).OnFixedUpdate();
			if (isRecording)
			{
				if (!indicator.active)
				{
					indicator.SetActive(true);
				}
				GameObject gameObject = ((Component)((Component)Players.GetLocalPlayer().Controller).gameObject.transform.GetChild(1)).gameObject;
				ogPC = Players.GetLocalPlayer().Controller;
				GameObject gameObject2 = ((Component)((Component)Players.GetLocalPlayer().Controller).gameObject.transform.GetChild(0)).gameObject;
				Transform child = gameObject.transform.GetChild(2);
				Transform child2 = gameObject.transform.GetChild(1);
				Transform child3 = gameObject.transform.GetChild(0).GetChild(0);
				Transform transform = ((Component)Players.GetLocalPlayer().Controller).gameObject.transform;
				handPositions.AddLast(new float[16]
				{
					((Component)child2).transform.localPosition.x,
					((Component)child2).transform.localPosition.y,
					((Component)child2).transform.localPosition.z,
					((Component)child).transform.localPosition.x,
					((Component)child).transform.localPosition.y,
					((Component)child).transform.localPosition.z,
					child3.localPosition.x,
					child3.localPosition.y,
					child3.localPosition.z,
					gameObject2.transform.position.y,
					gameObject.transform.position.x,
					gameObject.transform.position.y,
					gameObject.transform.position.z,
					transform.position.x,
					transform.position.y,
					transform.position.z
				});
				allRotations.AddLast((Quaternion[])(object)new Quaternion[5]
				{
					child2.localRotation,
					child.localRotation,
					child3.localRotation,
					gameObject.transform.rotation,
					transform.rotation
				});
				if (handPositions.Count < 1)
				{
					currentStack = null;
				}
				recordedStacks.AddLast(currentStack);
				if ((Object)(object)currentStack != (Object)null)
				{
					currentStack = null;
				}
			}
			if (isPlaying)
			{
				playClone(curFrame);
				curFrame++;
			}
			else if (isCloneSetup && !(classSceneName == "Gym"))
			{
			}
		}

		private void createClone()
		{
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: 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)
			clonePlayer = Object.Instantiate<GameObject>(((Component)Managers.GetPlayerManager().PlayerControllerPrefab).gameObject).gameObject;
			PlayerController component = clonePlayer.GetComponent<PlayerController>();
			rHand = ((Component)((Component)clonePlayer.gameObject.transform.GetChild(1)).gameObject.transform.GetChild(2)).gameObject;
			lHand = ((Component)((Component)clonePlayer.gameObject.transform.GetChild(1)).gameObject.transform.GetChild(1)).gameObject;
			head = ((Component)clonePlayer.transform.GetChild(1).GetChild(0).GetChild(0)).gameObject;
			vrOverall = ((Component)clonePlayer.gameObject.transform.GetChild(1)).gameObject;
			((Behaviour)((Component)clonePlayer.transform.GetChild(1).GetChild(2)).GetComponent<TrackedPoseDriver>()).enabled = false;
			((Behaviour)((Component)clonePlayer.transform.GetChild(1).GetChild(1)).GetComponent<TrackedPoseDriver>()).enabled = false;
			((Behaviour)((Component)clonePlayer.transform.GetChild(1).GetChild(0).GetChild(0)).GetComponent<TrackedPoseDriver>()).enabled = false;
			((Behaviour)((Component)clonePlayer.transform.GetChild(6)).GetComponent<VRIK>()).enabled = true;
			((Component)clonePlayer.transform.GetChild(9)).gameObject.SetActive(false);
			pSP = ((Component)clonePlayer.transform).GetComponent<PlayerStackProcessor>();
			((PlayerControllerSubsystem)pSP).Initialize(component);
			pSP.activeStackHandles = ((Component)Singleton<PlayerManager>.instance.localPlayer.Controller).gameObject.GetComponent<PlayerStackProcessor>().activeStackHandles;
			PlayerPoseSystem component2 = ((Component)clonePlayer.transform.GetChild(4)).GetComponent<PlayerPoseSystem>();
			PlayerMeasurement playerMeasurement = Players.GetLocalPlayer().Data.PlayerMeasurement;
			component.assignedPlayer.Data = Players.GetLocalPlayer().Data;
			component.assignedPlayer.Data.SetMeasurement(playerMeasurement, true);
			component.Initialize(component.AssignedPlayer);
			((Behaviour)((Component)clonePlayer.transform.GetChild(1).GetChild(2)).GetComponent<TrackedPoseDriver>()).enabled = false;
			((Behaviour)((Component)clonePlayer.transform.GetChild(1).GetChild(1)).GetComponent<TrackedPoseDriver>()).enabled = false;
			((Behaviour)((Component)clonePlayer.transform.GetChild(1).GetChild(0).GetChild(0)).GetComponent<TrackedPoseDriver>()).enabled = false;
			GameObject gameObject = ((Component)clonePlayer.transform.GetChild(1).GetChild(0).GetChild(0)).gameObject;
			((Behaviour)gameObject.GetComponent<Camera>()).enabled = false;
			((Behaviour)gameObject.GetComponent<AudioListener>()).enabled = false;
			Transform child = clonePlayer.transform.GetChild(4);
			component2 = ((Component)child).GetComponent<PlayerPoseSystem>();
			component2.currentInputPoses.Clear();
			MelonLogger.Msg("poses cleared");
			GameObject[] array = Il2CppArrayBase<GameObject>.op_Implicit(Object.FindObjectsOfType<GameObject>());
			List<GameObject> list = new List<GameObject>();
			GameObject[] array2 = array;
			foreach (GameObject val in array2)
			{
				if (((Object)val).name == "Health")
				{
					list.Add(val);
				}
			}
			list[0].transform.parent = clonePlayer.transform;
			playerForFollow = ((Component)((Component)Players.GetLocalPlayer().Controller).gameObject.transform.GetChild(1)).gameObject;
			((Component)clonePlayer.transform.GetChild(1)).gameObject.SetActive(false);
			((Component)clonePlayer.transform.GetChild(8)).gameObject.SetActive(true);
			liv = ((Component)clonePlayer.transform.GetChild(8)).gameObject.GetComponent<LIV>();
			((Behaviour)liv).enabled = false;
			lPHand = ((Component)clonePlayer.transform.GetChild(0).GetChild(2)).gameObject;
			rPHand = ((Component)clonePlayer.transform.GetChild(0).GetChild(3)).gameObject;
			pHead = ((Component)clonePlayer.transform.GetChild(0)).gameObject;
			lPHand.SetActive(false);
			rPHand.SetActive(false);
			pHead.SetActive(false);
			isCloneSetup = true;
		}

		private void playClone(int curFrame)
		{
			//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_0486: 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_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_050c: Unknown result type (might be due to invalid IL or missing references)
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_0557: Unknown result type (might be due to invalid IL or missing references)
			//IL_0588: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0620: Unknown result type (might be due to invalid IL or missing references)
			//IL_0636: Unknown result type (might be due to invalid IL or missing references)
			//IL_0638: Unknown result type (might be due to invalid IL or missing references)
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_0678: Unknown result type (might be due to invalid IL or missing references)
			//IL_0682: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: 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_010e: 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_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: 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_0175: 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_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: 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_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: 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_03b6: 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_03e3: Unknown result type (might be due to invalid IL or missing references)
			if (curFrame < handPositions.Count)
			{
				if (curFrame == 0)
				{
					rotIt = allRotations.GetEnumerator();
					handIt = handPositions.GetEnumerator();
					stackIt = recordedStacks.GetEnumerator();
					clonePlayer.SetActive(true);
					if (livSingle)
					{
						((Behaviour)liv).enabled = false;
					}
				}
				else if (!livSingle && curFrame == 5)
				{
					((Behaviour)liv).enabled = false;
					livSingle = true;
				}
				handIt.MoveNext();
				rotIt.MoveNext();
				stackIt.MoveNext();
				Vector3 eulerAngles = ((Quaternion)(ref rotIt.Current[0])).eulerAngles;
				((Vector3)(ref eulerAngles))..ctor(eulerAngles.x, eulerAngles.y, eulerAngles.z);
				Vector3 eulerAngles2 = ((Quaternion)(ref rotIt.Current[1])).eulerAngles;
				((Vector3)(ref eulerAngles2))..ctor(eulerAngles2.x, eulerAngles2.y, eulerAngles2.z);
				lHand.transform.localPosition = new Vector3(handIt.Current[0], handIt.Current[1], handIt.Current[2]);
				lHand.transform.localRotation = Quaternion.Euler(eulerAngles);
				rHand.transform.localPosition = new Vector3(handIt.Current[3], handIt.Current[4], handIt.Current[5]);
				rHand.transform.localRotation = Quaternion.Euler(eulerAngles2);
				head.transform.localPosition = new Vector3(handIt.Current[6], handIt.Current[7], handIt.Current[8]);
				head.transform.localRotation = rotIt.Current[2];
				lPHand.transform.localPosition = new Vector3(handIt.Current[0], handIt.Current[1], handIt.Current[2]);
				lPHand.transform.localRotation = Quaternion.Euler(eulerAngles);
				rPHand.transform.localPosition = new Vector3(handIt.Current[3], handIt.Current[4], handIt.Current[5]);
				rPHand.transform.localRotation = Quaternion.Euler(eulerAngles2);
				vrOverall.transform.position = new Vector3(handIt.Current[10], handIt.Current[11], handIt.Current[12]);
				vrOverall.transform.rotation = rotIt.Current[3];
				clonePlayer.transform.position = new Vector3(handIt.Current[13], handIt.Current[14], handIt.Current[15]);
				clonePlayer.transform.rotation = rotIt.Current[4];
				clonePlayer.transform.position = new Vector3(clonePlayer.transform.position.x, handIt.Current[9], clonePlayer.transform.position.z);
				if ((Object)(object)stackIt.Current != (Object)null)
				{
					pSP.Execute(stackIt.Current, (StackConfiguration)null);
				}
			}
			else
			{
				MelonLogger.Msg("[CloneBending] Frame: " + curFrame);
				isPlaying = false;
				curFrame = 0;
				LinkedList<Quaternion[]>.Enumerator enumerator = allRotations.GetEnumerator();
				LinkedList<float[]>.Enumerator enumerator2 = handPositions.GetEnumerator();
				enumerator.MoveNext();
				enumerator2.MoveNext();
				Vector3 eulerAngles3 = ((Quaternion)(ref enumerator.Current[0])).eulerAngles;
				((Vector3)(ref eulerAngles3))..ctor(eulerAngles3.x, eulerAngles3.y, eulerAngles3.z);
				Vector3 eulerAngles4 = ((Quaternion)(ref enumerator.Current[1])).eulerAngles;
				((Vector3)(ref eulerAngles4))..ctor(eulerAngles4.x, eulerAngles4.y, eulerAngles4.z);
				lHand.transform.localPosition = new Vector3(enumerator2.Current[0], enumerator2.Current[1], enumerator2.Current[2]);
				lHand.transform.localRotation = Quaternion.Euler(eulerAngles3);
				rHand.transform.localPosition = new Vector3(enumerator2.Current[3], enumerator2.Current[4], enumerator2.Current[5]);
				rHand.transform.localRotation = Quaternion.Euler(eulerAngles4);
				head.transform.localPosition = new Vector3(enumerator2.Current[6], enumerator2.Current[7], enumerator2.Current[8]);
				head.transform.localRotation = enumerator.Current[2];
				lPHand.transform.localPosition = new Vector3(enumerator2.Current[0], enumerator2.Current[1], enumerator2.Current[2]);
				lPHand.transform.localRotation = Quaternion.Euler(eulerAngles3);
				rPHand.transform.localPosition = new Vector3(enumerator2.Current[3], enumerator2.Current[4], enumerator2.Current[5]);
				rPHand.transform.localRotation = Quaternion.Euler(eulerAngles4);
				clonePlayer.transform.position = new Vector3(clonePlayer.transform.position.x, enumerator2.Current[9], clonePlayer.transform.position.z);
				MelonCoroutines.Start(finishPlaying());
			}
		}

		private IEnumerator finishPlaying()
		{
			yield return (object)new WaitForSeconds(1f);
			if (!isPlaying)
			{
				clonePlayer.SetActive(false);
			}
		}

		private IEnumerator RecordCooldown(int x)
		{
			if (isRecording)
			{
				indicator.SetActive(true);
			}
			else
			{
				indicator.SetActive(false);
			}
			yield return (object)new WaitForSeconds(2f);
			if (x == 0)
			{
				isROnCooldown = false;
			}
			else
			{
				isPOnCooldown = false;
			}
		}

		private void indicatorCircle()
		{
			//IL_0077: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			GameObject gameObject = ((Component)((Component)Players.GetLocalPlayer().Controller).gameObject.transform.GetChild(1)).gameObject;
			Transform child = gameObject.transform.GetChild(2);
			indicator = GameObject.CreatePrimitive((PrimitiveType)2);
			indicator.transform.parent = child;
			((Object)indicator).name = "Indicator";
			indicator.transform.localPosition = new Vector3(0.06f, 0.005f, 0.09f);
			indicator.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 90f));
			indicator.transform.localScale = new Vector3(0.02f, 0.004f, 0.02f);
			indicator.GetComponent<Renderer>().material.shader = Shader.Find("Universal Render Pipeline/Lit");
			indicator.SetActive(false);
		}
	}
}