Decompiled source of BooM Gun v1.1.0

BooM_Gun.dll

Decompiled a week ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using FistVR;
using H3VRUtils.MonoScripts.VisualModifiers;
using HarmonyLib;
using OpenScripts2;
using OtherLoader;
using TheNext;
using UnityEditor;
using UnityEngine;
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 JerryComponent
{
	public class EnableIfDisabled : MonoBehaviour
	{
		public FVRFireArmRound Bullet;

		public WaggleJoint wag;

		public GameObject phy;

		private void Start()
		{
		}

		private void Update()
		{
			if (Bullet.IsSpent)
			{
				wag.angleLimitLeft = 180f;
				wag.angleLimitRight = 25f;
			}
			if (!Bullet.IsSpent)
			{
				wag.angleLimitLeft = 180f;
				wag.angleLimitRight = -180f;
			}
			if (Bullet.IsChambered)
			{
				phy.SetActive(false);
			}
			if (!Bullet.IsChambered)
			{
				phy.SetActive(true);
			}
		}
	}
	public class FagotGripX : MonoBehaviour
	{
		public GameObject Fagot;

		public GameObject fagotLaser;

		public string laser;

		public LAPD2019Laser l;

		public string GunName;

		public FVRPhysicalObject obj;

		public WorkingRigidbodies WR;

		private void Start()
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			Fagot = GameObject.Find(GunName);
			fagotLaser = GameObject.Find(laser);
			l = fagotLaser.GetComponent<LAPD2019Laser>();
			WR = Fagot.GetComponent<WorkingRigidbodies>();
			if ((Object)(object)WR != (Object)null)
			{
				((Component)this).gameObject.transform.position = ((Component)WR.G).transform.position;
				((Component)this).gameObject.transform.eulerAngles = ((Component)WR.GP).transform.eulerAngles;
				ConfigurableJoint val = ((Component)this).gameObject.AddComponent<ConfigurableJoint>();
				((Joint)val).connectedBody = WR.G;
				((Joint)val).autoConfigureConnectedAnchor = false;
				((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f);
				((Joint)val).anchor = new Vector3(0f, 0f, 0f);
				val.xMotion = (ConfigurableJointMotion)0;
				val.yMotion = (ConfigurableJointMotion)0;
				val.zMotion = (ConfigurableJointMotion)0;
				val.angularXMotion = (ConfigurableJointMotion)2;
				val.angularYMotion = (ConfigurableJointMotion)2;
				val.angularZMotion = (ConfigurableJointMotion)2;
			}
			if ((Object)(object)l != (Object)null)
			{
				l.PO = obj;
			}
		}

		private void Update()
		{
			if ((Object)(object)Fagot == (Object)null || (Object)(object)WR == (Object)null)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}
	}
	public class FagotGripY : MonoBehaviour
	{
		public GameObject FagotYMani;

		public string GunYName;

		public GameObject Fagot;

		public string Gun;

		public CarlGustaf CG;

		public FVRPhysicalObject obj;

		public WorkingRigidbodies WR;

		private JointLimits JL;

		private void Start()
		{
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			FagotYMani = GameObject.Find(GunYName);
			Fagot = GameObject.Find(Gun);
			CG = Fagot.GetComponent<CarlGustaf>();
			WR = Fagot.GetComponent<WorkingRigidbodies>();
			if ((Object)(object)WR != (Object)null)
			{
				((Component)this).gameObject.transform.SetParent(((Component)WR.Y).transform);
				((Component)this).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
				((Component)this).gameObject.transform.localEulerAngles = new Vector3(25f, 0f, 0f);
				HingeJoint val = ((Component)this).gameObject.AddComponent<HingeJoint>();
				((Joint)val).connectedBody = WR.Y;
				((Joint)val).autoConfigureConnectedAnchor = false;
				((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f);
				((Joint)val).anchor = new Vector3(0f, 0f, 0f);
				((Joint)val).axis = new Vector3(1f, 0f, 0f);
				val.useLimits = true;
				((JointLimits)(ref JL)).max = 45f;
				((JointLimits)(ref JL)).min = 0f;
				val.limits = JL;
			}
		}

		private void Update()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)FagotYMani != (Object)null)
			{
				FagotYMani.transform.eulerAngles = ((Component)this).gameObject.transform.eulerAngles;
			}
			if ((Object)(object)Fagot == (Object)null || Gun == null || (Object)(object)WR == (Object)null)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
			else if ((Object)(object)Fagot != (Object)null && Gun != null && (Object)(object)WR != (Object)null && (Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null && ((FVRInteractiveObject)obj).m_hand.Input.TriggerPressed && CG.Chamber.IsFull && !CG.Chamber.IsSpent)
			{
				CG.TryToChargeHandle();
				CG.TryToFire();
			}
		}
	}
	public class LauncherHandle : MonoBehaviour
	{
		public GameObject LCH;

		public string GunName;

		public FVRPhysicalObject obj;

		public CarlGustaf Gun;

		public WorkingRigidbodies WR;

		private void Start()
		{
			//IL_0061: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			LCH = GameObject.Find(GunName);
			Gun = LCH.GetComponent<CarlGustaf>();
			WR = LCH.GetComponent<WorkingRigidbodies>();
			if ((Object)(object)WR != (Object)null)
			{
				((Component)this).gameObject.transform.position = ((Component)WR.G).transform.position;
				((Component)this).gameObject.transform.eulerAngles = ((Component)WR.GP).transform.eulerAngles;
				ConfigurableJoint val = ((Component)this).gameObject.AddComponent<ConfigurableJoint>();
				((Joint)val).connectedBody = WR.G;
				((Joint)val).autoConfigureConnectedAnchor = false;
				((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f);
				((Joint)val).anchor = new Vector3(0f, 0f, 0f);
				val.xMotion = (ConfigurableJointMotion)0;
				val.yMotion = (ConfigurableJointMotion)0;
				val.zMotion = (ConfigurableJointMotion)0;
				val.angularXMotion = (ConfigurableJointMotion)2;
				val.angularYMotion = (ConfigurableJointMotion)2;
				val.angularZMotion = (ConfigurableJointMotion)2;
			}
		}

		private void Update()
		{
			if ((Object)(object)LCH == (Object)null || (Object)(object)Gun == (Object)null || (Object)(object)WR == (Object)null)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
			else if ((Object)(object)LCH != (Object)null && (Object)(object)Gun != (Object)null && (Object)(object)WR != (Object)null && (Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null && ((FVRInteractiveObject)obj).m_hand.Input.TriggerPressed)
			{
				Gun.TryToFire();
			}
		}
	}
	public class MuzzleEffectFagot : MonoBehaviour
	{
		public GameObject effect;

		public CarlGustaf gun;

		public bool fired = false;

		private void Start()
		{
		}

		private void Update()
		{
			//IL_0086: 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)
			if (gun.Chamber.IsFull && !gun.Chamber.IsSpent)
			{
				fired = false;
			}
			else if (gun.Chamber.IsFull && gun.Chamber.IsSpent && !fired)
			{
				Object.Instantiate<GameObject>(effect, ((Component)((FVRFireArm)gun).MuzzlePos).transform.position, ((Component)((FVRFireArm)gun).MuzzlePos).transform.rotation);
				fired = true;
			}
		}
	}
	public class Syringe : FVRFireArmAttachment
	{
		public enum CartridgeState
		{
			Whole,
			BitOpen,
			Jammed
		}

		public List<Renderer> Rends;

		public CartridgeState CState;

		public int numPowderChunksLeft = 20;

		public AudioEvent AudEvent_Bite;

		public AudioEvent AudEvent_Tap;

		public Transform PowderSpawnPoint;

		public GameObject PowderPrefab;

		public GameObject BitPart;

		public AudioEvent AudEvent_Spit;

		public GameObject Splode;

		[NonSerialized]
		public bool m_isDestroyed;

		[NonSerialized]
		public float m_tickDownToSpit = 0.2f;

		[NonSerialized]
		public bool m_tickingDownToSpit;

		[NonSerialized]
		public float timeSinceSpawn = 1f;

		public PowerupType put;

		public PowerUpIntensity pui;

		public PowerUpDuration pud;

		public AudioEvent AudEvent_DIng;

		public FVRPhysicalObject PenObject;

		public bool isAlreadyInHeadRange = false;

		public bool isUsed = false;

		public KillAfter ka;

		public void SetRenderer(CartridgeState s)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Invalid comparison between Unknown and I4
			for (int i = 0; i < Rends.Count; i++)
			{
				if ((int)s == i)
				{
					Rends[i].enabled = true;
				}
				else
				{
					Rends[i].enabled = false;
				}
			}
		}

		public override void Awake()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			((FVRFireArmAttachment)this).Awake();
			SetRenderer(CState);
		}

		public override void UpdateInteraction(FVRViveHand hand)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			((FVRFireArmAttachment)this).UpdateInteraction(hand);
			if (((FVRInteractiveObject)this).m_hasTriggeredUpSinceBegin)
			{
				float num = Vector3.Angle(-((Component)this).transform.forward, Vector3.up);
			}
			if ((int)CState == 0)
			{
				Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f;
				if (Vector3.Distance(((Component)this).transform.position, val) < 0.15f)
				{
					SM.PlayGenericSound(AudEvent_Bite, ((Component)this).transform.position);
					CState = (CartridgeState)1;
					SetRenderer(CState);
					m_tickingDownToSpit = true;
					m_tickDownToSpit = Random.Range(0.3f, 0.6f);
				}
			}
		}

		public override void FVRUpdate()
		{
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Invalid comparison between Unknown and I4
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: 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_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			((FVRPhysicalObject)this).FVRUpdate();
			if (timeSinceSpawn < 1f)
			{
				timeSinceSpawn += Time.deltaTime;
			}
			if (m_tickingDownToSpit)
			{
				m_tickDownToSpit -= Time.deltaTime;
				if (m_tickDownToSpit <= 0f)
				{
					m_tickingDownToSpit = false;
					Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f;
					SM.PlayGenericSound(AudEvent_Spit, val);
					GameObject val2 = Object.Instantiate<GameObject>(BitPart, val, Random.rotation);
					Rigidbody component = val2.GetComponent<Rigidbody>();
					component.velocity = GM.CurrentPlayerBody.Head.forward * Random.Range(2f, 4f) + Random.onUnitSphere;
					component.angularVelocity = Random.onUnitSphere * Random.Range(1f, 5f);
				}
			}
			if ((int)CState == 1)
			{
				float num = Vector3.Angle(-((Component)this).transform.forward, Vector3.up);
				if (num > 120f && numPowderChunksLeft > 0 && timeSinceSpawn > 0.04f)
				{
					numPowderChunksLeft--;
					timeSinceSpawn = 0f;
					Object.Instantiate<GameObject>(PowderPrefab, PowderSpawnPoint.position, Random.rotation);
				}
			}
		}

		private void Update()
		{
			//IL_0007: 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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Invalid comparison between Unknown and I4
			float num = Vector3.Distance(((Component)this).transform.position, ((Component)GM.CurrentPlayerBody.Head).transform.position + Vector3.up * -0.1f);
			if ((double)num >= 0.19)
			{
				isAlreadyInHeadRange = false;
			}
			if ((double)num < 0.15)
			{
				if (!isAlreadyInHeadRange && (int)CState == 1 && !isUsed)
				{
					PowerUp(((FVRInteractiveObject)PenObject).m_hand);
					Console.Write("Yummy");
					isUsed = true;
				}
				isAlreadyInHeadRange = true;
			}
		}

		public void PowerUp(FVRViveHand hand)
		{
			//IL_000f: 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_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			SM.PlayCoreSound((FVRPooledAudioType)10, AudEvent_DIng, ((Component)this).transform.position);
			GM.CurrentSceneSettings.OnPowerupUse(put);
			GM.CurrentPlayerBody.ActivatePower(put, pui, pud, false, false, -1f);
			((Behaviour)ka).enabled = true;
		}
	}
	public class BelfFedMGLifter : MonoBehaviour
	{
		public FVRFireArmTopCover cover;

		public FVRFoldingStockXAxis lifter;

		public BoxCollider col;

		public OpenBoltReceiver gun;

		public float a = 45f;

		private void Update()
		{
			//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_005c: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			if (!((FVRFireArm)gun).HasBelt && ((Component)cover).transform.localEulerAngles.x >= 45f)
			{
				((Collider)col).enabled = true;
			}
			if (((FVRFireArm)gun).HasBelt || ((Component)cover).transform.localEulerAngles.x < 45f)
			{
				((Collider)col).enabled = false;
			}
			if (((Component)lifter).transform.localEulerAngles.x < 45f)
			{
				a = ((Component)lifter).transform.localEulerAngles.x;
				((Component)lifter).transform.localEulerAngles = new Vector3(a + 5f, 0f, 0f);
			}
			if (((Component)lifter).transform.localEulerAngles.x == 45f)
			{
				a = 45f;
			}
			if (((Component)lifter).transform.localEulerAngles.x > 45f)
			{
				((Component)lifter).transform.localEulerAngles = new Vector3(45f, 0f, 0f);
			}
		}
	}
	public class BuletSearcher : MonoBehaviour
	{
		private BallisticProjectile boolet;

		public GameObject booletcam;

		private GameObject bullet;

		private bool spawned = false;

		private GameObject bc;

		private RaycastHit hit;

		private Ray ray;

		public LayerMask mask;

		private float timeb = 1f;

		private void Awake()
		{
		}

		private void Start()
		{
		}

		private void Update()
		{
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			timeb += Time.deltaTime;
			boolet = Object.FindObjectOfType<BallisticProjectile>();
			if ((Object)(object)boolet != (Object)null)
			{
				bullet = ((Component)boolet).gameObject;
			}
			if ((Object)(object)boolet == (Object)null)
			{
			}
			if ((Object)(object)bullet != (Object)null && !spawned)
			{
				if (timeb >= 1f)
				{
					ray = new Ray(bullet.transform.position, bullet.transform.forward);
					if (Physics.Raycast(ray, ref hit, 2000f, LayerMask.op_Implicit(mask)) && ((Object)((Component)((RaycastHit)(ref hit)).collider).gameObject).name == "Geo_Head")
					{
						Time.timeScale = Mathf.Clamp(0.0001f, 0.0001f, 1f);
						Time.fixedDeltaTime = Time.timeScale / SteamVR.instance.hmd_DisplayFrequency;
						bc = Object.Instantiate<GameObject>(booletcam, bullet.transform.localPosition, Quaternion.identity);
						bc.transform.parent = bullet.transform;
						bc.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
						timeb = 0f;
					}
				}
				if (!(timeb < 1f))
				{
				}
			}
			if (spawned)
			{
			}
			if ((Object)(object)bc == (Object)null)
			{
				spawned = false;
			}
			if ((Object)(object)bc != (Object)null)
			{
				spawned = true;
			}
		}
	}
	public class ClosedBoltDoubleSideHandleRot : MonoBehaviour
	{
		public GameObject LeftHandle;

		public GameObject RightHandle;

		public FVRInteractiveObject bolt;

		private void Start()
		{
		}

		private void Update()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: 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_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: 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)
			if ((Object)(object)bolt.m_hand != (Object)null)
			{
				if (Vector3.Distance(((Component)bolt.m_hand).transform.position, LeftHandle.transform.position) > Vector3.Distance(((Component)bolt.m_hand).transform.position, RightHandle.transform.position))
				{
					RightHandle.transform.localEulerAngles = new Vector3(0f, 90f, 0f);
					LeftHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				}
				else if (Vector3.Distance(((Component)bolt.m_hand).transform.position, LeftHandle.transform.position) < Vector3.Distance(((Component)bolt.m_hand).transform.position, RightHandle.transform.position))
				{
					LeftHandle.transform.localEulerAngles = new Vector3(0f, 270f, 0f);
					RightHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				}
				else if (Vector3.Distance(((Component)bolt.m_hand).transform.position, LeftHandle.transform.position) == Vector3.Distance(((Component)bolt.m_hand).transform.position, RightHandle.transform.position))
				{
					LeftHandle.transform.localEulerAngles = new Vector3(0f, 270f, 0f);
					RightHandle.transform.localEulerAngles = new Vector3(0f, 90f, 0f);
				}
			}
			else if ((Object)(object)bolt.m_hand == (Object)null)
			{
				LeftHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				RightHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
		}
	}
	public class ClosedBoltHandleLock : ClosedBoltHandle
	{
		private bool isLocked = false;

		private bool springread = false;

		private float springh;

		private float springb;

		private void Update()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			if (!(Vector3.Distance(((Component)this).gameObject.transform.position, base.Point_Rear.position) < 0.01f) || !((Object)(object)((FVRInteractiveObject)this).m_hand != (Object)null))
			{
				return;
			}
			if (!isLocked)
			{
				if ((((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed) || (!((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed))
				{
					if (!springread)
					{
						springh = base.Speed_Forward;
						springb = base.Weapon.Bolt.Speed_Forward;
						springread = true;
					}
					base.Speed_Forward = 0f;
					base.Weapon.Bolt.Speed_Forward = 0f;
					base.Weapon.Bolt.LockBolt();
					base.CurPos = (HandlePos)2;
					base.Weapon.Bolt.CurPos = (BoltPos)2;
					((FVRInteractiveObject)this).ForceBreakInteraction();
					isLocked = true;
				}
				if (((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed && !((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed)
				{
					if (springread)
					{
						base.Speed_Forward = springh;
						base.Weapon.Bolt.Speed_Forward = springb;
						base.CurPos = (HandlePos)0;
						base.Weapon.Bolt.ReleaseBolt();
						base.Weapon.Bolt.CurPos = (BoltPos)0;
						springread = false;
					}
					isLocked = false;
				}
			}
			else
			{
				if (!isLocked)
				{
					return;
				}
				if ((((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed) || (!((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed))
				{
					if (!springread)
					{
						springh = base.Speed_Forward;
						springb = base.Weapon.Bolt.Speed_Forward;
						springread = true;
					}
					base.Speed_Forward = 0f;
					base.Weapon.Bolt.Speed_Forward = 0f;
					base.CurPos = (HandlePos)2;
					base.Weapon.Bolt.LockBolt();
					base.Weapon.Bolt.CurPos = (BoltPos)2;
					((FVRInteractiveObject)this).ForceBreakInteraction();
					isLocked = true;
				}
				if (((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed && !((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed)
				{
					if (springread)
					{
						base.Speed_Forward = springh;
						base.Weapon.Bolt.Speed_Forward = springb;
						base.CurPos = (HandlePos)0;
						base.Weapon.Bolt.ReleaseBolt();
						base.Weapon.Bolt.CurPos = (BoltPos)0;
						springread = false;
					}
					isLocked = false;
				}
			}
		}
	}
	public class CylinderEject : MonoBehaviour
	{
		private float deltaang;

		private int chambersPassed = 0;

		public Rigidbody gunrig;

		public GameObject cylinder;

		public AudioEvent click;

		public GameObject loadinggate;

		public GameObject EjectRod;

		public Transform EjcetRodrear;

		public Transform CylinderEjectPos;

		public List<FVRFireArmChamber> chambers;

		public SingleActionRevolver gun;

		public Collider Rod;

		public bool slapped = false;

		public GameObject Weights;

		public GameObject WeightsRoot;

		public GameObject follow;

		public float decelerationPerChamber = 0.5f;

		public FVRViveHand prehand;

		private float currentSpeed;

		private bool isSpinning = false;

		private float previousAngle;

		public Mac11_Stock stock;

		public Transform slapdir;

		public Vector3 velLinearWorld;

		private void Start()
		{
			//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)
			previousAngle = ((Component)this).transform.localEulerAngles.y;
		}

		private void Update()
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Invalid comparison between Unknown and I4
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_039a: Unknown result type (might be due to invalid IL or missing references)
			//IL_039f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_057c: 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_0596: Unknown result type (might be due to invalid IL or missing references)
			//IL_05aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_05af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_068a: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: 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_06a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0491: Unknown result type (might be due to invalid IL or missing references)
			//IL_049c: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0851: Unknown result type (might be due to invalid IL or missing references)
			//IL_0876: Unknown result type (might be due to invalid IL or missing references)
			//IL_06db: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0915: Unknown result type (might be due to invalid IL or missing references)
			//IL_091a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0706: Unknown result type (might be due to invalid IL or missing references)
			//IL_070b: Unknown result type (might be due to invalid IL or missing references)
			//IL_071a: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Unknown result type (might be due to invalid IL or missing references)
			//IL_061f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0624: Unknown result type (might be due to invalid IL or missing references)
			//IL_097d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0641: Unknown result type (might be due to invalid IL or missing references)
			//IL_0646: Unknown result type (might be due to invalid IL or missing references)
			//IL_064b: Unknown result type (might be due to invalid IL or missing references)
			//IL_074a: Unknown result type (might be due to invalid IL or missing references)
			//IL_074f: Unknown result type (might be due to invalid IL or missing references)
			//IL_076c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0771: Unknown result type (might be due to invalid IL or missing references)
			//IL_0776: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null)
			{
				velLinearWorld = ((FVRInteractiveObject)gun).m_hand.OtherHand.Input.VelLinearWorld;
			}
			if (loadinggate.transform.localEulerAngles.x > 45f && !slapped && (Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null && Vector3.Distance(((FVRInteractiveObject)gun).m_hand.OtherHand.PalmTransform.position, slapdir.position) < 0.15f && Vector3.Angle(velLinearWorld, slapdir.forward) < 60f && ((Vector3)(ref velLinearWorld)).magnitude > 1f)
			{
				prehand = ((FVRInteractiveObject)gun).m_hand;
				currentSpeed = 1000f * ((Vector3)(ref velLinearWorld)).magnitude;
				isSpinning = true;
				slapped = true;
			}
			if ((int)GM.Options.ControlOptions.CCM == 1)
			{
				if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null)
				{
					if (!((FVRInteractiveObject)gun).m_hand.Input.BYButtonPressed)
					{
						gun.m_isSpinning = false;
					}
					else if (((FVRInteractiveObject)gun).m_hand.Input.BYButtonPressed)
					{
						gun.m_isSpinning = true;
					}
				}
				else if ((Object)(object)((FVRInteractiveObject)gun).m_hand == (Object)null)
				{
					gun.m_isSpinning = false;
				}
			}
			if (Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[0]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[1]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[2]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[3]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[4]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[5]).gameObject.transform.position) > 0.0015f)
			{
				EjectRod.transform.localPosition = new Vector3(0f, 0f, 0f);
			}
			if ((Object)(object)prehand == (Object)null)
			{
			}
			if (EjectRod.transform.localPosition.z < 0f && (Object)(object)((FVRInteractiveObject)stock).m_hand == (Object)null)
			{
				EjectRod.transform.localPosition = new Vector3(0f, 0f, EjectRod.transform.localPosition.z + Time.deltaTime);
			}
			if (EjectRod.transform.localPosition.z > 0f)
			{
				EjectRod.transform.localPosition = new Vector3(0f, 0f, 0f);
			}
			if (loadinggate.transform.localEulerAngles.x > 45f)
			{
				gun.m_isStateToggled = true;
				foreach (FVRFireArmChamber chamber in chambers)
				{
					if (Vector3.Distance(((Component)chamber).transform.position, CylinderEjectPos.position) < 0.0015f)
					{
						chamber.IsAccessible = true;
						chamber.IsManuallyChamberable = true;
					}
					else if (Vector3.Distance(((Component)chamber).transform.position, CylinderEjectPos.position) > 0.0015f)
					{
						chamber.IsAccessible = true;
						chamber.IsManuallyChamberable = false;
					}
				}
			}
			else if (loadinggate.transform.localEulerAngles.x < 45f)
			{
				gun.m_isStateToggled = false;
				foreach (FVRFireArmChamber chamber2 in chambers)
				{
					chamber2.IsAccessible = true;
					chamber2.IsManuallyChamberable = false;
				}
			}
			follow.transform.position = Weights.transform.position;
			if (follow.transform.localPosition.z < WeightsRoot.transform.localPosition.z)
			{
				foreach (FVRFireArmChamber chamber3 in chambers)
				{
					if (Vector3.Distance(((Component)chamber3).transform.position, CylinderEjectPos.position) < 0.0015f && (Object)(object)chamber3.m_round != (Object)null && loadinggate.transform.localEulerAngles.x > 45f)
					{
						chamber3.EjectRound(((FVRInteractiveObject)chamber3).PoseOverride.position, Vector3.zero, Vector3.zero, false);
					}
				}
			}
			else if (follow.transform.localPosition.z >= WeightsRoot.transform.localPosition.z)
			{
				foreach (FVRFireArmChamber chamber4 in chambers)
				{
					if (Vector3.Distance(((Component)chamber4).transform.position, CylinderEjectPos.position) < 0.0015f && EjectRod.transform.localPosition.z < EjcetRodrear.localPosition.z && (Object)(object)chamber4.m_round != (Object)null && loadinggate.transform.localEulerAngles.x > 45f)
					{
						chamber4.EjectRound(((FVRInteractiveObject)chamber4).PoseOverride.position, Vector3.zero, Vector3.zero, false);
					}
				}
			}
			if (EjectRod.transform.localEulerAngles.z < EjcetRodrear.localEulerAngles.z)
			{
				isSpinning = false;
			}
			if (!isSpinning)
			{
				return;
			}
			if (prehand.Input.GripPressed)
			{
				gunrig.useGravity = false;
				gunrig.isKinematic = true;
				prehand.Display_Controller.SetActive(false);
				((FVRInteractiveObject)gun).ForceBreakInteraction();
				((Component)gun).gameObject.transform.position = ((Component)prehand).transform.position;
				((Component)gun).gameObject.transform.eulerAngles = ((Component)prehand).transform.eulerAngles;
			}
			else if (!prehand.Input.GripPressed)
			{
				slapped = false;
				gunrig.useGravity = true;
				gunrig.isKinematic = false;
				prehand.Display_Controller.SetActive(true);
				isSpinning = false;
				prehand = null;
			}
			float deltaTime = Time.deltaTime;
			float num = currentSpeed * deltaTime;
			cylinder.transform.Rotate(0f, 0f, num, (Space)1);
			float z = cylinder.transform.localEulerAngles.z;
			deltaang = Mathf.DeltaAngle(previousAngle, z);
			if (deltaang >= 60f)
			{
				previousAngle = z;
				deltaang = 0f;
				chambersPassed++;
				SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position);
			}
			if (chambersPassed > 0)
			{
				currentSpeed -= decelerationPerChamber * (float)chambersPassed;
				if (currentSpeed <= 0f)
				{
					chambersPassed = 0;
					previousAngle = z;
					gunrig.useGravity = true;
					gunrig.isKinematic = false;
					currentSpeed = 0f;
					isSpinning = false;
					SnapToNearestChamber();
					prehand.ForceSetInteractable((FVRInteractiveObject)(object)gun);
					((FVRInteractiveObject)gun).BeginInteraction(prehand);
					prehand = null;
					slapped = false;
				}
			}
		}

		private void SnapToNearestChamber()
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			float num = deltaang;
			if (num != 0f)
			{
				float num2 = ((!(num < 30f)) ? (60f - num) : (0f - num));
				cylinder.transform.Rotate(0f, 0f, cylinder.transform.localEulerAngles.z + num2, (Space)1);
			}
		}
	}
	public class Lookat : MonoBehaviour
	{
		public GameObject mark;

		public Transform nearestAI;

		public SosigLink[] currentAI = null;

		public GameObject lookAtObj;

		public LAPD2019Laser laser;

		public Transform player;

		private void OnTriggerEnter(Collider other)
		{
			currentAI = ((Component)other).gameObject.GetComponents<SosigLink>();
		}

		private void Update()
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			if (currentAI == null || (Object)(object)nearestAI == (Object)null)
			{
				laser.TurnOff();
				mark.SetActive(false);
				mark.transform.localPosition = new Vector3(0f, 0f, 0f);
				lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
			if ((Object)(object)nearestAI != (Object)null)
			{
				laser.TurnOn();
				mark.SetActive(true);
				mark.transform.position = ((Component)nearestAI).transform.position;
				AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward);
			}
			AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward);
			if (currentAI != null)
			{
				nearestAI = GetNearestGameObject(player, currentAI);
			}
		}

		private void AxisLookAt(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_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: 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, tr_self.localEulerAngles.y, 0f);
		}

		public Transform GetNearestGameObject(Transform player, SosigLink[] objects)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			Transform val = null;
			if (objects == null || (Object)(object)val == (Object)null)
			{
			}
			if (objects.Length > 0)
			{
				val = ((Component)objects[0]).transform;
				float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position);
				for (int i = 1; i < objects.Length; 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 Slotarea : MonoBehaviour
	{
		public GameObject parent;

		public void OnTriggerStay(Collider other)
		{
			//IL_002d: 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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			GameObject gameObject = ((Component)other).gameObject;
			FVRPhysicalObject component = gameObject.GetComponent<FVRPhysicalObject>();
			if (!((Object)(object)component != (Object)null) || !((Object)(object)gameObject != (Object)(object)parent) || (int)component.QBSlotType != 0 || ((FVRInteractiveObject)component).m_isHeld || !((Object)(object)component.m_quickbeltSlot == (Object)null))
			{
				return;
			}
			float num = Vector3.Distance(((Component)component).transform.position, ((Component)GM.CurrentPlayerBody.LeftHand).transform.position);
			float num2 = Vector3.Distance(((Component)component).transform.position, ((Component)GM.CurrentPlayerBody.RightHand).transform.position);
			if (num < 0.25f || num2 < 0.25f)
			{
				Rigidbody component2 = gameObject.GetComponent<Rigidbody>();
				if ((Object)(object)component2 != (Object)null)
				{
					gameObject.transform.SetParent(parent.transform);
					component2.useGravity = false;
					component2.isKinematic = true;
				}
			}
		}

		public void OnTriggerExit(Collider other)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			GameObject gameObject = ((Component)other).gameObject;
			FVRPhysicalObject component = gameObject.GetComponent<FVRPhysicalObject>();
			if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && (int)component.QBSlotType == 0 && ((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null)
			{
				Rigidbody component2 = gameObject.GetComponent<Rigidbody>();
				if ((Object)(object)component2 != (Object)null)
				{
					gameObject.transform.SetParent(parent.transform);
					component2.useGravity = true;
					component2.isKinematic = false;
				}
			}
		}

		private void Update()
		{
		}
	}
	public class DynamoFlashLight : MonoBehaviour
	{
		public float magnith = 2.5f;

		public float pullmag = 25000f;

		public Collider col;

		public GameObject r0;

		public AudioEvent AudioSt;

		public GameObject Audio;

		public AudioSource Audios;

		public Rigidbody R;

		public RotateOverTime Magni;

		public RotateOverTime Magni2;

		public Rigidbody str1;

		public Rigidbody str2;

		public Rigidbody ring;

		public Rigidbody base1;

		public Rigidbody base2;

		public GameObject ringobj;

		public GameObject ringbase;

		public Light spotlight;

		public Material MatBody;

		public Material MatLens;

		public FVRPhysicalObject Mainobj;

		public FVRPhysicalObject Pullobj;

		public float MovSpeed;

		public float LocalVel;

		public float LastAV;

		public bool pulled = false;

		public float weight = 0f;

		private void Start()
		{
			pulled = false;
			Audio.SetActive(false);
			MatBody.SetFloat("_EmissionWeight", 0f);
			MatLens.SetFloat("_EmissionWeight", 0f);
			spotlight.intensity = 0f;
			Magni.angularVelocity.x = 0f;
			Magni.angularVelocity.y = 0f;
			Magni.angularVelocity.z = 0f;
			Magni2.angularVelocity.x = 0f;
			Magni2.angularVelocity.y = 0f;
			Magni2.angularVelocity.z = 0f;
		}

		private void Update()
		{
			//IL_0170: 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_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			Magni2.angularVelocity.x = 0f;
			Magni2.angularVelocity.y = 0f;
			Magni2.angularVelocity.z = Magni.angularVelocity.z * 100f;
			str1.isKinematic = false;
			str2.isKinematic = false;
			ring.isKinematic = false;
			base1.isKinematic = false;
			base2.isKinematic = false;
			if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand == (Object)null)
			{
				col.enabled = false;
			}
			else if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand != (Object)null)
			{
				col.enabled = true;
			}
			if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand == (Object)null || (Object)(object)((FVRInteractiveObject)Pullobj).m_hand == (Object)null)
			{
				LocalVel = 0f;
				LastAV = 0f;
			}
			else if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand != (Object)null && (Object)(object)((FVRInteractiveObject)Pullobj).m_hand != (Object)null)
			{
				r0.transform.localEulerAngles = new Vector3(0f, 0f, Vector3.Distance(ringobj.transform.position, ringbase.transform.position) * 5000f);
				LocalVel = (Vector3.Distance(ringobj.transform.position, ringbase.transform.position) - LastAV) * Time.deltaTime;
				LastAV = LocalVel;
				LocalVel = (Vector3.Distance(ringobj.transform.position, ringbase.transform.position) - LastAV) * Time.deltaTime;
				LastAV = LocalVel;
				if (LocalVel > magnith)
				{
					Magni.angularVelocity.x = 0f;
					Magni.angularVelocity.y = 0f;
					Magni.angularVelocity.z = Magni.angularVelocity.z + LocalVel * pullmag * Time.deltaTime;
				}
			}
			spotlight.intensity = Magni.angularVelocity.z * 0.025f;
			weight = spotlight.intensity * 0.4f;
			if (weight > 1f)
			{
				weight = 1f;
			}
			else if (weight < 0f)
			{
				weight = 0f;
			}
			MatBody.SetFloat("_EmissionWeight", weight);
			MatLens.SetFloat("_EmissionWeight", weight);
			if (spotlight.intensity > 3f)
			{
				spotlight.intensity = 3f;
			}
			else if (spotlight.intensity < 0f)
			{
				spotlight.intensity = 0f;
			}
			if (Magni.angularVelocity.z > 0f)
			{
				Audio.SetActive(true);
				Audios.volume = Magni.angularVelocity.z * 0.1f;
				Audios.pitch = 0.1f + Magni.angularVelocity.z * 0.01f;
			}
			else if (Magni.angularVelocity.z <= 0f)
			{
				Audio.SetActive(false);
				Audios.pitch = 0f;
				Audios.volume = 0f;
			}
			else if (Magni.angularVelocity.z > 1000f)
			{
				Magni.angularVelocity.z = 1000f;
			}
			if (Magni.angularVelocity.z > 0f)
			{
				Magni.angularVelocity.z = Magni.angularVelocity.z - 2.5f * Time.deltaTime;
			}
			else if (Magni.angularVelocity.z < 0f)
			{
				Magni.angularVelocity.z = 0f;
			}
			if (Audios.volume > 1f)
			{
				Audios.volume = 1f;
			}
			else if (Audios.volume < 0f)
			{
				Audios.volume = 0f;
			}
			if (Audios.pitch > 2f)
			{
				Audios.pitch = 2f;
			}
			if (Audios.pitch < 0f)
			{
				Audios.pitch = 0f;
			}
		}

		private void OnDestroy()
		{
			Object.Destroy((Object)(object)((Component)str1).gameObject);
			Object.Destroy((Object)(object)((Component)str2).gameObject);
			Object.Destroy((Object)(object)((Component)ring).gameObject);
			Object.Destroy((Object)(object)((Component)R).gameObject);
			Object.Destroy((Object)(object)((Component)base1).gameObject);
			Object.Destroy((Object)(object)((Component)base2).gameObject);
		}
	}
}
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
public class DeferredNightVisionEffect : MonoBehaviour
{
	[SerializeField]
	[Tooltip("The main color of the NV effect")]
	public Color m_NVColor = new Color(0f, 1f, 0.1724138f, 0f);

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

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

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

	private Material m_Material;

	private Shader m_Shader;

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

	public Shader NightVisionShader => m_Shader;

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

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

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

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

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

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

	public void ReloadShaders()
	{
		OnDisable();
	}

	private void OnRenderImage(RenderTexture source, RenderTexture destination)
	{
		UpdateShaderValues();
		CreateMaterials();
		Graphics.Blit((Texture)(object)source, destination, m_Material);
	}
}
namespace JerryComponent
{
	public class DoomReload : MonoBehaviour
	{
		public BreakActionWeapon Gun;

		public Rigidbody rig;

		public FVRFireArmChamber L;

		public FVRFireArmChamber R;

		public Transform Leject;

		public Transform Reject;

		public GameObject AnimationBase;

		public Transform AnimationRootPos;

		[NonSerialized]
		private FVRFireArmRound LR;

		[NonSerialized]
		private FVRFireArmRound RR;

		public GameObject close;

		public GameObject open;

		public GameObject insert;

		public Transform Ani1;

		public Transform Ani2;

		public Transform Ani3;

		public Transform Ani4;

		public Transform Ani5;

		public Transform Ani6;

		public Transform Ani7;

		public Transform AniBase;

		public bool isCheeki = false;

		public bool isCheekiReload = false;

		public float cd = 4f;

		public GameObject fore;

		private void Start()
		{
			if ((Object)(object)LR == (Object)null)
			{
				LR = L.m_round;
			}
			if ((Object)(object)RR == (Object)null)
			{
				RR = R.m_round;
			}
		}

		private void Update()
		{
			//IL_003f: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: 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_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_0459: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: 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_053c: 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_05a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0716: Unknown result type (might be due to invalid IL or missing references)
			//IL_073b: 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_0609: Unknown result type (might be due to invalid IL or missing references)
			//IL_0619: Unknown result type (might be due to invalid IL or missing references)
			//IL_0629: Unknown result type (might be due to invalid IL or missing references)
			//IL_062e: Unknown result type (might be due to invalid IL or missing references)
			//IL_063e: 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_0653: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0824: Unknown result type (might be due to invalid IL or missing references)
			//IL_084d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0682: Unknown result type (might be due to invalid IL or missing references)
			//IL_0692: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b7: 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_094b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0970: Unknown result type (might be due to invalid IL or missing references)
			//IL_0999: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0914: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)LR == (Object)null || (Object)(object)RR == (Object)null)
			{
			}
			AnimationBase.transform.localPosition = new Vector3(0f, 0f, 0f);
			AnimationBase.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			if (((FVRInteractiveObject)Gun).m_isHeld)
			{
				if ((Vector3.Distance(GM.CurrentMovementManager.Head.position, ((Component)((FVRInteractiveObject)Gun).m_hand).gameObject.transform.position) <= 0.25f && Gun.m_isLatched) || (isCheekiReload && Gun.m_isLatched))
				{
					isCheeki = true;
				}
				else if ((Vector3.Distance(GM.CurrentMovementManager.Head.position, ((Component)((FVRInteractiveObject)Gun).m_hand).gameObject.transform.position) > 0.25f && !isCheekiReload) || !Gun.m_isLatched)
				{
					isCheeki = false;
				}
			}
			if (isCheeki)
			{
				rig.useGravity = false;
				rig.isKinematic = true;
				AnimationBase.transform.SetParent(((Component)GM.CurrentMovementManager.Head).transform);
				Gun.m_hasLatchButton = false;
				if (!isCheekiReload)
				{
					fore.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
					((Component)Gun).gameObject.transform.position = ((Component)AniBase).transform.position;
					((Component)Gun).gameObject.transform.eulerAngles = ((Component)AniBase).transform.eulerAngles;
				}
				if (L.IsSpent && R.IsSpent)
				{
					if ((Object)(object)LR == (Object)null)
					{
						LR = L.m_round;
					}
					if ((Object)(object)RR == (Object)null)
					{
						RR = R.m_round;
					}
					if ((Object)(object)LR != (Object)null && (Object)(object)RR != (Object)null)
					{
						isCheekiReload = true;
					}
				}
			}
			else if (!isCheeki)
			{
				rig.useGravity = true;
				rig.isKinematic = false;
				AnimationBase.transform.SetParent(AnimationRootPos);
				Gun.m_hasLatchButton = true;
			}
			if (!isCheekiReload)
			{
				if ((Object)(object)LR != (Object)null)
				{
					LR = null;
				}
				if ((Object)(object)RR != (Object)null)
				{
					RR = null;
				}
				open.SetActive(false);
				close.SetActive(false);
				insert.SetActive(false);
			}
			if (!isCheekiReload)
			{
				return;
			}
			isCheeki = true;
			cd -= 2f * Time.deltaTime;
			if (cd < 4f && cd > 3.5f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)Ani1).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani1).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
			if (cd < 3.5f && cd > 2.5f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)Ani2).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani2).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
			if (cd < 2.5f && cd > 2f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)Ani3).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani3).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
			if (cd < 2f && cd > 1.5f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)Ani4).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani4).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(75f, 0f, 0f);
				open.SetActive(true);
				if (L.IsFull)
				{
					L.EjectRound(((Component)L).transform.position + ((Component)L).transform.forward * Gun.EjectOffset, ((Component)L).transform.forward * Gun.EjectSpeed, Vector3.right, false);
				}
				if (R.IsFull)
				{
					R.EjectRound(((Component)R).transform.position + ((Component)R).transform.forward * Gun.EjectOffset, ((Component)R).transform.forward * Gun.EjectSpeed, Vector3.right, false);
				}
			}
			if (cd < 1.5f && cd > 1f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)Ani5).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani5).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(75f, 0f, 0f);
				insert.SetActive(true);
				if (!L.IsFull)
				{
					L.SetRound(LR, false);
				}
				if (!R.IsFull)
				{
					R.SetRound(RR, false);
				}
			}
			if (cd < 1f && cd > 0.5f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)Ani6).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani6).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				close.SetActive(true);
				Gun.Barrels[0].m_isHammerCocked = true;
				Gun.Barrels[1].m_isHammerCocked = true;
			}
			if (cd < 0.5f && cd > 0f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)Ani7).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani7).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
			if (cd < 0f)
			{
				((Component)Gun).gameObject.transform.position = ((Component)AniBase).transform.position;
				((Component)Gun).gameObject.transform.eulerAngles = ((Component)AniBase).transform.eulerAngles;
				fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				cd = 4f;
				isCheekiReload = false;
			}
		}
	}
	public class guitarreset : MonoBehaviour
	{
		public AudioSource song;

		public GameObject rot;

		private bool is45 = false;

		private void Start()
		{
		}

		private void over45()
		{
			if (is45)
			{
				song.Stop();
			}
			is45 = false;
		}

		private void under45()
		{
			if (!is45)
			{
				song.Play();
				song.Pause();
			}
			is45 = true;
		}

		private void Update()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			if (rot.transform.localEulerAngles.x > 45f)
			{
				over45();
			}
			if (rot.transform.localEulerAngles.x < 45f)
			{
				under45();
			}
		}
	}
	public class guitarscript : MonoBehaviour
	{
		public GameObject reset;

		public AudioSource song;

		public GameObject resetvolume;

		private bool slaponce;

		private void Start()
		{
		}

		private void OnTriggerEnter(Collider other)
		{
			slaponce = true;
		}

		private void Update()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: 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_0091: 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_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_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: 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)
			if (reset.transform.localEulerAngles.x > 15f)
			{
				resetvolume.SetActive(true);
				resetvolume.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				if (resetvolume.transform.localEulerAngles.x > 25f)
				{
					resetvolume.transform.localEulerAngles = new Vector3(25f, 0f, 0f);
					resetvolume.SetActive(false);
				}
			}
			if (reset.transform.localEulerAngles.x < 15f)
			{
				resetvolume.SetActive(false);
				resetvolume.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			}
			if (reset.transform.localEulerAngles.x < 25f)
			{
				song.UnPause();
			}
			if (reset.transform.localEulerAngles.x > 25f)
			{
				reset.transform.localEulerAngles = new Vector3(25f, 0f, 0f);
			}
			if (reset.transform.localEulerAngles.x >= 25f)
			{
				song.Pause();
			}
			song.volume = 1f - resetvolume.transform.localEulerAngles.x * 0.04f;
			if (slaponce)
			{
				reset.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
				slaponce = false;
			}
		}
	}
	public class guitarslap : MonoBehaviour
	{
		public GameObject slide;

		public AudioSource asa1;

		public AudioSource asa2;

		private void Start()
		{
		}

		private void Update()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			asa1.pitch = slide.transform.localPosition.z;
			asa2.pitch = slide.transform.localPosition.z;
		}
	}
	public class guitarslap2 : MonoBehaviour
	{
		public int start = 0;

		public SphereCollider cols;

		public int[] notes1;

		public int[] notes2;

		public int[] notes3;

		public int[] notes4;

		public AudioEvent[] clips;

		public GameObject foregrip;

		public GameObject hold1;

		public GameObject hold2;

		public GameObject hold3;

		public GameObject hold4;

		public Transform pos;

		private void Start()
		{
		}

		private void OnTriggerEnter(Collider col)
		{
			//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)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			col = (Collider)(object)cols;
			if (hold1.transform.localEulerAngles.x < 45f && hold2.transform.localEulerAngles.x < 45f && hold3.transform.localEulerAngles.x < 45f && hold4.transform.localEulerAngles.x < 45f)
			{
				SM.PlayGenericSound(clips[0], pos.localPosition);
				start = 0;
			}
			if ((hold1.transform.localEulerAngles.x > 45f && notes1[start] == 0) || (hold2.transform.localEulerAngles.x > 45f && notes2[start] == 0) || (hold3.transform.localEulerAngles.x > 45f && notes3[start] == 0) || (hold4.transform.localEulerAngles.x > 45f && notes4[start] == 0))
			{
				start = 0;
			}
			if (hold1.transform.localEulerAngles.x > 45f)
			{
				foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes1[start]);
				SM.PlayGenericSound(clips[notes1[start]], pos.localPosition);
				start++;
			}
			if (hold2.transform.localEulerAngles.x > 45f)
			{
				foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes2[start]);
				SM.PlayGenericSound(clips[notes2[start]], pos.localPosition);
				start++;
			}
			if (hold3.transform.localEulerAngles.x > 45f)
			{
				foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes3[start]);
				SM.PlayGenericSound(clips[notes3[start]], pos.localPosition);
				start++;
			}
			if (hold4.transform.localEulerAngles.x > 45f)
			{
				foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes4[start]);
				SM.PlayGenericSound(clips[notes4[start]], pos.localPosition);
				start++;
			}
		}

		private void FixedUpdate()
		{
		}

		private void Update()
		{
		}
	}
	public class LebelHandle : MonoBehaviour
	{
		public Mac11_Stock fakeboltt;

		public BoltActionRifle_Handle realbolt;

		public GameObject rot;

		public GameObject fakebolt;

		public FVRAlternateGrip foregrip;

		private GameObject _player = null;

		private FVRViveHand leftHand = null;

		private FVRViveHand rightHand = null;

		public bool istransfterd = true;

		private void Awake()
		{
			_player = ((Component)Object.FindObjectOfType<FVRPlayerBody>()).gameObject;
		}

		private void Start()
		{
			leftHand = ((Component)_player.transform.Find("Controller (left)")).GetComponent<FVRViveHand>();
			rightHand = ((Component)_player.transform.Find("Controller (right)")).GetComponent<FVRViveHand>();
		}

		private void BoltTransfer()
		{
			if (!istransfterd)
			{
				((FVRInteractiveObject)fakeboltt).EndInteraction(rightHand);
				rightHand.ForceSetInteractable((FVRInteractiveObject)(object)realbolt);
				((FVRInteractiveObject)realbolt).BeginInteraction(rightHand);
				istransfterd = true;
			}
			if (!istransfterd)
			{
			}
		}

		private void Update()
		{
			if (!fakebolt.activeInHierarchy)
			{
				BoltTransfer();
			}
			if (fakebolt.activeInHierarchy)
			{
				istransfterd = false;
			}
			if (!((Object)(object)_player == (Object)null) && !((Object)(object)leftHand == (Object)null) && !((Object)(object)rightHand == (Object)null))
			{
			}
		}
	}
	public class LeverActionHandle : MonoBehaviour
	{
		public LeverActionFirearm LAF;

		public FVRAlternateGrip LAFFore;

		public FVRFireArmChamber chamber;

		public FVRPhysicalObject lever;

		public FVRPhysicalObject leverfore;

		public Collider levercol;

		public Collider forecol;

		public Collider LAFcol;

		public Collider LAFforecol;

		public HingeJoint HJ;

		public JointLimits JL;

		private void Start()
		{
			//IL_0028: 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)
			((JointLimits)(ref JL)).max = 0f;
			((JointLimits)(ref JL)).min = 0f;
			LAF.m_curLeverPos = (ZPos)2;
			LAF.m_lastLeverPos = (ZPos)2;
		}

		private void Update()
		{
			//IL_0008: 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_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: 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_0096: 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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			HJ.limits = JL;
			if (((Component)lever).transform.localEulerAngles.x < 15f && ((Component)lever).transform.localEulerAngles.x >= 10f)
			{
				LAF.m_curLeverPos = (ZPos)2;
			}
			else if (((Component)lever).transform.localEulerAngles.x < 50f && ((Component)lever).transform.localEulerAngles.x > 40f)
			{
				LAF.m_curLeverPos = (ZPos)1;
			}
			else if (((Component)lever).transform.localEulerAngles.x <= 78f && ((Component)lever).transform.localEulerAngles.x > 73f)
			{
				LAF.m_curLeverPos = (ZPos)0;
			}
			LAF.m_lastLeverPos = LAF.m_curLeverPos;
			if ((Object)(object)((FVRInteractiveObject)LAF).m_hand != (Object)null)
			{
				if ((Object)(object)((FVRInteractiveObject)leverfore).m_hand != (Object)null)
				{
					((FVRInteractiveObject)LAFFore).BeginInteraction(((FVRInteractiveObject)leverfore).m_hand);
					((FVRInteractiveObject)leverfore).ForceBreakInteraction();
				}
				if ((Object)(object)((FVRInteractiveObject)LAFFore).m_hand == (Object)null)
				{
					if (chamber.IsFull && !chamber.IsSpent && !LAF.m_isLeverReleasePressed)
					{
						levercol.enabled = false;
						forecol.enabled = false;
						LAFcol.enabled = true;
						LAFforecol.enabled = true;
						((JointLimits)(ref JL)).max = 0f;
					}
					else if (!chamber.IsFull || chamber.IsSpent || LAF.m_isLeverReleasePressed)
					{
						levercol.enabled = true;
						forecol.enabled = true;
						LAFcol.enabled = false;
						LAFforecol.enabled = false;
						((FVRInteractiveObject)lever).BeginInteraction(((FVRInteractiveObject)LAF).m_hand);
						((FVRInteractiveObject)LAF).ForceBreakInteraction();
						((JointLimits)(ref JL)).max = 68f;
					}
				}
				else if ((Object)(object)((FVRInteractiveObject)LAFFore).m_hand != (Object)null)
				{
					if (chamber.IsFull && !chamber.IsSpent && !LAF.m_isLeverReleasePressed)
					{
						levercol.enabled = false;
						forecol.enabled = false;
						LAFcol.enabled = true;
						LAFforecol.enabled = true;
						((JointLimits)(ref JL)).max = 0f;
					}
					else if (!chamber.IsFull || chamber.IsSpent || LAF.m_isLeverReleasePressed)
					{
						levercol.enabled = true;
						forecol.enabled = true;
						LAFcol.enabled = false;
						LAFforecol.enabled = false;
						((FVRInteractiveObject)lever).BeginInteraction(((FVRInteractiveObject)LAF).m_hand);
						((FVRInteractiveObject)LAF).ForceBreakInteraction();
						((FVRInteractiveObject)leverfore).BeginInteraction(((FVRInteractiveObject)LAFFore).m_hand);
						((FVRInteractiveObject)LAFFore).ForceBreakInteraction();
						((JointLimits)(ref JL)).max = 68f;
					}
				}
			}
			else if ((Object)(object)((FVRInteractiveObject)lever).m_hand != (Object)null)
			{
				if ((Object)(object)((FVRInteractiveObject)LAFFore).m_hand != (Object)null)
				{
					((FVRInteractiveObject)leverfore).BeginInteraction(((FVRInteractiveObject)LAFFore).m_hand);
					((FVRInteractiveObject)LAFFore).ForceBreakInteraction();
				}
				if ((Object)(object)((FVRInteractiveObject)leverfore).m_hand == (Object)null)
				{
					if (chamber.IsFull && !chamber.IsSpent)
					{
						levercol.enabled = false;
						forecol.enabled = false;
						LAFcol.enabled = true;
						LAFforecol.enabled = true;
						((FVRInteractiveObject)LAF).BeginInteraction(((FVRInteractiveObject)lever).m_hand);
						((FVRInteractiveObject)lever).ForceBreakInteraction();
						((JointLimits)(ref JL)).max = 0f;
					}
					else if (!chamber.IsFull || chamber.IsSpent)
					{
						levercol.enabled = true;
						forecol.enabled = true;
						LAFcol.enabled = false;
						LAFforecol.enabled = false;
						((JointLimits)(ref JL)).max = 68f;
					}
				}
				else if ((Object)(object)((FVRInteractiveObject)leverfore).m_hand == (Object)null)
				{
					if (chamber.IsFull && !chamber.IsSpent)
					{
						levercol.enabled = false;
						forecol.enabled = false;
						LAFcol.enabled = true;
						LAFforecol.enabled = true;
						((FVRInteractiveObject)LAF).BeginInteraction(((FVRInteractiveObject)lever).m_hand);
						((FVRInteractiveObject)lever).ForceBreakInteraction();
						((FVRInteractiveObject)LAFFore).BeginInteraction(((FVRInteractiveObject)leverfore).m_hand);
						((FVRInteractiveObject)leverfore).ForceBreakInteraction();
						((JointLimits)(ref JL)).max = 0f;
					}
					else if (!chamber.IsFull || chamber.IsSpent)
					{
						levercol.enabled = true;
						forecol.enabled = true;
						LAFcol.enabled = false;
						LAFforecol.enabled = false;
						((JointLimits)(ref JL)).max = 68f;
					}
				}
			}
			else if ((Object)(object)((FVRInteractiveObject)lever).m_hand == (Object)null && (Object)(object)((FVRInteractiveObject)LAF).m_hand == (Object)null)
			{
				forecol.enabled = false;
				LAFforecol.enabled = true;
			}
		}
	}
	public class DshapeGrip : MonoBehaviour
	{
		public ClosedBoltWeapon gun;

		public GameObject trigL;

		public GameObject trigR;

		public GameObject magrel;

		private void Start()
		{
		}

		private void Update()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			if (trigL.transform.localEulerAngles.x > 45f || trigR.transform.localEulerAngles.x > 45f)
			{
				gun.Fire();
			}
			if (magrel.transform.localEulerAngles.x > 45f && (Object)(object)((FVRFireArm)gun).Magazine != (Object)null)
			{
				((FVRFireArm)gun).EjectMag(false);
			}
		}
	}
}
public class Bezier : MonoBehaviour
{
	public Transform[] controlPoints;

	public LineRenderer lineRenderer;

	private int _segmentNum = 50;

	private void Start()
	{
	}

	private void Update()
	{
		DrawCurve();
	}

	private void DrawCurve()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0048: 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)
		for (int i = 1; i <= _segmentNum; i++)
		{
			float t = (float)i / (float)_segmentNum;
			int num = 0;
			Vector3 val = CalculateCubicBezierPoint(t, controlPoints[num].position, controlPoints[num + 1].position, controlPoints[num + 2].position);
			lineRenderer.positionCount = i;
			lineRenderer.SetPosition(i - 1, val);
		}
	}

	private Vector3 CalculateCubicBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: 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_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: 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_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: 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_0046: Unknown result type (might be due to invalid IL or missing references)
		float num = 1f - t;
		float num2 = t * t;
		float num3 = num * num;
		Vector3 val = num3 * p0;
		val += 2f * num * t * p1;
		return val + num2 * p2;
	}
}
public class BezierUtils
{
	private static Vector3 CalculateCubicBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: 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_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: 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_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_003d: 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_0045: Unknown result type (might be due to invalid IL or missing references)
		float num = 1f - t;
		float num2 = t * t;
		float num3 = num * num;
		Vector3 val = num3 * p0;
		val += 2f * num * t * p1;
		return val + num2 * p2;
	}

	public static Vector3[] GetBeizerList(Vector3 startPoint, Vector3 controlPoint, Vector3 endPoint, int segmentNum)
	{
		//IL_0017: 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_001a: 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_0029: 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)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		Vector3[] array = (Vector3[])(object)new Vector3[segmentNum];
		for (int i = 1; i <= segmentNum; i++)
		{
			float t = (float)i / (float)segmentNum;
			Vector3 val = CalculateCubicBezierPoint(t, startPoint, controlPoint, endPoint);
			array[i - 1] = val;
			Debug.Log((object)array[i - 1]);
		}
		return array;
	}
}
namespace JerryComponent
{
	public class M9Barrel : MonoBehaviour
	{
		public Collider mountcol;

		public Collider Trigger;

		public FVRFireArmAttachmentMount mount;

		public GameObject rot;

		public Collider grabrot;

		private void Start()
		{
		}

		private void FixedUpdate()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			if (rot.transform.localEulerAngles.z >= 55f)
			{
				Trigger.enabled = true;
				mountcol.enabled = false;
				if (mount.HasAttachmentsOnIt())
				{
					((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.GetComponent<Collider>().enabled = false;
				}
			}
			else if (rot.transform.localEulerAngles.z < 55f)
			{
				Trigger.enabled = false;
				mountcol.enabled = true;
				if (mount.HasAttachmentsOnIt())
				{
					((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.GetComponent<Collider>().enabled = true;
				}
			}
			if (mount.HasAttachmentsOnIt())
			{
				grabrot.enabled = true;
			}
			else if (!mount.HasAttachmentsOnIt())
			{
				grabrot.enabled = false;
			}
		}
	}
	public class M9Rocket : MonoBehaviour
	{
		public Collider grabcol;

		public FVRPhysicalObject mainphy;

		public GameObject phys;

		public GameObject explosion;

		public GameObject explode;

		public FVRObject fuze;

		public Rigidbody lockpos;

		public GameObject fuzeFollow;

		public GameObject fuzezero;

		public GameObject fuzeobj;

		public FVRFireArmAttachment fuzehead;

		public bool isTriggered = false;

		public GameObject drag;

		public GameObject flash;

		public Rigidbody mainobj;

		public bool isChambered = false;

		public Transform lockintube;

		public AudioEvent Insert;

		public SpringJoint SJ;

		public bool changed = false;

		private void Start()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			fuzeobj = Object.Instantiate<GameObject>(((AnvilAsset)fuze).GetGameObject(), ((Component)lockpos).transform.position, ((Component)lockpos).transform.rotation);
			SJ = fuzeobj.GetComponent<SpringJoint>();
			((Joint)SJ).connectedBody = lockpos;
			fuzehead = fuzeobj.GetComponent<FVRFireArmAttachment>();
			fuzeFollow.transform.SetParent((Transform)null);
		}

		private void OnTriggerEnter(Collider other)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (((Object)((Component)other).gameObject).name == "M9TriggerZone" && !isTriggered && !isChambered)
			{
				isChambered = true;
				SM.PlayCoreSound((FVRPooledAudioType)41, Insert, ((Component)this).transform.position);
				lockintube = ((Component)other).gameObject.transform;
			}
		}

		private void Update()
		{
			//IL_0079: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: 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_0216: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)fuzeobj != (Object)null)
			{
				if ((Object)(object)fuzehead.curMount == (Object)null)
				{
					fuzeFollow.transform.position = fuzeobj.transform.position;
				}
			}
			else if ((Object)(object)fuzeobj == (Object)null)
			{
				fuzeFollow.transform.position = fuzezero.transform.position;
			}
			if ((Object)(object)fuzehead != (Object)null)
			{
				if ((Object)(object)fuzehead.curMount != (Object)null)
				{
					fuzeFollow.transform.position = ((Component)fuzehead.curMount).gameObject.transform.position;
					if ((Object)(object)((Component)fuzehead.curMount.MyObject).gameObject.GetComponent<FVRFireArm>() != (Object)null && ((Component)fuzehead.curMount.MyObject).gameObject.GetComponent<FVRFireArm>().Foregrip.gameObject.transform.localEulerAngles.x >= 45f)
					{
						isTriggered = true;
						isChambered = false;
						drag.SetActive(true);
						flash.SetActive(true);
						Object.Destroy((Object)(object)((Component)fuzehead).gameObject);
						Object.Destroy((Object)(object)((Component)lockpos).gameObject);
					}
				}
			}
			else if (!((Object)(object)fuzehead == (Object)null) && !((Object)(object)lockpos == (Object)null) && !((Object)(object)SJ == (Object)null))
			{
			}
			if (!isChambered || !isChambered)
			{
				return;
			}
			((Component)mainobj).gameObject.transform.position = lockintube.position;
			((Component)mainobj).gameObject.transform.eulerAngles = lockintube.eulerAngles;
			phys.SetActive(false);
			mainobj.useGravity = false;
			fuzeobj.transform.SetParent((Transform)null);
			if (!changed)
			{
				FVRViveHand hand = ((FVRInteractiveObject)mainphy).m_hand;
				((FVRInteractiveObject)mainphy).ForceBreakInteraction();
				grabcol.enabled = false;
				if ((Object)(object)SJ != (Object)null)
				{
					SJ.spring = 0f;
				}
				hand.ForceSetInteractable((FVRInteractiveObject)(object)fuzehead);
				((FVRInteractiveObject)fuzehead).BeginInteraction(hand);
				changed = true;
			}
		}
	}
	public class M9impact : MonoBehaviour
	{
		public M9Rocket RC;

		public Rigidbody mainObj;

		public bool isfuzed = false;

		public float cd = 0.5f;

		public Transform ForcePos;

		public bool forced = false;

		public float power = 150f;

		public GameObject FP;

		private void Start()
		{
			isfuzed = false;
		}

		private void OnCollisionEnter(Collision collision)
		{
			//IL_001e: 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_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			if (isfuzed)
			{
				Object.Instantiate<GameObject>(RC.explosion, ((Component)this).transform.position, ((Component)this).transform.rotation);
				Object.Instantiate<GameObject>(RC.explode, ((Component)this).transform.position, ((Component)this).transform.rotation);
				Object.Destroy((Object)(object)FP);
				Object.Destroy((Object)(object)RC.fuzeFollow);
				Object.Destroy((Object)(object)RC.drag);
				Object.Destroy((Object)(object)RC.flash);
				Object.Destroy((Object)(object)((Component)RC.mainobj).gameObject);
				Object.Destroy((Object)(object)((Component)RC).gameObject);
				Object.Destroy((Object)(object)((Component)this).gameObject);
				isfuzed = false;
			}
		}

		private void FixedUpdate()
		{
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)FP == (Object)null)
			{
			}
			if (RC.isTriggered)
			{
				cd -= Time.deltaTime;
				if ((Object)(object)RC.fuzehead != (Object)null)
				{
					RC.fuzehead.DetachFromMount();
					Object.Destroy((Object)(object)((Component)RC.fuzehead).gameObject);
				}
			}
			if (cd <= 0f)
			{
				isfuzed = true;
				if ((Object)(object)FP.GetComponent<Rigidbody>() != (Object)null)
				{
					RC.phys.SetActive(true);
					FP.GetComponent<Rigidbody>().useGravity = true;
				}
			}
			else if (cd > 0f && RC.isTriggered && !forced)
			{
				FP = new GameObject("FP");
				FP.transform.position = ((Component)ForcePos).transform.position;
				FP.transform.eulerAngles = ((Component)ForcePos).transform.eulerAngles;
				FixedJoint val = FP.AddComponent<FixedJoint>();
				((Joint)val).connectedBody = mainObj;
				Rigidbody component = FP.GetComponent<Rigidbody>();
				component.useGravity = false;
				component.AddRelativeForce(Vector3.forward * power, (ForceMode)1);
				forced = true;
			}
		}
	}
	public class PreSpawn : MonoBehaviour
	{
		public FVRFireArmAttachmentMount mount;

		public FVRObject Tube;

		public GameObject TubeObj;

		public Transform pos;

		private void Start()
		{
			//IL_0029: 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)
			if (!mount.HasAttachmentsOnIt())
			{
				TubeObj = Object.Instantiate<GameObject>(((AnvilAsset)Tube).GetGameObject(), ((Component)pos).transform.position, ((Component)pos).transform.rotation);
				TubeObj.GetComponent<FVRFireArmAttachment>().AttachToMount(mount, false);
			}
		}
	}
	public class RearGrip : MonoBehaviour
	{
		public FVRInteractiveObject grab;

		public GameObject MainObj;

		public Rigidbody mainrig;

		public Vector3 posspeed;

		public Vector3 angspeed;

		private void Start()
		{
		}

		private void FixedUpdate()
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or mis