using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using FistVR; using HarmonyLib; using OtherLoader; using ToxicGasFramework; using UnityEngine; using UnityEngine.AI; using UnityEngine.UI; [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 Scale16muzzle : MonoBehaviour { public Suppressor muzzledevice; public GameObject muzzleinterface; public bool scaled = false; public bool magscaled = false; public bool clipscaled = false; public FVRFireArm firearm; public Vector3 scaleoriginal; public Vector3 magscaleoriginal; public Vector3 clipscaleoriginal; public FVRPhysicalObjectSize size; private void Start() { } private void Update() { //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_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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)firearm == (Object)null || (Object)(object)((FVRFireArmAttachment)muzzledevice).curMount == (Object)null || (Object)(object)((FVRFireArmAttachment)muzzledevice).curMount.Parent == (Object)null || (Object)(object)firearm.Magazine == (Object)null || (Object)(object)firearm.Clip == (Object)null) { } if ((Object)(object)firearm != (Object)null && !scaled) { scaleoriginal = ((Component)firearm).gameObject.transform.localScale; size = ((FVRPhysicalObject)firearm).Size; scaled = true; } if ((Object)(object)firearm != (Object)null && !magscaled && (Object)(object)firearm.Magazine != (Object)null) { magscaleoriginal = ((Component)firearm.Magazine).gameObject.transform.localScale; magscaled = true; } if ((Object)(object)firearm != (Object)null && !clipscaled && (Object)(object)firearm.Clip != (Object)null) { clipscaleoriginal = ((Component)firearm.Clip).gameObject.transform.localScale; clipscaled = true; } if ((Object)(object)((FVRFireArmAttachment)muzzledevice).curMount != (Object)null && ((FVRFireArmAttachment)muzzledevice).curMount.AttachmentsList.Count > 0) { firearm = ((Component)((FVRFireArmAttachment)muzzledevice).curMount.Parent).GetComponent(); if ((Object)(object)firearm.Magazine == (Object)null) { magscaled = false; } if ((Object)(object)firearm.Clip == (Object)null) { clipscaled = false; } if (1f - 5f * (muzzledevice.CatchRot / 360f) / 6f <= 0f) { ((FVRPhysicalObject)firearm).Size = (FVRPhysicalObjectSize)0; } if (1f - 5f * (muzzledevice.CatchRot / 360f) / 6f > 0f) { ((FVRPhysicalObject)firearm).Size = size; } ((Component)firearm).gameObject.transform.localScale = scaleoriginal * (1f - 5f * (muzzledevice.CatchRot / 360f) / 6f); } if ((Object)(object)((FVRFireArmAttachment)muzzledevice).curMount != (Object)null && ((FVRFireArmAttachment)muzzledevice).curMount.AttachmentsList.Count < 1) { firearm = null; scaled = false; } } } public class SlingHoster : MonoBehaviour { public FVRPhysicalObject mainobj; public WaggleJoint joint1; public GameObject geo1; public GameObject geo2; public WaggleJoint joint2; private void Start() { } private void Update() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainobj.m_quickbeltSlot != (Object)null && !((FVRInteractiveObject)mainobj).m_isHeld) { ((Behaviour)joint1).enabled = true; ((Behaviour)joint2).enabled = true; return; } ((Behaviour)joint1).enabled = false; ((Behaviour)joint2).enabled = false; geo1.transform.localEulerAngles = new Vector3(270f, 0f, 0f); geo2.transform.localEulerAngles = new Vector3(270f, 0f, 0f); } } public class Syringe : FVRFireArmAttachment { public enum CartridgeState { Whole, BitOpen, Jammed } public List 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(BitPart, val, Random.rotation); Rigidbody component = val2.GetComponent(); 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(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 Syringe2 : FVRFireArmAttachment { public enum CartridgeState { Whole, BitOpen, Jammed } public List 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 Transform needletip; 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(BitPart, val, Random.rotation); Rigidbody component = val2.GetComponent(); 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(PowderPrefab, PowderSpawnPoint.position, Random.rotation); } } } private void Update() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Invalid comparison between Unknown and I4 //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Invalid comparison between Unknown and I4 if ((Object)(object)((FVRInteractiveObject)PenObject).m_hand != (Object)null && ((Object)((FVRInteractiveObject)PenObject).m_hand).name == "Controller (left)") { float num = Vector3.Distance(needletip.position, ((Component)GM.CurrentPlayerBody.RightHand).transform.position); if ((double)num >= 0.07500000298023224) { isAlreadyInHeadRange = false; } if ((double)num < 0.05000000074505806) { if (!isAlreadyInHeadRange && (int)CState == 1 && !isUsed) { PowerUp(((FVRInteractiveObject)PenObject).m_hand); Console.Write("Oof"); isUsed = true; } isAlreadyInHeadRange = true; } } if (!((Object)(object)((FVRInteractiveObject)PenObject).m_hand != (Object)null) || !(((Object)((FVRInteractiveObject)PenObject).m_hand).name == "Controller (right)")) { return; } float num2 = Vector3.Distance(needletip.position, ((Component)GM.CurrentPlayerBody.LeftHand).transform.position); if ((double)num2 >= 0.07500000298023224) { isAlreadyInHeadRange = false; } if ((double)num2 < 0.07500000298023224) { if (!isAlreadyInHeadRange && (int)CState == 1 && !isUsed) { PowerUp(((FVRInteractiveObject)PenObject).m_hand); Console.Write("Oof"); 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 gunpodtrigger : MonoBehaviour { public FVRInteractiveObject obj; public GameObject trigger; private void Start() { } private void Update() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj.m_hand != (Object)null) { if (obj.m_hand.Input.TriggerPressed) { trigger.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class control_component : MonoBehaviour { public GameObject Comp; public GameObject Comp2; public GameObject Rot; 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) if (Rot.transform.localEulerAngles.x >= 45f) { Comp.SetActive(false); Comp2.SetActive(true); } else { Comp.SetActive(true); Comp2.SetActive(false); } } } public class controll_component : MonoBehaviour { public GameObject Comp; public GameObject Rot; 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) if (Rot.transform.localEulerAngles.y > 10f && Rot.transform.localEulerAngles.y < -10f) { Comp.SetActive(false); } else { Comp.SetActive(true); } } } } public class CameraController : MonoBehaviour { public GameObject mTarget; public Vector3 mDistance; public float mSpeed = 5f; private void Update() { //IL_0017: 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_0053: 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) //IL_005e: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) ((Component)((Component)this).GetComponent()).transform.LookAt(mTarget.transform.position); ((Component)((Component)this).GetComponent()).transform.position = ((Component)((Component)this).GetComponent()).transform.position + mSpeed * Time.deltaTime * (mTarget.transform.position + mDistance - ((Component)((Component)this).GetComponent()).transform.position); } } public class IdleUpdate : StateMachineBehaviour { private float mIdleRayCast = 0.5f; public override void OnStateEnter(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) { ((Component)animator).GetComponent().DisablePlant((AvatarIKGoal)0, 2f); ((Component)animator).GetComponent().DisablePlant((AvatarIKGoal)1, 2f); } public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { FootPlacementData footPlacementData = ((Component)animator).GetComponents()[0]; FootPlacementData footPlacementData2 = ((Component)animator).GetComponents()[1]; if ((Object)(object)footPlacementData != (Object)null) { if (((AnimatorStateInfo)(ref stateInfo)).normalizedTime > 0.25f) { footPlacementData.mExtraRayDistanceCheck = mIdleRayCast; } else { footPlacementData.mExtraRayDistanceCheck = 0f; } } if ((Object)(object)footPlacementData2 != (Object)null) { if (((AnimatorStateInfo)(ref stateInfo)).normalizedTime > 0.25f) { footPlacementData2.mExtraRayDistanceCheck = mIdleRayCast; } else { footPlacementData2.mExtraRayDistanceCheck = 0f; } } } } public class InputController : MonoBehaviour { public float Speed = 4f; public float TurnSpeed = 1f; public Camera mCam; protected Vector3 mLeftVec = new Vector3(-1f, 0f, 0f); protected Vector3 mFwdVec = new Vector3(0f, 0f, 1f); protected Vector3 mGOFwdVec = new Vector3(0f, 0f, 1f); protected Animator mAnim; protected float mTimePassed = 0f; protected int mMove = Animator.StringToHash("move"); protected int mSpeed = Animator.StringToHash("speed"); protected bool mMecFPActive = true; protected GUIStyle mStyle; private void Start() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) mStyle = new GUIStyle(); mAnim = ((Component)this).GetComponent(); mStyle.normal.textColor = new Color(0.5f, 0f, 0.75f, 1f); mStyle.fontSize = 20; } private void OnGUI() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) GUI.Label(new Rect(0f, 0f, 100f, 100f), "Use W, A, S, D to move around\nPress R to activate/deactivate Mec Foot Placer\nHold L to run", mStyle); } private void Update() { //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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00dd: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) Animator obj = mAnim; AnimatorStateInfo currentAnimatorStateInfo = mAnim.GetCurrentAnimatorStateInfo(0); float normalizedTime = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime; AnimatorStateInfo currentAnimatorStateInfo2 = mAnim.GetCurrentAnimatorStateInfo(0); obj.SetFloat("time", normalizedTime - Mathf.Floor(((AnimatorStateInfo)(ref currentAnimatorStateInfo2)).normalizedTime)); if (!Input.anyKey) { float @float = mAnim.GetFloat(mSpeed); @float -= 1.5f * Time.deltaTime; if (@float < 0f) { @float = 0f; mAnim.SetBool(mMove, false); } mAnim.SetFloat(mSpeed, @float); return; } bool flag = false; Vector3 val = ((Component)mCam).transform.rotation * mFwdVec; val.y = 0f; Vector3 val2 = ((Component)mCam).transform.rotation * mLeftVec; val2.y = 0f; mGOFwdVec = ((Component)this).gameObject.transform.rotation * new Vector3(0f, 0f, 1f); Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(0f, 0f, 0f); float num = 1f; float num2 = 0f; if (Input.GetKey((KeyCode)97)) { val3 += val2; flag = true; } if (Input.GetKey((KeyCode)100)) { val3 -= val2; flag = true; } if (Input.GetKey((KeyCode)119)) { val3 += val; flag = true; } if (Input.GetKey((KeyCode)115)) { val3 -= val; flag = true; } if (Input.GetKey((KeyCode)108)) { float float2 = mAnim.GetFloat(mSpeed); if (flag) { float2 += Time.deltaTime; if (float2 > 1f) { float2 = 1f; } } else { float2 -= 2f * Time.deltaTime; if (float2 < 0f) { float2 = 0f; } } mAnim.SetFloat(mSpeed, float2); } else { float float3 = mAnim.GetFloat(mSpeed); float3 -= Time.deltaTime; if (float3 < 0f) { float3 = 0f; } mAnim.SetFloat(mSpeed, float3); } if (Input.GetKey((KeyCode)281) && mTimePassed > 0.1f) { Time.timeScale -= 0.1f; if (Time.timeScale < 0f) { Time.timeScale = 0f; } mTimePassed = 0f; Debug.Log((object)Time.timeScale); } if (Input.GetKey((KeyCode)280) && mTimePassed > 0.1f) { Time.timeScale += 0.1f; mTimePassed = 0f; Debug.Log((object)Time.timeScale); } if (Input.GetKeyDown((KeyCode)114)) { mMecFPActive = !mMecFPActive; ((Component)this).GetComponent().SetActive((AvatarIKGoal)0, mMecFPActive); ((Component)this).GetComponent().SetActive((AvatarIKGoal)1, mMecFPActive); } if (flag) { num = Vector3.Cross(mGOFwdVec, val3).y; if (num != 0f) { num /= Mathf.Abs(num); } num2 = Vector3.Angle(mGOFwdVec, val3); num2 *= TurnSpeed * Time.deltaTime; ((Component)this).gameObject.transform.Rotate(new Vector3(0f, num, 0f), num2, (Space)0); mAnim.SetBool(mMove, true); } else if (mAnim.GetFloat("speed") <= 0f) { mAnim.SetBool(mMove, false); } mTimePassed += Time.deltaTime; } } public class LocomotionUpdate : StateMachineBehaviour { public override void OnStateEnter(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) { ((Component)animator).GetComponent().EnablePlant((AvatarIKGoal)0, 2f); ((Component)animator).GetComponent().EnablePlant((AvatarIKGoal)1, 2f); } public override void OnStateUpdate(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) { float @float = animator.GetFloat("speed"); float num = ((AnimatorStateInfo)(ref animatorStateInfo)).normalizedTime - Mathf.Floor(((AnimatorStateInfo)(ref animatorStateInfo)).normalizedTime); float num2 = 0.5f - 0.25f * @float; FootPlacementData[] components = ((Component)animator).GetComponents(); FootPlacementData footPlacementData = null; for (byte b = 0; b < components.Length; b++) { switch (components[b].mFootID) { case FootPlacementData.LimbID.LEFT_FOOT: footPlacementData = components[b]; if ((double)num > 0.5 && num < 0.5f + num2) { footPlacementData.mExtraRayDistanceCheck = 0.7f; } else { footPlacementData.mExtraRayDistanceCheck = -0.2f; } break; case FootPlacementData.LimbID.RIGHT_FOOT: footPlacementData = components[b]; if (num < num2) { footPlacementData.mExtraRayDistanceCheck = 0.7f; } else { footPlacementData.mExtraRayDistanceCheck = -0.2f; } break; case FootPlacementData.LimbID.LEFT_HAND: footPlacementData = components[b]; break; case FootPlacementData.LimbID.RIGHT_HAND: footPlacementData = components[b]; break; } footPlacementData.mTransitionTime = 0.15f - 0.1f * @float; } } } public class PelvisSet : StateMachineBehaviour { public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { ((Component)animator).GetComponent().mAdjustPelvisVertically = true; } } public class PelvisUnset : StateMachineBehaviour { public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { ((Component)animator).GetComponent().mAdjustPelvisVertically = false; } } public class FootPlacementData : MonoBehaviour { public enum LimbID { LEFT_FOOT, RIGHT_FOOT, LEFT_HAND, RIGHT_HAND } public enum Target { FOOT, TOE, HEEL } public LimbID mFootID = LimbID.LEFT_FOOT; public bool mPlantFoot = true; public Vector3 mForwardVector = new Vector3(0f, 0f, 1f); public Vector3 mIKHintOffset = new Vector3(0f, 0f, 0f); public Vector3 mUpVector = new Vector3(0f, 1f, 0f); public float mFootOffsetDist = 0.5f; public float mFootLength = 0.22f; public float mFootHalfWidth = 0.05f; public float mFootHeight = 0.1f; public float mFootRotationLimit = 45f; public float mTransitionTime = 0.2f; public float mExtraRayDistanceCheck = 0f; public bool mSetExtraRaydistanceCheckAutomatically = false; public float mErrorThreshold = 0.05f; public float mExtraRayDistanceCheckMin = 0f; public float mExtraRayDistanceCheckMax = 2f; protected bool mFootPlantIsOnTransition = false; protected float mFootPlantBlendSpeed; protected Vector3 mTargetPos = new Vector3(0f, 0f, 0f); protected Vector3 mTargetToePos = new Vector3(0f, 0f, 0f); protected Vector3 mTargetHeelPos = new Vector3(0f, 0f, 0f); protected Vector3 mRotatedFwdVec; protected Vector3 mRotatedIKHintOffset; protected float mTargetFootWeight = 0f; protected float mCurrentFootWeight = 0f; protected float mGoalBlendSpeed = 0f; protected float mPlantBlendFactor = 0f; private Vector3 mFootPlantedPos; private Quaternion mFootPlantedRot; private bool mFootPlanted = false; private Vector3 mPreviousFootPos = Vector3.zero; public void SetTargetPos(Target target, Vector3 target_pos) { //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_0027: 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_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) switch (target) { case Target.FOOT: mTargetPos = target_pos; break; case Target.TOE: mTargetToePos = target_pos; break; case Target.HEEL: mTargetHeelPos = target_pos; break; } } public Vector3 GetTargetPos(Target target) { //IL_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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //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_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) return (Vector3)(target switch { Target.FOOT => mTargetPos, Target.TOE => mTargetToePos, Target.HEEL => mTargetHeelPos, _ => Vector3.zero, }); } public void CalculateRotatedFwdVec() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_0112: 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_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_00cb: 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_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) AvatarIKGoal val = (AvatarIKGoal)0; switch (mFootID) { case LimbID.RIGHT_FOOT: val = (AvatarIKGoal)1; break; case LimbID.LEFT_HAND: val = (AvatarIKGoal)2; break; case LimbID.RIGHT_HAND: val = (AvatarIKGoal)3; break; } float num = 0f; Quaternion iKRotation = ((Component)this).GetComponent().GetIKRotation(val); num = ((Quaternion)(ref iKRotation)).eulerAngles.y * (float)Math.PI / 180f; Quaternion val2 = default(Quaternion); ((Quaternion)(ref val2))..ctor(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f)); if (mFootPlanted && mPlantFoot) { num = ((Quaternion)(ref mFootPlantedRot)).eulerAngles.y * (float)Math.PI / 180f; val2 = Quaternion.Slerp(val2, new Quaternion(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f)), mPlantBlendFactor); } mRotatedFwdVec = val2 * ((Vector3)(ref mForwardVector)).normalized; } public Vector3 GetRotatedFwdVec() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mRotatedFwdVec; } public void CalculateRotatedIKHint() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = ((Component)this).transform.rotation; float num = ((Quaternion)(ref rotation)).eulerAngles.y * (float)Math.PI / 180f; Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f)); mRotatedIKHintOffset = val * mIKHintOffset; } public Vector3 GetRotatedIKHint() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mRotatedIKHintOffset; } public void SetTargetFootWeight(float weight) { mTargetFootWeight = weight; } public float GetTargetFootWeight() { return mTargetFootWeight; } public void SetCurrentFootWeight(float weight) { mCurrentFootWeight = weight; } public float GetCurrentFootWeight() { return mCurrentFootWeight; } public void SetGoalBlendSpeed(float speed) { mGoalBlendSpeed = speed; } public float GetGoalBlendSpeed() { return mGoalBlendSpeed; } public float GetPlantBlendFactor() { return mPlantBlendFactor; } public void SetPlantBlendFactor(float factor) { mPlantBlendFactor = factor; } public void EnablePlantBlend(float blend_speed) { mFootPlantBlendSpeed = Mathf.Abs(blend_speed); mFootPlantIsOnTransition = true; } public void DisablePlantBlend(float blend_speed) { mFootPlantBlendSpeed = 0f - Mathf.Abs(blend_speed); mFootPlantIsOnTransition = true; } public float GetFootPlantBlendSpeed() { return mFootPlantBlendSpeed; } public void PlantBlendTransitionEnded() { mFootPlantIsOnTransition = false; } public bool IsPlantOnTransition() { return mFootPlantIsOnTransition; } public void SetFootPlanted(bool planted) { mFootPlanted = planted; } public bool GetFootPlanted() { return mFootPlanted; } public void SetPlantedPos(Vector3 planted_pos) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) mFootPlantedPos = planted_pos; } public Vector3 GetPlantedPos() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mFootPlantedPos; } public void SetPlantedRot(Quaternion planted_rot) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) mFootPlantedRot = planted_rot; } public Quaternion GetPlantedRot() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mFootPlantedRot; } private void Start() { //IL_001b: 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_0056: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) Animator component = ((Component)this).GetComponent(); if (!((Object)(object)component == (Object)null)) { HumanBodyBones val = (HumanBodyBones)5; switch (mFootID) { case LimbID.RIGHT_FOOT: val = (HumanBodyBones)6; break; case LimbID.RIGHT_HAND: val = (HumanBodyBones)18; break; case LimbID.LEFT_HAND: val = (HumanBodyBones)17; break; } mPreviousFootPos = component.GetBoneTransform(val).position; } } protected bool IsErrorHigh(HumanBodyBones bone, Vector3 current_position, Vector3 previous_pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) Vector3 val = previous_pos - current_position; float magnitude = ((Vector3)(ref val)).magnitude; float num = mErrorThreshold; if (Time.deltaTime < 0.033f) { num = mErrorThreshold * 30f * Time.deltaTime; } if (magnitude > num) { return true; } return false; } private void OnAnimatorIK() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0074: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if (!mSetExtraRaydistanceCheckAutomatically) { return; } Animator component = ((Component)this).GetComponent(); if (!((Object)(object)component == (Object)null)) { HumanBodyBones val = (HumanBodyBones)5; switch (mFootID) { case LimbID.RIGHT_FOOT: val = (HumanBodyBones)6; break; case LimbID.RIGHT_HAND: val = (HumanBodyBones)18; break; case LimbID.LEFT_HAND: val = (HumanBodyBones)17; break; } if (IsErrorHigh(val, component.GetBoneTransform(val).position, mPreviousFootPos)) { mExtraRayDistanceCheck = mExtraRayDistanceCheckMin; } else { mExtraRayDistanceCheck = mExtraRayDistanceCheckMax; } mPreviousFootPos = component.GetBoneTransform(val).position; } } } public class MecFootPlacer : MonoBehaviour { public bool mAdjustPelvisVertically = false; public bool mDampPelvis = false; public float mMaxLegLength = 1f; public float mMinLegLength = 0.2f; public float mPelvisAdjustmentSpeed = 1f; public string[] mLayersToIgnore; protected FootPlacementData mLeftFoot = null; protected FootPlacementData mRightFoot = null; protected FootPlacementData mLeftHand = null; protected FootPlacementData mRightHand = null; protected Animator mAnim; protected LayerMask mLayerMask = LayerMask.op_Implicit(-1); private const float mEpsilon = 0.005f; private float mCurrentRootVertError = 0f; private float mTargetRootVertError = 0f; private float mCurrentPelvisSpeed = 0f; private Vector3 mLeftFootContact_Ontransition_Disable; private Vector3 mLeftToeContact_Ontransition_Disable; private Vector3 mLeftHeelContact_Ontransition_Disable; private Vector3 mRightFootContact_Ontransition_Disable; private Vector3 mRightToeContact_Ontransition_Disable; private Vector3 mRightHeelContact_Ontransition_Disable; private Vector3 mLeftHandContact_Ontransition_Disable; private Vector3 mLeftHandToeContact_Ontransition_Disable; private Vector3 mLeftHandHeelContact_Ontransition_Disable; private Vector3 mRightHandContact_Ontransition_Disable; private Vector3 mRightHandToeContact_Ontransition_Disable; private Vector3 mRightHandHeelContact_Ontransition_Disable; private bool mRootPosLeftRightFoot = false; private bool mLeftFootActive = true; private bool mRightFootActive = true; private bool mLeftHandActive = true; private bool mRightHandActive = true; public void SetActive(AvatarIKGoal foot_id, bool active) { //IL_0001: 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_0045: Invalid comparison between Unknown and I4 //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Invalid comparison between Unknown and I4 //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if ((int)foot_id == 0) { if ((Object)(object)mLeftFoot == (Object)null) { return; } if (active && !mLeftFootActive) { ResetIKParams(foot_id); } mLeftFootActive = active; } if ((int)foot_id == 1) { if ((Object)(object)mRightFoot == (Object)null) { return; } if (active && !mRightFootActive) { ResetIKParams(foot_id); } mRightFootActive = active; } if ((int)foot_id == 2) { if ((Object)(object)mRightHand == (Object)null) { return; } if (active && !mLeftHandActive) { ResetIKParams(foot_id); } mLeftHandActive = active; } if ((int)foot_id == 3 && !((Object)(object)mRightHand == (Object)null)) { if (active && !mRightHandActive) { ResetIKParams(foot_id); } mRightHandActive = active; } } public bool IsActive(AvatarIKGoal foot_id) { //IL_0001: 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: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Invalid comparison between Unknown and I4 if ((int)foot_id == 0) { return mLeftFootActive; } if ((int)foot_id == 1) { return mRightFootActive; } if ((int)foot_id == 2) { return mLeftHandActive; } if ((int)foot_id == 3) { return mRightHandActive; } return false; } public void SetLayerMask(LayerMask layer_mask) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) mLayerMask = layer_mask; } public LayerMask GetLayerMask() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mLayerMask; } public float GetPlantBlendWeight(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; default: return -1f; } return footPlacementData.GetPlantBlendFactor(); } public void SetPlantBlendWeight(AvatarIKGoal foot_id, float weight) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } footPlacementData.SetPlantBlendFactor(weight); } public void EnablePlant(AvatarIKGoal foot_id, float blend_speed) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } footPlacementData.EnablePlantBlend(blend_speed); } public void DisablePlant(AvatarIKGoal foot_id, float blend_speed) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } footPlacementData.DisablePlantBlend(blend_speed); } private void ResetIKParams(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00d4: 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) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Invalid comparison between Unknown and I4 //IL_00f8: 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_013b: 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_0148: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Invalid comparison between Unknown and I4 //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_029d: 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_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034d: 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_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) if ((int)foot_id == 0) { Vector3 position = mAnim.GetBoneTransform((HumanBodyBones)5).position; mLeftFoot.SetTargetFootWeight(0f); mLeftFoot.SetCurrentFootWeight(0f); mLeftFoot.SetGoalBlendSpeed(0f); mLeftFoot.SetFootPlanted(planted: false); mLeftFootContact_Ontransition_Disable = position; mLeftToeContact_Ontransition_Disable = mLeftFoot.mUpVector * mLeftFoot.mFootOffsetDist + mLeftFoot.GetRotatedFwdVec() * mLeftFoot.mFootLength; mLeftHeelContact_Ontransition_Disable = position + new Quaternion(0f, 0.7071f, 0f, 0.7071f) * mLeftFoot.GetRotatedFwdVec() * mLeftFoot.mFootHalfWidth; } if ((int)foot_id == 1) { Vector3 position2 = mAnim.GetBoneTransform((HumanBodyBones)6).position; mRightFoot.SetTargetFootWeight(0f); mRightFoot.SetCurrentFootWeight(0f); mRightFoot.SetGoalBlendSpeed(0f); mRightFoot.SetFootPlanted(planted: false); mRightFootContact_Ontransition_Disable = position2; mRightToeContact_Ontransition_Disable = mRightFoot.mUpVector * mRightFoot.mFootOffsetDist + mRightFoot.GetRotatedFwdVec() * mRightFoot.mFootLength; mRightHeelContact_Ontransition_Disable = position2 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mRightFoot.GetRotatedFwdVec() * mRightFoot.mFootHalfWidth; } if ((int)foot_id == 2) { Vector3 position3 = mAnim.GetBoneTransform((HumanBodyBones)17).position; mLeftHand.SetTargetFootWeight(0f); mLeftHand.SetCurrentFootWeight(0f); mLeftHand.SetGoalBlendSpeed(0f); mLeftHand.SetFootPlanted(planted: false); mLeftHandContact_Ontransition_Disable = position3; mLeftHandToeContact_Ontransition_Disable = mLeftHand.mUpVector * mLeftHand.mFootOffsetDist + mLeftHand.GetRotatedFwdVec() * mLeftHand.mFootLength; mLeftHandHeelContact_Ontransition_Disable = position3 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mLeftHand.GetRotatedFwdVec() * mLeftHand.mFootHalfWidth; } if ((int)foot_id == 3) { Vector3 position4 = mAnim.GetBoneTransform((HumanBodyBones)18).position; mRightHand.SetTargetFootWeight(0f); mRightHand.SetCurrentFootWeight(0f); mRightHand.SetGoalBlendSpeed(0f); mRightHand.SetFootPlanted(planted: false); mRightHandContact_Ontransition_Disable = position4; mRightHandToeContact_Ontransition_Disable = mRightHand.mUpVector * mRightHand.mFootOffsetDist + mRightHand.GetRotatedFwdVec() * mRightHand.mFootLength; mRightHandHeelContact_Ontransition_Disable = position4 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mRightHand.GetRotatedFwdVec() * mRightHand.mFootHalfWidth; } } protected void SetIKWeight(AvatarIKGoal foot_id, float target_weight, float transition_time) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown switch ((int)foot_id) { case 0: if (Mathf.Abs(target_weight - mLeftFoot.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mLeftFoot.SetGoalBlendSpeed((target_weight - mLeftFoot.GetCurrentFootWeight()) / transition_time); } else { mLeftFoot.SetGoalBlendSpeed(0.1f); mLeftFoot.SetCurrentFootWeight(target_weight); } } mLeftFoot.SetTargetFootWeight(target_weight); break; case 1: if (Mathf.Abs(target_weight - mRightFoot.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mRightFoot.SetGoalBlendSpeed((target_weight - mRightFoot.GetCurrentFootWeight()) / transition_time); } else { mRightFoot.SetGoalBlendSpeed(0.1f); mRightFoot.SetCurrentFootWeight(target_weight); } } mRightFoot.SetTargetFootWeight(target_weight); break; case 2: if (Mathf.Abs(target_weight - mLeftHand.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mLeftHand.SetGoalBlendSpeed((target_weight - mLeftHand.GetCurrentFootWeight()) / transition_time); } else { mLeftHand.SetGoalBlendSpeed(0.1f); mLeftHand.SetCurrentFootWeight(target_weight); } } mLeftHand.SetTargetFootWeight(target_weight); break; case 3: if (Mathf.Abs(target_weight - mRightHand.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mRightHand.SetGoalBlendSpeed((target_weight - mRightHand.GetCurrentFootWeight()) / transition_time); } else { mRightHand.SetGoalBlendSpeed(0.1f); mRightHand.SetCurrentFootWeight(target_weight); } } mRightHand.SetTargetFootWeight(target_weight); break; } } protected void CalculateIKGoalWeights(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } float num = Mathf.Sign(footPlacementData.GetTargetFootWeight() - footPlacementData.GetCurrentFootWeight()); footPlacementData.SetCurrentFootWeight(footPlacementData.GetCurrentFootWeight() + footPlacementData.GetGoalBlendSpeed() * Time.deltaTime); if (num * Mathf.Sign(footPlacementData.GetTargetFootWeight() - footPlacementData.GetCurrentFootWeight()) < 1f || Mathf.Abs(footPlacementData.GetCurrentFootWeight() - footPlacementData.GetTargetFootWeight()) < 0.005f) { footPlacementData.SetCurrentFootWeight(footPlacementData.GetTargetFootWeight()); } else if (footPlacementData.GetCurrentFootWeight() > 1f || footPlacementData.GetCurrentFootWeight() < 0f) { footPlacementData.SetCurrentFootWeight(Mathf.Clamp(footPlacementData.GetTargetFootWeight(), 0f, 1f)); } } protected void CheckForLimits(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_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_005e: 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_00f9: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } Vector3 zero = Vector3.zero; Vector3 rotatedFwdVec = footPlacementData.GetRotatedFwdVec(); if (Vector3.Angle(rotatedFwdVec, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE)) > footPlacementData.mFootRotationLimit) { zero = footPlacementData.mUpVector * footPlacementData.mFootLength * Mathf.Tan(footPlacementData.mFootRotationLimit * ((float)Math.PI / 180f)); if (Vector3.Angle(footPlacementData.mUpVector, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE)) > 90f) { zero = -zero; } footPlacementData.SetTargetPos(FootPlacementData.Target.TOE, rotatedFwdVec * footPlacementData.mFootLength + zero); } Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(0f, 0.7071f, 0f, 0.7071f); if (Vector3.Angle(val * rotatedFwdVec, footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL)) > footPlacementData.mFootRotationLimit) { zero = footPlacementData.mUpVector * footPlacementData.mFootHalfWidth * Mathf.Tan(footPlacementData.mFootRotationLimit * ((float)Math.PI / 180f)); if (Vector3.Angle(footPlacementData.mUpVector, footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL)) > 90f) { zero = -zero; } footPlacementData.SetTargetPos(FootPlacementData.Target.HEEL, val * rotatedFwdVec * footPlacementData.mFootHalfWidth + zero); } } protected void UpdateFootPlantBlendWeights(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } if (!footPlacementData.IsPlantOnTransition()) { return; } footPlacementData.SetPlantBlendFactor(footPlacementData.GetPlantBlendFactor() + footPlacementData.GetFootPlantBlendSpeed() * Time.deltaTime); if (footPlacementData.GetFootPlantBlendSpeed() > 0f) { if (footPlacementData.GetPlantBlendFactor() > 1f) { footPlacementData.SetPlantBlendFactor(1f); footPlacementData.PlantBlendTransitionEnded(); } } else if (footPlacementData.GetPlantBlendFactor() < 0f) { footPlacementData.SetPlantBlendFactor(0f); footPlacementData.PlantBlendTransitionEnded(); } } protected void FindContactPoints(AvatarIKGoal foot_id) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected I4, but got Unknown //IL_0060: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected I4, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected I4, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: 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_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0290: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Expected I4, but got Unknown //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: 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_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040d: 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_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Expected I4, but got Unknown //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_0381: 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) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: 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_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: 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_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Expected I4, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: 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_065a: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0685: 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_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_066a: 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_0595: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Expected I4, but got Unknown //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) Vector3 iKPosition = mAnim.GetIKPosition(foot_id); bool flag = true; FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } RaycastHit val = default(RaycastHit); if (Physics.Raycast(iKPosition + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootHeight + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { SetIKWeight(foot_id, 1f, footPlacementData.mTransitionTime); Vector3 val2 = ((RaycastHit)(ref val)).point; if (footPlacementData.mPlantFoot && footPlacementData.GetFootPlanted() && Physics.Raycast(footPlacementData.GetPlantedPos() + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootHeight + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { val2 = Vector3.Lerp(val2, ((RaycastHit)(ref val)).point, footPlacementData.GetPlantBlendFactor()); } footPlacementData.SetTargetPos(FootPlacementData.Target.FOOT, val2); switch ((int)foot_id) { case 0: mLeftFootContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; case 1: mRightFootContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; case 2: mLeftHandContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; case 3: mRightHandContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; } flag = true; } else { SetIKWeight(foot_id, 0f, footPlacementData.mTransitionTime); footPlacementData.SetTargetPos(FootPlacementData.Target.FOOT, Vector3.Lerp(iKPosition, (Vector3)((int)foot_id switch { 0 => mLeftFootContact_Ontransition_Disable, 1 => mRightFootContact_Ontransition_Disable, 2 => mLeftHandContact_Ontransition_Disable, 3 => mRightHandContact_Ontransition_Disable, _ => Vector3.zero, }), footPlacementData.GetCurrentFootWeight())); flag = false; } if (Physics.Raycast(iKPosition + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist + footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootLength, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)) && flag) { Vector3 val3 = ((RaycastHit)(ref val)).point; if (footPlacementData.mPlantFoot && footPlacementData.GetFootPlanted() && Physics.Raycast(footPlacementData.GetPlantedPos() + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist + footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootLength, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { val3 = Vector3.Lerp(val3, ((RaycastHit)(ref val)).point, footPlacementData.GetPlantBlendFactor()); } footPlacementData.SetTargetPos(FootPlacementData.Target.TOE, val3 - footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT)); switch ((int)foot_id) { case 0: mLeftToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; case 1: mRightToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; case 2: mLeftHandToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; case 3: mRightHandToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; } } else { Vector3 val4 = (Vector3)((int)foot_id switch { 0 => mLeftToeContact_Ontransition_Disable, 1 => mRightToeContact_Ontransition_Disable, 2 => mLeftHandToeContact_Ontransition_Disable, 3 => mRightHandToeContact_Ontransition_Disable, _ => Vector3.zero, }); footPlacementData.SetTargetPos(FootPlacementData.Target.TOE, Vector3.Slerp(footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootLength, val4, footPlacementData.GetCurrentFootWeight())); } Quaternion val5 = default(Quaternion); ((Quaternion)(ref val5))..ctor(0f, 0.7071f, 0f, 0.7071f); Vector3 val6 = iKPosition + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist; Vector3 val7 = val5 * footPlacementData.GetRotatedFwdVec(); if (Physics.Raycast(val6 + ((Vector3)(ref val7)).normalized * footPlacementData.mFootHalfWidth, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)) && flag) { Vector3 val8 = ((RaycastHit)(ref val)).point; if (footPlacementData.mPlantFoot && footPlacementData.GetFootPlanted()) { Vector3 val9 = footPlacementData.GetPlantedPos() + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist; Vector3 val10 = val5 * footPlacementData.GetRotatedFwdVec(); if (Physics.Raycast(val9 + ((Vector3)(ref val10)).normalized * footPlacementData.mFootHalfWidth, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { val8 = Vector3.Lerp(val8, ((RaycastHit)(ref val)).point, footPlacementData.GetPlantBlendFactor()); } } footPlacementData.SetTargetPos(FootPlacementData.Target.HEEL, val8 - footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT)); switch ((int)foot_id) { case 0: mLeftHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; case 1: mRightHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; case 2: mLeftHandHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; case 3: mRightHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; default: { Vector3 val4 = Vector3.zero; break; } } } else { Vector3 val4 = (Vector3)((int)foot_id switch { 0 => mLeftHeelContact_Ontransition_Disable, 1 => mRightHeelContact_Ontransition_Disable, 2 => mLeftHandHeelContact_Ontransition_Disable, 3 => mRightHandHeelContact_Ontransition_Disable, _ => Vector3.zero, }); footPlacementData.SetTargetPos(FootPlacementData.Target.HEEL, Vector3.Slerp(val5 * footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootHalfWidth, val4, footPlacementData.GetCurrentFootWeight())); } } protected void RootPositioningCheck() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0058: 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_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_0082: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0352: 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) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: 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_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0185: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) AnimateRootVertError(); if (mAdjustPelvisVertically) { Vector3 val = mAnim.GetBoneTransform((HumanBodyBones)2).position - mAnim.GetIKPosition((AvatarIKGoal)1); float magnitude = ((Vector3)(ref val)).magnitude; FootPlacementData footPlacementData = mRightFoot; mRootPosLeftRightFoot = true; Vector3 val2 = mAnim.GetBoneTransform((HumanBodyBones)1).position - mAnim.GetIKPosition((AvatarIKGoal)0); float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude; Vector3 val3 = mAnim.GetBoneTransform((HumanBodyBones)2).position - mAnim.GetIKPosition((AvatarIKGoal)1); if (sqrMagnitude > ((Vector3)(ref val3)).sqrMagnitude) { Vector3 val4 = mAnim.GetBoneTransform((HumanBodyBones)1).position - mAnim.GetIKPosition((AvatarIKGoal)0); magnitude = ((Vector3)(ref val4)).magnitude; footPlacementData = mLeftFoot; mRootPosLeftRightFoot = false; } if (magnitude > mMaxLegLength) { mTargetRootVertError = magnitude - mMaxLegLength; float num = 0f; float num2 = 0f; Vector3 val5 = mAnim.GetBoneTransform((HumanBodyBones)1).position - (mAnim.GetIKPosition((AvatarIKGoal)0) + mLeftFoot.mUpVector * mTargetRootVertError); float magnitude2 = ((Vector3)(ref val5)).magnitude; if (magnitude2 < mMinLegLength) { num = mMinLegLength - magnitude2; } Vector3 val6 = mAnim.GetBoneTransform((HumanBodyBones)2).position - (mAnim.GetIKPosition((AvatarIKGoal)1) + mLeftFoot.mUpVector * mTargetRootVertError); magnitude2 = ((Vector3)(ref val6)).magnitude; if (magnitude2 < mMinLegLength) { num2 = mMinLegLength - magnitude2; } if (num2 != 0f || num != 0f) { if (num2 > num) { mTargetRootVertError -= num2; } else { mTargetRootVertError -= num; } } } else { mTargetRootVertError = 0f; mCurrentPelvisSpeed = 0f; } mAnim.SetIKPosition((AvatarIKGoal)0, mAnim.GetIKPosition((AvatarIKGoal)0) + footPlacementData.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)1, mAnim.GetIKPosition((AvatarIKGoal)1) + footPlacementData.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)2, mAnim.GetIKPosition((AvatarIKGoal)2) + footPlacementData.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)3, mAnim.GetIKPosition((AvatarIKGoal)3) + footPlacementData.mUpVector * mCurrentRootVertError); return; } mTargetRootVertError = 0f; mCurrentPelvisSpeed = 0f; if (Mathf.Abs(mCurrentRootVertError) >= 0.005f) { if (mRootPosLeftRightFoot) { mAnim.SetIKPosition((AvatarIKGoal)0, mAnim.GetIKPosition((AvatarIKGoal)0) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)1, mAnim.GetIKPosition((AvatarIKGoal)1) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)2, mAnim.GetIKPosition((AvatarIKGoal)2) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)3, mAnim.GetIKPosition((AvatarIKGoal)3) + mRightFoot.mUpVector * mCurrentRootVertError); } else { mAnim.SetIKPosition((AvatarIKGoal)0, mAnim.GetIKPosition((AvatarIKGoal)0) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)1, mAnim.GetIKPosition((AvatarIKGoal)1) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)2, mAnim.GetIKPosition((AvatarIKGoal)2) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)3, mAnim.GetIKPosition((AvatarIKGoal)3) + mRightFoot.mUpVector * mCurrentRootVertError); } } } protected void AnimateRootVertError() { float num = Mathf.Abs(mCurrentRootVertError - mTargetRootVertError); if (num < 0.005f) { mCurrentRootVertError = mTargetRootVertError; mCurrentPelvisSpeed = 0f; return; } float num2 = Mathf.Sign(mTargetRootVertError - mCurrentRootVertError); if (mDampPelvis) { if (num < mTargetRootVertError * 0.3f) { mCurrentPelvisSpeed -= mPelvisAdjustmentSpeed * Time.deltaTime; if (mCurrentPelvisSpeed < mPelvisAdjustmentSpeed * 0.5f) { mCurrentPelvisSpeed = mPelvisAdjustmentSpeed * 0.5f; } mCurrentRootVertError += num2 * mCurrentPelvisSpeed * Time.deltaTime; } else { mCurrentRootVertError += num2 * mPelvisAdjustmentSpeed * Time.deltaTime; } } else { mCurrentRootVertError += num2 * mPelvisAdjustmentSpeed * Time.deltaTime; mCurrentPelvisSpeed = 0f; } if (Mathf.Sign(mTargetRootVertError - mCurrentRootVertError) * num2 <= 0f) { mCurrentRootVertError = mTargetRootVertError; } } public void FootPlacement(AvatarIKGoal foot_id) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected I4, but got Unknown //IL_00c1: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_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_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Invalid comparison between Unknown and I4 //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: 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_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) FootPlacementData footPlacementData = null; switch ((int)foot_id) { default: return; case 0: if (!mLeftFootActive) { return; } footPlacementData = mLeftFoot; break; case 1: if (!mRightFootActive) { return; } footPlacementData = mRightFoot; break; case 2: if (!mLeftHandActive) { return; } footPlacementData = mLeftHand; break; case 3: if (!mRightHandActive) { return; } footPlacementData = mRightHand; break; } ((Vector3)(ref footPlacementData.mUpVector)).Normalize(); ((Vector3)(ref footPlacementData.mForwardVector)).Normalize(); footPlacementData.CalculateRotatedIKHint(); footPlacementData.CalculateRotatedFwdVec(); footPlacementData.SetTargetPos(FootPlacementData.Target.FOOT, mAnim.GetIKPosition(foot_id)); UpdateFootPlantBlendWeights(foot_id); FindContactPoints(foot_id); CheckForLimits(foot_id); CalculateIKGoalWeights(foot_id); mAnim.SetIKRotationWeight(foot_id, footPlacementData.GetCurrentFootWeight()); float num = Vector3.Angle(footPlacementData.GetRotatedFwdVec(), footPlacementData.mForwardVector); Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(0f, 0.7071f, 0f, 0.7071f); Quaternion val2 = Quaternion.FromToRotation(footPlacementData.mForwardVector, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE)); Vector3 eulerAngles = ((Quaternion)(ref val2)).eulerAngles; eulerAngles.z = 0f; Quaternion val3 = Quaternion.Euler(eulerAngles); if ((num > 90f && num < 180f) || (num > 270f && num < 360f)) { Quaternion val4 = Quaternion.FromToRotation(footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL), val * footPlacementData.GetRotatedFwdVec()); eulerAngles = ((Quaternion)(ref val4)).eulerAngles; } else { Quaternion val5 = Quaternion.FromToRotation(val * footPlacementData.GetRotatedFwdVec(), footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL)); eulerAngles = ((Quaternion)(ref val5)).eulerAngles; } eulerAngles.x = 0f; eulerAngles.y = 0f; val3 *= Quaternion.Euler(eulerAngles); mAnim.SetIKRotation(foot_id, val3); Vector3 zero = Vector3.zero; if ((int)foot_id == 0) { zero = mAnim.GetBoneTransform((HumanBodyBones)3).position - mAnim.GetIKPosition((AvatarIKGoal)0); mAnim.SetIKHintPositionWeight((AvatarIKHint)0, footPlacementData.GetCurrentFootWeight()); mAnim.SetIKHintPosition((AvatarIKHint)0, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE) + footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT) + footPlacementData.GetRotatedIKHint() + zero); } if ((int)foot_id == 1) { zero = mAnim.GetBoneTransform((HumanBodyBones)4).position - mAnim.GetBoneTransform((HumanBodyBones)6).position; mAnim.SetIKHintPositionWeight((AvatarIKHint)1, footPlacementData.GetCurrentFootWeight()); mAnim.SetIKHintPosition((AvatarIKHint)1, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE) + footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT) + footPlacementData.GetRotatedIKHint() + zero); } Vector3 val6 = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT) + footPlacementData.mUpVector * footPlacementData.mFootHeight; mAnim.SetIKPositionWeight(foot_id, footPlacementData.GetCurrentFootWeight()); mAnim.SetIKPosition(foot_id, val6); if (footPlacementData.GetCurrentFootWeight() <= 0f) { footPlacementData.SetFootPlanted(planted: false); } else if (footPlacementData.mPlantFoot && !footPlacementData.GetFootPlanted() && Mathf.Abs(footPlacementData.GetTargetFootWeight() - footPlacementData.GetCurrentFootWeight()) < 0.005f) { footPlacementData.SetPlantedPos(mAnim.GetIKPosition(foot_id)); footPlacementData.SetPlantedRot(mAnim.GetIKRotation(foot_id)); footPlacementData.SetFootPlanted(planted: true); } } private void UpdateLayerMask() { //IL_0021: 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) for (byte b = 0; b < mLayersToIgnore.Length; b++) { int num = LayerMask.NameToLayer(mLayersToIgnore[b]); if (num != -1) { mLayerMask = LayerMask.op_Implicit(LayerMask.op_Implicit(mLayerMask) & ~Mathf.RoundToInt(Mathf.Pow(2f, (float)num))); } } } private void Start() { mAnim = ((Component)this).GetComponent(); bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; FootPlacementData[] components = ((Component)this).GetComponents(); for (byte b = 0; b < components.Length; b++) { switch (components[b].mFootID) { case FootPlacementData.LimbID.LEFT_FOOT: flag = true; mLeftFoot = components[b]; break; case FootPlacementData.LimbID.RIGHT_FOOT: flag2 = true; mRightFoot = components[b]; break; case FootPlacementData.LimbID.RIGHT_HAND: flag4 = true; mLeftHand = components[b]; break; case FootPlacementData.LimbID.LEFT_HAND: flag3 = true; mRightHand = components[b]; break; } if (flag && flag2 && flag3 && flag4) { break; } } } private void OnAnimatorIK() { UpdateLayerMask(); if ((Object)(object)mLeftFoot != (Object)null) { FootPlacement((AvatarIKGoal)0); } if ((Object)(object)mRightFoot != (Object)null) { FootPlacement((AvatarIKGoal)1); } if ((Object)(object)mLeftHand != (Object)null) { FootPlacement((AvatarIKGoal)2); } if ((Object)(object)mRightHand != (Object)null) { FootPlacement((AvatarIKGoal)3); } RootPositioningCheck(); } private void LateUpdate() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_002b: 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_0041: 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) if (mCurrentRootVertError != 0f) { if (mRootPosLeftRightFoot) { Transform boneTransform = mAnim.GetBoneTransform((HumanBodyBones)0); boneTransform.position -= mRightFoot.mUpVector * mCurrentRootVertError; } else { Transform boneTransform2 = mAnim.GetBoneTransform((HumanBodyBones)0); boneTransform2.position -= mLeftFoot.mUpVector * mCurrentRootVertError; } } } } namespace JerryComponent { public class EnableWhenSloted : MonoBehaviour { public FVRPhysicalObject mainObj; public GameObject objectToEnable; public Transform MT; private void Start() { } private void Update() { //IL_003f: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainObj.m_quickbeltSlot != (Object)null) { if (mainObj.m_quickbeltSlot.IsPlayer) { objectToEnable.transform.position = MT.position; objectToEnable.transform.eulerAngles = MT.eulerAngles; } else if (!mainObj.m_quickbeltSlot.IsPlayer) { objectToEnable.transform.localPosition = new Vector3(0f, 0f, 0f); objectToEnable.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } objectToEnable.SetActive(true); } else if ((Object)(object)mainObj.m_quickbeltSlot == (Object)null) { objectToEnable.SetActive(false); } } } public class ComTacHeadset : MonoBehaviour { public AudioEvent[] ade; public GameObject powerswitch; public float limit; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 100f; public float alfIncRate = 100f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.75f; private bool isHeaded = false; public GameObject on; public GameObject off; public GameObject whole; private AudioSource[] ac; private AudioClip[] aclip; public float rmsVal; public float dbVal; private const int QSamples = 1024; private const float RefValue = 0.1f; private float[] _samples; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); } private void Start() { _samples = new float[1024]; } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "HeadsetSensor") { isHeaded = true; } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "HeadsetSensor") { isHeaded = false; } } private void Update() { //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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) ac = Resources.FindObjectsOfTypeAll(typeof(AudioSource)) as AudioSource[]; if (isHeaded) { whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } if (!isHeaded) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } } public class FollowHeadOnSloted : MonoBehaviour { public FVRPhysicalObject mainObj; public GameObject staticGEO; public GameObject movingGEO; private void Start() { } private void Update() { if ((Object)(object)mainObj.m_quickbeltSlot != (Object)null) { if (mainObj.QuickbeltSlot.IsPlayer) { staticGEO.SetActive(false); movingGEO.SetActive(true); } else { staticGEO.SetActive(true); movingGEO.SetActive(false); } } else if ((Object)(object)mainObj.m_quickbeltSlot == (Object)null) { staticGEO.SetActive(true); movingGEO.SetActive(false); } } } public class FollowHeadOnSlotedAttach : MonoBehaviour { public FVRFireArmAttachment mainObj; public GameObject staticGEO; public GameObject movingGEO; private void Start() { } private void Update() { if ((Object)(object)((FVRPhysicalObject)mainObj).m_quickbeltSlot != (Object)null) { if (((FVRPhysicalObject)mainObj).QuickbeltSlot.IsPlayer) { staticGEO.SetActive(false); movingGEO.SetActive(true); } else { staticGEO.SetActive(true); movingGEO.SetActive(false); } } else if ((Object)(object)((FVRPhysicalObject)mainObj).m_quickbeltSlot == (Object)null) { staticGEO.SetActive(true); movingGEO.SetActive(false); } } } public class TacEarPro : MonoBehaviour { public GameObject powerswitch; public FVRPhysicalObject mainOBJ; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 200f; public float alfHalfMin = 400f; public float alfIncRate = 10f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.5f; public GameObject on; public GameObject off; public GameObject whole; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void OnSosigGunFired(SosigWeapon sosigWeapon) { alf.cutoffFrequency = alfHalfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent += new SosiggunFired(OnSosigGunFired); } private void Update() { //IL_002f: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainOBJ.m_quickbeltSlot != (Object)null) { whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } if ((Object)(object)mainOBJ.m_quickbeltSlot == (Object)null) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent -= new SosiggunFired(OnSosigGunFired); } } public class TacEarPro2 : MonoBehaviour { public GameObject powerswitch; public FVRFireArmAttachment mainOBJ; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 200f; public float alfHalfMin = 400f; public float alfIncRate = 10f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.5f; public GameObject on; public GameObject off; public GameObject whole; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void OnSosigGunFired(SosigWeapon sosigWeapon) { alf.cutoffFrequency = alfHalfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent += new SosiggunFired(OnSosigGunFired); } private void Denoise() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } private void Update() { if ((Object)(object)mainOBJ.curMount != (Object)null) { if ((Object)(object)mainOBJ.curMount.MyObject.m_quickbeltSlot != (Object)null) { Denoise(); } else { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot != (Object)null) { Denoise(); } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot == (Object)null && (Object)(object)mainOBJ.curMount == (Object)null) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent -= new SosiggunFired(OnSosigGunFired); } } public class TacEarPro3 : MonoBehaviour { public GameObject powerswitch; public FVRFireArmAttachment mainOBJ; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 200f; public float alfHalfMin = 400f; public float alfIncRate = 10f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.5f; public GameObject on; public GameObject off; public GameObject whole; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void OnSosigGunFired(SosigWeapon sosigWeapon) { alf.cutoffFrequency = alfHalfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent += new SosiggunFired(OnSosigGunFired); } private void Denoise() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } private void Update() { if ((Object)(object)mainOBJ.curMount != (Object)null) { if (((Object)mainOBJ.curMount).name == "PodCase") { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } else { Denoise(); } } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot != (Object)null) { Denoise(); } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot == (Object)null && (Object)(object)mainOBJ.curMount == (Object)null) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent -= new SosiggunFired(OnSosigGunFired); } } public class ChangeLiveries : MonoBehaviour { public MeshRenderer rend; public MeshRenderer rend2; public GameObject bead; public Material m1; public Material m2; public Material m3; public Material m4; private void Start() { ((Renderer)rend).material = m1; } 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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) if (bead.transform.localPosition.x < 0.5f) { ((Renderer)rend).material = m1; ((Renderer)rend2).material = m1; } else if (bead.transform.localPosition.x > 0.5f && bead.transform.localPosition.x < 1.5f) { ((Renderer)rend).material = m2; ((Renderer)rend2).material = m2; } else if (bead.transform.localPosition.x > 1.5f && bead.transform.localPosition.x < 2.5f) { ((Renderer)rend).material = m3; ((Renderer)rend2).material = m3; } else if (bead.transform.localPosition.x > 2.5f && bead.transform.localPosition.x < 3.5f) { ((Renderer)rend).material = m4; ((Renderer)rend2).material = m4; } } } public class enableanddisable : MonoBehaviour { public GameObject enable; public GameObject disable; private void Start() { } private void Update() { if (disable.activeInHierarchy) { enable.SetActive(false); } else { enable.SetActive(true); } } } public class CBLauncher : MonoBehaviour { public GameObject switchstable; public GameObject normal; public GameObject he; public GameObject grapple; public GameObject typeSwitch; public bool typeSwitched = false; public float typenumber = 4f; public FVRPhysicalObject main; public GameObject disablepiece; public FVRFireArmAttachmentMount mount; public FVRInteractiveObject slidingpiece; public FVRFireArmAttachment arrow = null; public float power = 0f; public bool isPulled = false; public bool shoot = false; public Transform fore; public Transform foretip; public float speed; public float stringpower; public float powerthreshod = 5000f; public AudioEvent audioshoot; public bool transferedcontrol = false; 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) if (switchstable.transform.localEulerAngles.x > 45f) { main.MoveIntensity = 0.1f; main.RotIntensity = 0.05f; } if (switchstable.transform.localEulerAngles.x < 45f) { main.MoveIntensity = 0.5f; main.RotIntensity = 0.5f; } if (typenumber == 1f) { normal.SetActive(true); he.SetActive(false); grapple.SetActive(false); if ((Object)(object)arrow != (Object)null) { ((Component)arrow.AttachmentInterface).transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } if (typenumber == 2f) { normal.SetActive(false); he.SetActive(true); grapple.SetActive(false); if ((Object)(object)arrow != (Object)null) { ((Component)arrow.AttachmentInterface).transform.localEulerAngles = new Vector3(45f, 0f, 0f); } } if (typenumber == 3f) { normal.SetActive(false); he.SetActive(false); grapple.SetActive(true); if ((Object)(object)arrow != (Object)null) { ((Component)arrow.AttachmentInterface).transform.localEulerAngles = new Vector3(90f, 0f, 0f); } } if (typenumber > 3f) { typenumber = 1f; } if (typeSwitch.transform.localEulerAngles.x > 45f && !typeSwitched) { typenumber += 1f; typeSwitched = true; } if (typeSwitch.transform.localEulerAngles.x < 45f) { typeSwitched = false; } if (disablepiece.activeInHierarchy && ((FVRInteractiveObject)main).IsHeld && !transferedcontrol) { FVRViveHand otherHand = ((FVRInteractiveObject)main).m_hand.OtherHand; if ((Object)(object)otherHand.CurrentInteractable != (Object)null) { otherHand.m_currentInteractable.EndInteraction(otherHand); otherHand.CurrentInteractable = slidingpiece; slidingpiece.BeginInteraction(otherHand); transferedcontrol = true; } } if (!slidingpiece.IsHeld) { ((FVRInteractiveObject)main).UseGripRotInterp = true; float num = speed * Time.deltaTime; ((Component)slidingpiece).transform.localPosition = Vector3.MoveTowards(((Component)slidingpiece).transform.localPosition, fore.localPosition, num); } if (((Component)slidingpiece).transform.localPosition.z < 0f) { ((Component)slidingpiece).transform.localPosition = new Vector3(0f, 0f, 0f); } if (((Component)slidingpiece).transform.localPosition.z > 0.255f) { ((Component)slidingpiece).transform.localPosition = new Vector3(0f, 0f, 0.255f); } if (((Component)slidingpiece).transform.localPosition.z < 0.2f && mount.AttachmentsList.Count > 0) { isPulled = true; shoot = false; if (slidingpiece.IsHeld) { power = powerthreshod * ((0.255f - ((Component)slidingpiece).transform.localPosition.z) / 0.255f); } } if ((Object)(object)arrow == (Object)null || mount.AttachmentsList == null) { } if (mount.AttachmentsList.Count > 0) { arrow = mount.AttachmentsList[0]; } if (!(((Component)slidingpiece).transform.localPosition.z > 0.24f)) { return; } if (mount.AttachmentsList.Count > 0) { shoot = true; if (!slidingpiece.IsHeld && isPulled && (Object)(object)arrow != (Object)null && shoot) { SM.PlayCoreSoundDelayedOverrides((FVRPooledAudioType)10, audioshoot, ((Component)this).transform.position, new Vector2(1f, 1f), new Vector2(1f, 1.5f), 0f); arrow.DetachFromMount(); mount.DeRegisterAttachment(arrow); mount.EnableOnHover.SetActive(false); Rigidbody component = ((Component)arrow).gameObject.GetComponent(); Vector3 val = ((Component)component).transform.position - foretip.position; component.AddForceAtPosition(val * power * -1f, ((Component)foretip).transform.position); arrow = null; shoot = false; isPulled = false; power = 0f; transferedcontrol = false; } } if (slidingpiece.IsHeld || mount.AttachmentsList.Count <= 0) { isPulled = false; shoot = false; } } } public class HEseaker : MonoBehaviour { public MultipleUseArrow arrow; private void OnTriggerEnter(Collider other) { if (((Component)other).gameObject.layer == LayerMask.NameToLayer("AgentBody")) { arrow.Explode(); } } private void Update() { } } public class IgnoreLayer : MonoBehaviour { public Rigidbody rigid; public Transform center; private void Start() { } private void Update() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) rigid.centerOfMass = center.localPosition; } } public class MultipleUseArrow : MuzzleBrake { public GameObject[] SpawnOnDestruction; public GameObject main; public GameObject laddersight; public bool isMounted = false; public bool isGrap; public bool m_hasExploded = false; public GameObject tlight; public GameObject knots; public bool isHEact = false; public GameObject RopeLengthPrefab; public Transform RopePoint; public GameObject BundledRope; public GameObject FakeKnot; public GameObject FakeRopeLength; public bool m_isRopeFree; public bool m_hasBeenThrown; public bool m_hasLanded; public List finalRopePoints = new List(); public Vector3 currentRopePoint; public List m_ropeLengths = new List(); public LayerMask LM_Grapple; public RaycastHit m_hit; public bool IsRopeFree => m_isRopeFree; public void Update() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_005a: 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_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) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRFireArmAttachment)this).curMount == (Object)null) { Vector3 velocity = ((FVRPhysicalObject)this).RootRigidbody.velocity; if (((Vector3)(ref velocity)).magnitude > 45f && tlight.activeInHierarchy) { isHEact = true; } if (isHEact) { Vector3 velocity2 = ((FVRPhysicalObject)this).RootRigidbody.velocity; if (((Vector3)(ref velocity2)).magnitude < 40f) { Explode(); } } } if ((Object)(object)((FVRFireArmAttachment)this).curMount != (Object)null) { isMounted = true; if (knots.activeInHierarchy) { m_isRopeFree = true; } if (!knots.activeInHierarchy) { ClearRopeLengths(); m_isRopeFree = false; } m_hasBeenThrown = false; } if (laddersight.transform.localEulerAngles.x == 0f) { isGrap = false; knots.SetActive(false); tlight.SetActive(false); } if (laddersight.transform.localEulerAngles.x > 25f && laddersight.transform.localEulerAngles.x < 65f) { isGrap = true; knots.SetActive(false); tlight.SetActive(true); } if (laddersight.transform.localEulerAngles.x == 90f) { isGrap = false; knots.SetActive(true); tlight.SetActive(false); } } public override void BeginInteraction(FVRViveHand hand) { m_isRopeFree = false; ClearRopeLengths(); ((FVRPhysicalObject)this).RootRigidbody.isKinematic = false; ((FVRFireArmAttachment)this).BeginInteraction(hand); } public override void EndInteractionIntoInventorySlot(FVRViveHand hand, FVRQuickBeltSlot slot) { m_isRopeFree = false; ClearRopeLengths(); ((FVRPhysicalObject)this).EndInteractionIntoInventorySlot(hand, slot); } public override void EndInteraction(FVRViveHand hand) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) ((FVRFireArmAttachment)this).EndInteraction(hand); FakeRopeLength.SetActive(false); if (m_isRopeFree) { m_hasBeenThrown = true; m_hasLanded = false; finalRopePoints.Add(currentRopePoint); } } public void ClearRopeLengths() { BundledRope.SetActive(true); FakeKnot.SetActive(false); m_hasBeenThrown = false; m_hasLanded = false; finalRopePoints.Clear(); if (m_ropeLengths.Count > 0) { for (int num = m_ropeLengths.Count - 1; num >= 0; num--) { Object.Destroy((Object)(object)m_ropeLengths[num]); } m_ropeLengths.Clear(); } } public void FreeRope() { m_isRopeFree = true; BundledRope.SetActive(false); FakeKnot.SetActive(true); } public override void FVRUpdate() { //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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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) ((FVRPhysicalObject)this).FVRUpdate(); if ((Object)(object)((FVRFireArmAttachment)this).curMount == (Object)null && isMounted) { m_isRopeFree = true; m_hasBeenThrown = true; } if (laddersight.transform.localEulerAngles.x != 90f) { return; } if (IsRopeFree && !m_hasBeenThrown) { FakeRopeLength.SetActive(true); FakeRopeLength.transform.rotation = Quaternion.LookRotation(-Vector3.up, ((Component)this).transform.up); if (Physics.Raycast(RopePoint.position, -Vector3.up, ref m_hit, 200f, LayerMask.op_Implicit(LM_Grapple))) { FakeRopeLength.transform.localScale = new Vector3(1f, 1f, ((RaycastHit)(ref m_hit)).distance); currentRopePoint = ((RaycastHit)(ref m_hit)).point; } else { FakeRopeLength.transform.localScale = new Vector3(1f, 1f, 200f); currentRopePoint = FakeRopeLength.transform.position + -Vector3.up * 200f; } } for (int i = 0; i < finalRopePoints.Count; i++) { if (i < finalRopePoints.Count - 1) { Debug.DrawLine(finalRopePoints[i], finalRopePoints[i + 1], Color.yellow); } } } public void LateUpdate() { //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_004b: 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) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00ae: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) if (laddersight.transform.localEulerAngles.x != 90f || !IsRopeFree || !m_hasBeenThrown || m_hasLanded) { return; } Vector3 position = RopePoint.position; Vector3 val = currentRopePoint - position; if (Physics.Raycast(position, ((Vector3)(ref val)).normalized, ref m_hit, ((Vector3)(ref val)).magnitude, LayerMask.op_Implicit(LM_Grapple))) { Vector3 val2 = ((RaycastHit)(ref m_hit)).point + ((RaycastHit)(ref m_hit)).normal * 0.025f; Vector3 val3 = val2 - currentRopePoint; GameObject val4 = Object.Instantiate(RopeLengthPrefab, val2, Quaternion.LookRotation(-val3, Vector3.up)); val4.transform.localScale = new Vector3(1f, 1f, ((Vector3)(ref val3)).magnitude); FVRHandGrabPoint val5 = null; if (m_ropeLengths.Count > 0) { val5 = m_ropeLengths[m_ropeLengths.Count - 1].GetComponent(); } FVRHandGrabPoint component = val4.GetComponent(); m_ropeLengths.Add(val4); if ((Object)(object)val5 != (Object)null && (Object)(object)component != (Object)null) { val5.ConnectedGrabPoint_Base = component; component.ConnectedGrabPoint_End = val5; } FakeRopeLength.SetActive(false); finalRopePoints.Add(val2); currentRopePoint = val2; } else { FakeRopeLength.transform.rotation = Quaternion.LookRotation(val, Vector3.up); FakeRopeLength.transform.localScale = new Vector3(1f, 1f, ((Vector3)(ref val)).magnitude); FakeRopeLength.SetActive(true); } } public void Explode() { //IL_002f: 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) if (!m_hasExploded) { m_hasExploded = true; for (int i = 0; i < SpawnOnDestruction.Length; i++) { Object.Instantiate(SpawnOnDestruction[i], ((Component)this).transform.position, ((Component)this).transform.rotation); } Object.Destroy((Object)(object)((Component)this).gameObject); } } public override void OnCollisionEnter(Collision col) { //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_009c: 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_00a7: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) ((FVRPhysicalObject)this).OnCollisionEnter(col); if (laddersight.transform.localEulerAngles.x == 90f && IsRopeFree && m_hasBeenThrown && !m_hasLanded && (Object)(object)col.rigidbody == (Object)null && ((Component)col.transform).gameObject.layer == LayerMask.NameToLayer("Environment")) { m_hasLanded = true; isMounted = false; ((FVRPhysicalObject)this).RootRigidbody.isKinematic = true; Vector3 val = RopePoint.position - currentRopePoint; GameObject val2 = Object.Instantiate(RopeLengthPrefab, RopePoint.position, Quaternion.LookRotation(-val, Vector3.up)); val2.transform.localScale = new Vector3(1f, 1f, ((Vector3)(ref val)).magnitude); FVRHandGrabPoint val3 = null; if (m_ropeLengths.Count > 0) { val3 = m_ropeLengths[m_ropeLengths.Count - 1].GetComponent(); } FVRHandGrabPoint component = val2.GetComponent(); m_ropeLengths.Add(val2); if ((Object)(object)val3 != (Object)null && (Object)(object)component != (Object)null) { val3.ConnectedGrabPoint_Base = component; component.ConnectedGrabPoint_End = val3; } currentRopePoint = RopePoint.position; finalRopePoints.Add(currentRopePoint); FakeRopeLength.SetActive(false); } } } public class Lookat : MonoBehaviour { public GameObject mark; public Transform nearestAI; public SosigLink[] currentAI = null; public GameObject lookAtObj; public LAPD2019Laser laser; public float distanceNearest = 0f; public Transform player; private Vector3 velocity; private void Update() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_0166: 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_011f: 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) if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 1000f) { 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 = Vector3.SmoothDamp(mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.1f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); } currentAI = Object.FindObjectsOfType(); 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 Lookat2 : MonoBehaviour { public GameObject mark; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public LAPD2019Laser laser; public float distanceNearest = 0f; public Transform player; private Vector3 velocity; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void Update() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_011f: 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) if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 2500f) { 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 = Vector3.SmoothDamp(mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.1f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI == null) { return; } for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null) { currentAI.Remove(currentAI[i]); } } 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, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; 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 QBslotSpawn : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class QBslotToPlayer : MonoBehaviour { public FVRQuickBeltSlot slot1; private void Start() { } private void Update() { if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { if (GM.CurrentPlayerBody.QBSlots_Added.Contains(slot1)) { GM.CurrentPlayerBody.QBSlots_Added.Remove(slot1); } if (!GM.CurrentPlayerBody.QBSlots_Internal.Contains(slot1)) { GM.CurrentPlayerBody.QBSlots_Internal.Add(slot1); Debug.Log((object)"slotadded"); } } } private void OnDestroy() { if (GM.CurrentPlayerBody.QBSlots_Internal.Contains(slot1)) { GM.CurrentPlayerBody.QBSlots_Internal.Remove(slot1); } } } public class Slotarea : MonoBehaviour { public GameObject parent; private 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(); 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(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = false; component2.isKinematic = true; } } } private 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(); 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(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = true; component2.isKinematic = false; } } } } } public class Rotate : MonoBehaviour { public bool Up = false; public bool Forward = true; public bool Right = false; public float Speed = 0.025f; private void FixedUpdate() { //IL_0012: 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_0054: Unknown result type (might be due to invalid IL or missing references) if (Up) { ((Component)this).transform.Rotate(Vector3.up, Speed); } if (Forward) { ((Component)this).transform.Rotate(Vector3.forward, Speed); } if (Right) { ((Component)this).transform.Rotate(Vector3.right, Speed); } } } namespace JerryComponent { public class BeefCan : MonoBehaviour { public float dry = 0f; public GameObject thisStuff; public float refill = 100f; public GameObject ringMani; public GameObject ring; public GameObject lidRing; public GameObject canLid; public GameObject beef; public AudioSource canEat; public AudioSource canOpen; public HungryAndThirsty hAt; public bool isEated = false; public bool isCanOpened = false; private void Start() { hAt = Object.FindObjectOfType(); } 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) if (ring.transform.localEulerAngles.z >= 85f) { ringMani.SetActive(false); if (!isCanOpened) { canOpen.Play(); isCanOpened = true; } } if (canLid.transform.localEulerAngles.x < 60f) { lidRing.SetActive(true); } if (canLid.transform.localEulerAngles.x >= 60f) { lidRing.SetActive(false); } if (!(canLid.transform.localEulerAngles.x > 45f)) { return; } 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.2f)) { return; } if (!isEated) { canEat.Play(); if ((Object)(object)hAt != (Object)null) { hAt.levelOfHungry += refill; hAt.levelOfThirsty -= dry; } if ((Object)(object)hAt == (Object)null) { } isEated = true; } if (isEated) { beef.SetActive(false); thisStuff.SetActive(false); } } } public class BottleCap : MuzzleDeviceInterface { [NonSerialized] public Suppressor tempSup; [NonSerialized] public Vector3 lastHandForward = Vector3.zero; [NonSerialized] public Vector3 lastMountForward = Vector3.zero; public override void Awake() { ((FVRFireArmAttachmentInterface)this).Awake(); ref Suppressor reference = ref tempSup; FVRFireArmAttachment attachment = ((FVRFireArmAttachmentInterface)this).Attachment; reference = (Suppressor)(object)((attachment is Suppressor) ? attachment : null); } public override void OnAttach() { ref Suppressor reference = ref tempSup; FVRFireArmAttachment attachment = ((FVRFireArmAttachmentInterface)this).Attachment; reference = (Suppressor)(object)((attachment is Suppressor) ? attachment : null); AttachableFirearm val = null; if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.AmIOnAnAttachableFirearm(ref val)) { val.RegisterSuppressor(tempSup); } else if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent is FVRFireArm) { FVRPhysicalObject parent = ((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent; FVRFireArm val2 = (FVRFireArm)(object)((parent is FVRFireArm) ? parent : null); val2.RegisterSuppressor(tempSup); } ((MuzzleDeviceInterface)this).OnAttach(); } public override void OnDetach() { AttachableFirearm val = null; if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.AmIOnAnAttachableFirearm(ref val)) { val.RegisterSuppressor((Suppressor)null); } else if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent != null) { FVRPhysicalObject parent = ((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent; } ((MuzzleDeviceInterface)this).OnDetach(); } public override void BeginInteraction(FVRViveHand hand) { //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_002f: 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) ((FVRInteractiveObject)this).BeginInteraction(hand); lastHandForward = ((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Up; lastMountForward = ((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount).transform.up; } public override void UpdateInteraction(FVRViveHand hand) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_00bb: 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) ((FVRFireArmAttachmentInterface)this).UpdateInteraction(hand); if (((FVRInteractiveObject)this).IsHeld) { ((Component)((FVRFireArmAttachmentInterface)this).Attachment).transform.localEulerAngles = new Vector3(0f, 0f, tempSup.CatchRot); } if (tempSup.CatchRot > 5f) { ((FVRFireArmAttachmentInterface)this).IsLocked = true; return; } ((FVRFireArmAttachmentInterface)this).IsLocked = false; Vector3 closestValidPoint = ((FVRInteractiveObject)this).GetClosestValidPoint(((FVRFireArmAttachmentInterface)this).Attachment.curMount.Point_Front.position, ((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().MyObject).transform.position, ((Component)this).transform.position); if (Vector3.Distance(((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Pos, closestValidPoint) > 0.08f) { ((FVRInteractiveObject)this).EndInteraction(hand); hand.ForceSetInteractable((FVRInteractiveObject)(object)((FVRFireArmAttachmentInterface)this).Attachment); ((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment).BeginInteraction(hand); } } public override void FVRFixedUpdate() { //IL_0024: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_004b: 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) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)this).IsHeld) { float catchRot = tempSup.CatchRot; Vector3 val = Vector3.ProjectOnPlane(((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Up, ((Component)this).transform.forward); Vector3 val2 = Vector3.ProjectOnPlane(lastHandForward, ((Component)this).transform.forward); float num = Mathf.Atan2(Vector3.Dot(((Component)this).transform.forward, Vector3.Cross(val, val2)), Vector3.Dot(val, val2)) * 57.29578f; Suppressor obj = tempSup; obj.CatchRot -= num; Vector3 val3 = Vector3.ProjectOnPlane(((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount).transform.up, ((Component)this).transform.forward); Vector3 val4 = Vector3.ProjectOnPlane(lastMountForward, ((Component)this).transform.forward); num = Mathf.Atan2(Vector3.Dot(((Component)this).transform.forward, Vector3.Cross(val3, val4)), Vector3.Dot(val3, val4)) * 57.29578f; Suppressor obj2 = tempSup; obj2.CatchRot += num; tempSup.CatchRot = Mathf.Clamp(tempSup.CatchRot, 0f, 360f); tempSup.CatchRotDeltaAdd(Mathf.Abs(tempSup.CatchRot - catchRot)); lastHandForward = ((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Up; lastMountForward = ((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount).transform.up; } ((FVRInteractiveObject)this).FVRFixedUpdate(); } } public class HungryAndThirsty : MonoBehaviour { public GameObject textsRot; public TextMesh textH; public TextMesh textT; public float levelOfThirsty = 100f; public float levelOfHungry = 100f; public bool isHealed = false; public float valueDropRate = 0.005f; public float valueDropRate1 = 0.005f; public float valueDropRate2 = 0.001f; public PowerupType put; public PowerUpIntensity pui; public PowerUpDuration pud; public PowerupType put2; public PowerUpIntensity pui2; public PowerUpDuration pud2; public PowerupType put3; public PowerUpIntensity pui3; public PowerUpDuration pud3; public FVRPlayerBody pb; public GameObject hungryStomach; public GameObject heartBeat; private void OnPlayerHit(float percentOfLife) { levelOfHungry -= 10f; levelOfThirsty -= 10f; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.PlayerTookDamageEvent += new PlayerTookDamage(OnPlayerHit); } private void Start() { } public void PowerUp(FVRPlayerBody fVRPlayerBody) { //IL_0007: 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_001d: 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_003a: 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_0046: 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_0063: 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) GM.CurrentSceneSettings.OnPowerupUse(put); GM.CurrentPlayerBody.ActivatePower(put, pui, pud, false, false, -1f); GM.CurrentPlayerBody.ActivatePower(put2, pui2, pud2, false, false, -1f); GM.CurrentPlayerBody.ActivatePower(put3, pui3, pud3, false, false, -1f); } private void Update() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_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_00aa: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) pb = Object.FindObjectOfType(); textH.text = "H:" + (int)levelOfHungry; textT.text = "T:" + (int)levelOfThirsty; Vector3 position = ((Component)GM.CurrentPlayerBody.LeftHand).transform.position; if (Vector3.Distance(((Component)this).transform.position, position) <= 0.1f) { textsRot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } if (Vector3.Distance(((Component)this).transform.position, position) > 0.1f) { textsRot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)pb != (Object)null) { if (pb.Health <= 0f) { pb.KillPlayer(true); levelOfHungry = 100f; levelOfThirsty = 100f; } if (GM.CurrentSceneSettings.DoesDamageGetRegistered) { levelOfHungry -= valueDropRate; levelOfThirsty -= valueDropRate; } if (!GM.CurrentSceneSettings.DoesDamageGetRegistered) { levelOfHungry = 100f; levelOfThirsty = 100f; } if (levelOfThirsty > 100f) { levelOfThirsty = 100f; } if (levelOfHungry > 100f) { levelOfHungry = 100f; } if (levelOfThirsty < 0f) { levelOfThirsty = 0f; } if (levelOfHungry < 0f) { levelOfHungry = 0f; } if ((levelOfThirsty >= 90f) & (levelOfHungry >= 90f)) { hungryStomach.SetActive(false); heartBeat.SetActive(false); valueDropRate = valueDropRate1; pb.Health += 0.1f; if (!isHealed) { PowerUp(pb); isHealed = true; } } if (levelOfHungry < 90f || levelOfThirsty < 90f) { valueDropRate = valueDropRate2; isHealed = false; } if (levelOfHungry < 10f) { hungryStomach.SetActive(true); isHealed = false; } if (levelOfThirsty < 10f) { heartBeat.SetActive(true); isHealed = false; } if (levelOfThirsty <= 0f) { valueDropRate = valueDropRate2; pb.Health -= 0.1f; heartBeat.SetActive(true); isHealed = false; } if (levelOfHungry <= 0f) { valueDropRate = valueDropRate2; pb.Health -= 0.1f; hungryStomach.SetActive(true); isHealed = false; } if (levelOfHungry > 0f) { hungryStomach.SetActive(false); } if (levelOfThirsty > 0f) { heartBeat.SetActive(false); } if (levelOfHungry > 10f) { hungryStomach.SetActive(false); } if (levelOfThirsty > 10f) { heartBeat.SetActive(false); } } if (!((Object)(object)pb == (Object)null)) { } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.PlayerTookDamageEvent -= new PlayerTookDamage(OnPlayerHit); } } public class WaterBottle : MonoBehaviour { public GameObject thisStuff; public ParticleSystem psWater; public HungryAndThirsty hAt; public Transform bottleMuzzle; public FVRPhysicalObject thisOBJ; public GameObject dis; public Rigidbody watterBottle; public float lquidLeft = 100f; public AudioEvent audEvent_Shake; public GameObject audioPour; public GameObject audioDrink; public bool isShaked = false; public GameObject weightInWater; private void Start() { hAt = Object.FindObjectOfType(); } 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_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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) if (weightInWater.transform.localPosition.z < 0.08f) { isShaked = false; } if (weightInWater.transform.localPosition.z > 0.08f) { if (!isShaked) { if (lquidLeft > 0f) { SM.PlayCoreSound((FVRPooledAudioType)10, audEvent_Shake, ((Component)this).transform.position); } if (lquidLeft <= 0f) { } isShaked = true; } if (!isShaked) { } } if (!dis.activeInHierarchy) { psWater.Stop(); audioPour.SetActive(false); audioDrink.SetActive(false); } if (!dis.activeInHierarchy) { return; } Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (weightInWater.transform.localPosition.z < 0.05f) { psWater.Stop(); audioPour.SetActive(false); audioDrink.SetActive(false); } if (!(weightInWater.transform.localPosition.z >= 0.05f)) { return; } if (Vector3.Distance(bottleMuzzle.position, val) <= 0.25f) { if (lquidLeft > 0f) { lquidLeft -= 0.5f; audioDrink.SetActive(true); if ((Object)(object)hAt != (Object)null) { hAt.levelOfThirsty += 1f; } if (!((Object)(object)hAt == (Object)null)) { } } if (lquidLeft <= 0f) { audioDrink.SetActive(false); thisStuff.SetActive(false); } } if (Vector3.Distance(bottleMuzzle.position, val) > 0.25f) { if (lquidLeft > 0f) { lquidLeft -= 1f; psWater.Play(); audioPour.SetActive(true); } if (lquidLeft <= 0f) { psWater.Stop(); audioPour.SetActive(false); thisStuff.SetActive(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 RagdollAdd : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class ChangeMag : MonoBehaviour { public FVRFireArmMagazine[] mags; public FVRFireArm gun; public GameObject selector; 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) if (selector.transform.localEulerAngles.x >= 0f && selector.transform.localEulerAngles.x <= 2f) { gun.Magazine = mags[1]; } if (selector.transform.localEulerAngles.x >= 37f && selector.transform.localEulerAngles.x <= 39f) { gun.Magazine = mags[2]; } if (selector.transform.localEulerAngles.x >= 74f && selector.transform.localEulerAngles.x <= 76f) { gun.Magazine = mags[3]; } } } public class IRlaserpoint : MonoBehaviour { public GameObject IRpoint; public LayerMask lm; private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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) //IL_0041: 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_0077: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); Physics.Raycast(((Component)this).transform.localPosition, ((Component)this).transform.forward, ref val, (float)LayerMask.op_Implicit(lm)); if (Vector3.Distance(((Component)GM.CurrentPlayerBody.Head).transform.position, ((RaycastHit)(ref val)).point) <= 5000f) { Object.Instantiate(IRpoint, ((RaycastHit)(ref val)).point, new Quaternion(0f, 0f, 0f, 0f)); Object.Destroy((Object)(object)((Component)this).gameObject); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Update() { } } } [RequireComponent(typeof(Rigidbody))] public class ForceOnStart : MonoBehaviour { [SerializeField] private Vector3 force; [SerializeField] private Vector3 relativeForce; private void Start() { //IL_000a: 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) Rigidbody component = ((Component)this).GetComponent(); component.AddForce(force); component.AddRelativeForce(relativeForce); } } public class GameObjectByButton : MonoBehaviour { [SerializeField] private KeyCode key; [SerializeField] private GameObject target; private void Update() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(key)) { bool activeSelf = target.activeSelf; activeSelf = !activeSelf; target.SetActive(activeSelf); } } } namespace JerryComponent { public class MagFold : FVRInteractiveObject { public enum StockPos { Closed, Mid, Open } public Transform Root; public Transform Stock; public float rotAngle; public float MinRot; public float MaxRot; public StockPos m_curPos; public StockPos m_lastPos; public bool isMinClosed = true; public FVRFireArm FireArm; public override void UpdateInteraction(FVRViveHand hand) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_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_002b: 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_0035: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: 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_01c1: Invalid comparison between Unknown and I4 //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Invalid comparison between Unknown and I4 //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).UpdateInteraction(hand); Vector3 val = ((HandInput)(ref hand.Input)).Pos - Root.position; Vector3 val2 = Vector3.ProjectOnPlane(val, Root.up); val = ((Vector3)(ref val2)).normalized; Vector3 val3 = -((Component)Root).transform.forward; rotAngle = Mathf.Atan2(Vector3.Dot(Root.up, Vector3.Cross(val3, val)), Vector3.Dot(val3, val)) * 57.29578f; if (Mathf.Abs(rotAngle - MinRot) < 5f) { rotAngle = MinRot; } if (Mathf.Abs(rotAngle - MaxRot) < 5f) { rotAngle = MaxRot; } if (!(rotAngle >= MinRot) || !(rotAngle <= MaxRot)) { return; } Stock.localEulerAngles = new Vector3(0f, rotAngle, 0f); float num = Mathf.InverseLerp(MinRot, MaxRot, rotAngle); if (isMinClosed) { if (num < 0.02f) { m_curPos = (StockPos)0; } else if (num > 0.9f) { m_curPos = (StockPos)2; } else { m_curPos = (StockPos)1; } } else if (num < 0.1f) { m_curPos = (StockPos)2; } else if (num > 0.98f) { m_curPos = (StockPos)0; } else { m_curPos = (StockPos)1; } if ((int)m_curPos == 2 && (int)m_lastPos != 2) { FireArm.PlayAudioEvent((FirearmAudioEventType)30, 1f); } if ((int)m_curPos == 0 && (int)m_lastPos != 0) { FireArm.PlayAudioEvent((FirearmAudioEventType)31, 1f); } m_lastPos = m_curPos; } } public class ScopeCreate : MonoBehaviour { public GameObject SlideRot; public GameObject SlideRot2; public Camera Cam1; public Camera Cam2; public MeshRenderer Rend; private RenderTexture rt1; private RenderTexture rt2; private Material mt1; private Material mt2; public MeshRenderer mr1; public MeshRenderer mr2; public Shader sd; private void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown rt1 = new RenderTexture(2048, 2048, 16, (RenderTextureFormat)0); rt1.Create(); Cam1.targetTexture = rt1; mt1 = new Material(sd); mt1.SetTexture("_ReticleTex", (Texture)(object)rt1); mt1.SetFloat("_ReticleScale", 20f); mt1.SetFloat("_ReticleDistance", 30f); mt1.SetTexture("_ZoomTex", (Texture)(object)rt1); mt1.SetFloat("_ZoomScale", 1f); mt1.SetFloat("_VignetteRadius", 0f); mt1.SetFloat("_VignetteSmoothness", 0f); mt1.SetFloat("_VignetteAlpha", 0f); mt1.SetFloat("_CameraDistance", 1f); ((Renderer)mr1).material = mt1; rt2 = new RenderTexture(2048, 2048, 16, (RenderTextureFormat)0); rt2.Create(); Cam2.targetTexture = rt2; mt2 = new Material(sd); mt2.SetTexture("_ReticleTex", (Texture)(object)rt2); mt2.SetFloat("_ReticleScale", 20f); mt2.SetFloat("_ReticleDistance", 3.3f); mt2.SetTexture("_ZoomTex", (Texture)(object)rt2); mt2.SetFloat("_ZoomScale", 1f); mt2.SetFloat("_VignetteRadius", 1.331f); mt2.SetFloat("_VignetteSmoothness", 0.945f); mt2.SetFloat("_VignetteAlpha", 0f); mt2.SetFloat("_CameraDistance", 0f); ((Renderer)mr2).material = mt2; } private void Update() { } } public class barrelc : MonoBehaviour { public FVRFireArmAttachmentMount mount; public GameObject plate; 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) if (plate.transform.localEulerAngles.y < 45f) { if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } else if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } } public class barrelchange : MonoBehaviour { public OpenBoltReceiver gun; public FVRFireArmAttachmentMount mount; private void Start() { } private void Update() { if (mount.HasAttachmentsOnIt()) { if (!(((Object)((Component)mount.AttachmentsList[0]).gameObject).name == "MG3Barrel(Clone)")) { gun.m_fireSelectorMode = 0; } } else { gun.m_fireSelectorMode = 0; } } } } namespace JerryAr.GMOD_ToolGun { [BepInPlugin("JerryAr.GMOD_ToolGun", "GMOD_ToolGun", "1.0.1")] [BepInProcess("h3vr.exe")] [Description("Built with MeatKit")] [BepInDependency("h3vr.otherloader", "1.3.0")] public class GMOD_ToolGunPlugin : BaseUnityPlugin { private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); internal static ManualLogSource Logger; private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; LoadAssets(); } private void LoadAssets() { Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "JerryAr.GMOD_ToolGun"); OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.GMOD_ToolGun", "", "", "gmodtoolgun", ""); } } } public class RandomMovement : MonoBehaviour { public NavMeshAgent agent; public float range; public Transform centrePoint; private void Start() { agent = ((Component)this).GetComponent(); } private void Update() { //IL_0024: 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_0042: 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) if (agent.remainingDistance <= agent.stoppingDistance && RandomPoint(centrePoint.position, range, out var result)) { Debug.DrawRay(result, Vector3.up, Color.blue, 1f); agent.SetDestination(result); } } private bool RandomPoint(Vector3 center, float range, out Vector3 result) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) Vector3 val = center + Random.insideUnitSphere * range; NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 1f, -1)) { result = ((NavMeshHit)(ref val2)).position; return true; } result = Vector3.zero; return false; } } namespace JerryComponent { internal class HandFollowing : MonoBehaviour { public string handAnimaControName_Gun; public string handAnimaControName_Mag; private GameObject _player; private GameObject _POLeft; private GameObject _PORight; private FVRViveHand leftHand; private FVRViveHand rightHand; public Transform _ZuoShouWeiZhi; public Transform _YouShouWeiZhi; private void Start() { _player = ((Component)Object.FindObjectOfType()).gameObject; leftHand = ((Component)_player.transform.Find("Controller (left)")).GetComponent(); rightHand = ((Component)_player.transform.Find("Controller (right)")).GetComponent(); } private void Update() { HandFollow(); } private void HandFollow() { //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)leftHand.CurrentInteractable != (Object)null) { if ((Object)(object)((Component)leftHand.CurrentInteractable).GetComponent().PoseOverride_Touch != (Object)null) { _ZuoShouWeiZhi.position = ((Component)leftHand.CurrentInteractable).GetComponent().PoseOverride_Touch.position; _ZuoShouWeiZhi.rotation = ((Component)leftHand.CurrentInteractable).GetComponent().PoseOverride_Touch.rotation; ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, true); } else { _ZuoShouWeiZhi.position = ((Component)leftHand.CurrentInteractable).gameObject.transform.position; _ZuoShouWeiZhi.rotation = GM.CurrentMovementManager.LeftHand.rotation; ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, true); ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } } else { _ZuoShouWeiZhi.position = GM.CurrentMovementManager.LeftHand.position; _ZuoShouWeiZhi.rotation = GM.CurrentMovementManager.LeftHand.rotation; ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } if (!((Object)(object)rightHand.CurrentInteractable != (Object)null)) { _YouShouWeiZhi.position = GM.CurrentMovementManager.RightHand.position; _YouShouWeiZhi.rotation = GM.CurrentMovementManager.RightHand.rotation; ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } else if ((Object)(object)((Component)rightHand.CurrentInteractable).GetComponent().PoseOverride_Touch != (Object)null) { _YouShouWeiZhi.position = ((Component)rightHand.CurrentInteractable).gameObject.GetComponent().PoseOverride_Touch.position; _YouShouWeiZhi.rotation = ((Component)rightHand.CurrentInteractable).gameObject.GetComponent().PoseOverride_Touch.rotation; ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, true); } else { _YouShouWeiZhi.position = ((Component)rightHand.CurrentInteractable).gameObject.transform.position; _YouShouWeiZhi.rotation = GM.CurrentMovementManager.RightHand.rotation; ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, true); ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } } } public class OilLamp : MonoBehaviour { public FVRFireArmAttachment lamp; public WaggleJoint wag1; public WaggleJoint wag2; public GameObject flame; public Light light; private void Start() { } private void Update() { //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (!((FVRInteractiveObject)lamp).m_isHeld && (Object)(object)lamp.curMount == (Object)null && (Object)(object)((FVRPhysicalObject)lamp).m_quickbeltSlot == (Object)null) { ((Behaviour)wag1).enabled = false; ((Behaviour)wag2).enabled = false; ((Component)wag1.hingeGraphic).transform.localEulerAngles = new Vector3(270f, 0f, 0f); ((Component)wag2.hingeGraphic).transform.localEulerAngles = new Vector3(270f, 0f, 0f); } else if (((FVRInteractiveObject)lamp).m_isHeld || (Object)(object)lamp.curMount != (Object)null || (Object)(object)((FVRPhysicalObject)lamp).m_quickbeltSlot != (Object)null) { ((Behaviour)wag1).enabled = true; ((Behaviour)wag2).enabled = true; } light.range = flame.transform.localScale.y * 10f; light.intensity = flame.transform.localScale.y * 1f; } } public class GasFilter : Suppressor { public SuppressorInterface INTERF; public float timerG = 0f; public bool isUsed = false; public float minutesleft = 5f; public Rigidbody RB; private void Start() { } private void Update() { if (((Behaviour)INTERF).isActiveAndEnabled) { if (!isUsed) { timerG += Time.deltaTime; float num = (int)timerG / 60; if (num >= minutesleft) { ((FVRFireArmAttachment)this).DetachFromMount(); isUsed = true; } PlayerBlindness._isAMaskEquipped = true; } if (isUsed) { ((FVRFireArmAttachment)this).DetachFromMount(); PlayerBlindness._isAMaskEquipped = false; RB.isKinematic = false; RB.useGravity = true; } } else if (((Behaviour)INTERF).isActiveAndEnabled) { } } } public class GasMaskFilterDetect : MonoBehaviour { public GameObject GM; public GameObject Detect; public GameObject Breath; public FVRPhysicalObject Phy; private void Start() { } private void Update() { if ((Object)(object)Phy.m_quickbeltSlot != (Object)null) { if (Detect.activeInHierarchy) { GM.SetActive(false); Breath.SetActive(false); } else if (!Detect.activeInHierarchy) { GM.SetActive(true); Breath.SetActive(true); } } else if ((Object)(object)Phy.m_quickbeltSlot == (Object)null) { GM.SetActive(false); Breath.SetActive(false); } } } public class MagRotate : MonoBehaviour { public GameObject rot; public FVRFireArm gun; public MagFold fold; private void Awake() { } private void Start() { } private void Update() { //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)gun.Magazine)) { if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { if (((FVRInteractiveObject)gun).m_hand.OtherHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { if (!((Object)(object)((FVRInteractiveObject)gun).m_hand.OtherHand.CurrentInteractable != (Object)null)) { ((FVRInteractiveObject)gun).m_hand.OtherHand.ForceSetInteractable((FVRInteractiveObject)(object)fold); ((FVRInteractiveObject)fold).BeginInteraction(((FVRInteractiveObject)gun).m_hand.OtherHand); } } else if (!((FVRInteractiveObject)gun).m_hand.OtherHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { gun.EjectMag(false); } else if (rot.transform.localEulerAngles.y >= 30f && (Object)(object)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable == (Object)(object)fold) { fold.MinRot = 30f; fold.MaxRot = 30f; } } else if ((Object)(object)((FVRInteractiveObject)gun).m_hand == (Object)null && rot.transform.localEulerAngles.y < 30f) { gun.EjectMag(false); } } else if (!Object.op_Implicit((Object)(object)gun.Magazine)) { fold.MinRot = 0f; fold.MaxRot = 30f; rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } } public class FaceUpdate : MonoBehaviour { public AnimationClip[] animations; private Animator anim; public float delayWeight; private float current = 0f; private void Start() { anim = ((Component)this).GetComponent(); } private void Update() { if (Input.GetMouseButton(0)) { current = 1f; } else { current = Mathf.Lerp(current, 0f, delayWeight); } anim.SetLayerWeight(1, current); } } [RequireComponent(typeof(Animator))] public class IdleChanger : MonoBehaviour { private Animator anim; private AnimatorStateInfo currentState; private AnimatorStateInfo previousState; public bool _random = false; public float _threshold = 0.5f; public float _interval = 2f; private void Start() { //IL_0015: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) anim = ((Component)this).GetComponent(); currentState = anim.GetCurrentAnimatorStateInfo(0); previousState = currentState; ((MonoBehaviour)this).StartCoroutine("RandomChange"); } private void Update() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown("up") || Input.GetButton("Jump")) { anim.SetBool("Next", true); } if (Input.GetKeyDown("down")) { anim.SetBool("Back", true); } if (anim.GetBool("Next")) { currentState = anim.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref previousState)).nameHash != ((AnimatorStateInfo)(ref currentState)).nameHash) { anim.SetBool("Next", false); previousState = currentState; } } if (anim.GetBool("Back")) { currentState = anim.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref previousState)).nameHash != ((AnimatorStateInfo)(ref currentState)).nameHash) { anim.SetBool("Back", false); previousState = currentState; } } } private void OnGUI() { //IL_0019: 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_007d: Unknown result type (might be due to invalid IL or missing references) GUI.Box(new Rect((float)(Screen.width - 110), 10f, 100f, 90f), "Change Motion"); if (GUI.Button(new Rect((float)(Screen.width - 100), 40f, 80f, 20f), "Next")) { anim.SetBool("Next", true); } if (GUI.Button(new Rect((float)(Screen.width - 100), 70f, 80f, 20f), "Back")) { anim.SetBool("Back", true); } } private IEnumerator RandomChange() { while (true) { if (_random) { float num = Random.Range(-1f, 1f); if (num <= 0f - _threshold) { anim.SetBool("Back", true); } else if (num >= _threshold) { anim.SetBool("Next", true); } } yield return (object)new WaitForSeconds(_interval); } } } public class SceneLoader : MonoBehaviour { private void OnGUI() { //IL_0019: 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_0072: Unknown result type (might be due to invalid IL or missing references) GUI.Box(new Rect(10f, (float)(Screen.height - 100), 100f, 90f), "Change Scene"); if (GUI.Button(new Rect(20f, (float)(Screen.height - 70), 80f, 20f), "Next")) { LoadNextScene(); } if (GUI.Button(new Rect(20f, (float)(Screen.height - 40), 80f, 20f), "Back")) { LoadPreScene(); } } private void LoadPreScene() { int num = Application.loadedLevel + 1; if (num <= 1) { num = Application.levelCount; } Application.LoadLevel(num); } private void LoadNextScene() { int num = Application.loadedLevel + 1; if (num >= Application.levelCount) { num = 1; } Application.LoadLevel(num); } } public class ThirdPersonCamera : MonoBehaviour { public float smooth = 3f; private Transform standardPos; private Transform frontPos; private Transform jumpPos; private bool bQuickSwitch = false; private void Start() { //IL_0074: 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) standardPos = GameObject.Find("CamPos").transform; if (Object.op_Implicit((Object)(object)GameObject.Find("FrontPos"))) { frontPos = GameObject.Find("FrontPos").transform; } if (Object.op_Implicit((Object)(object)GameObject.Find("JumpPos"))) { jumpPos = GameObject.Find("JumpPos").transform; } ((Component)this).transform.position = standardPos.position; ((Component)this).transform.forward = standardPos.forward; } private void FixedUpdate() { if (Input.GetButton("Fire1")) { setCameraPositionFrontView(); } else if (Input.GetButton("Fire2")) { setCameraPositionJumpView(); } else { setCameraPositionNormalView(); } } private void setCameraPositionNormalView() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_0024: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (!bQuickSwitch) { ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, standardPos.position, Time.fixedDeltaTime * smooth); ((Component)this).transform.forward = Vector3.Lerp(((Component)this).transform.forward, standardPos.forward, Time.fixedDeltaTime * smooth); } else { ((Component)this).transform.position = standardPos.position; ((Component)this).transform.forward = standardPos.forward; bQuickSwitch = false; } } private void setCameraPositionFrontView() { //IL_0014: 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) bQuickSwitch = true; ((Component)this).transform.position = frontPos.position; ((Component)this).transform.forward = frontPos.forward; } private void setCameraPositionJumpView() { //IL_0014: 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_0030: 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_0051: 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) bQuickSwitch = false; ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, jumpPos.position, Time.fixedDeltaTime * smooth); ((Component)this).transform.forward = Vector3.Lerp(((Component)this).transform.forward, jumpPos.forward, Time.fixedDeltaTime * smooth); } } [RequireComponent(typeof(Animator))] [RequireComponent(typeof(CapsuleCollider))] [RequireComponent(typeof(Rigidbody))] public class UnityChanControlScriptWithRgidBody : MonoBehaviour { public float animSpeed = 1.5f; public float lookSmoother = 3f; public bool useCurves = true; public float useCurvesHeight = 0.5f; public float forwardSpeed = 7f; public float backwardSpeed = 2f; public float rotateSpeed = 2f; public float jumpPower = 3f; private CapsuleCollider col; private Rigidbody rb; private Vector3 velocity; private float orgColHight; private Vector3 orgVectColCenter; private Animator anim; private AnimatorStateInfo currentBaseState; private GameObject cameraObject; private static int idleState = Animator.StringToHash("Base Layer.Idle"); private static int locoState = Animator.StringToHash("Base Layer.Locomotion"); private static int jumpState = Animator.StringToHash("Base Layer.Jump"); private static int restState = Animator.StringToHash("Base Layer.Rest"); private void Start() { //IL_004d: 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) anim = ((Component)this).GetComponent(); col = ((Component)this).GetComponent(); rb = ((Component)this).GetComponent(); cameraObject = GameObject.FindWithTag("MainCamera"); orgColHight = col.height; orgVectColCenter = col.center; } private void FixedUpdate() { //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_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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: 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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: 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_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) float axis = Input.GetAxis("Horizontal"); float axis2 = Input.GetAxis("Vertical"); anim.SetFloat("Speed", axis2); anim.SetFloat("Direction", axis); anim.speed = animSpeed; currentBaseState = anim.GetCurrentAnimatorStateInfo(0); rb.useGravity = true; velocity = new Vector3(0f, 0f, axis2); velocity = ((Component)this).transform.TransformDirection(velocity); if ((double)axis2 > 0.1) { velocity *= forwardSpeed; } else if ((double)axis2 < -0.1) { velocity *= backwardSpeed; } if (Input.GetButtonDown("Jump") && ((AnimatorStateInfo)(ref currentBaseState)).nameHash == locoState && !anim.IsInTransition(0)) { rb.AddForce(Vector3.up * jumpPower, (ForceMode)2); anim.SetBool("Jump", true); } Transform transform = ((Component)this).transform; transform.localPosition += velocity * Time.fixedDeltaTime; ((Component)this).transform.Rotate(0f, axis * rotateSpeed, 0f); if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == locoState) { if (useCurves) { resetCollider(); } } else if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == jumpState) { cameraObject.SendMessage("setCameraPositionJumpView"); if (anim.IsInTransition(0)) { return; } if (useCurves) { float @float = anim.GetFloat("JumpHeight"); float float2 = anim.GetFloat("GravityControl"); if (float2 > 0f) { rb.useGravity = false; } Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)this).transform.position + Vector3.up, -Vector3.up); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2)) { if (((RaycastHit)(ref val2)).distance > useCurvesHeight) { col.height = orgColHight - @float; float num = orgVectColCenter.y + @float; col.center = new Vector3(0f, num, 0f); } else { resetCollider(); } } } anim.SetBool("Jump", false); } else if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == idleState) { if (useCurves) { resetCollider(); } if (Input.GetButtonDown("Jump")) { anim.SetBool("Rest", true); } } else if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == restState && !anim.IsInTransition(0)) { anim.SetBool("Rest", false); } } private void resetCollider() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) col.height = orgColHight; col.center = orgVectColCenter; } } namespace JerryComponent { public class SPMK6 : MonoBehaviour { public GameObject mark; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public LAPD2019Laser laser; public float distanceNearest = 0f; public GameObject muzzle; public Transform player; private Vector3 velocity; public float muzzleToTarget = 0f; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void Update() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_016c: 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_01d7: Unknown result type (might be due to invalid IL or missing references) List list = null; if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 100f || muzzleToTarget > 10f) { 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 = Vector3.SmoothDamp(mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.01f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); muzzleToTarget = Vector3.Angle(((Component)player).transform.forward, ((Component)nearestAI).transform.position); } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI == null) { return; } for (int i = 0; i < currentAI.Count; i++) { if (Vector3.Angle(muzzle.transform.forward, ((Component)currentAI[i]).transform.position) < 15f && (Object)(object)currentAI[i] != (Object)null) { list.Add(currentAI[i]); } } for (int j = 0; j < currentAI.Count; j++) { if ((Object)(object)currentAI[j] == (Object)null) { currentAI.Remove(currentAI[j]); } } if (list != null) { nearestAI = GetNearestGameObject(player, list); } if (list != null) { } } 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, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; 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 scrach : MonoBehaviour { public GameObject Fire; public GameObject Detonate; public GameObject Cracker; public float DieTime; private void Start() { } public void KillMe() { Object.Destroy((Object)(object)Cracker); } private void Update() { if (Fire.activeInHierarchy) { Detonate.SetActive(true); ((MonoBehaviour)this).Invoke("KillMe", DieTime); } else { Detonate.SetActive(false); } } } public class ShotClockMP : MonoBehaviour { public GameObject startBeep; public GameObject startBeepPre; public GameObject textmode0; public GameObject textmode1; public GameObject textmode2; public GameObject menu0; public GameObject menu1; public GameObject menu2; public bool startcounting = false; private float shotsin; private float secondsin; public GameObject startbutton; public GameObject menuplus; public GameObject menuminus; public GameObject setplus; public GameObject setminusandon; public bool button1pressed = false; public bool button2pressed = false; public bool button3pressed = false; public bool button4pressed = false; public float menu; public float shots = 1f; public float seconds = 3f; public Text shotsText; public Text secondsText; public Text modesText; public Text timerText; private float t; private float startTime; public bool timerStarted = false; private void Awake() { menu = 0f; t = 0f; startTime = 0f; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void OnDisable() { menu = 0f; t = 0f; startTime = 0f; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void Update() { //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_0381: 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) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Expected O, but got Unknown //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Expected O, but got Unknown if (menu == 0f) { modesText.text = "Main"; textmode0.SetActive(true); textmode1.SetActive(false); textmode2.SetActive(false); } else if (menu == 1f) { modesText.text = "Shot"; textmode0.SetActive(false); textmode1.SetActive(true); textmode2.SetActive(false); } else if (menu == 2f) { modesText.text = "Secs"; textmode0.SetActive(false); textmode1.SetActive(false); textmode2.SetActive(true); } if (menu < 0f) { menu = 2f; } else if (menu > 2f) { menu = 0f; } shotsText.text = shots.ToString(); if (shots < 1f) { shots = 99f; } else if (shots > 99f) { shots = 1f; } secondsText.text = seconds.ToString(); if (seconds < 0f) { seconds = 10f; } else if (seconds > 10f) { seconds = 1f; } if (menuplus.transform.localEulerAngles.z > 1f) { if (!button1pressed) { menu += 1f; button1pressed = true; } } else if (menuplus.transform.localEulerAngles.z < 1f) { button1pressed = false; } if (menuminus.transform.localEulerAngles.z > 1f) { if (!button2pressed) { menu -= 1f; button2pressed = true; } } else if (menuminus.transform.localEulerAngles.z < 1f) { button2pressed = false; } if (setplus.transform.localEulerAngles.z > 1f) { if (!button3pressed) { if (menu == 0f) { button3pressed = true; } else if (menu == 1f) { shots += 1f; button3pressed = true; } else if (menu == 2f) { seconds += 1f; button3pressed = true; } } } else if (setplus.transform.localEulerAngles.z < 1f) { button3pressed = false; } if (setminusandon.transform.localEulerAngles.z > 1f) { if (!button4pressed) { if (menu == 0f) { t = 0f; startTime = 0f; startcounting = true; secondsin = seconds; shotsin = shots; button4pressed = true; startBeepPre.SetActive(true); } else if (menu == 1f) { shots -= 1f; button4pressed = true; } else if (menu == 2f) { seconds -= 1f; button4pressed = true; } } } else if (setminusandon.transform.localEulerAngles.z < 1f) { button4pressed = false; } if (startcounting) { secondsin -= 1f * Time.deltaTime; if (secondsin < 0f) { startBeepPre.SetActive(false); startBeep.SetActive(true); timerStarted = true; secondsin = 0f; startcounting = false; } } if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); t += Time.deltaTime; string text = ((int)t / 60).ToString("00"); string text2 = (t % 60f).ToString("00"); string text3 = (t * 1000f % 1000f).ToString("000"); string text4 = text3.Substring(0, 2); timerText.text = text + ":" + text2 + ":" + text4; if (shotsin < 0f || t > 60f) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); startBeep.SetActive(false); timerStarted = false; } } } private void OnShotFired(FVRFireArm firearm) { shotsin -= 1f; } private void OnDestroy() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } } } public class ShotClockMP2 : MonoBehaviour { public int i = 0; private Text stT; private string min; private string sec; private string milsec; private string mil; public List minL; public List secL; public List milsecL; public GameObject startBeep; public GameObject startBeepPre; public GameObject textmode0; public GameObject textmode1; public GameObject textmode2; public GameObject menu0; public GameObject menu1; public GameObject menu2; public bool startcounting = false; private float secondsin; public GameObject startbutton; public GameObject menuplus; public GameObject menuminus; public GameObject setplus; public GameObject setminusandon; public bool button1pressed = false; public bool button2pressed = false; public bool button3pressed = false; public bool button4pressed = false; public float menu; public float seconds = 3f; public Text setsText; public Text secondsText; public Text modesText; public Text timerText; public Text timerTextzero; private float t; private float startTime; public bool timerStarted = false; private void Awake() { stT = timerTextzero; minL.Add("00"); secL.Add("00"); milsecL.Add("00"); menu = 0f; t = 0f; startTime = 0f; min = "00"; sec = "00"; milsec = "000"; mil = "00"; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void OnDisable() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } min = "00"; sec = "00"; milsec = "000"; mil = "00"; minL.Clear(); secL.Clear(); milsecL.Clear(); menu = 0f; t = 0f; startTime = 0f; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void FixedUpdate() { //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_0614: Expected O, but got Unknown //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Expected O, but got Unknown //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Expected O, but got Unknown if (menu == 0f) { modesText.text = "Main"; textmode0.SetActive(true); textmode1.SetActive(false); textmode2.SetActive(false); } else if (menu == 1f) { modesText.text = "Sets"; textmode0.SetActive(false); textmode1.SetActive(true); textmode2.SetActive(false); } else if (menu == 2f) { modesText.text = "Secs"; textmode0.SetActive(false); textmode1.SetActive(false); textmode2.SetActive(true); } if (menu < 0f) { menu = 2f; } else if (menu > 2f) { menu = 0f; } if (minL.Count > 0 && secL.Count > 0 && milsecL.Count > 0) { if (i < 0) { i = minL.Count - 1; } else if (i > minL.Count - 1) { i = 0; } setsText.text = i + "=" + minL[i] + ":" + secL[i] + ":" + milsecL[i]; } secondsText.text = seconds.ToString(); if (seconds < 1f) { seconds = 10f; } else if (seconds > 10f) { seconds = 1f; } if (menuplus.transform.localEulerAngles.z > 1f) { if (!button1pressed) { menu += 1f; button1pressed = true; } } else if (menuplus.transform.localEulerAngles.z < 1f) { button1pressed = false; } if (menuminus.transform.localEulerAngles.z > 1f) { if (!button2pressed) { menu -= 1f; button2pressed = true; } } else if (menuminus.transform.localEulerAngles.z < 1f) { button2pressed = false; } if (setplus.transform.localEulerAngles.z > 1f) { if (!button3pressed) { if (menu == 0f) { button3pressed = true; } else if (menu == 1f) { if (minL.Count > 0 && secL.Count > 0 && milsecL.Count > 0) { i++; } button3pressed = true; } else if (menu == 2f) { seconds += 1f; button3pressed = true; } } } else if (setplus.transform.localEulerAngles.z < 1f) { button3pressed = false; } if (setminusandon.transform.localEulerAngles.z > 1f) { if (!button4pressed) { if (menu == 0f) { minL.Clear(); secL.Clear(); milsecL.Clear(); minL.Add("00"); secL.Add("00"); milsecL.Add("00"); t = 0f; startTime = 0f; startcounting = true; secondsin = seconds; button4pressed = true; startBeepPre.SetActive(true); } else if (menu == 1f) { if (minL.Count > 0 && secL.Count > 0 && milsecL.Count > 0) { i--; } button4pressed = true; } else if (menu == 2f) { seconds -= 1f; button4pressed = true; } } } else if (setminusandon.transform.localEulerAngles.z < 1f) { startcounting = false; GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); startBeep.SetActive(false); timerStarted = false; startBeepPre.SetActive(false); button4pressed = false; } if (startcounting) { secondsin -= 1f * Time.deltaTime; if (secondsin < 0f) { GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); startBeepPre.SetActive(false); startBeep.SetActive(true); timerStarted = true; secondsin = 0f; startcounting = false; } } if (timerStarted) { t += Time.deltaTime; int num = (int)t / 3600; int num2 = ((int)t - num * 3600) / 60; int num3 = (int)t - num * 3600 - num2 * 60; int num4 = (int)((t - (float)(int)t) * 1000f); min = num2.ToString("00"); sec = num3.ToString("00"); milsec = num4.ToString("000"); mil = milsec.Substring(0, 2); timerText.text = min + ":" + sec + ":" + mil; if (t / 60f > 5f) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); startBeep.SetActive(false); timerStarted = false; } } } private void OnShotFired(FVRFireArm firearm) { minL.Add(min); secL.Add(sec); milsecL.Add(mil); } private void OnDestroy() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } } } public class PixelShotGun : MonoBehaviour { public GameObject boltFake; public GameObject handleFake; public GameObject boltcon; public GameObject handlecon; public GameObject boltReal; public GameObject handleReal; public GameObject m0; public GameObject m1; public GameObject m2; public GameObject m3; public GameObject m4; public GameObject m5; private void Start() { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: 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_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) if (boltFake.transform.localPosition.z == 0f) { m0.SetActive(true); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 1f) { m0.SetActive(false); m1.SetActive(true); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 2f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(true); m3.SetActive(false); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 3f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(true); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 4f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(true); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 5f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(true); } boltcon.transform.position = boltReal.transform.position; boltcon.transform.eulerAngles = boltReal.transform.eulerAngles; handlecon.transform.position = handleReal.transform.position; handlecon.transform.eulerAngles = handleReal.transform.eulerAngles; boltFake.transform.localPosition = new Vector3(0f, 0f, (float)(int)boltcon.transform.localPosition.z); handleFake.transform.localPosition = new Vector3(0f, 0f, (float)(int)handlecon.transform.localPosition.z); } } public class TexasStarA : MonoBehaviour { public FVRFireArmAttachmentMount Mount; public GameObject Weight; private void Start() { } private void Update() { if (Mount.HasAttachmentsOnIt()) { Weight.SetActive(true); } if (!Mount.HasAttachmentsOnIt()) { Weight.SetActive(false); } } } public class TexasStarB : ReactiveSteelTarget { public FVRFireArmAttachmentInterface interf; public FVRFireArmAttachment Attach; public GameObject Phys; public Damage dam; public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 if ((int)dam.Class == 1 && (int)dam.Class == 3 && (int)dam.Class == 2) { if (((Behaviour)interf).isActiveAndEnabled) { Attach.DetachFromMount(); Debug.Log((object)"I'm hit!"); } ((ReactiveSteelTarget)this).PlayHitSound(1f); } } private void Start() { } public void Update() { if (dam.Dam_TotalKinetic > 1f) { Attach.DetachFromMount(); } else if (!(dam.Dam_TotalKinetic <= 0f)) { } if (((Behaviour)interf).isActiveAndEnabled) { Phys.SetActive(true); } else if (!((Behaviour)interf).isActiveAndEnabled) { Phys.SetActive(false); } } } public class ToolGun : MonoBehaviour { public GameObject none; public GameObject hinge; public GameObject fix; public GameObject spring; public GameObject force; public GameObject triggergeo; public FVRViveHand hand; public FVRPhysicalObject mainobj; public GameObject trigger; public GameObject togglelever; public GameObject buttonlever; public bool isFired; public GameObject objA; public GameObject objB; public Transform muzzle; public LayerMask lm; public Material mathinge; public Material matspring; public Material matfixed; public AudioEvent fire; 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_0755: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_084c: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) if (trigger.transform.localEulerAngles.x < 5f && isFired) { isFired = false; } if (togglelever.transform.localPosition.y < 0.5f) { none.SetActive(true); hinge.SetActive(false); fix.SetActive(false); spring.SetActive(false); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (togglelever.transform.localPosition.y > 0.5f && togglelever.transform.localPosition.y < 1.5f) { none.SetActive(false); hinge.SetActive(true); fix.SetActive(false); spring.SetActive(false); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(20f, 0f, 0f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val)).rigidbody != (Object)null) { if ((Object)(object)objA == (Object)null) { objA = ((Component)((RaycastHit)(ref val)).rigidbody).gameObject; } else if ((Object)(object)objA != (Object)null) { objB = ((Component)((RaycastHit)(ref val)).rigidbody).gameObject; if ((Object)(object)objB != (Object)(object)objA) { ConfigurableJoint val2 = objB.AddComponent(); ((Joint)val2).connectedBody = objA.GetComponent(); val2.xMotion = (ConfigurableJointMotion)0; val2.yMotion = (ConfigurableJointMotion)0; val2.zMotion = (ConfigurableJointMotion)0; ToolGunLine toolGunLine = objB.AddComponent(); toolGunLine.objA = objA; toolGunLine.objB = objB; toolGunLine.mat = mathinge; } objA = null; objB = null; } } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if (togglelever.transform.localPosition.y > 1.5f && togglelever.transform.localPosition.y < 2.5f) { none.SetActive(false); hinge.SetActive(false); fix.SetActive(true); spring.SetActive(false); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(0f, 355f, 345f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val3 = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val3, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val3)).rigidbody != (Object)null) { if ((Object)(object)objA == (Object)null) { objA = ((Component)((RaycastHit)(ref val3)).rigidbody).gameObject; } else if ((Object)(object)objA != (Object)null) { objB = ((Component)((RaycastHit)(ref val3)).rigidbody).gameObject; if ((Object)(object)objB != (Object)(object)objA) { FixedJoint val4 = objB.AddComponent(); ((Joint)val4).connectedBody = objA.GetComponent(); ToolGunLine toolGunLine2 = objB.AddComponent(); toolGunLine2.objA = objA; toolGunLine2.objB = objB; toolGunLine2.mat = matfixed; } objA = null; objB = null; } } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if (togglelever.transform.localPosition.y > 2.5f && togglelever.transform.localPosition.y < 3.5f) { none.SetActive(false); hinge.SetActive(false); fix.SetActive(false); spring.SetActive(true); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(340f, 0f, 0f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val5 = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val5, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val5)).rigidbody != (Object)null) { if ((Object)(object)objA == (Object)null) { objA = ((Component)((RaycastHit)(ref val5)).rigidbody).gameObject; } else if ((Object)(object)objA != (Object)null) { objB = ((Component)((RaycastHit)(ref val5)).rigidbody).gameObject; if ((Object)(object)objB != (Object)(object)objA) { SpringJoint val6 = objB.AddComponent(); ((Joint)val6).connectedBody = objA.GetComponent(); val6.spring = 25f; val6.damper = 5f; val6.tolerance = 0.025f; ((Joint)val6).anchor = new Vector3(0f, 0f, 0f); ((Joint)val6).autoConfigureConnectedAnchor = false; ((Joint)val6).connectedAnchor = new Vector3(0f, 0f, 0f); ToolGunLine toolGunLine3 = objB.AddComponent(); toolGunLine3.objA = objA; toolGunLine3.objB = objB; toolGunLine3.mat = matspring; } objA = null; objB = null; } } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if (togglelever.transform.localPosition.y > 3.5f) { none.SetActive(false); hinge.SetActive(false); fix.SetActive(false); spring.SetActive(false); force.SetActive(true); buttonlever.transform.localEulerAngles = new Vector3(0f, 5f, 15f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val7 = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val7, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val7)).rigidbody != (Object)null) { ((RaycastHit)(ref val7)).rigidbody.AddForce(((RaycastHit)(ref val7)).normal * -20f, (ForceMode)2); } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if ((Object)(object)((FVRInteractiveObject)mainobj).m_hand == (Object)null || (Object)(object)hand == (Object)null || (Object)(object)objA == (Object)null || (Object)(object)objB == (Object)null) { hand = null; } if (!((Object)(object)((FVRInteractiveObject)mainobj).m_hand != (Object)null)) { return; } hand = ((FVRInteractiveObject)mainobj).m_hand; if ((Object)(object)hand != (Object)null) { if (hand.Input.TriggerPressed) { triggergeo.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else { triggergeo.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } } public class ToolGunLine : MonoBehaviour { public Material mat; public GameObject objA; public GameObject objB; public LineRenderer LR; public bool rendered; private void Start() { } private void Update() { //IL_007a: 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) if (((Object)(object)objA != (Object)null) & ((Object)(object)objB != (Object)null)) { if (!rendered) { LR = objB.AddComponent(); rendered = true; } if ((Object)(object)LR != (Object)null) { ((Renderer)LR).material = mat; LR.SetPosition(0, objA.transform.position); LR.SetPosition(1, objB.transform.position); LR.startWidth = 0.01f; LR.endWidth = 0.01f; } } if ((Object)(object)objA == (Object)null || (Object)(object)objB == (Object)null) { LR = null; } } } public class Launcher2k11 : MonoBehaviour { public GameObject pointing; public NavMeshAgent agent; public GameObject missileGeoL; public GameObject missileGeoR; public GameObject launchposL; public GameObject launchposR; public GameObject missileprefab; public bool rdytolaunchL = false; public bool rdytolaunchR = false; public bool fireL = false; public bool fireR = false; public bool fire = false; public float cd = 5f; public float reloadL = 20f; public float reloadR = 20f; public Vector3 xvel = Vector3.zero; public Vector3 yvel = Vector3.zero; public GameObject lookatobj; public GameObject frameX; public GameObject frameY; public Radar1S91 radar; public void OnTriggerStay(Collider other) { if (((Object)((Component)other).gameObject).name == "RadarTrigger") { radar = ((Component)other).gameObject.GetComponent(); } } private void Start() { fireL = true; fireR = false; missileGeoL.SetActive(false); missileGeoR.SetActive(false); reloadL = 0f; reloadR = 20f; } private void Update() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GM.CurrentPlayerBody.Head != (Object)null) { agent.SetDestination(((Component)GM.CurrentPlayerBody.Head).transform.position); } if ((Object)(object)radar == (Object)null) { cd = 5f; lookatobj.transform.localEulerAngles = Vector3.RotateTowards(lookatobj.transform.localEulerAngles, new Vector3(0f, 0f, 0f), 360f, 360f); frameX.transform.localEulerAngles = Vector3.SmoothDamp(frameX.transform.localEulerAngles, new Vector3(30f, 0f, 0f), ref xvel, 2f); } if ((Object)(object)radar != (Object)null) { if ((Object)(object)radar.airtarg != (Object)null) { cd -= 1f * Time.deltaTime; if (cd < 0f) { cd = 0f; } lookatobj.transform.eulerAngles = Vector3.RotateTowards(lookatobj.transform.forward, radar.airtarg.gameObject.transform.position, 360f, 360f); frameX.transform.localEulerAngles = Vector3.SmoothDamp(frameX.transform.forward, new Vector3(0f, 0f, 0f), ref xvel, 2f); if (frameX.transform.localEulerAngles.x < 5f) { fire = true; } } if ((Object)(object)radar.nearestAI != (Object)null) { cd -= 1f * Time.deltaTime; if (cd < 0f) { cd = 0f; } lookatobj.transform.eulerAngles = Vector3.RotateTowards(lookatobj.transform.forward, ((Component)radar.nearestAI).gameObject.transform.position, 360f, 360f); frameX.transform.localEulerAngles = Vector3.SmoothDamp(frameX.transform.forward, new Vector3(0f, 0f, 0f), ref xvel, 2f); if (frameX.transform.localEulerAngles.x < 5f) { fire = true; } } } frameY.transform.localEulerAngles = Vector3.SmoothDamp(frameY.transform.localEulerAngles, new Vector3(0f, lookatobj.transform.localEulerAngles.y, 0f), ref yvel, 2f); if (reloadL >= 0f) { reloadL -= 1f * Time.deltaTime; } if (reloadL < 0f) { reloadL = 0f; } if (reloadL < 1f) { missileGeoL.SetActive(true); rdytolaunchL = true; } if (rdytolaunchL && fireL && fire && cd < 1f) { missileGeoL.SetActive(false); Object.Instantiate(missileprefab, launchposL.transform.position, launchposL.transform.rotation); reloadL = 20f; rdytolaunchL = false; fireL = false; cd = 5f; fireR = true; } if (reloadR >= 0f) { reloadR -= 1f * Time.deltaTime; } if (reloadR < 0f) { reloadR = 0f; } if (reloadR < 1f) { missileGeoR.SetActive(true); rdytolaunchR = true; } if (rdytolaunchR && fireR && fire && cd < 1f) { missileGeoR.SetActive(false); Object.Instantiate(missileprefab, launchposR.transform.position, launchposR.transform.rotation); reloadR = 20f; rdytolaunchR = false; fireR = false; cd = 5f; fireL = true; } } } public class Missile2k11 : MonoBehaviour { public Rigidbody rocket; public GameObject roc; public Rigidbody rb; public GameObject explosion; public GameObject explode; public GameObject mark; public GameObject subrocket; public GameObject mainrocket; public bool subtomain = false; public float countdown = 30f; public float m_speed = 25f; public float acc = 50f; public float m_rotspeed = 100f; private void Start() { subrocket.SetActive(true); mainrocket.SetActive(false); } private void Update() { //IL_006c: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0210: 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_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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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_01b1: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_0189: Unknown result type (might be due to invalid IL or missing references) mark = GameObject.Find("2k11Mark"); if ((Object)(object)mark == (Object)null || (Object)(object)roc == (Object)null || (Object)(object)rocket == (Object)null) { } if (countdown > 25f) { rocket.AddRelativeTorque(new Vector3(0f, 0f, 50f), (ForceMode)1); rocket.AddRelativeForce(new Vector3(0f, 0f, 1000f), (ForceMode)1); } if (countdown < 25f && (Object)(object)mark != (Object)null) { Object.Destroy((Object)(object)roc); Vector3 val = mark.transform.position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(((Component)this).transform.forward, normalized) / m_rotspeed; if (num > 0.01f || num < -0.01f) { Transform transform = ((Component)this).transform; Vector3 val2 = Vector3.Slerp(((Component)this).transform.forward, normalized, Time.deltaTime / num); transform.forward = ((Vector3)(ref val2)).normalized; } else { m_speed += acc * Time.deltaTime; Transform transform2 = ((Component)this).transform; Vector3 val3 = Vector3.Slerp(((Component)this).transform.forward, normalized, 1f); transform2.forward = ((Vector3)(ref val3)).normalized; } Transform transform3 = ((Component)this).transform; transform3.position += ((Component)this).transform.forward * m_speed * Time.deltaTime; } if ((Object)(object)mark != (Object)null) { if (countdown <= 0f) { countdown = 0f; } if (Vector3.Distance(((Component)this).transform.position, mark.transform.position) < 5f || countdown < 5f) { Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } countdown -= 1f * Time.deltaTime; if (countdown <= 0f) { subrocket.SetActive(false); mainrocket.SetActive(true); } } public void OnCollisionEnter(Collision collision) { //IL_000d: 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_002f: 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) Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class Radar1S91 : MonoBehaviour { public GameObject airtarg; public GameObject pointing; public NavMeshAgent agent; public GameObject rotbase; public GameObject rotbaseelev; public GameObject sradar; public RotateOverTime rot; public GameObject fradar; public GameObject radarfold; public GameObject fradarbase; private Vector3 velocity; public GameObject mark; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public float distanceNearest = 0f; public Transform player; public Vector3 fradarvel = Vector3.zero; public Vector3 sradarvel = Vector3.zero; public LayerMask lm; public Transform radarpos; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void Start() { } private void Update() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //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) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_002c: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: 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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: 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_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GM.CurrentPlayerBody.Head != (Object)null) { agent.SetDestination(((Component)GM.CurrentPlayerBody.Head).transform.position); } Vector3 val = pointing.transform.position - fradar.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(((Component)this).transform.forward, normalized) / 20f; if (num > 0.01f || num < -0.01f) { Transform transform = fradar.transform; Vector3 val2 = Vector3.Slerp(fradar.transform.forward, normalized, Time.deltaTime / num); transform.forward = ((Vector3)(ref val2)).normalized; } else { Transform transform2 = ((Component)this).transform; Vector3 val3 = Vector3.Slerp(((Component)this).transform.forward, normalized, 1f); transform2.forward = ((Vector3)(ref val3)).normalized; } fradarbase.transform.eulerAngles = new Vector3(0f, fradar.transform.eulerAngles.y, 0f); if (rotbase.transform.localPosition.y < 0.008f) { radarfold.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (rotbase.transform.localPosition.y > 0.008f) { radarfold.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 2500f) { airtarg = GameObject.Find("F18_Steak(Clone)"); if ((Object)(object)airtarg != (Object)null) { if (radarfold.transform.localEulerAngles.x > 45f) { ((Behaviour)rot).enabled = true; } rotbaseelev.transform.localEulerAngles = new Vector3(90f, 0f, 0f); mark.SetActive(true); mark.transform.position = airtarg.transform.position; AxisLookAt(lookAtObj.transform, airtarg.transform.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, airtarg.transform.position); } if ((Object)(object)airtarg == (Object)null) { mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Behaviour)rot).enabled = false; sradar.transform.localEulerAngles = Vector3.SmoothDamp(sradar.transform.localEulerAngles, new Vector3(0f, 0f, 0f), ref sradarvel, 1f); if (sradar.transform.localEulerAngles.y < 2f || sradar.transform.localEulerAngles.y > 358f) { rotbaseelev.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } if ((Object)(object)nearestAI != (Object)null) { if (radarfold.transform.localEulerAngles.x > 45f) { ((Behaviour)rot).enabled = true; } rotbaseelev.transform.localEulerAngles = new Vector3(90f, 0f, 0f); mark.SetActive(true); mark.transform.position = ((Component)nearestAI).transform.position; AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI == null) { return; } for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null) { currentAI.Remove(currentAI[i]); } } 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, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; 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 PortalGun : MonoBehaviour { public GameObject playerball; public float YHeight; public Vector3 vel = Vector3.zero; public GameObject blue; public GameObject yellow; public GameObject none; public AudioEvent shoot; public AudioEvent clear; public LayerMask lm; public Transform aperture; public RaycastHit hit; public GameObject triggerClear; public GameObject yellowTrigger; public GameObject blueTrigger; public bool fired = false; public GameObject yellowPortal; public GameObject bluePortal; public GameObject yellowPortalObjOut; public GameObject bluePortalObjOut; public GameObject yellowPortalOut; public GameObject bluePortalOut; public GameObject yellowPortalCam; public GameObject bluePortalCam; public GameObject yellowPortalCamRef; public GameObject bluePortalCamRef; public GameObject yellowRot; public GameObject blueRot; private void Start() { yellowPortal.transform.SetParent((Transform)null); bluePortal.transform.SetParent((Transform)null); blue.SetActive(false); yellow.SetActive(false); none.SetActive(true); yellowPortal.SetActive(false); bluePortal.SetActive(false); } 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); } private void Update() { //IL_000c: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: 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_03a4: 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_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: 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_023f: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0202: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0285: 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_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_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_058c: 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_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: 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_073a: Unknown result type (might be due to invalid IL or missing references) //IL_073f: 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_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_070e: Unknown result type (might be due to invalid IL or missing references) //IL_078e: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_0812: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(playerball.transform.position, yellowPortal.transform.position) < Vector3.Distance(playerball.transform.position, bluePortal.transform.position)) { if (yellowPortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y && yellowPortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = Vector3.SmoothDamp(playerball.transform.position, new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, yellowPortal.transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z), ref vel, 0.1f); } else if (yellowPortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } else if (yellowPortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } } else if (bluePortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y && bluePortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = Vector3.SmoothDamp(playerball.transform.position, new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, bluePortal.transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z), ref vel, 0.1f); } else if (bluePortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } else if (bluePortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } yellowPortalCam.transform.localRotation = yellowPortalCamRef.transform.localRotation; bluePortalCam.transform.localRotation = bluePortalCamRef.transform.localRotation; AxisLookAt(yellowPortalCamRef.transform, ((Component)GM.CurrentPlayerBody.Head).transform.position, Vector3.forward); AxisLookAt(bluePortalCamRef.transform, ((Component)GM.CurrentPlayerBody.Head).transform.position, Vector3.forward); if (yellowTrigger.transform.localEulerAngles.x > 45f && !fired) { blue.SetActive(false); yellow.SetActive(true); none.SetActive(false); SM.PlayGenericSound(shoot, ((Component)this).transform.position); shootYellow(); fired = true; } if (blueTrigger.transform.localEulerAngles.x > 45f && !fired) { blue.SetActive(true); yellow.SetActive(false); none.SetActive(false); SM.PlayGenericSound(shoot, ((Component)this).transform.position); shootBlue(); fired = true; } else if (yellowTrigger.transform.localEulerAngles.x < 45f && blueTrigger.transform.localEulerAngles.x < 45f && triggerClear.transform.localEulerAngles.x < 45f) { fired = false; } else if (triggerClear.transform.localEulerAngles.x > 45f && !fired) { blue.SetActive(false); yellow.SetActive(false); none.SetActive(true); SM.PlayGenericSound(clear, ((Component)this).transform.position); yellowPortal.SetActive(false); bluePortal.SetActive(false); yellowPortal.transform.localPosition = ((Component)this).transform.position; yellowPortal.transform.localEulerAngles = ((Component)this).transform.eulerAngles; bluePortal.transform.localPosition = ((Component)this).transform.position; bluePortal.transform.localEulerAngles = ((Component)this).transform.eulerAngles; fired = true; } } public void shootYellow() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Physics.Raycast(aperture.position, aperture.forward, ref hit, 1000f, LayerMask.op_Implicit(lm))) { yellowPortal.SetActive(true); yellowPortal.transform.position = ((RaycastHit)(ref hit)).point; yellowPortal.transform.rotation = Quaternion.LookRotation(((RaycastHit)(ref hit)).normal); } } public void shootBlue() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Physics.Raycast(aperture.position, aperture.forward, ref hit, 1000f, LayerMask.op_Implicit(lm))) { bluePortal.SetActive(true); bluePortal.transform.position = ((RaycastHit)(ref hit)).point; bluePortal.transform.rotation = Quaternion.LookRotation(((RaycastHit)(ref hit)).normal); } } private void OnDestroy() { Object.Destroy((Object)(object)yellowPortal.gameObject); Object.Destroy((Object)(object)bluePortal.gameObject); } } public class Portals : MonoBehaviour { public PortalGun pGun; public GameObject splode; public bool isYellowPortal = true; public GameObject face; public GameObject otherPotral; public Portals oppositeportal; private void OnTriggerEnter(Collider other) { //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: 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_023e: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject == (Object)(object)otherPotral) { ((Component)this).gameObject.SetActive(false); } if (!otherPotral.activeInHierarchy || !((Component)this).gameObject.activeInHierarchy) { return; } if ((Object)(object)((Component)other).gameObject == (Object)(object)pGun.playerball) { if (isYellowPortal) { ((Component)GM.CurrentMovementManager).transform.eulerAngles = new Vector3(0f, pGun.bluePortal.transform.eulerAngles.y, 0f); ((Component)GM.CurrentMovementManager).transform.position = pGun.bluePortalOut.transform.position; GM.CurrentMovementManager.Blast(pGun.bluePortalOut.transform.forward, 15f, false); Object.Instantiate(splode, pGun.bluePortalOut.transform); } else { ((Component)GM.CurrentMovementManager).transform.eulerAngles = new Vector3(0f, pGun.yellowPortal.transform.eulerAngles.y, 0f); ((Component)GM.CurrentMovementManager).transform.position = pGun.yellowPortalOut.transform.position; GM.CurrentMovementManager.Blast(pGun.yellowPortalOut.transform.forward, 15f, false); Object.Instantiate(splode, pGun.yellowPortalOut.transform); } } if (!((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null)) { return; } if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { if ((Object)(object)((Component)other).gameObject.GetComponent().m_quickbeltSlot != (Object)null) { return; } if (isYellowPortal) { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.bluePortalObjOut.transform.position; Object.Instantiate(splode, pGun.bluePortalOut.transform.position, pGun.bluePortalOut.transform.rotation); } else { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.yellowPortalObjOut.transform.position; Object.Instantiate(splode, pGun.yellowPortalOut.transform.position, pGun.yellowPortalOut.transform.rotation); } } if (isYellowPortal) { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.bluePortalObjOut.transform.position; Object.Instantiate(splode, pGun.bluePortalOut.transform.position, pGun.bluePortalOut.transform.rotation); } else { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.yellowPortalObjOut.transform.position; Object.Instantiate(splode, pGun.yellowPortalOut.transform.position, pGun.yellowPortalOut.transform.rotation); } } private void Update() { if (((Component)this).gameObject.activeInHierarchy && otherPotral.activeInHierarchy) { face.SetActive(true); } else { face.SetActive(false); } } } public class FrankenTurret : MonoBehaviour { public Animator ani; public FVRPhysicalObject obj; public LayerMask lm; public Transform bottom; public Transform top; public Transform left; public Transform right; public Transform rear; public float length = 0.5f; public float lengthshort = 0.05f; private void Start() { } private void Update() { //IL_0063: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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_00d5: 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_00fd: 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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)obj).m_isHeld) { ani.SetBool("Grabbed", true); ani.SetBool("InTheAir", false); ani.SetBool("FallOver", false); return; } ani.SetBool("Grabbed", false); RaycastHit val = default(RaycastHit); if (Physics.Raycast(bottom.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, length, LayerMask.op_Implicit(lm))) { ani.SetBool("InTheAir", false); ani.SetBool("FallOver", false); } else if (Physics.Raycast(top.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) || Physics.Raycast(left.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) || Physics.Raycast(right.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) || Physics.Raycast(rear.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm))) { ani.SetBool("InTheAir", false); ani.SetBool("FallOver", true); } else if (!Physics.Raycast(top.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) && !Physics.Raycast(left.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) && !Physics.Raycast(right.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) && !Physics.Raycast(rear.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm))) { ani.SetBool("InTheAir", true); ani.SetBool("FallOver", false); } } } }