Decompiled source of HellDivers2 SES Liberty GameMenu H3MP v1.1.2

HellDivers2_SES_Liberty_GameMenu_H3MP.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using Atlas;
using BepInEx;
using BepInEx.Logging;
using FistVR;
using H3MP.Tracking;
using HarmonyLib;
using JerryHD2HP;
using OtherLoader;
using UnityEditor;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Valve.VR;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace JerryHD2HP
{
	public class HellPodOnStart : MonoBehaviour
	{
		public GameObject Pad;

		public Transform down;

		public Transform up;

		public Vector3 Padref;

		public float cd = 0f;

		public GameObject cover;

		public bool iscoverflew = false;

		public Rigidbody rig;

		private void Start()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			GM.CurrentSceneSettings.UsesPlayerCatcher = false;
			Pad.transform.position = ((Component)down).transform.position;
		}

		private void FixedUpdate()
		{
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)GM.CurrentPlayerBody != (Object)null)
			{
				cd += Time.deltaTime;
				if (cd >= 2f && !iscoverflew)
				{
					Rigidbody val = cover.AddComponent<Rigidbody>();
					val.AddForce(new Vector3(1f, 25f, 0f), (ForceMode)1);
					val.AddRelativeTorque(new Vector3(10f, 0f, 0f), (ForceMode)1);
					iscoverflew = true;
				}
				if (cd > 3.5f)
				{
					Pad.transform.localPosition = Vector3.SmoothDamp(Pad.transform.localPosition, up.localPosition, ref Padref, 0.25f);
				}
				if (cd <= 5f)
				{
					((Component)GM.CurrentPlayerBody).transform.position = Pad.transform.position;
				}
				if (cd > 15f)
				{
					((Behaviour)this).enabled = false;
				}
			}
		}

		private void OnDestroy()
		{
			Object.Destroy((Object)(object)cover);
			GM.CurrentSceneSettings.UsesPlayerCatcher = true;
		}
	}
}
namespace JerryHD2MP
{
	[BepInPlugin("JerryHD2.Plugin", "JerryHD2.Plugin", "1.0.0")]
	[BepInProcess("h3vr.exe")]
	public class KidnapPlayerToShipMP : BaseUnityPlugin
	{
		public bool KidnapSucceed = false;

		public Sprite placeholder;

		[NonSerialized]
		public MainMenuScenePointable[] scenes;

		[NonSerialized]
		public List<string> scenenames = new List<string>();

		[NonSerialized]
		public List<Sprite> icons = new List<Sprite>();

		[NonSerialized]
		public GameObject sceneselector;

		[NonSerialized]
		public SelectMapMP script;

		[NonSerialized]
		public GameObject HellPod;

		[NonSerialized]
		public MainMenuScreen screen;

		public bool hellpoddeployed = false;

		public bool loaded = false;

		public float cd = 5f;

		public float lasttime;

		public bool isloadingring = false;

		[NonSerialized]
		public string mapname;

		[NonSerialized]
		public GameObject Pelican;

		private void Start()
		{
		}

		private void FixedUpdate()
		{
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f0: 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_05e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0602: Unknown result type (might be due to invalid IL or missing references)
			//IL_0607: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0383: 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_06ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_0736: Unknown result type (might be due to invalid IL or missing references)
			//IL_075a: Unknown result type (might be due to invalid IL or missing references)
			//IL_080f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0833: Unknown result type (might be due to invalid IL or missing references)
			lasttime = LoaderStatus.LastLoadEventTime;
			if (lasttime > 1f)
			{
				loaded = true;
			}
			if ((Object)(object)HellPod == (Object)null || (Object)(object)script == (Object)null || (Object)(object)sceneselector == (Object)null || scenes == null || scenenames == null || (Object)(object)screen == (Object)null)
			{
			}
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "MainMenu3" && !KidnapSucceed)
			{
				if (mapname == null)
				{
					cd -= Time.deltaTime;
					SteamVR_Fade.Start(new Color(0f, 0f, 0f, 1f), 0f, true);
					scenes = Object.FindObjectsOfType<MainMenuScenePointable>();
					GameObject val = GameObject.Find("LevelLoadScreen");
					screen = val.GetComponent<MainMenuScreen>();
					for (int i = 0; i < scenes.Length; i++)
					{
						if (scenes[i].Def.SceneName != null)
						{
							if (!scenenames.Contains(scenes[i].Def.SceneName))
							{
								scenenames.Add(scenes[i].Def.SceneName);
							}
						}
						else if (scenes[i].Def.SceneName == null && scenes[i].Def.Name != null && !scenenames.Contains(scenes[i].Def.Name) && scenes[i].Def.Name != "LibertyMP")
						{
							scenenames.Add(scenes[i].Def.Name);
						}
						if ((Object)(object)scenes[i].Def.Image != (Object)null)
						{
							if (!icons.Contains(scenes[i].Def.Image) && scenes[i].Def.Name != "LibertyMP")
							{
								icons.Add(scenes[i].Def.Image);
							}
						}
						else if ((Object)(object)scenes[i].Def.Image == (Object)null)
						{
							icons.Add(placeholder);
						}
						if (scenes[i].Def.Name == "LibertyMP")
						{
							screen.m_def = scenes[i].Def;
						}
					}
					if (loaded && cd <= 0f)
					{
						screen.LoadScene();
						KidnapSucceed = true;
						isloadingring = false;
						hellpoddeployed = false;
					}
				}
				else
				{
					if (mapname == null)
					{
						return;
					}
					cd -= Time.deltaTime;
					SteamVR_Fade.Start(new Color(0f, 0f, 0f, 1f), 0f, true);
					scenes = Object.FindObjectsOfType<MainMenuScenePointable>();
					GameObject val2 = GameObject.Find("LevelLoadScreen");
					screen = val2.GetComponent<MainMenuScreen>();
					for (int j = 0; j < scenes.Length; j++)
					{
						if (scenes[j].Def.SceneName == null)
						{
							if (scenes[j].Def.Name != null && scenes[j].Def.Name == mapname)
							{
								screen.m_def = scenes[j].Def;
							}
						}
						else if (scenes[j].Def.SceneName != null && scenes[j].Def.SceneName == mapname)
						{
							screen.m_def = scenes[j].Def;
						}
					}
					if (loaded && cd <= 0f)
					{
						screen.LoadScene();
						KidnapSucceed = true;
						isloadingring = false;
						hellpoddeployed = false;
						mapname = null;
					}
				}
				return;
			}
			Scene activeScene2 = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene2)).name == "LibertyMP")
			{
				if (KidnapSucceed)
				{
					cd = 5f;
					sceneselector = GameObject.Find("HD2SceneSelector");
					if ((Object)(object)sceneselector != (Object)null && (Object)(object)sceneselector.GetComponent<SelectMapMP>() != (Object)null)
					{
						script = sceneselector.GetComponent<SelectMapMP>();
						script.Maps = scenenames;
						script.previews = icons;
						KidnapSucceed = false;
						hellpoddeployed = false;
						isloadingring = false;
					}
				}
				else if (!KidnapSucceed && (Object)(object)script != (Object)null)
				{
					mapname = script.curmap;
				}
				return;
			}
			Scene activeScene3 = SceneManager.GetActiveScene();
			if (!(((Scene)(ref activeScene3)).name != "LibertyMP"))
			{
				return;
			}
			Scene activeScene4 = SceneManager.GetActiveScene();
			if (!(((Scene)(ref activeScene4)).name != "MainMenu3") || hellpoddeployed || !((Object)(object)GM.CurrentPlayerBody != (Object)null))
			{
				return;
			}
			cd -= Time.deltaTime;
			if (!isloadingring)
			{
				cd = 1f;
				SteamVR_Fade.Start(new Color(0f, 0f, 0f, 1f), 0f, true);
				isloadingring = true;
			}
			else
			{
				if (!(cd <= 0f))
				{
					return;
				}
				SteamVR_Fade.Start(new Color(0f, 0f, 0f, 0f), 0.1f, true);
				if (IM.OD.ContainsKey("PlayerHellPodPrefab"))
				{
					AnvilCallback<GameObject> gameObjectAsync = ((AnvilAsset)IM.OD["PlayerHellPodPrefab"]).GetGameObjectAsync();
					if (Object.op_Implicit((Object)(object)gameObjectAsync.Result))
					{
						HellPod = Object.Instantiate<GameObject>(gameObjectAsync.Result);
						HellPod.transform.position = ((Component)GM.CurrentPlayerBody).transform.position;
						HellPod.transform.eulerAngles = new Vector3(0f, 0f, 0f);
						hellpoddeployed = true;
						KidnapSucceed = false;
						cd = 5f;
					}
				}
				SteamVR_Fade.Start(new Color(0f, 0f, 0f, 0f), 0.1f, true);
				if (IM.OD.ContainsKey("PlayerPelicanPrefabMP"))
				{
					AnvilCallback<GameObject> gameObjectAsync2 = ((AnvilAsset)IM.OD["PlayerPelicanPrefabMP"]).GetGameObjectAsync();
					if (Object.op_Implicit((Object)(object)gameObjectAsync2.Result))
					{
						Pelican = Object.Instantiate<GameObject>(gameObjectAsync2.Result);
						Pelican.transform.position = ((Component)GM.CurrentPlayerBody).transform.position;
						Pelican.transform.eulerAngles = new Vector3(0f, 0f, 0f);
					}
				}
			}
		}
	}
}
namespace JerryHD2PelicanMP
{
	public class PelicanTurretMP : MonoBehaviour
	{
		public SimpleLauncher launcher;

		public FVRFireArmChamber gun;

		public float firecd = 0.3f;

		public float firecdtotal = 1f;

		public float firecdbtw = 3f;

		public GameObject turretbase;

		public float scancd = 0f;

		[NonSerialized]
		public NavMeshAgent[] bugs;

		public Rigidbody rig;

		public Transform muzzle;

		public GameObject mark;

		[NonSerialized]
		public Transform curtarg;

		public GameObject lookAtObj;

		public Transform player;

		private Vector3 velocity;

		public GameObject firesound;

		private void FixedUpdate()
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: 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_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: 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_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: 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_026c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: 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)
			scancd -= Time.deltaTime;
			if (scancd <= 0f)
			{
				bugs = Object.FindObjectsOfType<NavMeshAgent>();
				scancd = 10f;
			}
			((Component)rig).gameObject.transform.position = muzzle.position;
			((Component)rig).gameObject.transform.eulerAngles = muzzle.eulerAngles;
			if ((Object)(object)curtarg == (Object)null)
			{
				mark.SetActive(false);
				mark.transform.localPosition = new Vector3(0f, 0f, 0f);
				turretbase.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
			if ((Object)(object)curtarg != (Object)null)
			{
				mark.SetActive(true);
				mark.transform.position = Vector3.SmoothDamp(mark.transform.position, ((Component)curtarg).transform.position, ref velocity, 0.25f);
				AxisLookAtX(lookAtObj.transform, mark.gameObject.transform.position, Vector3.forward);
				AxisLookAtY(turretbase.transform, mark.gameObject.transform.position, Vector3.forward);
				firecdbtw -= Time.deltaTime;
				if (firecdbtw <= 0f)
				{
					firecdtotal -= Time.deltaTime;
					if (firecdtotal <= 0f)
					{
						firecdtotal = 1f;
						firecdbtw = 3f;
					}
					firecd -= Time.deltaTime;
					if (firecd <= 0f)
					{
						firesound.SetActive(false);
						gun.SetRound((FireArmRoundClass)181, ((Component)gun).transform.position, ((Component)gun).transform.rotation);
						launcher.Fire();
						gun.EjectRound(((Component)gun).transform.position, Vector3.zero, Vector3.zero, false);
						firecd = 0.3f;
						firesound.SetActive(true);
					}
				}
				else if (firecdbtw > 0f)
				{
					firecdtotal = 1f;
					firecd = 0.3f;
				}
			}
			if (bugs.Length <= 0)
			{
				return;
			}
			for (int i = 0; i < bugs.Length - 1; i++)
			{
				if ((Object)(object)bugs[i] == (Object)null)
				{
					RemoveAt(ref bugs, i);
				}
			}
			curtarg = GetNearestGameObject(player, bugs);
		}

		public static void RemoveAt<T>(ref T[] arr, int index)
		{
			for (int i = index; i < arr.Length - 1; i++)
			{
				arr[i] = arr[i + 1];
			}
			Array.Resize(ref arr, arr.Length - 1);
		}

		private void AxisLookAtX(Transform tr_self, Vector3 lookPos, Vector3 directionAxis)
		{
			//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_0008: 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_000f: 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_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: 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_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_003f: 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_0052: 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_006a: Unknown result type (might be due to invalid IL or missing references)
			Quaternion rotation = tr_self.rotation;
			Vector3 val = lookPos - tr_self.position;
			Vector3 val2 = tr_self.rotation * directionAxis;
			Vector3 val3 = Vector3.Cross(val2, val);
			Vector3 normalized = ((Vector3)(ref val3)).normalized;
			float num = Vector3.Angle(val2, val);
			tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation;
			tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f);
		}

		private void AxisLookAtY(Transform tr_self, Vector3 lookPos, Vector3 directionAxis)
		{
			//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_0008: 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_000f: 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_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: 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_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_003f: 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_0057: 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_006a: Unknown result type (might be due to invalid IL or missing references)
			Quaternion rotation = tr_self.rotation;
			Vector3 val = lookPos - tr_self.position;
			Vector3 val2 = tr_self.rotation * directionAxis;
			Vector3 val3 = Vector3.Cross(val2, val);
			Vector3 normalized = ((Vector3)(ref val3)).normalized;
			float num = Vector3.Angle(val2, val);
			tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation;
			tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, 0f);
		}

		public Transform GetNearestGameObject(Transform player, NavMeshAgent[] objects)
		{
			//IL_0039: 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_005a: 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)
			Transform val = null;
			if (objects == null || (Object)(object)val == (Object)null)
			{
			}
			if (objects.Length > 0 && (Object)(object)objects[0] != (Object)null)
			{
				val = ((Component)objects[0]).transform;
				float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position);
				for (int i = 1; i < objects.Length - 1; i++)
				{
					float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position);
					if (num > num2)
					{
						num = num2;
						val = ((Component)objects[i]).transform;
					}
				}
			}
			return val;
		}
	}
	public class PelicanExtractMP : MonoBehaviour
	{
		public TrackedPlayerBody[] Bodies;

		public List<Transform> PlayerHeads;

		public GameObject pelicanbase;

		public GameObject pelicanaway;

		public GameObject PelicanVehicle;

		public float pelicanrefy;

		public float pelicanrefz;

		public Vector3 pelicanrotref;

		public GameObject enginerot;

		public GameObject thrusterrot;

		public GameObject doorrot;

		public bool startextracting = false;

		public bool extracted = false;

		public GameObject extractbgm;

		public AudioSource extractost;

		public GameObject extractSuccessbgm;

		public AudioSource extractSuccessost;

		public AudioSource afterburner;

		public float abvolume;

		public float abref;

		public float cdlanding = 60f;

		public Transform extractpose;

		public GameObject ETA2;

		public GameObject ETA1;

		public GameObject CFL;

		public GameObject Comment;

		public GameObject afterburnerboost;

		public Material pelicanmat1;

		public Material pelicanmat2;

		public Material pelicanmat3;

		public Material pelicanmat4;

		public float mat1ref;

		public GameObject innerandlight;

		public float pelicanmatvalue = 1f;

		public PelicanTurretMP PT;

		public AR15HandleSightFlipper flipper;

		public GameObject beaconrot;

		public GameObject beaconrot2;

		public float cdbeacon = 15f;

		public GameObject evac;

		public GameObject cdtext;

		public Text text;

		public GameObject beam;

		public GameObject beacongeo;

		public float detcd = 0f;

		public GameObject playerref;

		public GameObject playerref2;

		public GameObject playerref3;

		public GameObject playerref4;

		public GameObject playerrefOWN;

		public GameObject p1pos;

		public GameObject p2pos;

		public GameObject p3pos;

		public GameObject p4pos;

		public bool p1onboard = false;

		public bool p2onboard = false;

		public bool p3onboard = false;

		public bool p4onboard = false;

		public bool seated = false;

		public List<GameObject> onboardpos = new List<GameObject>();

		public Animator ani;

		private void Start()
		{
			//IL_0027: 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)
			((Behaviour)PT).enabled = false;
			beaconrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			beaconrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
		}

		private void FixedUpdate()
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_039e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: 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)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0657: Unknown result type (might be due to invalid IL or missing references)
			//IL_0693: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a3: 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_04bd: 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_0473: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0718: Unknown result type (might be due to invalid IL or missing references)
			//IL_0728: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0702: Unknown result type (might be due to invalid IL or missing references)
			//IL_0576: 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_04dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0757: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_053c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0560: Unknown result type (might be due to invalid IL or missing references)
			//IL_0943: Unknown result type (might be due to invalid IL or missing references)
			//IL_0948: Unknown result type (might be due to invalid IL or missing references)
			//IL_0957: Unknown result type (might be due to invalid IL or missing references)
			//IL_095c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0971: Unknown result type (might be due to invalid IL or missing references)
			//IL_0976: Unknown result type (might be due to invalid IL or missing references)
			//IL_097f: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a23: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a51: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b08: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b33: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b58: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a93: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a98: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0acf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c78: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d08: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d98: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e76: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e15: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f03: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f13: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f93: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fa3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fd2: Unknown result type (might be due to invalid IL or missing references)
			//IL_1052: Unknown result type (might be due to invalid IL or missing references)
			//IL_1062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ff1: Unknown result type (might be due to invalid IL or missing references)
			//IL_1001: Unknown result type (might be due to invalid IL or missing references)
			//IL_1081: Unknown result type (might be due to invalid IL or missing references)
			//IL_1091: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_10c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_10df: Unknown result type (might be due to invalid IL or missing references)
			//IL_10ef: Unknown result type (might be due to invalid IL or missing references)
			if (cdbeacon > 0f)
			{
				cdbeacon -= Time.deltaTime;
			}
			else if (cdbeacon <= 0f && !startextracting)
			{
				beacongeo.SetActive(true);
				beaconrot.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
			}
			if (!flipper.m_isLargeAperture && (Object)(object)GameObject.Find("EVACPin(Clone)") == (Object)null)
			{
				if (IM.OD.ContainsKey("EVACPin"))
				{
					AnvilCallback<GameObject> gameObjectAsync = ((AnvilAsset)IM.OD["EVACPin"]).GetGameObjectAsync();
					if (Object.op_Implicit((Object)(object)gameObjectAsync.Result))
					{
						Object.Instantiate<GameObject>(gameObjectAsync.Result);
					}
				}
				flipper.m_isLargeAperture = true;
			}
			if ((Object)(object)GameObject.Find("EVACPin(Clone)") != (Object)null)
			{
				startextracting = true;
			}
			if (!startextracting)
			{
				return;
			}
			cdtext.SetActive(true);
			evac.SetActive(false);
			text.text = ((int)cdlanding).ToString();
			pelicanmat1.SetFloat("_DissolveCutoff", pelicanmatvalue);
			pelicanmat2.SetFloat("_DissolveCutoff", pelicanmatvalue);
			pelicanmat3.SetFloat("_DissolveCutoff", pelicanmatvalue);
			pelicanmat4.SetFloat("_DissolveCutoff", pelicanmatvalue);
			afterburner.volume = abvolume;
			if (cdlanding > 0f)
			{
				beaconrot2.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
				beam.SetActive(true);
				cdlanding -= Time.deltaTime;
			}
			if (cdlanding > 30f && cdlanding < 60f)
			{
				extractbgm.SetActive(true);
				ETA2.SetActive(true);
			}
			if (cdlanding > 15f && cdlanding < 30f)
			{
				ETA1.SetActive(true);
			}
			if (cdlanding > 0f && cdlanding < 15f)
			{
				pelicanmatvalue = 1f;
				thrusterrot.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
			}
			if (!(cdlanding <= 0f))
			{
				return;
			}
			if (seated)
			{
				GM.CurrentPlayerBody.Health = 5000f;
				((Component)GM.CurrentPlayerBody).gameObject.transform.localPosition = Vector3.zero;
				((Component)GM.CurrentPlayerBody).gameObject.transform.localEulerAngles = Vector3.zero;
			}
			if (!extracted)
			{
				PelicanVehicle.SetActive(true);
				ani.SetBool("Landing", true);
				CFL.SetActive(true);
				pelicanmatvalue = Mathf.SmoothDamp(pelicanmatvalue, 0f, ref mat1ref, 2f);
				beaconrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				beaconrot2.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				beam.SetActive(false);
				if (Vector3.Distance(pelicanaway.transform.position, pelicanbase.transform.position) > 25f)
				{
					((Behaviour)PT).enabled = true;
					abvolume = Mathf.SmoothDamp(abvolume, 0.75f, ref abref, 5f);
					enginerot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
					doorrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
					thrusterrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				}
				if (Vector3.Distance(pelicanaway.transform.position, pelicanbase.transform.position) <= 25f && Vector3.Distance(pelicanaway.transform.position, pelicanbase.transform.position) > 5f)
				{
					abvolume = Mathf.SmoothDamp(abvolume, 0.05f, ref abref, 5f);
					enginerot.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
					thrusterrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				}
				if (Vector3.Distance(pelicanaway.transform.position, pelicanbase.transform.position) <= 5f)
				{
					((Behaviour)PT).enabled = false;
					doorrot.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
					thrusterrot.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
				}
			}
			else if (extracted)
			{
				((Behaviour)PT).enabled = true;
				Comment.SetActive(true);
				extractbgm.SetActive(false);
				extractSuccessbgm.SetActive(true);
				ani.SetBool("Extract", true);
				SteamVR_Fade.Start(new Color(0f, 0f, 0f, 1f), 1f, true);
				abvolume = Mathf.SmoothDamp(abvolume, 0.75f, ref abref, 5f);
				if (Vector3.Distance(pelicanaway.transform.position, pelicanbase.transform.position) > 10f)
				{
					enginerot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
					afterburnerboost.SetActive(true);
					doorrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				}
				if (Vector3.Distance(pelicanaway.transform.position, pelicanbase.transform.position) > 2f)
				{
					thrusterrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				}
				if (!extractSuccessost.isPlaying)
				{
					SteamVR_LoadLevel.Begin("MainMenu3", false, 0f, 0f, 0f, 0f, 1f);
					startextracting = false;
				}
			}
			if (!((Object)(object)GM.CurrentPlayerBody != (Object)null) || !(doorrot.transform.localEulerAngles.x > 45f))
			{
				return;
			}
			detcd -= Time.deltaTime;
			if (detcd <= 0f)
			{
				Bodies = null;
				Bodies = Object.FindObjectsOfType<TrackedPlayerBody>();
				for (int i = 0; i < Bodies.Length; i++)
				{
					if ((Object)(object)Bodies[i].physicalPlayerBody != (Object)null && (Object)(object)Bodies[i].physicalPlayerBody.headTransform != (Object)null && !PlayerHeads.Contains(Bodies[i].physicalPlayerBody.headTransform))
					{
						PlayerHeads.Add(Bodies[i].physicalPlayerBody.headTransform);
					}
				}
				detcd = 5f;
			}
			if (PlayerHeads.Count > 0)
			{
				for (int j = 0; j < PlayerHeads.Count; j++)
				{
					if ((Object)(object)PlayerHeads[j] == (Object)null)
					{
						PlayerHeads.Remove(PlayerHeads[j]);
					}
				}
			}
			if (PlayerHeads.Count >= 1)
			{
				playerref.transform.position = new Vector3(PlayerHeads[0].position.x, extractpose.position.y, PlayerHeads[0].position.z);
			}
			if (PlayerHeads.Count >= 2)
			{
				playerref2.transform.position = new Vector3(PlayerHeads[1].position.x, extractpose.position.y, PlayerHeads[1].position.z);
			}
			if (PlayerHeads.Count >= 3)
			{
				playerref3.transform.position = new Vector3(PlayerHeads[2].position.x, extractpose.position.y, PlayerHeads[2].position.z);
			}
			if (PlayerHeads.Count >= 4)
			{
				playerref4.transform.position = new Vector3(PlayerHeads[3].position.x, extractpose.position.y, PlayerHeads[3].position.z);
			}
			playerrefOWN.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, extractpose.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z);
			if (Vector3.Distance(playerrefOWN.transform.position, p1pos.transform.position) <= 0.2f)
			{
				((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(p1pos.transform);
				((Component)GM.CurrentPlayerBody).gameObject.transform.localPosition = Vector3.zero;
				((Component)GM.CurrentPlayerBody).gameObject.transform.localEulerAngles = Vector3.zero;
				p1onboard = true;
				seated = true;
			}
			if (Vector3.Distance(playerrefOWN.transform.position, p2pos.transform.position) <= 0.2f)
			{
				((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(p2pos.transform);
				((Component)GM.CurrentPlayerBody).gameObject.transform.localPosition = Vector3.zero;
				((Component)GM.CurrentPlayerBody).gameObject.transform.localEulerAngles = Vector3.zero;
				p2onboard = true;
				seated = true;
			}
			if (Vector3.Distance(playerrefOWN.transform.position, p3pos.transform.position) <= 0.2f)
			{
				((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(p3pos.transform);
				((Component)GM.CurrentPlayerBody).gameObject.transform.localPosition = Vector3.zero;
				((Component)GM.CurrentPlayerBody).gameObject.transform.localEulerAngles = Vector3.zero;
				p3onboard = true;
				seated = true;
			}
			if (Vector3.Distance(playerrefOWN.transform.position, p4pos.transform.position) <= 0.2f)
			{
				((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(p4pos.transform);
				((Component)GM.CurrentPlayerBody).gameObject.transform.localPosition = Vector3.zero;
				((Component)GM.CurrentPlayerBody).gameObject.transform.localEulerAngles = Vector3.zero;
				p4onboard = true;
				seated = true;
			}
			if (Vector3.Distance(playerref.transform.position, p1pos.transform.position) <= 0.2f || Vector3.Distance(playerref2.transform.position, p1pos.transform.position) <= 0.2f || Vector3.Distance(playerref3.transform.position, p1pos.transform.position) <= 0.2f || Vector3.Distance(playerref4.transform.position, p1pos.transform.position) <= 0.2f)
			{
				if (!onboardpos.Contains(p1pos))
				{
					onboardpos.Add(p1pos);
				}
				p1onboard = true;
			}
			if (Vector3.Distance(playerref.transform.position, p2pos.transform.position) <= 0.2f || Vector3.Distance(playerref2.transform.position, p2pos.transform.position) <= 0.2f || Vector3.Distance(playerref3.transform.position, p2pos.transform.position) <= 0.2f || Vector3.Distance(playerref4.transform.position, p2pos.transform.position) <= 0.2f)
			{
				if (!onboardpos.Contains(p2pos))
				{
					onboardpos.Add(p2pos);
				}
				p2onboard = true;
			}
			if (Vector3.Distance(playerref.transform.position, p3pos.transform.position) <= 0.2f || Vector3.Distance(playerref2.transform.position, p3pos.transform.position) <= 0.35f || Vector3.Distance(playerref3.transform.position, p3pos.transform.position) <= 0.2f || Vector3.Distance(playerref4.transform.position, p3pos.transform.position) <= 0.2f)
			{
				if (!onboardpos.Contains(p3pos))
				{
					onboardpos.Add(p3pos);
				}
				p3onboard = true;
			}
			if (Vector3.Distance(playerref.transform.position, p4pos.transform.position) <= 0.2f || Vector3.Distance(playerref2.transform.position, p4pos.transform.position) <= 0.35f || Vector3.Distance(playerref3.transform.position, p4pos.transform.position) <= 0.2f || Vector3.Distance(playerref4.transform.position, p4pos.transform.position) <= 0.2f)
			{
				if (!onboardpos.Contains(p4pos))
				{
					onboardpos.Add(p4pos);
				}
				p4onboard = true;
			}
			if (onboardpos.Count >= PlayerHeads.Count && onboardpos.Count > 0 && seated)
			{
				extracted = true;
			}
			else if (PlayerHeads.Count <= 0 && seated)
			{
				extracted = true;
			}
		}
	}
}
namespace JerryHD2MP
{
	public class SelectMapMP : MonoBehaviour
	{
		public TrackedPlayerBody[] Bodies;

		public List<Transform> PlayerHeads;

		public Transform nullref;

		public GameObject rocketFX;

		public GameObject rocketFX2;

		public GameObject rocketFX3;

		public GameObject rocketFX4;

		public GameObject otherRocketFX;

		public ShakeTransformS shake;

		public ShakeTransformS shake2;

		public ShakeTransformS shake3;

		public ShakeTransformS shake4;

		public bool shakestarted = false;

		public Sprite placeholder;

		public List<Sprite> previews;

		public Material Im1;

		public GameObject playerref;

		public GameObject playerref2;

		public GameObject playerref3;

		public GameObject playerref4;

		public GameObject playerrefOWN;

		public float podlightref;

		public Transform podposheadref;

		public Transform hellpodpos;

		public Transform hellpodpos2;

		public Transform hellpodpos3;

		public Transform hellpodpos4;

		public Transform hellpad;

		public Transform hellpad2;

		public Transform hellpad3;

		public Transform hellpad4;

		public GameObject HellpodGeo;

		public GameObject HellpodGeo2;

		public GameObject HellpodGeo3;

		public GameObject HellpodGeo4;

		public Transform shootpos;

		public Transform shootpos2;

		public Transform shootpos3;

		public Transform shootpos4;

		public AR15HandleSightFlipper prev;

		public AR15HandleSightFlipper next;

		public AR15HandleSightFlipper ok;

		public Text mapname;

		public string curmap;

		public bool mapselected = false;

		public bool hellpodactivated = false;

		public bool hellpodactivated2 = false;

		public bool hellpodactivated3 = false;

		public bool hellpodactivated4 = false;

		public List<GameObject> ActivatedPod;

		public int num;

		public List<string> Maps;

		public AudioEvent clickOK;

		public AudioEvent shoot;

		public AudioSource Mapselected;

		public AudioSource Mapdeselected;

		public GameObject podlid;

		public GameObject podlid2;

		public GameObject podlid3;

		public GameObject podlid4;

		public Transform podup;

		public Transform podup2;

		public Transform podup3;

		public Transform podup4;

		public Transform poddown;

		public Transform poddown2;

		public Transform poddown3;

		public Transform poddown4;

		public GameObject truecover;

		public GameObject truecover2;

		public GameObject truecover3;

		public GameObject truecover4;

		public GameObject piston;

		public GameObject piston2;

		public GameObject piston3;

		public GameObject piston4;

		public GameObject pistonend;

		public GameObject pistonend2;

		public GameObject pistonend3;

		public GameObject pistonend4;

		public GameObject cover;

		public GameObject cover2;

		public GameObject cover3;

		public GameObject cover4;

		public bool BGMLoaded = false;

		public float pistonref;

		public float pistonref2;

		public float pistonref3;

		public float pistonref4;

		public float pistonendref;

		public float pistonendref2;

		public float pistonendref3;

		public float pistonendref4;

		public float coverref;

		public float coverref2;

		public float coverref3;

		public float coverref4;

		public bool shot = false;

		public float selected;

		public float deselected;

		public Vector3 lidref;

		public Vector3 lidref2;

		public Vector3 lidref3;

		public Vector3 lidref4;

		public AudioSource HellDiveBGMPre;

		public AudioSource HellDiveBGMPost;

		public AudioSource whoosh;

		public float warnlightref;

		public float cd = 37f;

		public GameObject HMD;

		public GameObject headcam;

		public GameObject HMDRot;

		public float HMDRotref;

		public bool faded = false;

		public GameObject HellDoor;

		public float HellDoorref;

		public AudioSource HPP;

		public AudioSource HPLI;

		public AudioSource stepon;

		public AudioSource stepon2;

		public AudioSource stepon3;

		public AudioSource stepon4;

		public bool stept = false;

		public bool stept2 = false;

		public bool stept3 = false;

		public bool stept4 = false;

		public bool HellPodReady = false;

		public GameObject effect;

		public GameObject effect2;

		public GameObject effect3;

		public GameObject effect4;

		public float detcd = 5f;

		private void Start()
		{
		}

		private void FixedUpdate()
		{
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_043d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: 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_04f9: 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_0513: Unknown result type (might be due to invalid IL or missing references)
			//IL_0518: Unknown result type (might be due to invalid IL or missing references)
			//IL_0521: Unknown result type (might be due to invalid IL or missing references)
			//IL_1407: Unknown result type (might be due to invalid IL or missing references)
			//IL_140c: Unknown result type (might be due to invalid IL or missing references)
			//IL_142f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0569: Unknown result type (might be due to invalid IL or missing references)
			//IL_056e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0583: 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_0591: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05de: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0601: Unknown result type (might be due to invalid IL or missing references)
			//IL_0696: Unknown result type (might be due to invalid IL or missing references)
			//IL_069b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_06af: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0635: Unknown result type (might be due to invalid IL or missing references)
			//IL_063a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_064e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0663: Unknown result type (might be due to invalid IL or missing references)
			//IL_0668: Unknown result type (might be due to invalid IL or missing references)
			//IL_0671: Unknown result type (might be due to invalid IL or missing references)
			//IL_14a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_14c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_14ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_1510: Unknown result type (might be due to invalid IL or missing references)
			//IL_1684: Unknown result type (might be due to invalid IL or missing references)
			//IL_16b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_1704: Unknown result type (might be due to invalid IL or missing references)
			//IL_1719: Unknown result type (might be due to invalid IL or missing references)
			//IL_1743: Unknown result type (might be due to invalid IL or missing references)
			//IL_1748: Unknown result type (might be due to invalid IL or missing references)
			//IL_1766: Unknown result type (might be due to invalid IL or missing references)
			//IL_1542: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0764: Unknown result type (might be due to invalid IL or missing references)
			//IL_179d: Unknown result type (might be due to invalid IL or missing references)
			//IL_17a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_17b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_17bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_17db: Unknown result type (might be due to invalid IL or missing references)
			//IL_17e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_17e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1575: Unknown result type (might be due to invalid IL or missing references)
			//IL_0794: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a58: Unknown result type (might be due to invalid IL or missing references)
			//IL_182d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1832: Unknown result type (might be due to invalid IL or missing references)
			//IL_1846: Unknown result type (might be due to invalid IL or missing references)
			//IL_184b: Unknown result type (might be due to invalid IL or missing references)
			//IL_186b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1870: Unknown result type (might be due to invalid IL or missing references)
			//IL_1879: Unknown result type (might be due to invalid IL or missing references)
			//IL_15a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_089c: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_083d: Unknown result type (might be due to invalid IL or missing references)
			//IL_18bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_18c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_18d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_18db: Unknown result type (might be due to invalid IL or missing references)
			//IL_18fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_1900: Unknown result type (might be due to invalid IL or missing references)
			//IL_1909: Unknown result type (might be due to invalid IL or missing references)
			//IL_15ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_15db: Unknown result type (might be due to invalid IL or missing references)
			//IL_086d: Unknown result type (might be due to invalid IL or missing references)
			//IL_19c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_19cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_19df: Unknown result type (might be due to invalid IL or missing references)
			//IL_19e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a04: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a09: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a12: Unknown result type (might be due to invalid IL or missing references)
			//IL_194d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1952: Unknown result type (might be due to invalid IL or missing references)
			//IL_1966: Unknown result type (might be due to invalid IL or missing references)
			//IL_196b: Unknown result type (might be due to invalid IL or missing references)
			//IL_198b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1990: Unknown result type (might be due to invalid IL or missing references)
			//IL_1999: Unknown result type (might be due to invalid IL or missing references)
			//IL_0975: Unknown result type (might be due to invalid IL or missing references)
			//IL_0985: Unknown result type (might be due to invalid IL or missing references)
			//IL_0916: Unknown result type (might be due to invalid IL or missing references)
			//IL_0946: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a5e: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0abc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b31: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b41: Unknown result type (might be due to invalid IL or missing references)
			//IL_0adb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aeb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b60: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b70: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c24: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c43: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c53: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c72: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c82: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d26: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d36: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d65: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d94: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dfc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e0c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f57: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f67: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f87: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0efb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f00: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1e: Unknown result type (might be due to invalid IL or missing references)
			//IL_10a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_10c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_10d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_10e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fdf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fff: Unknown result type (might be due to invalid IL or missing references)
			//IL_1004: Unknown result type (might be due to invalid IL or missing references)
			//IL_102c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1056: Unknown result type (might be due to invalid IL or missing references)
			//IL_105b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1079: Unknown result type (might be due to invalid IL or missing references)
			//IL_1202: Unknown result type (might be due to invalid IL or missing references)
			//IL_120d: Unknown result type (might be due to invalid IL or missing references)
			//IL_121d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1232: Unknown result type (might be due to invalid IL or missing references)
			//IL_123d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1117: Unknown result type (might be due to invalid IL or missing references)
			//IL_111c: Unknown result type (might be due to invalid IL or missing references)
			//IL_113a: Unknown result type (might be due to invalid IL or missing references)
			//IL_115a: Unknown result type (might be due to invalid IL or missing references)
			//IL_115f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1187: Unknown result type (might be due to invalid IL or missing references)
			//IL_11b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_11b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_1272: Unknown result type (might be due to invalid IL or missing references)
			//IL_1277: Unknown result type (might be due to invalid IL or missing references)
			//IL_1295: Unknown result type (might be due to invalid IL or missing references)
			//IL_12b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_12ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_12e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_130c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1311: Unknown result type (might be due to invalid IL or missing references)
			//IL_132f: Unknown result type (might be due to invalid IL or missing references)
			detcd -= Time.deltaTime;
			if (detcd <= 0f)
			{
				Bodies = null;
				Bodies = Object.FindObjectsOfType<TrackedPlayerBody>();
				for (int i = 0; i < Bodies.Length; i++)
				{
					if ((Object)(object)Bodies[i].physicalPlayerBody != (Object)null && (Object)(object)Bodies[i].physicalPlayerBody.headTransform != (Object)null && !PlayerHeads.Contains(Bodies[i].physicalPlayerBody.headTransform))
					{
						PlayerHeads.Add(Bodies[i].physicalPlayerBody.headTransform);
					}
				}
				detcd = 5f;
			}
			if (PlayerHeads.Count > 0)
			{
				for (int j = 0; j < PlayerHeads.Count; j++)
				{
					if ((Object)(object)PlayerHeads[j] == (Object)null)
					{
						PlayerHeads.Remove(PlayerHeads[j]);
					}
				}
			}
			curmap = Maps[num];
			mapname.text = curmap;
			if (previews.Count > 0)
			{
				if ((Object)(object)previews[num] != (Object)null)
				{
					Im1.SetTexture("_EmissionMap", (Texture)(object)previews[num].texture);
				}
				else if ((Object)(object)previews[num] == (Object)null)
				{
					Im1.SetTexture("_EmissionMap", (Texture)(object)placeholder.texture);
				}
			}
			if (!prev.m_isLargeAperture)
			{
				if (num == 0)
				{
					num = Maps.Count - 1;
				}
				else if (num > 0)
				{
					num--;
				}
				SM.PlayCoreSound((FVRPooledAudioType)41, clickOK, ((Component)this).transform.position);
				prev.m_isLargeAperture = true;
			}
			if (!next.m_isLargeAperture)
			{
				if (num == Maps.Count - 1)
				{
					num = 0;
				}
				else if (num < Maps.Count - 1)
				{
					num++;
				}
				SM.PlayCoreSound((FVRPooledAudioType)41, clickOK, ((Component)this).transform.position);
				next.m_isLargeAperture = true;
			}
			if (ok.m_isLargeAperture && (Object)(object)GameObject.Find("MapPin(Clone)") == (Object)null)
			{
				mapselected = false;
				hellpodactivated = false;
				Mapselected.volume = Mathf.SmoothDamp(Mapselected.volume, 0f, ref selected, 0.05f);
				Mapdeselected.volume = Mathf.SmoothDamp(Mapdeselected.volume, 0.75f, ref selected, 0.05f);
			}
			else if (!ok.m_isLargeAperture && (Object)(object)GameObject.Find("MapPin(Clone)") == (Object)null && !mapselected)
			{
				if (IM.OD.ContainsKey("MapPin"))
				{
					AnvilCallback<GameObject> gameObjectAsync = ((AnvilAsset)IM.OD["MapPin"]).GetGameObjectAsync();
					if (Object.op_Implicit((Object)(object)gameObjectAsync.Result))
					{
						Object.Instantiate<GameObject>(gameObjectAsync.Result);
					}
				}
				mapselected = true;
			}
			if ((Object)(object)GameObject.Find("MapPin(Clone)") != (Object)null)
			{
				if (!HellPodReady)
				{
					SM.PlayCoreSound((FVRPooledAudioType)41, clickOK, ((Component)this).transform.position);
					Mapselected.Play();
					HPP.Play();
					HellPodReady = true;
				}
				Mapselected.volume = Mathf.SmoothDamp(Mapselected.volume, 0.75f, ref selected, 0.05f);
				Mapdeselected.volume = Mathf.SmoothDamp(Mapdeselected.volume, 0f, ref selected, 0.05f);
				if (PlayerHeads.Count >= 1)
				{
					playerref.transform.position = new Vector3(PlayerHeads[0].position.x, podposheadref.position.y, PlayerHeads[0].position.z);
				}
				if (PlayerHeads.Count >= 2)
				{
					playerref2.transform.position = new Vector3(PlayerHeads[1].position.x, podposheadref.position.y, PlayerHeads[1].position.z);
				}
				if (PlayerHeads.Count >= 3)
				{
					playerref3.transform.position = new Vector3(PlayerHeads[2].position.x, podposheadref.position.y, PlayerHeads[2].position.z);
				}
				if (PlayerHeads.Count >= 4)
				{
					playerref4.transform.position = new Vector3(PlayerHeads[3].position.x, podposheadref.position.y, PlayerHeads[3].position.z);
				}
				playerrefOWN.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, podposheadref.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z);
				if (Vector3.Distance(playerrefOWN.transform.position, ((Component)hellpodpos).transform.position) <= 0.35f && !stept)
				{
					stepon.Play();
					stept = true;
				}
				if (stept)
				{
					((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(((Component)hellpad).transform);
					((Component)GM.CurrentPlayerBody).transform.localPosition = Vector3.zero;
					if (!hellpodactivated)
					{
						effect.transform.localScale = new Vector3(1f, 1f, 1f);
						ActivatedPod.Add(HellpodGeo);
						hellpodactivated = true;
					}
				}
				if (Vector3.Distance(playerrefOWN.transform.position, ((Component)hellpodpos2).transform.position) <= 0.35f && !stept2)
				{
					stepon2.Play();
					stept2 = true;
				}
				if (stept2)
				{
					((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(((Component)hellpad2).transform);
					((Component)GM.CurrentPlayerBody).transform.localPosition = Vector3.zero;
					if (!hellpodactivated2)
					{
						effect2.transform.localScale = new Vector3(1f, 1f, 1f);
						ActivatedPod.Add(HellpodGeo2);
						hellpodactivated2 = true;
					}
				}
				if (Vector3.Distance(playerrefOWN.transform.position, ((Component)hellpodpos3).transform.position) <= 0.35f && !stept3)
				{
					stepon3.Play();
					stept3 = true;
				}
				if (stept3)
				{
					((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(((Component)hellpad3).transform);
					((Component)GM.CurrentPlayerBody).transform.localPosition = Vector3.zero;
					if (!hellpodactivated3)
					{
						effect3.transform.localScale = new Vector3(1f, 1f, 1f);
						ActivatedPod.Add(HellpodGeo3);
						hellpodactivated3 = true;
					}
				}
				if (Vector3.Distance(playerrefOWN.transform.position, ((Component)hellpodpos4).transform.position) <= 0.35f && !stept4)
				{
					stepon4.Play();
					stept4 = true;
				}
				if (stept4)
				{
					((Component)GM.CurrentPlayerBody).gameObject.transform.SetParent(((Component)hellpad4).transform);
					((Component)GM.CurrentPlayerBody).transform.localPosition = Vector3.zero;
					if (!hellpodactivated4)
					{
						effect4.transform.localScale = new Vector3(1f, 1f, 1f);
						ActivatedPod.Add(HellpodGeo4);
						hellpodactivated4 = true;
					}
				}
				if ((Vector3.Distance(playerref.transform.position, ((Component)hellpodpos).transform.position) <= 0.35f || Vector3.Distance(playerref2.transform.position, ((Component)hellpodpos).transform.position) <= 0.35f || Vector3.Distance(playerref3.transform.position, ((Component)hellpodpos).transform.position) <= 0.35f || Vector3.Distance(playerref4.transform.position, ((Component)hellpodpos).transform.position) <= 0.35f) && !hellpodactivated)
				{
					ActivatedPod.Add(HellpodGeo);
					hellpodactivated = true;
				}
				if ((Vector3.Distance(playerref.transform.position, ((Component)hellpodpos2).transform.position) <= 0.35f || Vector3.Distance(playerref2.transform.position, ((Component)hellpodpos2).transform.position) <= 0.35f || Vector3.Distance(playerref3.transform.position, ((Component)hellpodpos2).transform.position) <= 0.35f || Vector3.Distance(playerref4.transform.position, ((Component)hellpodpos2).transform.position) <= 0.35f) && !hellpodactivated2)
				{
					ActivatedPod.Add(HellpodGeo2);
					hellpodactivated2 = true;
				}
				if ((Vector3.Distance(playerref.transform.position, ((Component)hellpodpos3).transform.position) <= 0.35f || Vector3.Distance(playerref2.transform.position, ((Component)hellpodpos3).transform.position) <= 0.35f || Vector3.Distance(playerref3.transform.position, ((Component)hellpodpos3).transform.position) <= 0.35f || Vector3.Distance(playerref4.transform.position, ((Component)hellpodpos3).transform.position) <= 0.35f) && !hellpodactivated3)
				{
					ActivatedPod.Add(HellpodGeo3);
					hellpodactivated3 = true;
				}
				if ((Vector3.Distance(playerref.transform.position, ((Component)hellpodpos4).transform.position) <= 0.35f || Vector3.Distance(playerref2.transform.position, ((Component)hellpodpos4).transform.position) <= 0.35f || Vector3.Distance(playerref3.transform.position, ((Component)hellpodpos4).transform.position) <= 0.35f || Vector3.Distance(playerref4.transform.position, ((Component)hellpodpos4).transform.position) <= 0.35f) && !hellpodactivated4)
				{
					ActivatedPod.Add(HellpodGeo4);
					hellpodactivated4 = true;
				}
				if (hellpodactivated)
				{
					podlid.transform.position = Vector3.SmoothDamp(podlid.transform.position, poddown.position, ref lidref, 1f);
					if (Vector3.Distance(podlid.transform.position, poddown.position) < 0.01f)
					{
						piston.transform.localEulerAngles = new Vector3(0f, 90f, Mathf.SmoothDamp(piston.transform.localEulerAngles.z, 100f, ref pistonref, 0.1f));
						pistonend.transform.localPosition = new Vector3(Mathf.SmoothDamp(pistonend.transform.localPosition.x, -1.7f, ref pistonendref, 0.1f), 0f, 0f);
						cover.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.SmoothDamp(cover.transform.localEulerAngles.z, 0f, ref coverref, 0.1f));
					}
				}
				if (hellpodactivated2)
				{
					podlid2.transform.position = Vector3.SmoothDamp(podlid2.transform.position, poddown2.position, ref lidref2, 1f);
					if (Vector3.Distance(podlid2.transform.position, poddown2.position) < 0.01f)
					{
						piston2.transform.localEulerAngles = new Vector3(0f, 90f, Mathf.SmoothDamp(piston2.transform.localEulerAngles.z, 100f, ref pistonref2, 0.1f));
						pistonend2.transform.localPosition = new Vector3(Mathf.SmoothDamp(pistonend2.transform.localPosition.x, -1.7f, ref pistonendref2, 0.1f), 0f, 0f);
						cover2.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.SmoothDamp(cover2.transform.localEulerAngles.z, 0f, ref coverref2, 0.1f));
					}
				}
				if (hellpodactivated3)
				{
					podlid3.transform.position = Vector3.SmoothDamp(podlid3.transform.position, poddown3.position, ref lidref3, 1f);
					if (Vector3.Distance(podlid3.transform.position, poddown3.position) < 0.01f)
					{
						piston3.transform.localEulerAngles = new Vector3(0f, 90f, Mathf.SmoothDamp(piston3.transform.localEulerAngles.z, 100f, ref pistonref3, 0.1f));
						pistonend3.transform.localPosition = new Vector3(Mathf.SmoothDamp(pistonend3.transform.localPosition.x, -1.7f, ref pistonendref3, 0.1f), 0f, 0f);
						cover3.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.SmoothDamp(cover3.transform.localEulerAngles.z, 0f, ref coverref3, 0.1f));
					}
				}
				if (hellpodactivated4)
				{
					podlid4.transform.position = Vector3.SmoothDamp(podlid4.transform.position, poddown4.position, ref lidref4, 1f);
					if (Vector3.Distance(podlid4.transform.position, poddown4.position) < 0.01f)
					{
						piston4.transform.localEulerAngles = new Vector3(0f, 90f, Mathf.SmoothDamp(piston4.transform.localEulerAngles.z, 100f, ref pistonref4, 0.1f));
						pistonend4.transform.localPosition = new Vector3(Mathf.SmoothDamp(pistonend4.transform.localPosition.x, -1.7f, ref pistonendref4, 0.1f), 0f, 0f);
						cover4.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.SmoothDamp(cover4.transform.localEulerAngles.z, 0f, ref coverref4, 0.1f));
					}
				}
			}
			if (shot)
			{
				Mapselected.volume = 0f;
				Mapdeselected.volume = 0f;
			}
			if (ActivatedPod.Count < PlayerHeads.Count || ActivatedPod.Count <= 0)
			{
				return;
			}
			Mapselected.volume = Mathf.SmoothDamp(Mapselected.volume, 0f, ref selected, 0.1f);
			Mapdeselected.volume = Mathf.SmoothDamp(Mapdeselected.volume, 0f, ref selected, 0.1f);
			HellDoor.transform.localPosition = new Vector3(0f, Mathf.SmoothDamp(HellDoor.transform.localPosition.y, 5f, ref HellDoorref, 1f), 0f);
			if (!BGMLoaded)
			{
				whoosh.Play();
				HellDiveBGMPre.Play();
				HPLI.Play();
				BGMLoaded = true;
			}
			if (!HellDiveBGMPre.isPlaying && !shot)
			{
				truecover.transform.localPosition = new Vector3(0f, 0f, 1.45f);
				truecover2.transform.localPosition = new Vector3(0f, 0f, 1.45f);
				truecover3.transform.localPosition = new Vector3(0f, 0f, 1.45f);
				truecover4.transform.localPosition = new Vector3(0f, 0f, 1.45f);
				if (ActivatedPod.Contains(HellpodGeo))
				{
					HellpodGeo.transform.position = shootpos.position;
				}
				if (ActivatedPod.Contains(HellpodGeo2))
				{
					HellpodGeo2.transform.position = shootpos2.position;
				}
				if (ActivatedPod.Contains(HellpodGeo3))
				{
					HellpodGeo3.transform.position = shootpos3.position;
				}
				if (ActivatedPod.Contains(HellpodGeo4))
				{
					HellpodGeo4.transform.position = shootpos4.position;
				}
				HellDiveBGMPost.Play();
				SM.PlayCoreSound((FVRPooledAudioType)41, shoot, hellpad.position);
				shot = true;
			}
			if (shot)
			{
				if (!shakestarted)
				{
					shake.Begin();
					shake2.Begin();
					shake3.Begin();
					shake4.Begin();
					shakestarted = true;
					otherRocketFX.SetActive(true);
				}
				headcam.transform.eulerAngles = ((Component)GM.CurrentPlayerBody.Head).transform.eulerAngles;
				headcam.transform.SetParent(((Component)GM.CurrentPlayerBody.Torso).transform);
				headcam.transform.localPosition = Vector3.zero;
				HMD.SetActive(true);
				headcam.SetActive(true);
				HMD.transform.SetParent(((Component)GM.CurrentPlayerBody.Head).transform);
				HMD.transform.localPosition = Vector3.zero;
				HMD.transform.localEulerAngles = Vector3.zero;
				HMDRot.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.SmoothDamp(HMDRot.transform.localEulerAngles.z, 90f, ref HMDRotref, 0.2f));
				if (ActivatedPod.Contains(HellpodGeo))
				{
					HellpodGeo.transform.position = new Vector3(HellpodGeo.transform.position.x, HellpodGeo.transform.position.y - 25f * Time.deltaTime, HellpodGeo.transform.position.z);
					rocketFX.SetActive(true);
				}
				if (ActivatedPod.Contains(HellpodGeo2))
				{
					HellpodGeo2.transform.position = new Vector3(HellpodGeo2.transform.position.x, HellpodGeo2.transform.position.y - 25f * Time.deltaTime, HellpodGeo2.transform.position.z);
					rocketFX2.SetActive(true);
				}
				if (ActivatedPod.Contains(HellpodGeo3))
				{
					HellpodGeo3.transform.position = new Vector3(HellpodGeo3.transform.position.x, HellpodGeo3.transform.position.y - 25f * Time.deltaTime, HellpodGeo3.transform.position.z);
					rocketFX3.SetActive(true);
				}
				if (ActivatedPod.Contains(HellpodGeo4))
				{
					HellpodGeo4.transform.position = new Vector3(HellpodGeo4.transform.position.x, HellpodGeo4.transform.position.y - 25f * Time.deltaTime, HellpodGeo4.transform.position.z);
					rocketFX4.SetActive(true);
				}
				otherRocketFX.transform.position = new Vector3(otherRocketFX.transform.position.x, otherRocketFX.transform.position.y - 20f * Time.deltaTime, otherRocketFX.transform.position.z);
			}
			if (shot && !whoosh.isPlaying && !faded)
			{
				SteamVR_Fade.Start(new Color(0f, 0f, 0f, 1f), 2.5f, true);
				faded = true;
			}
			if (shot && !HellDiveBGMPost.isPlaying)
			{
				SteamVR_LoadLevel.Begin("MainMenu3", false, 0f, 0f, 0f, 0f, 1f);
			}
		}
	}
}
namespace JerryHD2HP
{
	public class ShakeTransformS : MonoBehaviour
	{
		public Transform shakeobj;

		public float shake = 0.2f;

		public void Begin()
		{
			((MonoBehaviour)this).StartCoroutine("C");
		}

		private IEnumerator C()
		{
			while (true)
			{
				shakeobj.localPosition = new Vector3(shakeobj.localPosition.x + Random.Range(0f, shake), shakeobj.localPosition.y, shakeobj.localPosition.z);
				shakeobj.localPosition = new Vector3(shakeobj.localPosition.x, shakeobj.localPosition.y + Random.Range(0f, 0.5f * shake), shakeobj.localPosition.z);
				shakeobj.localPosition = new Vector3(shakeobj.localPosition.x, shakeobj.localPosition.y, shakeobj.localPosition.z + Random.Range(0f, shake));
				yield return (object)new WaitForSeconds(0.01f);
				shakeobj.localPosition = new Vector3(shakeobj.localPosition.x - Random.Range(0f, shake), shakeobj.localPosition.y, shakeobj.localPosition.z);
				shakeobj.localPosition = new Vector3(shakeobj.localPosition.x, shakeobj.localPosition.y - Random.Range(0f, 0.5f * shake), shakeobj.localPosition.z);
				shakeobj.localPosition = new Vector3(shakeobj.localPosition.x, shakeobj.localPosition.y, shakeobj.localPosition.z - Random.Range(0f, shake));
				yield return (object)new WaitForSeconds(0.01f);
			}
		}

		public void FixedUpdate()
		{
			//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_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			((Component)this).gameObject.transform.localPosition = new Vector3(Mathf.Clamp(((Component)this).gameObject.transform.localPosition.x, -0.1f, 0.1f), Mathf.Clamp(((Component)this).gameObject.transform.localPosition.y, -0.05f, 0.05f), Mathf.Clamp(((Component)this).gameObject.transform.localPosition.z, -0.1f, 0.1f));
		}
	}
}
namespace JerryAr.HellDivers2_SES_Liberty_GameMenu_H3MP
{
	[BepInPlugin("JerryAr.HellDivers2_SES_Liberty_GameMenu_H3MP", "HellDivers2_SES_Liberty_GameMenu_H3MP", "1.1.2")]
	[BepInProcess("h3vr.exe")]
	[Description("Built with MeatKit")]
	[BepInDependency("nrgill28.Atlas", "1.0.1")]
	[BepInDependency("h3vr.otherloader", "1.3.0")]
	public class HellDivers2_SES_Liberty_GameMenu_H3MPPlugin : BaseUnityPlugin
	{
		private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

		internal static ManualLogSource Logger;

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

		private void LoadAssets()
		{
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "JerryAr.HellDivers2_SES_Liberty_GameMenu_H3MP");
			AtlasPlugin.RegisterScene(Path.Combine(BasePath, "libertymp"));
			OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.HellDivers2_SES_Liberty_GameMenu_H3MP", "", "", "playerhellpodprefab", "");
			OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.HellDivers2_SES_Liberty_GameMenu_H3MP", "", "", "playerpelicanprefabmp", "");
		}
	}
}
public class NavMeshCleaner : MonoBehaviour
{
	private class Tri
	{
		public int i1;

		public int i2;

		public int i3;

		public int min;

		public int max;

		public Tri(int i1, int i2, int i3)
		{
			this.i1 = i1;
			this.i2 = i2;
			this.i3 = i3;
			min = Mathf.Min(new int[3] { i1, i2, i3 });
			max = Mathf.Max(new int[3] { i1, i2, i3 });
		}
	}

	private class Edge
	{
		public int i1;

		public int i2;

		public Edge(int i1, int i2)
		{
			this.i1 = i1;
			this.i2 = i2;
		}
	}

	[CustomEditor(typeof(NavMeshCleaner))]
	public class NavMeshCleanerEditor : Editor
	{
		private static class Styles
		{
			private static Dictionary<string, GUIStyle> texture = new Dictionary<string, GUIStyle>();

			public static GUIStyle Get(string id)
			{
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0020: Expected O, but got Unknown
				if (!texture.TryGetValue(id, out var value))
				{
					value = new GUIStyle(GUIStyle.op_Implicit(id));
					texture.Add(id, value);
				}
				return value;
			}
		}

		private NavMeshCleaner m_Target;

		private int m_OverPoint = -1;

		private static float kEpsilon = 1E-06f;

		private void OnEnable()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			m_Target = (NavMeshCleaner)(object)((Editor)this).target;
			Undo.undoRedoPerformed = (UndoRedoCallback)Delegate.Combine((Delegate?)(object)Undo.undoRedoPerformed, (Delegate?)new UndoRedoCallback(OnUndoOrRedo));
		}

		private void OnDisable()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			Undo.undoRedoPerformed = (UndoRedoCallback)Delegate.Remove((Delegate?)(object)Undo.undoRedoPerformed, (Delegate?)new UndoRedoCallback(OnUndoOrRedo));
		}

		private void OnUndoOrRedo()
		{
			((Editor)this).Repaint();
		}

		public override void OnInspectorGUI()
		{
			//IL_007c: 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_00f2: 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_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			EditorGUILayout.HelpBox((m_OverPoint == -1) ? "Press Control and click to add a walkable point." : "Press Control and click to remove the point.", (MessageType)((m_Target.m_WalkablePoint.Count != 0) ? 1 : 2));
			((Editor)this).OnInspectorGUI();
			NavMeshCleaner navMeshCleaner = (NavMeshCleaner)(object)((Editor)this).target;
			if (navMeshCleaner.m_Child.Count > 0)
			{
				EditorGUI.BeginChangeCheck();
				bool flag = EditorGUILayout.Toggle("Hide Temp Mesh Object In Hierarchy", ((((Object)navMeshCleaner.m_Child[0].gameObject).hideFlags & 1) != 0) ? true : false, (GUILayoutOption[])(object)new GUILayoutOption[0]);
				if (EditorGUI.EndChangeCheck())
				{
					for (int i = 0; i < navMeshCleaner.m_Child.Count; i++)
					{
						((Object)navMeshCleaner.m_Child[i].gameObject).hideFlags = (HideFlags)((!flag) ? (((Object)navMeshCleaner.m_Child[i].gameObject).hideFlags & -2) : (((Object)navMeshCleaner.m_Child[i].gameObject).hideFlags | 1));
					}
					try
					{
						EditorApplication.RepaintHierarchyWindow();
						EditorApplication.DirtyHierarchyWindowSorting();
					}
					catch
					{
					}
				}
			}
			if (GUILayout.Button((!navMeshCleaner.HasMesh()) ? "Calculate" : "Recalculate", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }))
			{
				navMeshCleaner.Build();
				navMeshCleaner.SetMeshVisible(visible: true);
				SceneView.RepaintAll();
			}
			if (navMeshCleaner.HasMesh() && GUILayout.Button((!navMeshCleaner.MeshVisible()) ? "Show Mesh" : "Hide Mesh", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }))
			{
				bool meshVisible = !navMeshCleaner.MeshVisible();
				navMeshCleaner.SetMeshVisible(meshVisible);
				SceneView.RepaintAll();
			}
			if (navMeshCleaner.HasMesh() && GUILayout.Button("Reset Mesh", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }))
			{
				navMeshCleaner.Reset();
				SceneView.RepaintAll();
			}
			if (navMeshCleaner.HasMesh() && GUILayout.Button("Reset WalkablePoints", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }))
			{
				Undo.RecordObject(((Editor)this).target, "reset");
				m_Target.m_WalkablePoint.Clear();
				SceneView.RepaintAll();
			}
		}

		private void DrawDisc(Vector3 p, Vector3 n, float radius)
		{
			//IL_0009: 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_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			Vector3[] array = (Vector3[])(object)new Vector3[20];
			Matrix4x4 val = Matrix4x4.TRS(p, Quaternion.LookRotation(n), Vector3.one * radius);
			for (int i = 0; i < 20; i++)
			{
				ref Vector3 reference = ref array[i];
				reference = ((Matrix4x4)(ref val)).MultiplyPoint3x4(new Vector3(Mathf.Cos((float)Math.PI * 2f * (float)i / 19f), Mathf.Sin((float)Math.PI * 2f * (float)i / 19f), 0f));
			}
			Handles.DrawAAPolyLine(array);
		}

		private void OnSceneGUI()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Invalid comparison between Unknown and I4
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Invalid comparison between Unknown and I4
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0043: 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_0057: 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_0063: 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_015a: Invalid comparison between Unknown and I4
			//IL_008b: 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_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Invalid comparison between Unknown and I4
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Invalid comparison between Unknown and I4
			//IL_0095: 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_00a8: 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_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: 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_0172: Invalid comparison between Unknown and I4
			SceneView currentDrawingSceneView = SceneView.currentDrawingSceneView;
			Event current = Event.current;
			if ((int)current.type == 7)
			{
				for (int i = 0; i < m_Target.m_WalkablePoint.Count; i++)
				{
					Vector3 val = ((Component)m_Target).transform.TransformPoint(m_Target.m_WalkablePoint[i]);
					float num = WorldSize(1f, currentDrawingSceneView.camera, val);
					Handles.color = Color.black;
					DrawDisc(val, Vector3.up, num * 15f);
					Handles.color = ((i != m_OverPoint) ? Color.green : Color.red);
					Handles.DrawSolidDisc(val, Vector3.up, num * 10f);
					Handles.DrawLine(val, val + Vector3.up * (num * 200f));
				}
			}
			if ((int)current.type == 8 && current.control)
			{
				HandleUtility.AddDefaultControl(GUIUtility.GetControlID((FocusType)2));
			}
			if (current.control)
			{
				EditorGUIUtility.AddCursorRect(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), (MouseCursor)((m_OverPoint != -1) ? 12 : 11));
			}
			if (((int)current.type == 0 || (int)current.type == 3 || (int)current.type == 2 || (int)current.type == 1) && current.button == 0)
			{
				MouseEvent(current.type, current.mousePosition, (int)current.modifiers == 2);
			}
		}

		private void MouseEvent(EventType type, Vector2 mouseposition, bool controldown)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Invalid comparison between Unknown and I4
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: 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_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: 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_021a: Unknown result type (might be due to invalid IL or missing references)
			SceneView currentDrawingSceneView = SceneView.currentDrawingSceneView;
			Ray val = HandleUtility.GUIPointToWorldRay(mouseposition);
			if ((int)type == 2)
			{
				int num = -1;
				for (int i = 0; i < m_Target.m_WalkablePoint.Count; i++)
				{
					Vector3 val2 = ((Component)m_Target).transform.TransformPoint(m_Target.m_WalkablePoint[i]);
					float num2 = WorldSize(10f, currentDrawingSceneView.camera, val2) * 1.5f;
					if (DistanceRayVsPoint(val, val2) < num2)
					{
						num = i;
						break;
					}
				}
				if (num != m_OverPoint)
				{
					m_OverPoint = num;
					HandleUtility.Repaint();
				}
			}
			if ((int)type != 0 || !controldown)
			{
				return;
			}
			if (m_OverPoint != -1)
			{
				Undo.RecordObject((Object)(object)m_Target, "Remove Point");
				m_Target.m_WalkablePoint.RemoveAt(m_OverPoint);
				m_OverPoint = -1;
			}
			else
			{
				float num3 = 1000f;
				RaycastHit val3 = default(RaycastHit);
				if (Physics.Raycast(val, ref val3, num3))
				{
					Undo.RecordObject((Object)(object)m_Target, "Add Point");
					m_Target.m_WalkablePoint.Add(((Component)m_Target).transform.InverseTransformPoint(((RaycastHit)(ref val3)).point));
				}
				else
				{
					NavMeshTriangulation val4 = NavMesh.CalculateTriangulation();
					Vector3[] vertices = val4.vertices;
					int[] indices = val4.indices;
					Vector3 outNormal = Vector3.up;
					for (int j = 0; j < indices.Length; j += 3)
					{
						num3 = IntersectTest(val, vertices[indices[j]], vertices[indices[j + 1]], vertices[indices[j + 2]], num3, ref outNormal);
					}
					if (num3 < 1000f)
					{
						Undo.RecordObject((Object)(object)m_Target, "Add Point");
						Vector3 val5 = ((Ray)(ref val)).origin + ((Ray)(ref val)).direction * num3;
						m_Target.m_WalkablePoint.Add(((Component)m_Target).transform.InverseTransformPoint(val5));
					}
				}
			}
			HandleUtility.Repaint();
		}

		private static float IntersectTest(Ray ray, Vector3 v0, Vector3 v1, Vector3 v2, float mint, ref Vector3 outNormal)
		{
			//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_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: 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_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = v1 - v0;
			Vector3 val2 = v2 - v0;
			Vector3 val3 = Vector3.Cross(((Ray)(ref ray)).direction, val2);
			float num = Vector3.Dot(val, val3);
			if (num > 0f - kEpsilon && num < kEpsilon)
			{
				return mint;
			}
			float num2 = 1f / num;
			Vector3 val4 = ((Ray)(ref ray)).origin - v0;
			float num3 = num2 * Vector3.Dot(val4, val3);
			if (num3 < 0f || num3 > 1f)
			{
				return mint;
			}
			Vector3 val5 = Vector3.Cross(val4, val);
			float num4 = num2 * Vector3.Dot(((Ray)(ref ray)).direction, val5);
			if (num4 < 0f || num3 + num4 > 1f)
			{
				return mint;
			}
			float num5 = num2 * Vector3.Dot(val2, val5);
			if (num5 > kEpsilon && num5 < mint)
			{
				outNormal = Vector3.Normalize(Vector3.Cross(((Vector3)(ref val)).normalized, ((Vector3)(ref val2)).normalized));
				return num5;
			}
			return mint;
		}

		private static float WorldSize(float screensize, Camera camera, Vector3 p)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (!camera.orthographic)
			{
				Vector3 val = ((Component)camera).transform.InverseTransformPoint(p);
				float num = Mathf.Tan(camera.fieldOfView * ((float)Math.PI / 180f) * 0.5f) * val.z;
				return num * screensize / (float)camera.pixelHeight;
			}
			return camera.orthographicSize * screensize / (float)camera.pixelHeight;
		}

		private static float DistanceRayVsPoint(Ray mouseRay, Vector3 pos)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: 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_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = pos - ((Ray)(ref mouseRay)).origin;
			return Mathf.Sqrt(Vector3.Dot(val, val) - Vector3.Dot(((Ray)(ref mouseRay)).direction, val) * Vector3.Dot(((Ray)(ref mouseRay)).direction, val));
		}

		private static Vector3 IntersectPlane(Vector3 inNormal, Vector3 inPoint, Ray mouseRay)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)