using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using FistVR; using H3VRUtils.MonoScripts.VisualModifiers; using HarmonyLib; using OpenScripts2; using OtherLoader; using UnityEngine; using Valve.VR; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace JerryComponent { public class FlashPanLidAuto : MonoBehaviour { public FlintlockFlashPan flashpan; private void FixedUpdate() { //IL_001e: 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 (flashpan.numGrainsPowderOn > 0f) { flashpan.FrizenState = (FState)0; } else if (flashpan.numGrainsPowderOn <= 0f) { flashpan.FrizenState = (FState)1; } } } public class FlintLockPepperBox : MonoBehaviour { public SingleActionRevolver revolver; public FlintlockFlashPan[] flashpans; public GameObject[] hammers; public FlintlockWeapon[] guns; public bool ready = false; public FlintlockPseudoRamRod[] FPR; public Collider[] col; public GameObject[] RamGeo; private void Start() { } private void FixedUpdate() { //IL_002c: 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_00a0: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Invalid comparison between Unknown and I4 if (revolver.m_isHammerCocked) { ready = true; guns[revolver.m_curChamber].HammerState = (HState)2; } else if (!revolver.m_isHammerCocked && ready) { ready = false; guns[revolver.m_curChamber].ReleaseHammer(); guns[revolver.m_curChamber].SetFlintState((FlintState)0); } for (int i = 0; i < FPR.Length; i++) { if ((int)FPR[i].RState == 1) { col[i].enabled = true; RamGeo[i].SetActive(true); } else if ((int)FPR[i].RState != 1) { col[i].enabled = false; RamGeo[i].SetActive(false); } } } } public class FlintLockPepperBoxDA : MonoBehaviour { public Revolver revolver; public FlintlockFlashPan[] flashpans; public GameObject[] hammers; public FlintlockWeapon[] guns; public bool ready = false; public FlintlockPseudoRamRod[] FPR; public Collider[] col; public GameObject[] RamGeo; private void Start() { } private void FixedUpdate() { //IL_002c: 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_00a0: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Invalid comparison between Unknown and I4 if (revolver.m_isHammerLocked) { ready = true; guns[revolver.m_curChamber].HammerState = (HState)2; } else if (!revolver.m_isHammerLocked && ready) { ready = false; guns[revolver.m_curChamber].ReleaseHammer(); guns[revolver.m_curChamber].SetFlintState((FlintState)0); } for (int i = 0; i < FPR.Length; i++) { if ((int)FPR[i].RState == 1) { col[i].enabled = true; RamGeo[i].SetActive(true); } else if ((int)FPR[i].RState != 1) { col[i].enabled = false; RamGeo[i].SetActive(false); } } } } public class CarlTrigger : FVRInteractiveObject { public CarlGustaf Carl; public GameObject Trigger; private void Update() { //IL_003e: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Invalid comparison between Unknown and I4 //IL_0160: 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_0083: 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_00fc: Invalid comparison between Unknown and I4 //IL_0095: 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) if ((Object)(object)base.m_hand != (Object)null) { Trigger.transform.localEulerAngles = new Vector3(20f * base.m_hand.Input.TriggerFloat, 0f, 0f); if (base.m_hand.Input.TriggerFloat > 0.5f && base.m_hand.Input.TriggerFloat < 0.75f && (int)Carl.CHState != 0) { Carl.CHState = (ChargingHandleState)0; } if (base.m_hand.Input.TriggerFloat > 0.75f && (int)Carl.CHState == 0) { Carl.TryToFire(); } if (base.m_hand.Input.TriggerFloat < 0.25f && (int)Carl.CHState != 2) { Carl.CHState = (ChargingHandleState)2; } } if ((Object)(object)base.m_hand == (Object)null) { Trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if ((int)Carl.CHState != 2) { Carl.CHState = (ChargingHandleState)2; } } } } public class CrankWheels : MonoBehaviour { public FVRInteractiveObject interactable; public GameObject Wheel; public float speed = 30f; public GameObject Mount; public float maxMountAngle = 20f; public float minMountAngle = 0f; [Header("手感参数")] public float wheelRadius = 0.2f; public float minLinearSpeed = 0.05f; public float angularGain = 1f; public float inertia = 0.96f; private float wheelTotalAngle = 0f; private float wheelAngularVelocity = 0f; private Vector3 prevLocalHandPos; private bool hasPrevHand = false; private bool wasHeldLastFrame = false; private void Start() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Wheel != (Object)null) { Wheel.transform.localRotation = Quaternion.identity; } } private void Update() { //IL_0048: 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) //IL_0059: 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_0142: 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_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_00a1: 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_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_00c7: 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_01f8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)interactable != (Object)null && (Object)(object)interactable.m_hand != (Object)null) { Vector3 position = ((Component)interactable.m_hand.Collider_Fingers).gameObject.transform.position; Vector3 val = Wheel.transform.InverseTransformPoint(position); if (hasPrevHand) { Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(prevLocalHandPos.y, prevLocalHandPos.z); Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(val.y, val.z); Vector2 val4 = val3 - val2; Vector2 normalized = ((Vector2)(ref val3)).normalized; Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(0f - normalized.y, normalized.x); float num = Vector2.Dot(val4, val5); float deltaTime = Time.deltaTime; float num2 = ((!(deltaTime > 0f)) ? 0f : (num / deltaTime)); if (Mathf.Abs(num2) < minLinearSpeed) { wheelAngularVelocity = 0f; } else { float num3 = num2 / wheelRadius; float num4 = num3 * 57.29578f * angularGain; wheelAngularVelocity = num4; } } prevLocalHandPos = val; hasPrevHand = true; wasHeldLastFrame = true; } else { if (wasHeldLastFrame) { wasHeldLastFrame = false; } else { wheelAngularVelocity *= inertia; if (Mathf.Abs(wheelAngularVelocity) < 0.01f) { wheelAngularVelocity = 0f; } } hasPrevHand = false; } wheelTotalAngle += wheelAngularVelocity * Time.deltaTime; if ((Object)(object)Wheel != (Object)null) { Wheel.transform.localRotation = Quaternion.Euler(wheelTotalAngle, 0f, 0f); } if ((Object)(object)Mount != (Object)null && Mathf.Abs(wheelAngularVelocity) > 0.01f) { float deltaY = wheelAngularVelocity * speed * -1f * Time.deltaTime; RotateMountWithLimit(deltaY); } } private void RotateMountWithLimit(float deltaY) { //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) float num = Mount.transform.localEulerAngles.y; if (num > 180f) { num -= 360f; } float num2 = num + deltaY; if ((!(num2 > maxMountAngle) || !(deltaY > 0f)) && (!(num2 < minMountAngle) || !(deltaY < 0f))) { Mount.transform.Rotate(0f, deltaY, 0f, (Space)1); } } public void ResetWheel() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) wheelTotalAngle = 0f; wheelAngularVelocity = 0f; if ((Object)(object)Wheel != (Object)null) { Wheel.transform.localRotation = Quaternion.identity; } hasPrevHand = false; wasHeldLastFrame = false; } } public class EnableIfDisabled : MonoBehaviour { public FVRFireArmRound Bullet; public WaggleJoint wag; public GameObject phy; private void Start() { } private void Update() { if (Bullet.IsSpent) { wag.angleLimitLeft = 180f; wag.angleLimitRight = 25f; } if (!Bullet.IsSpent) { wag.angleLimitLeft = 180f; wag.angleLimitRight = -180f; } if (Bullet.IsChambered) { phy.SetActive(false); } if (!Bullet.IsChambered) { phy.SetActive(true); } } } public class FagotGripX : MonoBehaviour { public GameObject Fagot; public GameObject fagotLaser; public string laser; public LAPD2019Laser l; public string GunName; public FVRPhysicalObject obj; public WorkingRigidbodies WR; private void Start() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) Fagot = GameObject.Find(GunName); fagotLaser = GameObject.Find(laser); l = fagotLaser.GetComponent(); WR = Fagot.GetComponent(); if ((Object)(object)WR != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)WR.G).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)WR.GP).transform.eulerAngles; ConfigurableJoint val = ((Component)this).gameObject.AddComponent(); ((Joint)val).connectedBody = WR.G; ((Joint)val).autoConfigureConnectedAnchor = false; ((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)val).anchor = new Vector3(0f, 0f, 0f); val.xMotion = (ConfigurableJointMotion)0; val.yMotion = (ConfigurableJointMotion)0; val.zMotion = (ConfigurableJointMotion)0; val.angularXMotion = (ConfigurableJointMotion)2; val.angularYMotion = (ConfigurableJointMotion)2; val.angularZMotion = (ConfigurableJointMotion)2; } if ((Object)(object)l != (Object)null) { l.PO = obj; } } private void Update() { if ((Object)(object)Fagot == (Object)null || (Object)(object)WR == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class FagotGripY : MonoBehaviour { public GameObject FagotYMani; public string GunYName; public GameObject Fagot; public string Gun; public CarlGustaf CG; public FVRPhysicalObject obj; public WorkingRigidbodies WR; private JointLimits JL; private void Start() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) FagotYMani = GameObject.Find(GunYName); Fagot = GameObject.Find(Gun); CG = Fagot.GetComponent(); WR = Fagot.GetComponent(); if ((Object)(object)WR != (Object)null) { ((Component)this).gameObject.transform.SetParent(((Component)WR.Y).transform); ((Component)this).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)this).gameObject.transform.localEulerAngles = new Vector3(25f, 0f, 0f); HingeJoint val = ((Component)this).gameObject.AddComponent(); ((Joint)val).connectedBody = WR.Y; ((Joint)val).autoConfigureConnectedAnchor = false; ((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)val).anchor = new Vector3(0f, 0f, 0f); ((Joint)val).axis = new Vector3(1f, 0f, 0f); val.useLimits = true; ((JointLimits)(ref JL)).max = 45f; ((JointLimits)(ref JL)).min = 0f; val.limits = JL; } } private void Update() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)FagotYMani != (Object)null) { FagotYMani.transform.eulerAngles = ((Component)this).gameObject.transform.eulerAngles; } if ((Object)(object)Fagot == (Object)null || Gun == null || (Object)(object)WR == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } else if ((Object)(object)Fagot != (Object)null && Gun != null && (Object)(object)WR != (Object)null && (Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null && ((FVRInteractiveObject)obj).m_hand.Input.TriggerPressed && CG.Chamber.IsFull && !CG.Chamber.IsSpent) { CG.TryToChargeHandle(); CG.TryToFire(); } } } public class GatherToLine : MonoBehaviour { public GameObject LaserPort; public float cd = 10f; private void Start() { LaserPort = GameObject.Find("LaserFagot"); cd = 10f; } private void Update() { //IL_001f: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0057: 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_00ce: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)LaserPort != (Object)null) { Vector3 nearestPointOnRay = GetNearestPointOnRay(((Component)this).gameObject.transform.position, LaserPort.transform.position, LaserPort.transform.forward); AxisLookAt(((Component)this).gameObject.transform, nearestPointOnRay, Vector3.forward); } if (!((Object)(object)((Component)this).gameObject.GetComponent() != (Object)null)) { return; } if (!((Component)this).gameObject.GetComponent().useGravity) { ((Component)this).gameObject.GetComponent().AddRelativeForce(new Vector3(0f, 0f, 0.0025f), (ForceMode)1); ((Component)this).gameObject.GetComponent().AddForce(new Vector3(0f, -0.00275f, 0f), (ForceMode)1); } if (!((Component)this).gameObject.GetComponent().useGravity) { return; } cd -= Time.deltaTime; if (cd <= 5f && (Object)(object)((Component)this).gameObject.GetComponent() != (Object)null) { ((Collider)((Component)this).gameObject.GetComponent()).isTrigger = true; if (!((Collider)((Component)this).gameObject.GetComponent()).isTrigger) { } } if (cd <= 0f) { if ((Object)(object)GameObject.Find(((Object)((Component)this).gameObject).name + "(Clone)") != (Object)null) { Object.Destroy((Object)(object)GameObject.Find(((Object)((Component)this).gameObject).name + "(Clone)")); } if (((Object)((Component)this).gameObject).name.Replace("(Clone)", "") != null && (Object)(object)GameObject.Find(((Object)((Component)this).gameObject).name.Replace("(Clone)", "")) != (Object)null) { Object.Destroy((Object)(object)GameObject.Find(((Object)((Component)this).gameObject).name.Replace("(Clone)", ""))); } Object.Destroy((Object)(object)((Component)this).gameObject); } } private Vector3 GetNearestPointOnRay(Vector3 point, Vector3 origin, Vector3 dir) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_002a: 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_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_0037: 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) Vector3 normalized = ((Vector3)(ref dir)).normalized; Vector3 val = point - origin; float num = Vector3.Dot(val, normalized); if (num < 0f) { num = 0f; } return origin + num * normalized; } 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 class LauncherHandle : MonoBehaviour { public GameObject LCH; public string GunName; public FVRPhysicalObject obj; public CarlGustaf Gun; public WorkingRigidbodies WR; private void Start() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) LCH = GameObject.Find(GunName); Gun = LCH.GetComponent(); WR = LCH.GetComponent(); if ((Object)(object)WR != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)WR.G).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)WR.GP).transform.eulerAngles; ConfigurableJoint val = ((Component)this).gameObject.AddComponent(); ((Joint)val).connectedBody = WR.G; ((Joint)val).autoConfigureConnectedAnchor = false; ((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)val).anchor = new Vector3(0f, 0f, 0f); val.xMotion = (ConfigurableJointMotion)0; val.yMotion = (ConfigurableJointMotion)0; val.zMotion = (ConfigurableJointMotion)0; val.angularXMotion = (ConfigurableJointMotion)2; val.angularYMotion = (ConfigurableJointMotion)2; val.angularZMotion = (ConfigurableJointMotion)2; } } private void Update() { if ((Object)(object)LCH == (Object)null || (Object)(object)Gun == (Object)null || (Object)(object)WR == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } else if ((Object)(object)LCH != (Object)null && (Object)(object)Gun != (Object)null && (Object)(object)WR != (Object)null && (Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null && ((FVRInteractiveObject)obj).m_hand.Input.TriggerPressed) { Gun.TryToFire(); } } } public class MuzzleEffectFagot : MonoBehaviour { public GameObject effect; public CarlGustaf gun; public bool fired = false; private void Start() { } private void Update() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) if (gun.Chamber.IsFull && !gun.Chamber.IsSpent) { fired = false; } else if (gun.Chamber.IsFull && gun.Chamber.IsSpent && !fired) { Object.Instantiate(effect, ((Component)((FVRFireArm)gun).MuzzlePos).transform.position, ((Component)((FVRFireArm)gun).MuzzlePos).transform.rotation); fired = true; } } } public class ReelAndWire : MonoBehaviour { public List points; public LineRenderer LR; public float dis; public GameObject Proj; public string tubeName = "9M113TubeP"; public string projName = "9M113ProjP"; public string Launcher = "9M113"; public float cdkill = 7.5f; private void Start() { //IL_0051: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown if ((Object)(object)GameObject.Find(Launcher) != (Object)null && (Object)(object)GameObject.Find(Launcher).GetComponent() != (Object)null) { ((FVRInteractiveObject)GameObject.Find(Launcher).GetComponent()).IsSimpleInteract = true; } GameObject item = Object.Instantiate(new GameObject("KonkursPoint0"), ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); if (!points.Contains(item)) { points.Add(item); } if (((Object)(object)Proj == (Object)null) & ((Object)(object)GameObject.Find(projName) != (Object)null)) { Proj = GameObject.Find(projName); } } private void Update() { //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: 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_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_01a4: 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) LR.positionCount = points.Count; if (points.Count > 0) { for (int i = 0; i < points.Count; i++) { if ((Object)(object)points[i] == (Object)null) { points.Remove(points[i]); } if ((Object)(object)points[i].GetComponent() == (Object)null) { Rigidbody val = points[i].AddComponent(); val.mass = 0.25f; val.drag = 0.25f; val.useGravity = false; } if ((Object)(object)points[i].GetComponent() == (Object)null) { points[i].AddComponent(); } if ((Object)(object)points[i] != (Object)null) { LR.SetPosition(i, points[i].transform.position); } } } if ((Object)(object)Proj != (Object)null) { if (points.Count > 0 && (Object)(object)points[0] != (Object)null && (Object)(object)GameObject.Find(tubeName) != (Object)null) { points[0].transform.position = GameObject.Find(tubeName).transform.position; } ((Component)this).gameObject.transform.position = Proj.transform.position; ((Component)this).gameObject.transform.rotation = Proj.transform.rotation; if (Vector3.Distance(((Component)this).gameObject.transform.position, points[points.Count - 1].transform.position) > 0.25f) { GameObject val2 = Object.Instantiate(new GameObject("KonkursPoint" + points.Count), ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); if ((Object)(object)val2.GetComponent() == (Object)null) { SphereCollider val3 = val2.AddComponent(); val3.radius = 0.025f; } if (!points.Contains(val2)) { points.Add(val2); } } } if (!((Object)(object)Proj == (Object)null)) { return; } cdkill -= Time.deltaTime; if (cdkill <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (points.Count <= 0) { return; } for (int num = points.Count - 1; num >= 0; num--) { if ((Object)(object)points[num] == (Object)null) { points.Remove(points[num]); } if ((Object)(object)points[num] != (Object)null && (Object)(object)points[num].GetComponent() != (Object)null && !points[num].GetComponent().useGravity) { points[num].GetComponent().mass = Random.Range(0.25f, 0.3f); points[num].GetComponent().drag = Random.Range(0.25f, 0.3f); points[num].GetComponent().useGravity = true; } } } private void OnDestroy() { if ((Object)(object)GameObject.Find(Launcher) != (Object)null && (Object)(object)GameObject.Find(Launcher).GetComponent() != (Object)null) { ((FVRInteractiveObject)GameObject.Find(Launcher).GetComponent()).IsSimpleInteract = false; } } } } public class ToggleLauncherPhysics : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { 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 NonSpringChargingHandle : MonoBehaviour { public OpenBoltReceiver gun; public OpenBoltChargingHandle bolthandle; public OpenBoltReceiverBolt bolt; public bool opened = false; private void FixedUpdate() { //IL_0011: 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_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_0067: 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_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) if (((Component)bolt).gameObject.transform.localPosition.z <= ((Component)bolt.Point_Bolt_LockPoint).transform.localPosition.z) { bolthandle.ForwardSpeed = 0f; } else if (((Component)bolt).gameObject.transform.localPosition.z > ((Component)bolt.Point_Bolt_LockPoint).transform.localPosition.z) { bolthandle.ForwardSpeed = 6f; } } } public class BelfFedMGLifter : MonoBehaviour { public FVRFireArmTopCover cover; public FVRFoldingStockXAxis lifter; public BoxCollider col; public OpenBoltReceiver gun; public float a = 45f; private void Update() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) if (!((FVRFireArm)gun).HasBelt && ((Component)cover).transform.localEulerAngles.x >= 45f) { ((Collider)col).enabled = true; } if (((FVRFireArm)gun).HasBelt || ((Component)cover).transform.localEulerAngles.x < 45f) { ((Collider)col).enabled = false; } if (((Component)lifter).transform.localEulerAngles.x < 45f) { a = ((Component)lifter).transform.localEulerAngles.x; ((Component)lifter).transform.localEulerAngles = new Vector3(a + 5f, 0f, 0f); } if (((Component)lifter).transform.localEulerAngles.x == 45f) { a = 45f; } if (((Component)lifter).transform.localEulerAngles.x > 45f) { ((Component)lifter).transform.localEulerAngles = new Vector3(45f, 0f, 0f); } } } public class BuletSearcher : MonoBehaviour { private BallisticProjectile boolet; public GameObject booletcam; private GameObject bullet; private bool spawned = false; private GameObject bc; private RaycastHit hit; private Ray ray; public LayerMask mask; private float timeb = 1f; private void Awake() { } private void Start() { } private void Update() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) timeb += Time.deltaTime; boolet = Object.FindObjectOfType(); if ((Object)(object)boolet != (Object)null) { bullet = ((Component)boolet).gameObject; } if ((Object)(object)boolet == (Object)null) { } if ((Object)(object)bullet != (Object)null && !spawned) { if (timeb >= 1f) { ray = new Ray(bullet.transform.position, bullet.transform.forward); if (Physics.Raycast(ray, ref hit, 2000f, LayerMask.op_Implicit(mask)) && ((Object)((Component)((RaycastHit)(ref hit)).collider).gameObject).name == "Geo_Head") { Time.timeScale = Mathf.Clamp(0.0001f, 0.0001f, 1f); Time.fixedDeltaTime = Time.timeScale / SteamVR.instance.hmd_DisplayFrequency; bc = Object.Instantiate(booletcam, bullet.transform.localPosition, Quaternion.identity); bc.transform.parent = bullet.transform; bc.transform.localEulerAngles = new Vector3(0f, 0f, 0f); timeb = 0f; } } if (!(timeb < 1f)) { } } if (spawned) { } if ((Object)(object)bc == (Object)null) { spawned = false; } if ((Object)(object)bc != (Object)null) { spawned = true; } } } public class ClosedBoltDoubleSideHandleRot : MonoBehaviour { public GameObject LeftHandle; public GameObject RightHandle; public FVRInteractiveObject bolt; private void Start() { } private void Update() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)bolt.m_hand != (Object)null) { if (Vector3.Distance(((Component)bolt.m_hand).transform.position, LeftHandle.transform.position) > Vector3.Distance(((Component)bolt.m_hand).transform.position, RightHandle.transform.position)) { RightHandle.transform.localEulerAngles = new Vector3(0f, 90f, 0f); LeftHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else if (Vector3.Distance(((Component)bolt.m_hand).transform.position, LeftHandle.transform.position) < Vector3.Distance(((Component)bolt.m_hand).transform.position, RightHandle.transform.position)) { LeftHandle.transform.localEulerAngles = new Vector3(0f, 270f, 0f); RightHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else if (Vector3.Distance(((Component)bolt.m_hand).transform.position, LeftHandle.transform.position) == Vector3.Distance(((Component)bolt.m_hand).transform.position, RightHandle.transform.position)) { LeftHandle.transform.localEulerAngles = new Vector3(0f, 270f, 0f); RightHandle.transform.localEulerAngles = new Vector3(0f, 90f, 0f); } } else if ((Object)(object)bolt.m_hand == (Object)null) { LeftHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f); RightHandle.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class ClosedBoltHandleLock : ClosedBoltHandle { private bool isLocked = false; private bool springread = false; private float springh; private float springb; private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) if (!(Vector3.Distance(((Component)this).gameObject.transform.position, base.Point_Rear.position) < 0.01f) || !((Object)(object)((FVRInteractiveObject)this).m_hand != (Object)null)) { return; } if (!isLocked) { if ((((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed) || (!((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed)) { if (!springread) { springh = base.Speed_Forward; springb = base.Weapon.Bolt.Speed_Forward; springread = true; } base.Speed_Forward = 0f; base.Weapon.Bolt.Speed_Forward = 0f; base.Weapon.Bolt.LockBolt(); base.CurPos = (HandlePos)2; base.Weapon.Bolt.CurPos = (BoltPos)2; ((FVRInteractiveObject)this).ForceBreakInteraction(); isLocked = true; } if (((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed && !((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed) { if (springread) { base.Speed_Forward = springh; base.Weapon.Bolt.Speed_Forward = springb; base.CurPos = (HandlePos)0; base.Weapon.Bolt.ReleaseBolt(); base.Weapon.Bolt.CurPos = (BoltPos)0; springread = false; } isLocked = false; } } else { if (!isLocked) { return; } if ((((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed) || (!((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed)) { if (!springread) { springh = base.Speed_Forward; springb = base.Weapon.Bolt.Speed_Forward; springread = true; } base.Speed_Forward = 0f; base.Weapon.Bolt.Speed_Forward = 0f; base.CurPos = (HandlePos)2; base.Weapon.Bolt.LockBolt(); base.Weapon.Bolt.CurPos = (BoltPos)2; ((FVRInteractiveObject)this).ForceBreakInteraction(); isLocked = true; } if (((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.BYButtonPressed && !((FVRInteractiveObject)this).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)this).m_hand.Input.Secondary2AxisNorthPressed) { if (springread) { base.Speed_Forward = springh; base.Weapon.Bolt.Speed_Forward = springb; base.CurPos = (HandlePos)0; base.Weapon.Bolt.ReleaseBolt(); base.Weapon.Bolt.CurPos = (BoltPos)0; springread = false; } isLocked = false; } } } } public class CylinderEject : MonoBehaviour { private float deltaang; private int chambersPassed = 0; public Rigidbody gunrig; public GameObject cylinder; public AudioEvent click; public GameObject loadinggate; public GameObject EjectRod; public Transform EjcetRodrear; public Transform CylinderEjectPos; public List chambers; public SingleActionRevolver gun; public Collider Rod; public bool slapped = false; public GameObject Weights; public GameObject WeightsRoot; public GameObject follow; public float decelerationPerChamber = 0.5f; public FVRViveHand prehand; private float currentSpeed; private bool isSpinning = false; private float previousAngle; public Mac11_Stock stock; public Transform slapdir; public Vector3 velLinearWorld; private void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) previousAngle = ((Component)this).transform.localEulerAngles.y; } private void Update() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Invalid comparison between Unknown and I4 //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_07b0: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_0915: Unknown result type (might be due to invalid IL or missing references) //IL_091a: Unknown result type (might be due to invalid IL or missing references) //IL_0706: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_0641: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_074f: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { velLinearWorld = ((FVRInteractiveObject)gun).m_hand.OtherHand.Input.VelLinearWorld; } if (loadinggate.transform.localEulerAngles.x > 45f && !slapped && (Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null && Vector3.Distance(((FVRInteractiveObject)gun).m_hand.OtherHand.PalmTransform.position, slapdir.position) < 0.15f && Vector3.Angle(velLinearWorld, slapdir.forward) < 60f && ((Vector3)(ref velLinearWorld)).magnitude > 1f) { prehand = ((FVRInteractiveObject)gun).m_hand; currentSpeed = 1000f * ((Vector3)(ref velLinearWorld)).magnitude; isSpinning = true; slapped = true; } if ((int)GM.Options.ControlOptions.CCM == 1) { if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { if (!((FVRInteractiveObject)gun).m_hand.Input.BYButtonPressed) { gun.m_isSpinning = false; } else if (((FVRInteractiveObject)gun).m_hand.Input.BYButtonPressed) { gun.m_isSpinning = true; } } else if ((Object)(object)((FVRInteractiveObject)gun).m_hand == (Object)null) { gun.m_isSpinning = false; } } if (Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[0]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[1]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[2]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[3]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[4]).gameObject.transform.position) > 0.0015f && Vector3.Distance(CylinderEjectPos.position, ((Component)chambers[5]).gameObject.transform.position) > 0.0015f) { EjectRod.transform.localPosition = new Vector3(0f, 0f, 0f); } if ((Object)(object)prehand == (Object)null) { } if (EjectRod.transform.localPosition.z < 0f && (Object)(object)((FVRInteractiveObject)stock).m_hand == (Object)null) { EjectRod.transform.localPosition = new Vector3(0f, 0f, EjectRod.transform.localPosition.z + Time.deltaTime); } if (EjectRod.transform.localPosition.z > 0f) { EjectRod.transform.localPosition = new Vector3(0f, 0f, 0f); } if (loadinggate.transform.localEulerAngles.x > 45f) { gun.m_isStateToggled = true; foreach (FVRFireArmChamber chamber in chambers) { if (Vector3.Distance(((Component)chamber).transform.position, CylinderEjectPos.position) < 0.0015f) { chamber.IsAccessible = true; chamber.IsManuallyChamberable = true; } else if (Vector3.Distance(((Component)chamber).transform.position, CylinderEjectPos.position) > 0.0015f) { chamber.IsAccessible = true; chamber.IsManuallyChamberable = false; } } } else if (loadinggate.transform.localEulerAngles.x < 45f) { gun.m_isStateToggled = false; foreach (FVRFireArmChamber chamber2 in chambers) { chamber2.IsAccessible = true; chamber2.IsManuallyChamberable = false; } } follow.transform.position = Weights.transform.position; if (follow.transform.localPosition.z < WeightsRoot.transform.localPosition.z) { foreach (FVRFireArmChamber chamber3 in chambers) { if (Vector3.Distance(((Component)chamber3).transform.position, CylinderEjectPos.position) < 0.0015f && (Object)(object)chamber3.m_round != (Object)null && loadinggate.transform.localEulerAngles.x > 45f) { chamber3.EjectRound(((FVRInteractiveObject)chamber3).PoseOverride.position, Vector3.zero, Vector3.zero, false); } } } else if (follow.transform.localPosition.z >= WeightsRoot.transform.localPosition.z) { foreach (FVRFireArmChamber chamber4 in chambers) { if (Vector3.Distance(((Component)chamber4).transform.position, CylinderEjectPos.position) < 0.0015f && EjectRod.transform.localPosition.z < EjcetRodrear.localPosition.z && (Object)(object)chamber4.m_round != (Object)null && loadinggate.transform.localEulerAngles.x > 45f) { chamber4.EjectRound(((FVRInteractiveObject)chamber4).PoseOverride.position, Vector3.zero, Vector3.zero, false); } } } if (EjectRod.transform.localEulerAngles.z < EjcetRodrear.localEulerAngles.z) { isSpinning = false; } if (!isSpinning) { return; } if (prehand.Input.GripPressed) { gunrig.useGravity = false; gunrig.isKinematic = true; prehand.Display_Controller.SetActive(false); ((FVRInteractiveObject)gun).ForceBreakInteraction(); ((Component)gun).gameObject.transform.position = ((Component)prehand).transform.position; ((Component)gun).gameObject.transform.eulerAngles = ((Component)prehand).transform.eulerAngles; } else if (!prehand.Input.GripPressed) { slapped = false; gunrig.useGravity = true; gunrig.isKinematic = false; prehand.Display_Controller.SetActive(true); isSpinning = false; prehand = null; } float deltaTime = Time.deltaTime; float num = currentSpeed * deltaTime; cylinder.transform.Rotate(0f, 0f, num, (Space)1); float z = cylinder.transform.localEulerAngles.z; deltaang = Mathf.DeltaAngle(previousAngle, z); if (deltaang >= 60f) { previousAngle = z; deltaang = 0f; chambersPassed++; SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); } if (chambersPassed > 0) { currentSpeed -= decelerationPerChamber * (float)chambersPassed; if (currentSpeed <= 0f) { chambersPassed = 0; previousAngle = z; gunrig.useGravity = true; gunrig.isKinematic = false; currentSpeed = 0f; isSpinning = false; SnapToNearestChamber(); prehand.ForceSetInteractable((FVRInteractiveObject)(object)gun); ((FVRInteractiveObject)gun).BeginInteraction(prehand); prehand = null; slapped = false; } } } private void SnapToNearestChamber() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) float num = deltaang; if (num != 0f) { float num2 = ((!(num < 30f)) ? (60f - num) : (0f - num)); cylinder.transform.Rotate(0f, 0f, cylinder.transform.localEulerAngles.z + num2, (Space)1); } } } public class Lookat : MonoBehaviour { public GameObject mark; public Transform nearestAI; public SosigLink[] currentAI = null; public GameObject lookAtObj; public LAPD2019Laser laser; public Transform player; private void OnTriggerEnter(Collider other) { currentAI = ((Component)other).gameObject.GetComponents(); } private void Update() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) if (currentAI == null || (Object)(object)nearestAI == (Object)null) { laser.TurnOff(); mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)nearestAI != (Object)null) { laser.TurnOn(); mark.SetActive(true); mark.transform.position = ((Component)nearestAI).transform.position; AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI != null) { nearestAI = GetNearestGameObject(player, currentAI); } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } public Transform GetNearestGameObject(Transform player, SosigLink[] objects) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Length > 0) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Length; i++) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).transform; } } } return val; } } public class Slotarea : MonoBehaviour { public GameObject parent; public void OnTriggerStay(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); 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; } } } public void OnTriggerExit(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); 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; } } } private void Update() { } } public class DynamoFlashLight : MonoBehaviour { public float magnith = 2.5f; public float pullmag = 25000f; public Collider col; public GameObject r0; public AudioEvent AudioSt; public GameObject Audio; public AudioSource Audios; public Rigidbody R; public RotateOverTime Magni; public RotateOverTime Magni2; public Rigidbody str1; public Rigidbody str2; public Rigidbody ring; public Rigidbody base1; public Rigidbody base2; public GameObject ringobj; public GameObject ringbase; public Light spotlight; public Material MatBody; public Material MatLens; public FVRPhysicalObject Mainobj; public FVRPhysicalObject Pullobj; public float MovSpeed; public float LocalVel; public float LastAV; public bool pulled = false; public float weight = 0f; private void Start() { pulled = false; Audio.SetActive(false); MatBody.SetFloat("_EmissionWeight", 0f); MatLens.SetFloat("_EmissionWeight", 0f); spotlight.intensity = 0f; Magni.angularVelocity.x = 0f; Magni.angularVelocity.y = 0f; Magni.angularVelocity.z = 0f; Magni2.angularVelocity.x = 0f; Magni2.angularVelocity.y = 0f; Magni2.angularVelocity.z = 0f; } private void Update() { //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) Magni2.angularVelocity.x = 0f; Magni2.angularVelocity.y = 0f; Magni2.angularVelocity.z = Magni.angularVelocity.z * 100f; str1.isKinematic = false; str2.isKinematic = false; ring.isKinematic = false; base1.isKinematic = false; base2.isKinematic = false; if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand == (Object)null) { col.enabled = false; } else if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand != (Object)null) { col.enabled = true; } if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand == (Object)null || (Object)(object)((FVRInteractiveObject)Pullobj).m_hand == (Object)null) { LocalVel = 0f; LastAV = 0f; } else if ((Object)(object)((FVRInteractiveObject)Mainobj).m_hand != (Object)null && (Object)(object)((FVRInteractiveObject)Pullobj).m_hand != (Object)null) { r0.transform.localEulerAngles = new Vector3(0f, 0f, Vector3.Distance(ringobj.transform.position, ringbase.transform.position) * 5000f); LocalVel = (Vector3.Distance(ringobj.transform.position, ringbase.transform.position) - LastAV) * Time.deltaTime; LastAV = LocalVel; LocalVel = (Vector3.Distance(ringobj.transform.position, ringbase.transform.position) - LastAV) * Time.deltaTime; LastAV = LocalVel; if (LocalVel > magnith) { Magni.angularVelocity.x = 0f; Magni.angularVelocity.y = 0f; Magni.angularVelocity.z = Magni.angularVelocity.z + LocalVel * pullmag * Time.deltaTime; } } spotlight.intensity = Magni.angularVelocity.z * 0.025f; weight = spotlight.intensity * 0.4f; if (weight > 1f) { weight = 1f; } else if (weight < 0f) { weight = 0f; } MatBody.SetFloat("_EmissionWeight", weight); MatLens.SetFloat("_EmissionWeight", weight); if (spotlight.intensity > 3f) { spotlight.intensity = 3f; } else if (spotlight.intensity < 0f) { spotlight.intensity = 0f; } if (Magni.angularVelocity.z > 0f) { Audio.SetActive(true); Audios.volume = Magni.angularVelocity.z * 0.1f; Audios.pitch = 0.1f + Magni.angularVelocity.z * 0.01f; } else if (Magni.angularVelocity.z <= 0f) { Audio.SetActive(false); Audios.pitch = 0f; Audios.volume = 0f; } else if (Magni.angularVelocity.z > 1000f) { Magni.angularVelocity.z = 1000f; } if (Magni.angularVelocity.z > 0f) { Magni.angularVelocity.z = Magni.angularVelocity.z - 2.5f * Time.deltaTime; } else if (Magni.angularVelocity.z < 0f) { Magni.angularVelocity.z = 0f; } if (Audios.volume > 1f) { Audios.volume = 1f; } else if (Audios.volume < 0f) { Audios.volume = 0f; } if (Audios.pitch > 2f) { Audios.pitch = 2f; } if (Audios.pitch < 0f) { Audios.pitch = 0f; } } private void OnDestroy() { Object.Destroy((Object)(object)((Component)str1).gameObject); Object.Destroy((Object)(object)((Component)str2).gameObject); Object.Destroy((Object)(object)((Component)ring).gameObject); Object.Destroy((Object)(object)((Component)R).gameObject); Object.Destroy((Object)(object)((Component)base1).gameObject); Object.Destroy((Object)(object)((Component)base2).gameObject); } } } [ExecuteInEditMode] [RequireComponent(typeof(Camera))] public class DeferredNightVisionEffect : MonoBehaviour { [SerializeField] [Tooltip("The main color of the NV effect")] public Color m_NVColor = new Color(0f, 1f, 0.1724138f, 0f); [SerializeField] [Tooltip("The color that the NV effect will 'bleach' towards (white = default)")] public Color m_TargetBleachColor = new Color(1f, 1f, 1f, 0f); [Range(0f, 0.1f)] [Tooltip("How much base lighting does the NV effect pick up")] public float m_baseLightingContribution = 0.025f; [Range(0f, 128f)] [Tooltip("The higher this value, the more bright areas will get 'bleached out'")] public float m_LightSensitivityMultiplier = 100f; private Material m_Material; private Shader m_Shader; [Tooltip("Do we want to apply a vignette to the edges of the screen?")] public bool useVignetting = true; public Shader NightVisionShader => m_Shader; private void DestroyMaterial(Material mat) { if (Object.op_Implicit((Object)(object)mat)) { Object.DestroyImmediate((Object)(object)mat); mat = null; } } private void CreateMaterials() { if ((Object)(object)m_Shader == (Object)null) { m_Shader = Shader.Find("Custom/DeferredNightVisionShader"); } if ((Object)(object)m_Material == (Object)null && (Object)(object)m_Shader != (Object)null && m_Shader.isSupported) { m_Material = CreateMaterial(m_Shader); } } private Material CreateMaterial(Shader shader) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)shader)) { return null; } Material val = new Material(shader); ((Object)val).hideFlags = (HideFlags)61; return val; } private void OnDisable() { DestroyMaterial(m_Material); m_Material = null; m_Shader = null; } [ContextMenu("UpdateShaderValues")] public void UpdateShaderValues() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)m_Material == (Object)null)) { m_Material.SetVector("_NVColor", Color.op_Implicit(m_NVColor)); m_Material.SetVector("_TargetWhiteColor", Color.op_Implicit(m_TargetBleachColor)); m_Material.SetFloat("_BaseLightingContribution", m_baseLightingContribution); m_Material.SetFloat("_LightSensitivityMultiplier", m_LightSensitivityMultiplier); m_Material.shaderKeywords = null; if (useVignetting) { Shader.EnableKeyword("USE_VIGNETTE"); } else { Shader.DisableKeyword("USE_VIGNETTE"); } } } private void OnEnable() { CreateMaterials(); UpdateShaderValues(); } public void ReloadShaders() { OnDisable(); } private void OnRenderImage(RenderTexture source, RenderTexture destination) { UpdateShaderValues(); CreateMaterials(); Graphics.Blit((Texture)(object)source, destination, m_Material); } } namespace JerryComponent { public class DoomReload : MonoBehaviour { public BreakActionWeapon Gun; public Rigidbody rig; public FVRFireArmChamber L; public FVRFireArmChamber R; public Transform Leject; public Transform Reject; public GameObject AnimationBase; public Transform AnimationRootPos; [NonSerialized] private FVRFireArmRound LR; [NonSerialized] private FVRFireArmRound RR; public GameObject close; public GameObject open; public GameObject insert; public Transform Ani1; public Transform Ani2; public Transform Ani3; public Transform Ani4; public Transform Ani5; public Transform Ani6; public Transform Ani7; public Transform AniBase; public bool isCheeki = false; public bool isCheekiReload = false; public float cd = 4f; public GameObject fore; private void Start() { if ((Object)(object)LR == (Object)null) { LR = L.m_round; } if ((Object)(object)RR == (Object)null) { RR = R.m_round; } } private void Update() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_0619: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06b7: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_094b: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_08c6: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_0914: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)LR == (Object)null || (Object)(object)RR == (Object)null) { } AnimationBase.transform.localPosition = new Vector3(0f, 0f, 0f); AnimationBase.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (((FVRInteractiveObject)Gun).m_isHeld) { if ((Vector3.Distance(GM.CurrentMovementManager.Head.position, ((Component)((FVRInteractiveObject)Gun).m_hand).gameObject.transform.position) <= 0.25f && Gun.m_isLatched) || (isCheekiReload && Gun.m_isLatched)) { isCheeki = true; } else if ((Vector3.Distance(GM.CurrentMovementManager.Head.position, ((Component)((FVRInteractiveObject)Gun).m_hand).gameObject.transform.position) > 0.25f && !isCheekiReload) || !Gun.m_isLatched) { isCheeki = false; } } if (isCheeki) { rig.useGravity = false; rig.isKinematic = true; AnimationBase.transform.SetParent(((Component)GM.CurrentMovementManager.Head).transform); Gun.m_hasLatchButton = false; if (!isCheekiReload) { fore.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Component)Gun).gameObject.transform.position = ((Component)AniBase).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)AniBase).transform.eulerAngles; } if (L.IsSpent && R.IsSpent) { if ((Object)(object)LR == (Object)null) { LR = L.m_round; } if ((Object)(object)RR == (Object)null) { RR = R.m_round; } if ((Object)(object)LR != (Object)null && (Object)(object)RR != (Object)null) { isCheekiReload = true; } } } else if (!isCheeki) { rig.useGravity = true; rig.isKinematic = false; AnimationBase.transform.SetParent(AnimationRootPos); Gun.m_hasLatchButton = true; } if (!isCheekiReload) { if ((Object)(object)LR != (Object)null) { LR = null; } if ((Object)(object)RR != (Object)null) { RR = null; } open.SetActive(false); close.SetActive(false); insert.SetActive(false); } if (!isCheekiReload) { return; } isCheeki = true; cd -= 2f * Time.deltaTime; if (cd < 4f && cd > 3.5f) { ((Component)Gun).gameObject.transform.position = ((Component)Ani1).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani1).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (cd < 3.5f && cd > 2.5f) { ((Component)Gun).gameObject.transform.position = ((Component)Ani2).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani2).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (cd < 2.5f && cd > 2f) { ((Component)Gun).gameObject.transform.position = ((Component)Ani3).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani3).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (cd < 2f && cd > 1.5f) { ((Component)Gun).gameObject.transform.position = ((Component)Ani4).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani4).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(75f, 0f, 0f); open.SetActive(true); if (L.IsFull) { L.EjectRound(((Component)L).transform.position + ((Component)L).transform.forward * Gun.EjectOffset, ((Component)L).transform.forward * Gun.EjectSpeed, Vector3.right, false); } if (R.IsFull) { R.EjectRound(((Component)R).transform.position + ((Component)R).transform.forward * Gun.EjectOffset, ((Component)R).transform.forward * Gun.EjectSpeed, Vector3.right, false); } } if (cd < 1.5f && cd > 1f) { ((Component)Gun).gameObject.transform.position = ((Component)Ani5).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani5).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(75f, 0f, 0f); insert.SetActive(true); if (!L.IsFull) { L.SetRound(LR, false); } if (!R.IsFull) { R.SetRound(RR, false); } } if (cd < 1f && cd > 0.5f) { ((Component)Gun).gameObject.transform.position = ((Component)Ani6).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani6).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); close.SetActive(true); Gun.Barrels[0].m_isHammerCocked = true; Gun.Barrels[1].m_isHammerCocked = true; } if (cd < 0.5f && cd > 0f) { ((Component)Gun).gameObject.transform.position = ((Component)Ani7).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)Ani7).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (cd < 0f) { ((Component)Gun).gameObject.transform.position = ((Component)AniBase).transform.position; ((Component)Gun).gameObject.transform.eulerAngles = ((Component)AniBase).transform.eulerAngles; fore.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); cd = 4f; isCheekiReload = false; } } } public class guitarreset : MonoBehaviour { public AudioSource song; public GameObject rot; private bool is45 = false; private void Start() { } private void over45() { if (is45) { song.Stop(); } is45 = false; } private void under45() { if (!is45) { song.Play(); song.Pause(); } is45 = true; } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (rot.transform.localEulerAngles.x > 45f) { over45(); } if (rot.transform.localEulerAngles.x < 45f) { under45(); } } } public class guitarscript : MonoBehaviour { public GameObject reset; public AudioSource song; public GameObject resetvolume; private bool slaponce; private void Start() { } private void OnTriggerEnter(Collider other) { slaponce = true; } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) if (reset.transform.localEulerAngles.x > 15f) { resetvolume.SetActive(true); resetvolume.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (resetvolume.transform.localEulerAngles.x > 25f) { resetvolume.transform.localEulerAngles = new Vector3(25f, 0f, 0f); resetvolume.SetActive(false); } } if (reset.transform.localEulerAngles.x < 15f) { resetvolume.SetActive(false); resetvolume.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (reset.transform.localEulerAngles.x < 25f) { song.UnPause(); } if (reset.transform.localEulerAngles.x > 25f) { reset.transform.localEulerAngles = new Vector3(25f, 0f, 0f); } if (reset.transform.localEulerAngles.x >= 25f) { song.Pause(); } song.volume = 1f - resetvolume.transform.localEulerAngles.x * 0.04f; if (slaponce) { reset.transform.localEulerAngles = new Vector3(0f, 0f, 0f); slaponce = false; } } } public class guitarslap : MonoBehaviour { public GameObject slide; public AudioSource asa1; public AudioSource asa2; private void Start() { } private void Update() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) asa1.pitch = slide.transform.localPosition.z; asa2.pitch = slide.transform.localPosition.z; } } public class guitarslap2 : MonoBehaviour { public int start = 0; public SphereCollider cols; public int[] notes1; public int[] notes2; public int[] notes3; public int[] notes4; public AudioEvent[] clips; public GameObject foregrip; public GameObject hold1; public GameObject hold2; public GameObject hold3; public GameObject hold4; public Transform pos; private void Start() { } private void OnTriggerEnter(Collider col) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) col = (Collider)(object)cols; if (hold1.transform.localEulerAngles.x < 45f && hold2.transform.localEulerAngles.x < 45f && hold3.transform.localEulerAngles.x < 45f && hold4.transform.localEulerAngles.x < 45f) { SM.PlayGenericSound(clips[0], pos.localPosition); start = 0; } if ((hold1.transform.localEulerAngles.x > 45f && notes1[start] == 0) || (hold2.transform.localEulerAngles.x > 45f && notes2[start] == 0) || (hold3.transform.localEulerAngles.x > 45f && notes3[start] == 0) || (hold4.transform.localEulerAngles.x > 45f && notes4[start] == 0)) { start = 0; } if (hold1.transform.localEulerAngles.x > 45f) { foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes1[start]); SM.PlayGenericSound(clips[notes1[start]], pos.localPosition); start++; } if (hold2.transform.localEulerAngles.x > 45f) { foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes2[start]); SM.PlayGenericSound(clips[notes2[start]], pos.localPosition); start++; } if (hold3.transform.localEulerAngles.x > 45f) { foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes3[start]); SM.PlayGenericSound(clips[notes3[start]], pos.localPosition); start++; } if (hold4.transform.localEulerAngles.x > 45f) { foregrip.transform.localPosition = new Vector3(0f, 0f, (float)notes4[start]); SM.PlayGenericSound(clips[notes4[start]], pos.localPosition); start++; } } private void FixedUpdate() { } private void Update() { } } public class LebelHandle : MonoBehaviour { public Mac11_Stock fakeboltt; public BoltActionRifle_Handle realbolt; public GameObject rot; public GameObject fakebolt; public FVRAlternateGrip foregrip; private GameObject _player = null; private FVRViveHand leftHand = null; private FVRViveHand rightHand = null; public bool istransfterd = true; private void Awake() { _player = ((Component)Object.FindObjectOfType()).gameObject; } private void Start() { leftHand = ((Component)_player.transform.Find("Controller (left)")).GetComponent(); rightHand = ((Component)_player.transform.Find("Controller (right)")).GetComponent(); } private void BoltTransfer() { if (!istransfterd) { ((FVRInteractiveObject)fakeboltt).EndInteraction(rightHand); rightHand.ForceSetInteractable((FVRInteractiveObject)(object)realbolt); ((FVRInteractiveObject)realbolt).BeginInteraction(rightHand); istransfterd = true; } if (!istransfterd) { } } private void Update() { if (!fakebolt.activeInHierarchy) { BoltTransfer(); } if (fakebolt.activeInHierarchy) { istransfterd = false; } if (!((Object)(object)_player == (Object)null) && !((Object)(object)leftHand == (Object)null) && !((Object)(object)rightHand == (Object)null)) { } } } public class LeverActionHandle : MonoBehaviour { public LeverActionFirearm LAF; public FVRAlternateGrip LAFFore; public FVRFireArmChamber chamber; public FVRPhysicalObject lever; public FVRPhysicalObject leverfore; public Collider levercol; public Collider forecol; public Collider LAFcol; public Collider LAFforecol; public HingeJoint HJ; public JointLimits JL; private void Start() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) ((JointLimits)(ref JL)).max = 0f; ((JointLimits)(ref JL)).min = 0f; LAF.m_curLeverPos = (ZPos)2; LAF.m_lastLeverPos = (ZPos)2; } private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) HJ.limits = JL; if (((Component)lever).transform.localEulerAngles.x < 15f && ((Component)lever).transform.localEulerAngles.x >= 10f) { LAF.m_curLeverPos = (ZPos)2; } else if (((Component)lever).transform.localEulerAngles.x < 50f && ((Component)lever).transform.localEulerAngles.x > 40f) { LAF.m_curLeverPos = (ZPos)1; } else if (((Component)lever).transform.localEulerAngles.x <= 78f && ((Component)lever).transform.localEulerAngles.x > 73f) { LAF.m_curLeverPos = (ZPos)0; } LAF.m_lastLeverPos = LAF.m_curLeverPos; if ((Object)(object)((FVRInteractiveObject)LAF).m_hand != (Object)null) { if ((Object)(object)((FVRInteractiveObject)leverfore).m_hand != (Object)null) { ((FVRInteractiveObject)LAFFore).BeginInteraction(((FVRInteractiveObject)leverfore).m_hand); ((FVRInteractiveObject)leverfore).ForceBreakInteraction(); } if ((Object)(object)((FVRInteractiveObject)LAFFore).m_hand == (Object)null) { if (chamber.IsFull && !chamber.IsSpent && !LAF.m_isLeverReleasePressed) { levercol.enabled = false; forecol.enabled = false; LAFcol.enabled = true; LAFforecol.enabled = true; ((JointLimits)(ref JL)).max = 0f; } else if (!chamber.IsFull || chamber.IsSpent || LAF.m_isLeverReleasePressed) { levercol.enabled = true; forecol.enabled = true; LAFcol.enabled = false; LAFforecol.enabled = false; ((FVRInteractiveObject)lever).BeginInteraction(((FVRInteractiveObject)LAF).m_hand); ((FVRInteractiveObject)LAF).ForceBreakInteraction(); ((JointLimits)(ref JL)).max = 68f; } } else if ((Object)(object)((FVRInteractiveObject)LAFFore).m_hand != (Object)null) { if (chamber.IsFull && !chamber.IsSpent && !LAF.m_isLeverReleasePressed) { levercol.enabled = false; forecol.enabled = false; LAFcol.enabled = true; LAFforecol.enabled = true; ((JointLimits)(ref JL)).max = 0f; } else if (!chamber.IsFull || chamber.IsSpent || LAF.m_isLeverReleasePressed) { levercol.enabled = true; forecol.enabled = true; LAFcol.enabled = false; LAFforecol.enabled = false; ((FVRInteractiveObject)lever).BeginInteraction(((FVRInteractiveObject)LAF).m_hand); ((FVRInteractiveObject)LAF).ForceBreakInteraction(); ((FVRInteractiveObject)leverfore).BeginInteraction(((FVRInteractiveObject)LAFFore).m_hand); ((FVRInteractiveObject)LAFFore).ForceBreakInteraction(); ((JointLimits)(ref JL)).max = 68f; } } } else if ((Object)(object)((FVRInteractiveObject)lever).m_hand != (Object)null) { if ((Object)(object)((FVRInteractiveObject)LAFFore).m_hand != (Object)null) { ((FVRInteractiveObject)leverfore).BeginInteraction(((FVRInteractiveObject)LAFFore).m_hand); ((FVRInteractiveObject)LAFFore).ForceBreakInteraction(); } if ((Object)(object)((FVRInteractiveObject)leverfore).m_hand == (Object)null) { if (chamber.IsFull && !chamber.IsSpent) { levercol.enabled = false; forecol.enabled = false; LAFcol.enabled = true; LAFforecol.enabled = true; ((FVRInteractiveObject)LAF).BeginInteraction(((FVRInteractiveObject)lever).m_hand); ((FVRInteractiveObject)lever).ForceBreakInteraction(); ((JointLimits)(ref JL)).max = 0f; } else if (!chamber.IsFull || chamber.IsSpent) { levercol.enabled = true; forecol.enabled = true; LAFcol.enabled = false; LAFforecol.enabled = false; ((JointLimits)(ref JL)).max = 68f; } } else if ((Object)(object)((FVRInteractiveObject)leverfore).m_hand == (Object)null) { if (chamber.IsFull && !chamber.IsSpent) { levercol.enabled = false; forecol.enabled = false; LAFcol.enabled = true; LAFforecol.enabled = true; ((FVRInteractiveObject)LAF).BeginInteraction(((FVRInteractiveObject)lever).m_hand); ((FVRInteractiveObject)lever).ForceBreakInteraction(); ((FVRInteractiveObject)LAFFore).BeginInteraction(((FVRInteractiveObject)leverfore).m_hand); ((FVRInteractiveObject)leverfore).ForceBreakInteraction(); ((JointLimits)(ref JL)).max = 0f; } else if (!chamber.IsFull || chamber.IsSpent) { levercol.enabled = true; forecol.enabled = true; LAFcol.enabled = false; LAFforecol.enabled = false; ((JointLimits)(ref JL)).max = 68f; } } } else if ((Object)(object)((FVRInteractiveObject)lever).m_hand == (Object)null && (Object)(object)((FVRInteractiveObject)LAF).m_hand == (Object)null) { forecol.enabled = false; LAFforecol.enabled = true; } } } public class ChauchatScript : MonoBehaviour { public GameObject bolthead; public GameObject bolt; public GameObject barrelref; public WaggleJoint M; public WaggleJoint L; public WaggleJoint R; public GameObject bipodref; 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_006b: 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_00af: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: 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_01be: 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_01e7: 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_013f: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(bolt.transform.position, barrelref.transform.position) <= 0.0008f) { bolthead.transform.localPosition = new Vector3(0f, 0f, Vector3.Distance(bolt.transform.position, barrelref.transform.position)); bolthead.transform.localEulerAngles = new Vector3(0f, 0f, 60f - 60f * (Vector3.Distance(bolt.transform.position, barrelref.transform.position) / 0.0008f)); } else if (Vector3.Distance(bolt.transform.position, barrelref.transform.position) > 0.0008f) { bolthead.transform.localPosition = new Vector3(0f, 0f, 0.0008f); bolthead.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } L.angleLimitRight = bipodref.transform.localEulerAngles.x * 2f - 90f; R.angleLimitRight = bipodref.transform.localEulerAngles.x * 2f - 90f; M.angleLimitLeft = bipodref.transform.localEulerAngles.x / 2f; M.angleLimitRight = bipodref.transform.localEulerAngles.x / 2f; } } public class GM6Barrel : MonoBehaviour { public GameObject barrelRig; public Mac11_Stock grab; public GameObject grabtarg; public GameObject barreltarg; public ClosedBoltReceiverDustCoverTrigger dustcover; public WaggleJoint dustcoverJoint; public AR15HandleSightFlipper barrelLatch; public Vector2 ZbarrelLimit; public float rear; public float fore; public GameObject snapbarrel; public ClosedBolt bolt; public GameObject boltGeo; public ClosedBoltWeapon gun; public GameObject boltrot; public AudioEvent snaptorearaud; public bool reachedtorear = false; public bool shot = false; public GameObject foreexp; public GameObject rearexp; public bool pulled = false; public bool startrecoil = false; public float recoverspeedbarrel; public float recoverspeedbolt; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)gun) { if (((FVRInteractiveObject)bolt).IsHeld) { ((FVRInteractiveObject)bolt).ForceBreakInteraction(); } ((FVRInteractiveObject)bolt).IsSimpleInteract = true; bolt.Speed_Rearward = 0f; shot = true; startrecoil = true; } } 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 Update() { //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_011e: 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_012b: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_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_0032: 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_004c: 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_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0213: 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_0283: 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_0268: 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) //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_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_0334: 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_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0366: 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_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: 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_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07c0: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_07f5: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)bolt).IsHeld) { boltGeo.gameObject.transform.localPosition = ((Component)bolt).gameObject.transform.localPosition; if (boltrot.transform.localEulerAngles.y >= 1f && !pulled) { barrelRig.gameObject.transform.localPosition = ((Component)bolt).gameObject.transform.localPosition; } else if (boltrot.transform.localEulerAngles.y < 1f) { pulled = true; } } dustcoverJoint.angleLimitRight = -1f * ((Component)dustcover).gameObject.transform.localEulerAngles.z; barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, barrelRig.gameObject.transform.localPosition.z); boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, boltGeo.gameObject.transform.localPosition.z); barrelRig.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); boltGeo.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (barrelRig.gameObject.transform.localPosition.z < rear) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); } if (barrelRig.gameObject.transform.localPosition.z > fore) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, fore); } if (boltGeo.gameObject.transform.localPosition.z < rear) { boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); } if (boltGeo.gameObject.transform.localPosition.z > fore) { pulled = false; boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, fore); } if (boltGeo.gameObject.transform.localPosition.z >= fore) { pulled = false; } if (barrelRig.gameObject.transform.localPosition.z < rear + 0.01f && !barrelLatch.m_isLargeAperture) { snapbarrel.SetActive(true); if (((FVRInteractiveObject)grab).IsHeld) { ((FVRInteractiveObject)grab).ForceBreakInteraction(); ((FVRInteractiveObject)grab).IsSimpleInteract = true; } barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); if (!dustcover.m_isOpen) { dustcover.ToggleDustCoverState(); } ((FVRInteractiveObject)bolt).IsSimpleInteract = true; } if (barrelLatch.m_isLargeAperture && !((FVRInteractiveObject)grab).IsHeld) { ((Component)grab).transform.position = grabtarg.transform.position; ((Component)grab).transform.eulerAngles = grabtarg.transform.eulerAngles; ((FVRInteractiveObject)grab).IsSimpleInteract = false; ((FVRInteractiveObject)bolt).IsSimpleInteract = false; snapbarrel.SetActive(false); if (barrelRig.gameObject.transform.localPosition.z < fore) { barrelRig.transform.localPosition = new Vector3(0f, 0f, barrelRig.transform.localPosition.z + recoverspeedbarrel); } } if (((FVRInteractiveObject)grab).IsHeld) { if (!dustcover.m_isOpen) { dustcover.ToggleDustCoverState(); } snapbarrel.SetActive(false); ((FVRInteractiveObject)bolt).IsSimpleInteract = false; barrelRig.gameObject.transform.eulerAngles = barreltarg.transform.eulerAngles; barrelRig.gameObject.transform.position = barreltarg.transform.position; } if (startrecoil && barrelRig.gameObject.transform.localPosition.z > rear) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, barrelRig.gameObject.transform.localPosition.z - recoverspeedbarrel * 5f); } if (barrelRig.gameObject.transform.localPosition.z < fore - 0.01f) { if (boltGeo.gameObject.transform.localPosition.z > rear + 0.01f) { boltGeo.gameObject.transform.localPosition = barrelRig.gameObject.transform.localPosition; } else if (boltGeo.gameObject.transform.localPosition.z < rear + 0.01f) { boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); if (!reachedtorear && shot) { startrecoil = false; SM.PlayCoreSound((FVRPooledAudioType)41, snaptorearaud, boltGeo.gameObject.transform.position); reachedtorear = true; shot = false; } } } else if (barrelRig.gameObject.transform.localPosition.z >= fore - 0.01f) { if (!((FVRInteractiveObject)bolt).IsHeld && boltGeo.gameObject.transform.localPosition.z < fore) { boltGeo.transform.localPosition = new Vector3(0f, 0f, boltGeo.transform.localPosition.z + recoverspeedbolt); } if (reachedtorear) { if (!((FVRInteractiveObject)bolt).IsHeld) { bolt.Speed_Rearward = -100f; bolt.SnapToRear(); } reachedtorear = false; } } if (boltGeo.gameObject.transform.localPosition.z >= fore - 0.01f) { ((FVRInteractiveObject)bolt).IsSimpleInteract = false; } } 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.ShotFiredEvent -= new ShotFired(OnShotFired); } } public class OpenBoltLongRecoilSystem : MonoBehaviour { public GameObject barrelRig; public Vector2 ZbarrelLimit; public float rear; public float fore; public OpenBoltReceiverBolt bolt; public OpenBoltChargingHandle handle; public GameObject boltGeo; public OpenBoltReceiver gun; public GameObject boltrot; public AudioEvent snaptorearaud; public bool reachedtorear = false; public bool shot = false; public bool pulled = false; public bool startrecoil = false; public float recoverspeedbarrel; public float recoverspeedbolt; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)gun) { if (((FVRInteractiveObject)handle).IsHeld) { ((FVRInteractiveObject)handle).ForceBreakInteraction(); } bolt.BoltSpeed_Rearward = 0f; shot = true; startrecoil = true; } } 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 Update() { //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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_017f: 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_01c2: 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_0032: 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_0051: 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_021c: 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_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_026c: 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_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: 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_031d: 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_0302: 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_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0478: 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_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: 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_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05be: 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_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_0441: 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_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_050d: 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_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)handle).IsHeld) { boltGeo.gameObject.transform.localPosition = ((Component)bolt).gameObject.transform.localPosition; if (((Component)bolt).gameObject.transform.localPosition.z > rear + 0.001f && !pulled) { barrelRig.gameObject.transform.localPosition = ((Component)bolt).gameObject.transform.localPosition; } else if (((Component)bolt).gameObject.transform.localPosition.z <= rear + 0.001f) { pulled = true; } } barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, barrelRig.gameObject.transform.localPosition.z); boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, boltGeo.gameObject.transform.localPosition.z); barrelRig.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); boltGeo.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (barrelRig.gameObject.transform.localPosition.z < rear) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); } if (barrelRig.gameObject.transform.localPosition.z > fore) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, fore); } if (boltGeo.gameObject.transform.localPosition.z < rear) { boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); } if (boltGeo.gameObject.transform.localPosition.z > fore) { pulled = false; boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, fore); } if (boltGeo.gameObject.transform.localPosition.z >= fore) { pulled = false; } if (((!((FVRInteractiveObject)handle).IsHeld && pulled) || (!((FVRInteractiveObject)handle).IsHeld && reachedtorear)) && barrelRig.gameObject.transform.localPosition.z < fore) { barrelRig.transform.localPosition = new Vector3(0f, 0f, barrelRig.transform.localPosition.z + recoverspeedbarrel); } if (startrecoil && barrelRig.gameObject.transform.localPosition.z > rear) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, barrelRig.gameObject.transform.localPosition.z - recoverspeedbarrel * 25f); } if (barrelRig.gameObject.transform.localPosition.z < fore - 0.001f) { if (boltGeo.gameObject.transform.localPosition.z > rear + 0.001f) { boltGeo.gameObject.transform.localPosition = barrelRig.gameObject.transform.localPosition; } else if (boltGeo.gameObject.transform.localPosition.z < rear + 0.001f) { boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); if (!reachedtorear && shot) { startrecoil = false; SM.PlayCoreSound((FVRPooledAudioType)41, snaptorearaud, boltGeo.gameObject.transform.position); reachedtorear = true; shot = false; } } } else if (barrelRig.gameObject.transform.localPosition.z >= fore - 0.001f) { if (!((FVRInteractiveObject)handle).IsHeld && !reachedtorear) { boltGeo.transform.localPosition = ((Component)bolt).gameObject.transform.localPosition; } if (reachedtorear) { if (!((FVRInteractiveObject)handle).IsHeld) { bolt.BoltSpeed_Rearward = -100f; bolt.SetBoltToRear(); } pulled = true; reachedtorear = false; } } if (pulled && ((FVRInteractiveObject)handle).IsHeld) { ((FVRInteractiveObject)handle).ForceBreakInteraction(); } } 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.ShotFiredEvent -= new ShotFired(OnShotFired); } } } public class RollAndLock2 : MonoBehaviour { public FVRFireArmRecoilProfile hold; public FVRFireArmRecoilProfile unhold; public Transform MagazinePoint; public Transform MagazinePivot; public float lowerlimit; public float upperlimit; private HingeJoint Joint; public float eject; public float lockangle; public bool magejectonmag; private bool locked = false; private bool isPhysRel = false; public Collider[] colliders; public FVRFireArm Gun; public GameObject GunRig; [NonSerialized] public FVRFireArmMagazine Magazine; public GameObject maglatch; public Collider col; private void Update() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_0038: 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_00ac: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: 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_045b: 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_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0493: 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) Vector3 val = ((Component)Gun).transform.InverseTransformPoint(MagazinePoint.position); Vector3 val2 = ((Component)Gun).transform.InverseTransformPoint(MagazinePivot.position); if ((Object)(object)Magazine != (Object)null) { if (((FVRInteractiveObject)Magazine).IsHeld) { Gun.RecoilProfile = hold; } else if (!((FVRInteractiveObject)Magazine).IsHeld) { Gun.RecoilProfile = unhold; } if (Quaternion.Angle(MagazinePoint.rotation, ((Component)Magazine).transform.rotation) < lockangle && !locked) { JointLimits limits = default(JointLimits); ((JointLimits)(ref limits)).max = lowerlimit; ((JointLimits)(ref limits)).min = lowerlimit; Joint.limits = limits; locked = true; if ((Object)(object)Gun.Magazine == (Object)null) { Gun.LoadMag(Magazine); Magazine.FireArm = Gun; } } if ((Object)(object)((FVRInteractiveObject)Gun).m_hand != (Object)null && (Object)(object)((FVRInteractiveObject)Magazine).m_hand != (Object)null) { if (locked && !((FVRInteractiveObject)Magazine).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)Magazine).m_hand.Input.TouchpadSouthPressed) { locked = false; JointLimits limits2 = default(JointLimits); ((JointLimits)(ref limits2)).max = upperlimit; ((JointLimits)(ref limits2)).min = lowerlimit; if ((Object)(object)Joint != (Object)null) { Joint.limits = limits2; Object.Destroy((Object)(object)Joint); } Collider[] array = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val3 in array) { Collider[] array2 = colliders; foreach (Collider val4 in array2) { Physics.IgnoreCollision(val4, val3, false); } } if ((Object)(object)Gun.Magazine != (Object)null) { Gun.EjectMag(false); Magazine = null; } } if (locked && ((FVRInteractiveObject)Magazine).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)Magazine).m_hand.Input.AXButtonPressed) { locked = false; JointLimits limits3 = default(JointLimits); ((JointLimits)(ref limits3)).max = upperlimit; ((JointLimits)(ref limits3)).min = lowerlimit; if ((Object)(object)Joint != (Object)null) { Joint.limits = limits3; Object.Destroy((Object)(object)Joint); } Collider[] array3 = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val5 in array3) { Collider[] array4 = colliders; foreach (Collider val6 in array4) { Physics.IgnoreCollision(val6, val5, false); } } if ((Object)(object)Gun.Magazine != (Object)null) { Gun.EjectMag(false); Magazine = null; } } } if ((Object)(object)((FVRInteractiveObject)Gun).m_hand != (Object)null && (Object)(object)((FVRInteractiveObject)Gun).m_hand.OtherHand.m_currentInteractable != (Object)null && (Object)(object)((Component)((FVRInteractiveObject)Gun).m_hand.OtherHand.m_currentInteractable).gameObject.GetComponent() != (Object)null && maglatch.transform.localEulerAngles.x > 180f && maglatch.transform.localEulerAngles.x < 335f) { locked = false; JointLimits limits4 = default(JointLimits); ((JointLimits)(ref limits4)).max = upperlimit; ((JointLimits)(ref limits4)).min = lowerlimit; if ((Object)(object)Joint != (Object)null) { Joint.limits = limits4; Object.Destroy((Object)(object)Joint); } Collider[] array5 = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val7 in array5) { Collider[] array6 = colliders; foreach (Collider val8 in array6) { Physics.IgnoreCollision(val8, val7, false); } } if ((Object)(object)Gun.Magazine != (Object)null) { Gun.EjectMag(false); Magazine = null; } } if (locked) { ((Component)Magazine).gameObject.transform.position = ((Component)MagazinePoint).transform.position; ((Component)Magazine).gameObject.transform.rotation = ((Component)MagazinePoint).transform.rotation; } } else if ((Object)(object)Magazine == (Object)null) { Gun.RecoilProfile = unhold; } } public void OnTriggerStay(Collider other) { //IL_002f: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_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_009d: 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_00e8: 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_010c: 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_010e: 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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((Component)other).GetComponent() != (Object)null) || !((Object)(object)((FVRInteractiveObject)((Component)other).GetComponent().Magazine).m_hand != (Object)null)) { return; } Transform transform = new GameObject().transform; transform.rotation = ((Component)((Component)other).GetComponent().Magazine).gameObject.transform.rotation; transform.parent = MagazinePoint; Vector3 val = ((Component)Gun).transform.InverseTransformPoint(MagazinePoint.position); Vector3 val2 = ((Component)Gun).transform.InverseTransformPoint(MagazinePivot.position); Joint = ((Component)Gun).gameObject.AddComponent(); ((Joint)Joint).autoConfigureConnectedAnchor = false; JointLimits limits = default(JointLimits); ((JointLimits)(ref limits)).max = upperlimit; ((JointLimits)(ref limits)).min = lowerlimit; Joint.limits = limits; ((Joint)Joint).anchor = val2; Joint.useLimits = true; ((Joint)Joint).connectedAnchor = val2 - val; ((Component)((Component)other).GetComponent().Magazine).transform.rotation = MagazinePoint.rotation; ((Joint)Joint).axis = ((Component)Gun).transform.InverseTransformDirection(MagazinePoint.right); ((Joint)Joint).connectedBody = ((Component)((Component)other).GetComponent().Magazine).GetComponent(); Magazine = ((Component)other).GetComponent().Magazine; ((Component)((Component)other).GetComponent().Magazine).transform.rotation = transform.rotation; Object.Destroy((Object)(object)((Component)transform).gameObject); Collider[] array = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val3 in array) { Collider[] array2 = colliders; foreach (Collider val4 in array2) { Physics.IgnoreCollision(val4, val3, true); } } } } namespace JerryComponent { public class M202Flash : MonoBehaviour { public FVRFireArmRound round; public GameObject BackBlast; public Transform[] muzzles; public FVRFireArmChamber[] chambers; public SimpleLauncher gun; public int index; public GameObject trigger; public GameObject MagWellLever; public GameObject maggrab; public MovableObjectPart rearlid; public bool fired = false; public bool cal = false; public Collider magwelllevergrab; private void FixedUpdate() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_01a8: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: 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_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_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_0313: 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) if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { trigger.transform.localEulerAngles = new Vector3(30f * ((FVRInteractiveObject)gun).m_hand.Input.TriggerFloat, 0f, 0f); } else if ((Object)(object)((FVRInteractiveObject)gun).m_hand == (Object)null) { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (trigger.transform.localEulerAngles.x < 25f) { fired = false; } if ((Object)(object)((FVRFireArm)gun).Magazine != (Object)null) { if (!cal) { index = ((FVRFireArm)gun).Magazine.m_numRounds; cal = true; } if (MagWellLever.transform.localPosition.z <= 0.19f) { rearlid.UpperLimit = 100f; } else if (MagWellLever.transform.localPosition.z > 0.19f) { rearlid.UpperLimit = 180f; } if (MagWellLever.transform.localPosition.z > 0.01f) { maggrab.SetActive(false); } if (MagWellLever.transform.localPosition.z <= 0.01f) { maggrab.SetActive(true); } if (((Component)rearlid.ObjectToMove).transform.localEulerAngles.x >= 100f) { magwelllevergrab.enabled = false; } else if (((Component)rearlid.ObjectToMove).transform.localEulerAngles.x < 100f) { magwelllevergrab.enabled = true; } if (index > 0 && !fired && trigger.transform.localEulerAngles.x > 25f && MagWellLever.transform.localPosition.z < 0.01f) { chambers[index - 1].SetRound(round, false); gun.Chamber = chambers[index - 1]; ((FVRFireArm)gun).MuzzlePos = muzzles[index - 1]; gun.Fire(); fired = true; Object.Instantiate(BackBlast, muzzles[index - 1].position, muzzles[index - 1].rotation); index--; FVRFireArmMagazine magazine = ((FVRFireArm)gun).Magazine; magazine.m_numRounds--; ((FVRFireArm)gun).Magazine.UpdateBulletDisplay(); } } else if ((Object)(object)((FVRFireArm)gun).Magazine == (Object)null) { cal = false; index = 0; rearlid.UpperLimit = 180f; } } } public class DshapeGrip : MonoBehaviour { public ClosedBoltWeapon gun; public GameObject trigL; public GameObject trigR; public GameObject magrel; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (trigL.transform.localEulerAngles.x > 45f || trigR.transform.localEulerAngles.x > 45f) { gun.Fire(); } if (magrel.transform.localEulerAngles.x > 45f && (Object)(object)((FVRFireArm)gun).Magazine != (Object)null) { ((FVRFireArm)gun).EjectMag(false); } } } } public class Bezier : MonoBehaviour { public Transform[] controlPoints; public LineRenderer lineRenderer; private int _segmentNum = 50; private void Start() { } private void Update() { DrawCurve(); } private void DrawCurve() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) for (int i = 1; i <= _segmentNum; i++) { float t = (float)i / (float)_segmentNum; int num = 0; Vector3 val = CalculateCubicBezierPoint(t, controlPoints[num].position, controlPoints[num + 1].position, controlPoints[num + 2].position); lineRenderer.positionCount = i; lineRenderer.SetPosition(i - 1, val); } } private Vector3 CalculateCubicBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) float num = 1f - t; float num2 = t * t; float num3 = num * num; Vector3 val = num3 * p0; val += 2f * num * t * p1; return val + num2 * p2; } } public class BezierUtils { private static Vector3 CalculateCubicBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) float num = 1f - t; float num2 = t * t; float num3 = num * num; Vector3 val = num3 * p0; val += 2f * num * t * p1; return val + num2 * p2; } public static Vector3[] GetBeizerList(Vector3 startPoint, Vector3 controlPoint, Vector3 endPoint, int segmentNum) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) Vector3[] array = (Vector3[])(object)new Vector3[segmentNum]; for (int i = 1; i <= segmentNum; i++) { float t = (float)i / (float)segmentNum; Vector3 val = CalculateCubicBezierPoint(t, startPoint, controlPoint, endPoint); array[i - 1] = val; Debug.Log((object)array[i - 1]); } return array; } } namespace JerryComponent { public class M9Barrel : MonoBehaviour { public Collider mountcol; public Collider Trigger; public FVRFireArmAttachmentMount mount; public GameObject rot; public Collider grabrot; private void Start() { } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (rot.transform.localEulerAngles.z >= 55f) { Trigger.enabled = true; mountcol.enabled = false; if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.GetComponent().enabled = false; } } else if (rot.transform.localEulerAngles.z < 55f) { Trigger.enabled = false; mountcol.enabled = true; if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.GetComponent().enabled = true; } } if (mount.HasAttachmentsOnIt()) { grabrot.enabled = true; } else if (!mount.HasAttachmentsOnIt()) { grabrot.enabled = false; } } } public class M9Rocket : MonoBehaviour { public Collider grabcol; public FVRPhysicalObject mainphy; public GameObject phys; public GameObject explosion; public GameObject explode; public FVRObject fuze; public Rigidbody lockpos; public GameObject fuzeFollow; public GameObject fuzezero; public GameObject fuzeobj; public FVRFireArmAttachment fuzehead; public bool isTriggered = false; public GameObject drag; public GameObject flash; public Rigidbody mainobj; public bool isChambered = false; public Transform lockintube; public AudioEvent Insert; public SpringJoint SJ; public bool changed = false; private void Start() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) fuzeobj = Object.Instantiate(((AnvilAsset)fuze).GetGameObject(), ((Component)lockpos).transform.position, ((Component)lockpos).transform.rotation); SJ = fuzeobj.GetComponent(); ((Joint)SJ).connectedBody = lockpos; fuzehead = fuzeobj.GetComponent(); fuzeFollow.transform.SetParent((Transform)null); } private void OnTriggerEnter(Collider other) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)other).gameObject).name == "M9TriggerZone" && !isTriggered && !isChambered) { isChambered = true; SM.PlayCoreSound((FVRPooledAudioType)41, Insert, ((Component)this).transform.position); lockintube = ((Component)other).gameObject.transform; } } private void Update() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)fuzeobj != (Object)null) { if ((Object)(object)fuzehead.curMount == (Object)null) { fuzeFollow.transform.position = fuzeobj.transform.position; } } else if ((Object)(object)fuzeobj == (Object)null) { fuzeFollow.transform.position = fuzezero.transform.position; } if ((Object)(object)fuzehead != (Object)null) { if ((Object)(object)fuzehead.curMount != (Object)null) { fuzeFollow.transform.position = ((Component)fuzehead.curMount).gameObject.transform.position; if ((Object)(object)((Component)fuzehead.curMount.MyObject).gameObject.GetComponent() != (Object)null && ((Component)fuzehead.curMount.MyObject).gameObject.GetComponent().Foregrip.gameObject.transform.localEulerAngles.x >= 45f) { isTriggered = true; isChambered = false; drag.SetActive(true); flash.SetActive(true); Object.Destroy((Object)(object)((Component)fuzehead).gameObject); Object.Destroy((Object)(object)((Component)lockpos).gameObject); } } } else if (!((Object)(object)fuzehead == (Object)null) && !((Object)(object)lockpos == (Object)null) && !((Object)(object)SJ == (Object)null)) { } if (!isChambered || !isChambered) { return; } ((Component)mainobj).gameObject.transform.position = lockintube.position; ((Component)mainobj).gameObject.transform.eulerAngles = lockintube.eulerAngles; phys.SetActive(false); mainobj.useGravity = false; fuzeobj.transform.SetParent((Transform)null); if (!changed) { FVRViveHand hand = ((FVRInteractiveObject)mainphy).m_hand; ((FVRInteractiveObject)mainphy).ForceBreakInteraction(); grabcol.enabled = false; if ((Object)(object)SJ != (Object)null) { SJ.spring = 0f; } hand.ForceSetInteractable((FVRInteractiveObject)(object)fuzehead); ((FVRInteractiveObject)fuzehead).BeginInteraction(hand); changed = true; } } } public class M9impact : MonoBehaviour { public M9Rocket RC; public Rigidbody mainObj; public bool isfuzed = false; public float cd = 0.5f; public Transform ForcePos; public bool forced = false; public float power = 150f; public GameObject FP; private void Start() { isfuzed = false; } private void OnCollisionEnter(Collision collision) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (isfuzed) { Object.Instantiate(RC.explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(RC.explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)FP); Object.Destroy((Object)(object)RC.fuzeFollow); Object.Destroy((Object)(object)RC.drag); Object.Destroy((Object)(object)RC.flash); Object.Destroy((Object)(object)((Component)RC.mainobj).gameObject); Object.Destroy((Object)(object)((Component)RC).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); isfuzed = false; } } private void FixedUpdate() { //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)FP == (Object)null) { } if (RC.isTriggered) { cd -= Time.deltaTime; if ((Object)(object)RC.fuzehead != (Object)null) { RC.fuzehead.DetachFromMount(); Object.Destroy((Object)(object)((Component)RC.fuzehead).gameObject); } } if (cd <= 0f) { isfuzed = true; if ((Object)(object)FP.GetComponent() != (Object)null) { RC.phys.SetActive(true); FP.GetComponent().useGravity = true; } } else if (cd > 0f && RC.isTriggered && !forced) { FP = new GameObject("FP"); FP.transform.position = ((Component)ForcePos).transform.position; FP.transform.eulerAngles = ((Component)ForcePos).transform.eulerAngles; FixedJoint val = FP.AddComponent(); ((Joint)val).connectedBody = mainObj; Rigidbody component = FP.GetComponent(); component.useGravity = false; component.AddRelativeForce(Vector3.forward * power, (ForceMode)1); forced = true; } } } public class PreSpawn : MonoBehaviour { public FVRFireArmAttachmentMount mount; public FVRObject Tube; public GameObject TubeObj; public Transform pos; private void Start() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (!mount.HasAttachmentsOnIt()) { TubeObj = Object.Instantiate(((AnvilAsset)Tube).GetGameObject(), ((Component)pos).transform.position, ((Component)pos).transform.rotation); TubeObj.GetComponent().AttachToMount(mount, false); } } } public class RearGrip : MonoBehaviour { public FVRInteractiveObject grab; public GameObject MainObj; public Rigidbody mainrig; public Vector3 posspeed; public Vector3 angspeed; private void Start() { } private void FixedUpdate() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)grab.m_hand != (Object)null) { mainrig.useGravity = false; MainObj.transform.position = ((Component)grab.m_hand).gameObject.transform.position; MainObj.transform.eulerAngles = ((Component)grab.m_hand).gameObject.transform.eulerAngles; } else if ((Object)(object)grab.m_hand == (Object)null) { mainrig.useGravity = true; } } } public class TriggerReverse : MonoBehaviour { public GameObject Rot; public AR15HandleSightFlipper trigger; public float limit; private void Start() { } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (Rot.transform.localEulerAngles.x >= limit) { trigger.m_isLargeAperture = !trigger.m_isLargeAperture; } } } public class Triggerrott : MonoBehaviour { public GameObject trigger; public float rotamont = 20f; public FVRPhysicalObject obj; public GameObject safety; private void Start() { } private void Update() { //IL_00aa: 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) if ((Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null && !safety.activeInHierarchy) { trigger.transform.localEulerAngles = new Vector3(((FVRInteractiveObject)obj).m_hand.Input.TriggerFloat * rotamont, 0f, 0f); } else if ((Object)(object)((FVRInteractiveObject)obj).m_hand == (Object)null || safety.activeInHierarchy) { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class FireRopeOB : MonoBehaviour { public OpenBoltReceiver gun; public GameObject trigger; 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_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 (trigger.transform.localPosition.z >= 0.1f) { gun.Fire(); } else if (!(trigger.transform.localPosition.z < 0.1f)) { } } } public class KeepMeAlive : MonoBehaviour { public Rigidbody rb; private void Start() { } private void Update() { rb.isKinematic = false; } } public class MountedMG : MonoBehaviour { public GameObject elev; public GameObject hori; public GameObject XGEO; public GameObject YGEO; public WaggleJoint X; public WaggleJoint Y; public Rigidbody j1; public Rigidbody j2; public Rigidbody j3; public GameObject trig; public ClosedBoltWeapon gun; 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_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_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_00ec: 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_00b6: 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) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0203: 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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0226: 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_01cd: 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_0320: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0384: 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_034e: 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_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Unknown result type (might be due to invalid IL or missing references) if (trig.transform.localPosition.x > 1f) { gun.Fire(); } if (trig.transform.localPosition.x < 1f) { } j1.isKinematic = false; j2.isKinematic = false; j3.isKinematic = false; if (elev.transform.localPosition.y < 0.5f) { XGEO.transform.localEulerAngles = new Vector3(0f, 0f, 0f); X.angleLimitLeft = 15f; X.angleLimitRight = 15f; } if (elev.transform.localPosition.y > 0.5f && elev.transform.localPosition.y < 1.5f) { XGEO.transform.localEulerAngles = new Vector3(15f, 0f, 0f); X.angleLimitLeft = 0f; X.angleLimitRight = 30f; } if (elev.transform.localPosition.y > 1.5f && elev.transform.localPosition.y < 2.5f) { XGEO.transform.localEulerAngles = new Vector3(0f, 0f, 0f); X.angleLimitLeft = 15f; X.angleLimitRight = 15f; } if (elev.transform.localPosition.y > 2.5f && elev.transform.localPosition.y < 3.5f) { XGEO.transform.localEulerAngles = new Vector3(345f, 0f, 0f); X.angleLimitLeft = 30f; X.angleLimitRight = 0f; } if (elev.transform.localPosition.y > 3.5f && elev.transform.localPosition.y < 4.5f) { XGEO.transform.localEulerAngles = new Vector3(0f, 0f, 0f); X.angleLimitLeft = 15f; X.angleLimitRight = 15f; } if (hori.transform.localPosition.y < 0.5f) { YGEO.transform.localEulerAngles = new Vector3(0f, 90f, 0f); Y.angleLimitLeft = 15f; Y.angleLimitRight = 15f; } if (hori.transform.localPosition.y > 0.5f && hori.transform.localPosition.y < 1.5f) { YGEO.transform.localEulerAngles = new Vector3(15f, 90f, 0f); Y.angleLimitLeft = 0f; Y.angleLimitRight = 30f; } if (hori.transform.localPosition.y > 1.5f && hori.transform.localPosition.y < 2.5f) { YGEO.transform.localEulerAngles = new Vector3(0f, 90f, 0f); Y.angleLimitLeft = 15f; Y.angleLimitRight = 15f; } if (hori.transform.localPosition.y > 2.5f && hori.transform.localPosition.y < 3.5f) { YGEO.transform.localEulerAngles = new Vector3(345f, 90f, 0f); Y.angleLimitLeft = 30f; Y.angleLimitRight = 0f; } if (hori.transform.localPosition.y > 3.5f && hori.transform.localPosition.y < 4.5f) { YGEO.transform.localEulerAngles = new Vector3(0f, 90f, 0f); Y.angleLimitLeft = 15f; Y.angleLimitRight = 15f; } } } public class Tripod : MonoBehaviour { public GameObject hinge; public GameObject trigger; public GameObject sliderot; public string gunname; public string gunnamebackup; public string gunnameold; public Transform slidemonut; public OpenBoltReceiver gun; private void Start() { } private void OnTriggerStay(Collider other) { //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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_0121: 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_01b0: 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) if (hinge.transform.localEulerAngles.x > 45f) { if (!(((Object)((Component)other).gameObject).name == gunname) && !(((Object)((Component)other).gameObject).name == gunnamebackup) && !(((Object)((Component)other).gameObject).name == gunnameold)) { return; } ((Component)other).gameObject.transform.SetParent(slidemonut); ((Component)other).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)other).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); gun = ((Component)other).gameObject.GetComponent(); Rigidbody component = ((Component)other).gameObject.GetComponent(); component.isKinematic = true; component.useGravity = false; if ((Object)(object)gun != (Object)null) { if (trigger.transform.localEulerAngles.x > 45f) { gun.ReleaseSeer(); gun.Fire(); } else if (trigger.transform.localEulerAngles.x < 45f) { gun.EngageSeer(); } if (gun.Chamber.IsFull) { sliderot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else if (!gun.Chamber.IsFull) { sliderot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } else if (((Object)((Component)other).gameObject).name == gunname || ((Object)((Component)other).gameObject).name == gunnamebackup || ((Object)((Component)other).gameObject).name == gunnameold) { Rigidbody component2 = ((Component)other).gameObject.GetComponent(); component2.isKinematic = false; component2.useGravity = true; ((Component)other).gameObject.transform.SetParent((Transform)null); gun = null; } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == gunname || ((Object)((Component)other).gameObject).name == gunnamebackup || ((Object)((Component)other).gameObject).name == gunnameold) { Rigidbody component = ((Component)other).gameObject.GetComponent(); component.isKinematic = false; component.useGravity = true; ((Component)other).gameObject.transform.SetParent((Transform)null); gun = null; } } private void Update() { if (!((Object)(object)gun == (Object)null)) { } } } 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 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 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; } } } public class BarrelLatch : MonoBehaviour { public Collider boltgrab; public GameObject knob; public GameObject bolt; public GameObject grab; public GameObject barrel; public float speed = 0f; public float speed_multi = 0.001f; public float fore = 0.2344f; public float rear = 0f; public WaggleJoint dustcover; public bool islocked = true; public GameObject audioopen; public GameObject audioclose; public GameObject audioflipopen; public GameObject audioflipclose; 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_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_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_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_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_012d: 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_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: 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_02bf: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: 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_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: 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) if (barrel.transform.localPosition.z > 0.2f && bolt.transform.localPosition.z > 0.2f && dustcover.hingeGraphic.localRotation.x >= 20f) { dustcover.angleLimitLeft = 115f; dustcover.angleLimitRight = -115f; audioflipclose.SetActive(true); audioflipopen.SetActive(false); } if (barrel.transform.localPosition.z <= 0.2f || bolt.transform.localPosition.z <= 0.2f) { dustcover.angleLimitLeft = 100f; dustcover.angleLimitRight = 0f; audioflipclose.SetActive(false); audioflipopen.SetActive(true); } if (grab.transform.localEulerAngles.x < 45f && !islocked) { if (barrel.transform.localPosition.z < fore) { boltgrab.enabled = false; audioopen.SetActive(false); speed += speed_multi; if (speed > 1f) { speed = 1f; } barrel.transform.localPosition = Vector3.MoveTowards(barrel.transform.localPosition, new Vector3(0f, 0f, fore), speed); } if (barrel.transform.localPosition.z >= fore) { barrel.transform.localPosition = new Vector3(0f, 0f, fore); speed = 0f; audioopen.SetActive(true); boltgrab.enabled = true; } } if (grab.transform.localPosition.x > 45f && barrel.transform.localPosition.z < 0.01f && knob.transform.localEulerAngles.x < 45f) { barrel.transform.localPosition = new Vector3(0f, 0f, rear); islocked = true; audioclose.SetActive(true); } if (knob.transform.localEulerAngles.x > 45f) { islocked = false; audioclose.SetActive(false); } } } public class ItemLauncher : MonoBehaviour { public FVRFireArmChamber chamber; public PinnedGrenade nade; public Transform muzzle; public LeverActionFirearm gun; public float force = 1500f; public void OnTriggerStay(Collider other) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { nade = ((Component)other).gameObject.GetComponent(); } } public void Update() { //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_023b: 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_0148: Invalid comparison between Unknown and I4 //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Invalid comparison between Unknown and I4 //IL_0186: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)nade != (Object)null) { if ((!chamber.IsFull || !gun.m_wasLeverLocked || !((FVRInteractiveObject)gun).m_hand.Input.TriggerPressed || (Object)(object)((FVRInteractiveObject)gun.ForeGrip).m_hand == (Object)null) && nade.m_isPinPulled) { ((Behaviour)nade).enabled = false; nade.m_isFused = false; nade.m_isLeverReleased = false; nade.FakeHandle.SetActive(true); nade.RealHandle.SetActive(false); nade.m_fuseTime = nade.DefaultFuse.x; } if (chamber.IsFull && gun.m_wasLeverLocked && ((FVRInteractiveObject)gun).m_hand.Input.TriggerPressed && (Object)(object)((FVRInteractiveObject)gun.ForeGrip).m_hand != (Object)null) { if ((int)chamber.GetRound().RoundClass == 220) { if ((Object)(object)((Component)nade).gameObject.GetComponent() != (Object)null) { ((Component)nade).gameObject.GetComponent().AddExplosionForce(force, muzzle.position, 2.5f); } } else if ((int)chamber.GetRound().RoundClass != 220) { ((Behaviour)nade).enabled = true; nade.m_isPinPulled = true; nade.m_isFused = true; nade.m_isLeverReleased = true; nade.FakeHandle.SetActive(false); nade.RealHandle.SetActive(true); nade.m_fuseTime = 0f; } } if (Vector3.Distance(((Component)nade).gameObject.transform.position, ((Component)this).gameObject.transform.position) > 0.25f) { ((Behaviour)nade).enabled = true; nade = null; } } else if (!((Object)(object)nade == (Object)null)) { } } } public class LeverActionOverrider : MonoBehaviour { public LeverActionFirearm Gun; public GameObject Lever; public Collider col; public Collider guncol; public MovableObjectPart part; public bool detached = true; private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_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_0058: 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_00fd: 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_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_0128: 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_01c3: 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) if (Lever.transform.localEulerAngles.x >= 50f) { Gun.m_wasLeverLocked = false; Gun.Chamber.IsAccessible = true; Gun.m_curLeverRot = -57f; Gun.m_curLeverPos = (ZPos)0; if (!detached) { Lever.transform.localEulerAngles = new Vector3(57f, 0f, 0f); ((FVRInteractiveObject)part).ForceBreakInteraction(); detached = true; } } else if (Lever.transform.localEulerAngles.x <= 7f) { Gun.m_wasLeverLocked = true; Gun.Chamber.IsAccessible = false; Gun.m_curLeverRot = 0f; Gun.m_curLeverPos = (ZPos)2; if (!detached) { Lever.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((FVRInteractiveObject)part).ForceBreakInteraction(); detached = true; } } else if (Lever.transform.localEulerAngles.x > 7f && Lever.transform.localEulerAngles.x < 50f) { Gun.m_wasLeverLocked = false; Gun.Chamber.IsAccessible = false; Gun.m_curLeverRot = 0f - Lever.transform.localEulerAngles.x; Gun.m_curLeverPos = (ZPos)1; detached = false; } if (Gun.m_isHammerCocked && Gun.m_wasLeverLocked) { col.enabled = false; guncol.enabled = true; } else if (!Gun.m_isHammerCocked || !Gun.m_wasLeverLocked) { col.enabled = true; guncol.enabled = false; } } } public class MultiCal : MonoBehaviour { public FVRFireArm gun; public FVRFireArmChamber chamber; public LadderSight LS; public FireArmRoundType[] types; public Transform[] chamberposes; public MuzzleEffectEntry[] muzzleeffect; public int muzzlenum; private void FixedUpdate() { //IL_0019: 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_0062: 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) gun.RoundType = types[LS.Setting]; chamber.RoundType = types[LS.Setting]; ((Component)chamber).gameObject.transform.localPosition = ((Component)chamberposes[LS.Setting]).transform.localPosition; gun.MuzzleEffects[muzzlenum].Entry = muzzleeffect[LS.Setting]; } } } namespace JerryAr.9M113_Konkurs { [BepInPlugin("JerryAr.9M113_Konkurs", "9M113_Konkurs", "1.1.0")] [BepInProcess("h3vr.exe")] [Description("Built with MeatKit")] [BepInDependency("h3vr.otherloader", "1.3.0")] public class 9M113_KonkursPlugin : 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.9M113_Konkurs"); OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.9M113_Konkurs", "", "", "9m113", ""); } } } namespace JerryComponent { public class Driller : MonoBehaviour { public GameObject drillfake; public GameObject drilltop; public string drillname; public Transform drillhole; public HandCrankFrankCrank cranker; public float spinspeed; [NonSerialized] public Drill DR; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == drillname && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { DR = ((Component)other).gameObject.GetComponent(); } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == drillname && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { DR = null; } } private void Update() { //IL_002d: 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_0089: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_018b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)DR == (Object)null) { drillfake.transform.localPosition = new Vector3(0f, 0f, 0f); drillfake.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)DR != (Object)null) { drillfake.transform.position = ((Component)DR.SpinnyBit).transform.position; drillfake.transform.eulerAngles = ((Component)DR.SpinnyBit).transform.eulerAngles; if (Vector3.Distance(drillhole.position, drilltop.transform.position) <= 0.025f && DR.m_motorSpeed > 0.2f) { cranker.CrankGun(5000f * DR.m_motorSpeed); cranker.m_curRot += 5000f * DR.m_motorSpeed; ((Component)cranker).gameObject.transform.localEulerAngles = new Vector3(0f, ((Component)cranker).gameObject.transform.localEulerAngles.y + Time.deltaTime * 5000f * DR.m_motorSpeed, 0f); } else if (DR.m_motorSpeed <= 0f) { cranker.m_isCrankHeld = false; } } } private void FixedUpdate() { } } public class HMGDragGat : MonoBehaviour { public GameObject HMG; public string GunName = "MiniGatlingGun(Clone)"; public WorkingRigidbodiesGat WR; private void Start() { //IL_0050: 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_00b3: 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) HMG = GameObject.Find(GunName); WR = HMG.GetComponent(); if ((Object)(object)WR != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)WR.D).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)WR.DP).transform.eulerAngles; ConfigurableJoint val = ((Component)this).gameObject.AddComponent(); ((Joint)val).connectedBody = WR.D; ((Joint)val).autoConfigureConnectedAnchor = false; ((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)val).anchor = new Vector3(0f, 0f, 0f); val.xMotion = (ConfigurableJointMotion)0; val.yMotion = (ConfigurableJointMotion)0; val.zMotion = (ConfigurableJointMotion)0; val.angularXMotion = (ConfigurableJointMotion)2; val.angularYMotion = (ConfigurableJointMotion)2; val.angularZMotion = (ConfigurableJointMotion)2; } } private void Update() { if ((Object)(object)HMG == (Object)null || (Object)(object)WR == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class HMGGripGat : MonoBehaviour { public GameObject HMG; public string GunName = "MiniGatlingGun(Clone)"; public WorkingRigidbodiesGat WR; private void Start() { //IL_0050: 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_00b3: 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) HMG = GameObject.Find(GunName); WR = HMG.GetComponent(); if ((Object)(object)WR != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)WR.G).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)WR.GP).transform.eulerAngles; ConfigurableJoint val = ((Component)this).gameObject.AddComponent(); ((Joint)val).connectedBody = WR.G; ((Joint)val).autoConfigureConnectedAnchor = false; ((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)val).anchor = new Vector3(0f, 0f, 0f); val.xMotion = (ConfigurableJointMotion)0; val.yMotion = (ConfigurableJointMotion)0; val.zMotion = (ConfigurableJointMotion)0; val.angularXMotion = (ConfigurableJointMotion)2; val.angularYMotion = (ConfigurableJointMotion)2; val.angularZMotion = (ConfigurableJointMotion)2; } } private void Update() { if ((Object)(object)HMG == (Object)null || (Object)(object)WR == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class WorkingRigidbodiesGat : MonoBehaviour { public Transform GP; public Rigidbody G; public Rigidbody X; public Rigidbody Y; public Transform DP; public Rigidbody D; private void Start() { } private void Update() { //IL_003f: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) G.isKinematic = false; X.isKinematic = false; Y.isKinematic = false; ((Component)X).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)X).transform.localEulerAngles = new Vector3(((Component)X).transform.localEulerAngles.x, 0f, 0f); ((Component)Y).transform.localEulerAngles = new Vector3(0f, ((Component)Y).transform.localEulerAngles.y, 0f); ((Component)Y).transform.localPosition = new Vector3(0f, 0f, 0f); } private void OnDestroy() { Object.Destroy((Object)(object)((Component)G).gameObject); Object.Destroy((Object)(object)((Component)X).gameObject); Object.Destroy((Object)(object)((Component)Y).gameObject); } } public class AdvancedGrabSystem : MonoBehaviour { public OpenBoltReceiver gun; public FVRInteractiveObject GrabStock; public GameObject RigStock; private void Update() { //IL_00ac: 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) if (GrabStock.m_isHeld && (Object)(object)((FVRPhysicalObject)gun).m_quickbeltSlot == (Object)null) { RigStock.SetActive(true); RigStock.transform.position = ((Component)GrabStock.m_hand).transform.position; } else if (!GrabStock.m_isHeld || (Object)(object)((FVRPhysicalObject)gun).m_quickbeltSlot != (Object)null) { RigStock.SetActive(false); RigStock.transform.localPosition = new Vector3(0f, 0f, 0f); } } } public class BullPupShit : MonoBehaviour { public Collider col; public BoxCollider grab; public GameObject switchtoBullPup; public Transform firemech_Nrm; public Transform firemech_BP; public GameObject FireMech; public Transform mm_Nrm; public Transform mm_BP; public GameObject MM; public GameObject Rec_Nrm; public GameObject Rec_BP; public GameObject CheekRest; public FVRFirearmBeltDisplayData data1; public FVRFirearmBeltDisplayData data2; public OpenBoltReceiver gun; public GameObject Allstock; public Transform sp_Nrm; public Transform sp_BP; public GameObject bipodL; public GameObject bipodH; public AR15HandleSightFlipper handguard; private void FixedUpdate() { //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) //IL_0170: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_019e: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) if (((FVRFireArm)gun).HasBelt) { col.enabled = false; } else if (!((FVRFireArm)gun).HasBelt) { col.enabled = true; } if (switchtoBullPup.transform.localEulerAngles.x > 45f) { FireMech.transform.localPosition = ((Component)firemech_BP).transform.localPosition; MM.transform.localPosition = ((Component)mm_BP).transform.localPosition; MM.transform.localEulerAngles = ((Component)mm_BP).transform.localEulerAngles; Rec_BP.SetActive(true); Rec_Nrm.SetActive(false); CheekRest.SetActive(true); ((FVRFireArm)gun).BeltDD = data2; Allstock.SetActive(false); ((FVRFireArm)gun).StockPos = ((Component)sp_BP).transform; handguard.m_isLargeAperture = false; bipodL.SetActive(false); bipodH.SetActive(false); grab.center = new Vector3(0.002064904f, -0.075f, 0.16f); } else if (switchtoBullPup.transform.localEulerAngles.x < 45f) { FireMech.transform.localPosition = ((Component)firemech_Nrm).transform.localPosition; MM.transform.localPosition = ((Component)mm_Nrm).transform.localPosition; MM.transform.localEulerAngles = ((Component)mm_Nrm).transform.localEulerAngles; Rec_BP.SetActive(false); Rec_Nrm.SetActive(true); CheekRest.SetActive(false); ((FVRFireArm)gun).BeltDD = data1; Allstock.SetActive(true); ((FVRFireArm)gun).StockPos = ((Component)sp_Nrm).transform; bipodL.SetActive(true); bipodH.SetActive(true); grab.center = new Vector3(0.002064904f, -0.04683853f, -0.002937095f); } } } } public class RollAndLock : MonoBehaviour { public Transform MagazinePoint; public Transform MagazinePivot; public float lowerlimit; public float upperlimit; private HingeJoint Joint; public float eject; public float lockangle; public bool magejectonmag; private bool locked = false; private bool isPhysRel = false; public Collider[] colliders; public OpenBoltReceiver Gun; public GameObject GunRig; [NonSerialized] public FVRFireArmMagazine Magazine; public Collider col; private void Update() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_0038: 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_0061: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)Gun).transform.InverseTransformPoint(MagazinePoint.position); Vector3 val2 = ((Component)Gun).transform.InverseTransformPoint(MagazinePivot.position); if (!((Object)(object)Magazine != (Object)null)) { return; } if (Quaternion.Angle(MagazinePoint.rotation, ((Component)Magazine).transform.rotation) < lockangle && !locked) { JointLimits limits = default(JointLimits); ((JointLimits)(ref limits)).max = lowerlimit; ((JointLimits)(ref limits)).min = lowerlimit; Joint.limits = limits; locked = true; if ((Object)(object)((FVRFireArm)Gun).Magazine == (Object)null) { ((FVRFireArm)Gun).LoadMag(Magazine); Magazine.FireArm = (FVRFireArm)(object)Gun; ((Behaviour)Magazine.BeltGrabTrigger).enabled = true; Magazine.Load((FVRFireArm)(object)Gun); ((FVRFireArm)Gun).ConnectedToBox = true; } } if ((Object)(object)((FVRInteractiveObject)Gun).m_hand != (Object)null && (Object)(object)((FVRInteractiveObject)Magazine).m_hand != (Object)null && ((FVRInteractiveObject)Magazine).m_hand.Input.TriggerPressed) { locked = false; JointLimits limits2 = default(JointLimits); ((JointLimits)(ref limits2)).max = upperlimit; ((JointLimits)(ref limits2)).min = lowerlimit; if ((Object)(object)Joint != (Object)null) { Joint.limits = limits2; Object.Destroy((Object)(object)Joint); } Collider[] array = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val3 in array) { Collider[] array2 = colliders; foreach (Collider val4 in array2) { Physics.IgnoreCollision(val4, val3, false); } } if ((Object)(object)((FVRFireArm)Gun).Magazine != (Object)null) { ((Behaviour)Magazine.BeltGrabTrigger).enabled = false; ((FVRFireArm)Gun).EjectMag(false); ((FVRFireArm)Gun).ConnectedToBox = false; Magazine = null; } } if (locked) { ((Component)Magazine).gameObject.transform.position = ((Component)MagazinePoint).transform.position; ((Component)Magazine).gameObject.transform.rotation = ((Component)MagazinePoint).transform.rotation; } } public void OnTriggerStay(Collider other) { //IL_0044: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_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_01b0: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((Component)other).GetComponent() != (Object)null) || !((Component)other).GetComponent().Magazine.IsBeltBox || !((Object)(object)((FVRInteractiveObject)((Component)other).GetComponent().Magazine).m_hand != (Object)null)) { return; } Transform transform = new GameObject().transform; transform.rotation = ((Component)((Component)other).GetComponent().Magazine).gameObject.transform.rotation; transform.parent = MagazinePoint; Vector3 val = ((Component)Gun).transform.InverseTransformPoint(MagazinePoint.position); Vector3 val2 = ((Component)Gun).transform.InverseTransformPoint(MagazinePivot.position); Joint = ((Component)Gun).gameObject.AddComponent(); ((Joint)Joint).autoConfigureConnectedAnchor = false; JointLimits limits = default(JointLimits); ((JointLimits)(ref limits)).max = upperlimit; ((JointLimits)(ref limits)).min = lowerlimit; Joint.limits = limits; ((Joint)Joint).anchor = val2; Joint.useLimits = true; ((Joint)Joint).connectedAnchor = val2 - val; ((Component)((Component)other).GetComponent().Magazine).transform.rotation = MagazinePoint.rotation; ((Joint)Joint).axis = ((Component)Gun).transform.InverseTransformDirection(MagazinePoint.forward); ((Joint)Joint).connectedBody = ((Component)((Component)other).GetComponent().Magazine).GetComponent(); Magazine = ((Component)other).GetComponent().Magazine; ((Component)((Component)other).GetComponent().Magazine).transform.rotation = transform.rotation; Object.Destroy((Object)(object)((Component)transform).gameObject); Collider[] array = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val3 in array) { Collider[] array2 = colliders; foreach (Collider val4 in array2) { Physics.IgnoreCollision(val4, val3, true); } } } } namespace JerryComponent { public class StockStab : MonoBehaviour { public FVRInteractiveObject grab; public FVRFireArm gun; private void FixedUpdate() { if (grab.m_isHeld) { gun.IsForegripStabilized(); } } } public class feederanim : MonoBehaviour { public OpenBoltReceiver gun; public OpenBoltChargingHandle bolthandle; public OpenBoltReceiverBolt bolt; public GameObject feederwindow1; public GameObject feederwindow2; public GameObject follower; public ManipulateObject feederani1; public ManipulateObject feederani2; public bool opened = false; private void FixedUpdate() { //IL_0011: 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_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_0067: 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_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_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_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0228: 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_026e: 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_012f: Unknown result type (might be due to invalid IL or missing references) if (((Component)bolt).gameObject.transform.localPosition.z <= ((Component)bolt.Point_Bolt_LockPoint).transform.localPosition.z) { bolthandle.ForwardSpeed = 0f; } else if (((Component)bolt).gameObject.transform.localPosition.z > ((Component)bolt.Point_Bolt_LockPoint).transform.localPosition.z) { bolthandle.ForwardSpeed = 6f; } if ((Object)(object)((FVRFireArm)gun).Magazine != (Object)null) { if (((FVRFireArm)gun).Magazine.IsBeltBox) { if (((FVRFireArm)gun).HasBelt) { ((Behaviour)feederani1).enabled = true; } else if (!((FVRFireArm)gun).HasBelt) { ((Behaviour)feederani1).enabled = false; feederwindow1.transform.localEulerAngles = new Vector3(0f, 60f, 0f); } } else if (!((FVRFireArm)gun).Magazine.IsBeltBox) { ((Behaviour)feederani1).enabled = true; } } else if ((Object)(object)((FVRFireArm)gun).Magazine == (Object)null) { ((Behaviour)feederani1).enabled = false; feederwindow1.transform.localEulerAngles = new Vector3(0f, 60f, 0f); } if (follower.transform.localPosition.x > 0.1f && !opened) { ((Behaviour)feederani2).enabled = true; feederwindow2.transform.localEulerAngles = new Vector3(0f, 90f, 0f); opened = true; } else if (follower.transform.localPosition.x <= 0.1f) { opened = false; ((Behaviour)feederani2).enabled = false; feederwindow2.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } [RequireComponent(typeof(Rigidbody))] public class AdvancedRope : MonoBehaviour { [Header("节点配置")] [Tooltip("节点列表(按父子顺序排列)")] public List nodes = new List(); [Header("旋转限制")] public float maxTwistAngle = 30f; public float maxSwing1Angle = 45f; public float maxSwing2Angle = 45f; [Header("物理设置")] public float jointSpring = 20f; public float jointDamper = 3f; public CharacterJoint[] oldJoints; private void Awake() { InitializeJoints(); } [ContextMenu("初始化关节")] public void InitializeJoints() { for (int i = 0; i < nodes.Count; i++) { ConfigureNode(nodes[i], i); } } public void ConfigureNode(RopeNode node, int index) { //IL_0084: 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_00a9: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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) if (!Object.op_Implicit((Object)(object)((Component)node).GetComponent())) { ((Component)node).gameObject.AddComponent(); } oldJoints = ((Component)node).GetComponents(); CharacterJoint[] array = oldJoints; foreach (CharacterJoint val in array) { Object.DestroyImmediate((Object)(object)val); } if (index != 0) { CharacterJoint val2 = ((Component)node).gameObject.AddComponent(); ((Joint)val2).connectedBody = ((Component)nodes[index - 1]).GetComponent(); ((Joint)val2).axis = Vector3.up; val2.swingAxis = Vector3.forward; ConfigureJointLimits(val2); val2.enableProjection = true; SoftJointLimitSpring val3 = default(SoftJointLimitSpring); ((SoftJointLimitSpring)(ref val3)).spring = jointSpring; ((SoftJointLimitSpring)(ref val3)).damper = jointDamper; SoftJointLimitSpring swingLimitSpring = (val2.twistLimitSpring = val3); val2.swingLimitSpring = swingLimitSpring; } } private void ConfigureJointLimits(CharacterJoint joint) { //IL_0003: 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_0025: 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_0034: 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_0054: 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_005e: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) SoftJointLimit val = default(SoftJointLimit); ((SoftJointLimit)(ref val)).limit = maxTwistAngle; ((SoftJointLimit)(ref val)).bounciness = 0.1f; SoftJointLimit lowTwistLimit = (joint.highTwistLimit = val); joint.lowTwistLimit = lowTwistLimit; val = default(SoftJointLimit); ((SoftJointLimit)(ref val)).limit = maxSwing1Angle; ((SoftJointLimit)(ref val)).bounciness = 0.1f; SoftJointLimit swing1Limit = val; joint.swing1Limit = swing1Limit; val = default(SoftJointLimit); ((SoftJointLimit)(ref val)).limit = maxSwing2Angle; ((SoftJointLimit)(ref val)).bounciness = 0.1f; SoftJointLimit swing2Limit = val; joint.swing2Limit = swing2Limit; } [ContextMenu("添加新节点")] public void AddNodeInEditor() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0038: 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) GameObject val = new GameObject("Node_" + nodes.Count); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.down * (float)nodes.Count; RopeNode item = val.AddComponent(); nodes.Add(item); } [ContextMenu("清除所有节点")] public void ClearNodes() { foreach (RopeNode node in nodes) { if ((Object)(object)node != (Object)null && (Object)(object)((Component)node).transform.parent == (Object)(object)((Component)this).transform) { Object.DestroyImmediate((Object)(object)((Component)node).gameObject); } } nodes.Clear(); } } public class RopeNode : MonoBehaviour { [Header("本地旋转限制")] public Vector3 minLocalRotation = new Vector3(-30f, -30f, -30f); public Vector3 maxLocalRotation = new Vector3(30f, 30f, 30f); private void Update() { //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_0091: Unknown result type (might be due to invalid IL or missing references) Vector3 localEulerAngles = ((Component)this).transform.localEulerAngles; localEulerAngles.x = ClampAngle(localEulerAngles.x, minLocalRotation.x, maxLocalRotation.x); localEulerAngles.y = ClampAngle(localEulerAngles.y, minLocalRotation.y, maxLocalRotation.y); localEulerAngles.z = ClampAngle(localEulerAngles.z, minLocalRotation.z, maxLocalRotation.z); ((Component)this).transform.localEulerAngles = localEulerAngles; } private float ClampAngle(float angle, float min, float max) { angle = NormalizeAngle(angle); min = NormalizeAngle(min); max = NormalizeAngle(max); return Mathf.Clamp(angle, min, max); } private float NormalizeAngle(float angle) { while (angle > 180f) { angle -= 360f; } while (angle < -180f) { angle += 360f; } return angle; } } public class BeltBoxScript : MonoBehaviour { public FVRFireArmMagazine mag; public Transform hostpos; public Transform belteject; public GameObject emptbelt; public bool spawned = true; public GameObject tail; public Transform tailpos; public KillAfter ka; public FVRFireArmAttachment thisatt; public GameObject phys; private void Update() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_0044: 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_015a: 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_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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mag.FireArm == (Object)null && (Object)(object)((FVRInteractiveObject)mag).m_hand == (Object)null) { ((Component)mag).gameObject.transform.position = hostpos.position; ((Component)mag).gameObject.transform.eulerAngles = hostpos.eulerAngles; } tail.transform.position = tailpos.position; ((Component)tailpos).transform.eulerAngles = tailpos.eulerAngles; if (Vector3.Distance(((Component)mag).gameObject.transform.position, hostpos.position) > 0.25f) { if ((Object)(object)mag.FireArm != (Object)null) { mag.FireArm.EjectMag(false); mag.FireArm = null; } if ((Object)(object)((FVRInteractiveObject)mag).m_hand != (Object)null) { ((FVRInteractiveObject)mag).ForceBreakInteraction(); } } else if ((Object)(object)mag.FireArm != (Object)null) { if (((Component)mag.Follower).transform.localPosition.x == 0f && !spawned) { Object.Instantiate(emptbelt, belteject.position, belteject.rotation); spawned = true; } else if (((Component)mag.Follower).transform.localPosition.x != 0f) { spawned = false; } if (mag.m_numRounds <= 0) { if ((Object)(object)thisatt.curMount != (Object)null) { thisatt.DetachFromMount(); } mag.FireArm.EjectMag(false); mag.FireArm = null; ((Behaviour)ka).enabled = true; } } if ((Object)(object)thisatt.curMount != (Object)null) { phys.SetActive(false); } else if ((Object)(object)thisatt.curMount == (Object)null) { phys.SetActive(true); } } } public class BeltExtention : MonoBehaviour { public magphys phys; public GameObject BeltOutGeo; public FVRFireArmMagazine prevMag; public BeltExtention prevBelt; public FVRFireArmMagazine nextMag; public BeltExtention nextBelt; public FVRFireArmMagazine thisMag; public BeltExtention thisBelt; public FVRFireArm gun; public GameObject attachAud; public Collider col; public Rigidbody thisRig; public BeltExtentionTop top; public Transform[] Nos; public KillAfter ka; private void OnTriggerEnter(Collider other) { if (!(((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) & ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null))) { return; } if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)(object)thisMag && (Object)(object)((FVRPhysicalObject)((Component)other).gameObject.GetComponent()).m_quickbeltSlot == (Object)null) { if ((Object)(object)prevMag != (Object)null) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)(object)prevMag) { nextMag = ((Component)other).gameObject.GetComponent(); } } else if ((Object)(object)prevMag == (Object)null) { nextMag = ((Component)other).gameObject.GetComponent(); } } if (!((Object)(object)((Component)other).gameObject.GetComponent().thisBelt != (Object)(object)thisBelt)) { return; } if ((Object)(object)prevBelt != (Object)null) { if ((Object)(object)((Component)other).gameObject.GetComponent().thisBelt != (Object)(object)prevBelt) { nextBelt = ((Component)other).gameObject.GetComponent().thisBelt; } } else if ((Object)(object)prevBelt == (Object)null) { nextBelt = ((Component)other).gameObject.GetComponent().thisBelt; } } private void Update() { //IL_0096: 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_0044: 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_02b8: 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) if ((Object)(object)thisMag.FireArm != (Object)null) { gun = thisMag.FireArm; ((Component)thisMag).gameObject.transform.position = gun.MagazineMountPos.position; ((Component)thisMag).gameObject.transform.eulerAngles = gun.MagazineMountPos.eulerAngles; } ((Component)this).gameObject.transform.position = ((Component)Nos[thisMag.m_numRounds]).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)Nos[thisMag.m_numRounds]).transform.eulerAngles; if ((Object)(object)((Component)thisMag).gameObject.GetComponent() != (Object)null) { thisRig = ((Component)thisMag).gameObject.GetComponent(); } if ((Object)(object)gun == (Object)null || (Object)(object)thisRig == (Object)null) { } if (thisMag.m_numRounds <= 0 && (Object)(object)gun != (Object)null) { gun.EjectMag(false); gun.Magazine = null; thisMag.FireArm = null; if ((Object)(object)nextMag != (Object)null && (Object)(object)nextBelt != (Object)null) { gun.LoadMag(nextMag); gun.Magazine = nextMag; nextMag.FireArm = gun; nextBelt.prevBelt = null; nextBelt.prevMag = null; nextBelt = null; nextMag = null; } gun = null; ((Behaviour)ka).enabled = true; } if ((Object)(object)nextBelt == (Object)null || (Object)(object)nextMag == (Object)null) { col.enabled = true; } else if ((Object)(object)nextMag != (Object)null && (Object)(object)nextBelt != (Object)null) { if ((Object)(object)top != (Object)null) { Object.Destroy((Object)(object)top); } col.enabled = false; if (thisMag.m_numRounds > 0) { ((Component)nextMag).gameObject.transform.position = ((Component)Nos[thisMag.m_numRounds]).transform.position; ((Component)nextMag).gameObject.transform.eulerAngles = ((Component)Nos[thisMag.m_numRounds]).transform.eulerAngles; nextBelt.prevBelt = thisBelt; nextBelt.prevMag = thisMag; } else if (thisMag.m_numRounds <= 0 && (Object)(object)gun == (Object)null) { nextBelt.prevBelt = null; nextBelt.prevMag = null; nextBelt = null; nextMag = null; } } if ((Object)(object)prevMag != (Object)null && (Object)(object)prevBelt != (Object)null) { if ((Object)(object)thisRig != (Object)null) { thisRig.useGravity = false; thisRig.isKinematic = true; } phys.isExtended = true; BeltOutGeo.SetActive(false); attachAud.SetActive(true); } else if ((Object)(object)prevMag == (Object)null || (Object)(object)prevBelt == (Object)null) { if ((Object)(object)thisRig != (Object)null) { thisRig.useGravity = true; thisRig.isKinematic = false; } phys.isExtended = false; BeltOutGeo.SetActive(true); attachAud.SetActive(false); } } } public class BeltExtentionTop : MonoBehaviour { public BeltExtention thisBelt; } public class BeltJoint : MonoBehaviour { public GameObject thisrig; public GameObject thatrig; private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) thisrig.transform.position = thatrig.transform.position; } } public class ChargingHandleSwing : MonoBehaviour { public GameObject CH; public FVRPhysicalObject ChargingHandle; public Transform CHroot; public LineRenderer LR; public OpenBoltReceiverBolt bolt; public float z = 0f; public AudioEvent boltout; public bool sound = false; private void Start() { } private void Update() { //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_005c: 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) //IL_00ae: 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) LR.SetPosition(0, ((Component)ChargingHandle).gameObject.transform.position); LR.SetPosition(1, CHroot.position); if (!((Object)(object)((FVRInteractiveObject)ChargingHandle).m_hand != (Object)null)) { return; } z = Vector3.Distance(CH.transform.position, CHroot.position); if (z < 0.5f) { ((Component)bolt).transform.localPosition = new Vector3(0f, 0f, 2f - 4f * z); } if (z < 0.5f) { sound = false; } if (z > 0.6f) { if (!sound) { SM.PlayCoreSound((FVRPooledAudioType)0, boltout, ((Component)bolt).gameObject.transform.position); sound = true; } bolt.SetBoltToRear(); } } } public class EjectionPort : MonoBehaviour { public OpenBoltReceiver gun; public GameObject Y; 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_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_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_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_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_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_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_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 (Y.transform.localEulerAngles.y > 0f && Y.transform.localEulerAngles.y < 45f) { gun.EjectionSpeed = new Vector3(Y.transform.localEulerAngles.y * 0.1f, 0f, 5f); } else if (Y.transform.localEulerAngles.y > 315f && Y.transform.localEulerAngles.y < 360f) { gun.EjectionSpeed = new Vector3((Y.transform.localEulerAngles.y - 360f) * 0.1f, 0f, 5f); } } } public class HMGGrip : MonoBehaviour { public GameObject HMG; public GameObject Trigger; public string GunName = "NSV(Clone)"; public string posName1 = "NSVPoseOverride"; public string posName2 = "NSVPoseOverride_Touch"; public string GunTrigger = "NSVTrigger"; public FVRPhysicalObject obj; public OpenBoltReceiver Gun; public WorkingRigidbodies WR; public GameObject posVIVE; public GameObject posTOUCH; private void Start() { //IL_0094: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) HMG = GameObject.Find(GunName); posVIVE = GameObject.Find(posName1); posTOUCH = GameObject.Find(posName2); Trigger = GameObject.Find(GunTrigger); Gun = HMG.GetComponent(); WR = HMG.GetComponent(); if ((Object)(object)WR != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)WR.G).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)WR.GP).transform.eulerAngles; ConfigurableJoint val = ((Component)this).gameObject.AddComponent(); ((Joint)val).connectedBody = WR.G; ((Joint)val).autoConfigureConnectedAnchor = false; ((Joint)val).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)val).anchor = new Vector3(0f, 0f, 0f); val.xMotion = (ConfigurableJointMotion)0; val.yMotion = (ConfigurableJointMotion)0; val.zMotion = (ConfigurableJointMotion)0; val.angularXMotion = (ConfigurableJointMotion)2; val.angularYMotion = (ConfigurableJointMotion)2; val.angularZMotion = (ConfigurableJointMotion)2; } if ((Object)(object)posVIVE != (Object)null) { ((FVRInteractiveObject)obj).PoseOverride = posVIVE.transform; } if ((Object)(object)posTOUCH != (Object)null) { ((FVRInteractiveObject)obj).PoseOverride_Touch = posTOUCH.transform; } } private void Update() { //IL_00d3: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)HMG == (Object)null || (Object)(object)Gun == (Object)null || (Object)(object)WR == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } else { if (!((Object)(object)HMG != (Object)null) || !((Object)(object)Gun != (Object)null) || !((Object)(object)WR != (Object)null) || !((Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null)) { return; } if ((Object)(object)Trigger != (Object)null) { Trigger.transform.localEulerAngles = new Vector3(((FVRInteractiveObject)obj).m_hand.Input.TriggerFloat * 30f, 0f, 0f); } if (((FVRInteractiveObject)obj).m_hand.Input.TriggerPressed) { if (((Component)WR.TC).transform.localEulerAngles.x < 10f) { Gun.ReleaseSeer(); } else if (((Component)WR.TC).transform.localEulerAngles.x > 10f) { Gun.EngageSeer(); } } else if (!((FVRInteractiveObject)obj).m_hand.Input.TriggerPressed) { Gun.EngageSeer(); } } } } public class OnlyOne : MonoBehaviour { private void Start() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown int num = 0; Object[] array = Object.FindObjectsOfType(typeof(FVRPhysicalObject)); for (int i = 0; i < array.Length; i++) { FVRPhysicalObject val = (FVRPhysicalObject)array[i]; num++; if (((Object)((Component)val).gameObject).name == ((Object)((Component)this).gameObject).name && !((Object)(object)((Component)val).gameObject == (Object)(object)((Component)this).gameObject) && (Object)(object)((Component)val).gameObject != (Object)(object)((Component)this).gameObject) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void Update() { } } public class SpringTopCover : MonoBehaviour { public GameObject topcover; public HingeJoint joint; public GameObject latch; public GameObject magwell; public GameObject Audioholder; public GameObject latchon; public GameObject latchoff; private JointSpring open; private JointSpring close; private bool TCclosed = true; private void Start() { open.spring = 50f; close.spring = 50f; open.damper = 1f; close.damper = 1f; open.targetPosition = 45f; close.targetPosition = 0f; } private void Update() { //IL_0027: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_013a: Unknown result type (might be due to invalid IL or missing references) if (TCclosed) { topcover.transform.localEulerAngles = new Vector3(0f, 0f, 0f); magwell.SetActive(false); Audioholder.SetActive(true); } else if (!TCclosed) { magwell.SetActive(true); Audioholder.SetActive(false); } if (latch.transform.localEulerAngles.x < 25f) { latchon.SetActive(false); latchoff.SetActive(true); joint.spring = close; if (topcover.transform.localEulerAngles.x < 5f) { TCclosed = true; } } else if (latch.transform.localEulerAngles.x > 25f) { latchon.SetActive(true); latchoff.SetActive(false); TCclosed = false; joint.spring = open; } } } public class WorkingRigidbodies : MonoBehaviour { public Transform GP; public Rigidbody G; public Rigidbody X; public Rigidbody Y; public Rigidbody TC; public Rigidbody CH; private void Start() { } private void Update() { //IL_0057: 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_007c: 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_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_00c5: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_0144: Unknown result type (might be due to invalid IL or missing references) G.isKinematic = false; X.isKinematic = false; Y.isKinematic = false; TC.isKinematic = false; CH.isKinematic = false; ((Component)X).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)X).transform.localEulerAngles = new Vector3(((Component)X).transform.localEulerAngles.x, 0f, 0f); ((Component)Y).transform.localEulerAngles = new Vector3(0f, ((Component)Y).transform.localEulerAngles.y, 0f); ((Component)Y).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)TC).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)TC).transform.localEulerAngles = new Vector3(((Component)TC).transform.localEulerAngles.x, 0f, 0f); } private void OnDestroy() { Object.Destroy((Object)(object)((Component)G).gameObject); Object.Destroy((Object)(object)((Component)X).gameObject); Object.Destroy((Object)(object)((Component)Y).gameObject); Object.Destroy((Object)(object)((Component)TC).gameObject); Object.Destroy((Object)(object)((Component)CH).gameObject); } } public class magphys : MonoBehaviour { public GameObject colP; public FVRFireArmMagazine mag; public GameObject phys; public CapsuleCollider col1; public CapsuleCollider col2; public CapsuleCollider col3; public bool hascol = false; public bool isExtended = false; private void Start() { } private void Update() { //IL_013e: 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_0234: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)col1 == (Object)null || (Object)(object)col2 == (Object)null || (Object)(object)col3 == (Object)null) { } if ((Object)(object)mag.FireArm != (Object)null || isExtended) { if (hascol) { if ((Object)(object)col1 != (Object)null) { Object.Destroy((Object)(object)col1); } if ((Object)(object)col2 != (Object)null) { Object.Destroy((Object)(object)col2); } if ((Object)(object)col3 != (Object)null) { Object.Destroy((Object)(object)col3); } hascol = false; } } else if ((Object)(object)mag.FireArm == (Object)null && !isExtended && !hascol) { if ((Object)(object)col1 == (Object)null) { col1 = colP.AddComponent(); ((Collider)col1).isTrigger = false; col1.center = new Vector3(0f, 0f, 0f); col1.radius = 0.05f; col1.height = 1f; col1.direction = 2; } if ((Object)(object)col2 == (Object)null) { col2 = colP.AddComponent(); ((Collider)col2).isTrigger = false; col2.center = new Vector3(-0.52f, 0f, 0f); col2.radius = 0.05f; col2.height = 1f; col2.direction = 2; } if ((Object)(object)col3 == (Object)null) { col3 = colP.AddComponent(); ((Collider)col3).isTrigger = false; col3.center = new Vector3(0.52f, 0f, 0f); col3.radius = 0.05f; col3.height = 1f; col3.direction = 2; } hascol = true; } } } public class AmmoBackPack : MonoBehaviour, IFVRDamageable { public Vector3 refv = Vector3.zero; public Transform belthold; public Transform beltexport; public SnapToPointRigidbody ltp; public Collider col; public GameObject main; public Rigidbody joint1; public Rigidbody joint2; public Rigidbody joint3; public Rigidbody joint4; public Rigidbody joint5; public Rigidbody joint6; public Rigidbody joint7; public Rigidbody SJroot; public string beltname; public GameObject newprefab; public GameObject brokenprefab; public GameObject beltlock; public GameObject belthead; public GameObject beltPieceObj; public FVRFireArmMagazine beltPiece; public float _damageRequired = 10000f; public float _damageReceived; private void Start() { newprefab.SetActive(true); brokenprefab.SetActive(false); beltPieceObj = GameObject.Find(beltname); if ((Object)(object)beltPieceObj != (Object)null) { beltPiece = beltPieceObj.GetComponent(); belthead = ((Component)beltPiece.RoundEjectionPos).gameObject; } } public void Damage(Damage dam) { //IL_0013: 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_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_0037: Unknown result type (might be due to invalid IL or missing references) if (!newprefab.activeInHierarchy) { return; } Vector3 val = dam.point + dam.hitNormal * Random.Range(0.002f, 0.008f); _damageReceived += dam.Dam_Blunt; if (_damageReceived >= _damageRequired) { ((Behaviour)ltp).enabled = false; newprefab.SetActive(false); brokenprefab.SetActive(true); if ((Object)(object)beltPiece != (Object)null) { beltPiece.m_numRounds = 0; beltPiece.m_capacity = 0; belthead.SetActive(false); } } } private void Update() { //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: 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_0216: 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) col.enabled = true; col.isTrigger = false; ((Component)col).gameObject.layer = 0; SJroot.isKinematic = false; joint1.isKinematic = false; joint2.isKinematic = false; joint3.isKinematic = false; joint4.isKinematic = false; joint5.isKinematic = false; joint6.isKinematic = false; joint7.isKinematic = false; if ((Object)(object)beltPieceObj == (Object)null || (Object)(object)beltPiece == (Object)null || (Object)(object)belthead == (Object)null) { } if ((Object)(object)beltPieceObj != (Object)null && (Object)(object)beltPiece != (Object)null && (Object)(object)belthead != (Object)null) { beltlock.transform.position = belthead.transform.position; beltlock.transform.eulerAngles = belthead.transform.eulerAngles; if ((Object)(object)beltPieceObj.GetComponent() != (Object)null) { beltPieceObj.GetComponent().useGravity = false; } else if (!((Object)(object)beltPieceObj.GetComponent() == (Object)null)) { } if ((Object)(object)beltPiece.FireArm != (Object)null && Vector3.Distance(((Component)beltPiece.FireArm).transform.position, ((Component)beltexport).transform.position) > 1.5f) { beltPiece.FireArm.EjectMag(false); } if ((Object)(object)((FVRInteractiveObject)beltPiece).m_hand == (Object)null && (Object)(object)beltPiece.FireArm == (Object)null) { beltPieceObj.transform.position = belthold.position; beltPieceObj.transform.eulerAngles = belthold.eulerAngles; } } if ((Object)(object)main == (Object)null) { Object.Destroy((Object)(object)((Component)SJroot).gameObject); Object.Destroy((Object)(object)((Component)joint1).gameObject); Object.Destroy((Object)(object)((Component)joint2).gameObject); Object.Destroy((Object)(object)((Component)joint3).gameObject); Object.Destroy((Object)(object)((Component)joint4).gameObject); Object.Destroy((Object)(object)((Component)joint5).gameObject); Object.Destroy((Object)(object)((Component)joint6).gameObject); Object.Destroy((Object)(object)((Component)joint7).gameObject); if ((Object)(object)beltPieceObj != (Object)null && (Object)(object)beltPiece != (Object)null) { beltPiece.m_numRounds = 0; beltPiece.m_capacity = 0; belthead.SetActive(false); } Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class AutoGrabMagWell : MonoBehaviour { public GameObject rot; public FVRFireArm gun; public MagFold fold; private void Awake() { } private void Start() { } private void Update() { //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_0141: 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_00f7: 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 (Object.op_Implicit((Object)(object)gun.Magazine)) { if (gun.Magazine.IsBeltBox && GM.CurrentMovementManager.Hands[1].Input.IsGrabbing && rot.transform.localEulerAngles.y < 45f) { if ((Object)(object)GM.CurrentMovementManager.Hands[1].CurrentInteractable == (Object)null) { GM.CurrentMovementManager.Hands[1].ForceSetInteractable((FVRInteractiveObject)(object)fold); ((FVRInteractiveObject)fold).BeginInteraction(GM.CurrentMovementManager.Hands[1]); } } else if (gun.Magazine.IsBeltBox && !GM.CurrentMovementManager.Hands[1].Input.IsGrabbing && rot.transform.localEulerAngles.y < 45f) { gun.EjectMag(false); } else if (gun.Magazine.IsBeltBox && rot.transform.localEulerAngles.y != 45f) { } } else if (Object.op_Implicit((Object)(object)gun.Magazine)) { } } } public class AutoGrabMagWell2 : MonoBehaviour { public GameObject rot; public FVRFireArm gun; public FVRViveHand thisHand; public MagFold fold; private void Awake() { } private void Start() { } private void Update() { //IL_0172: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)gun.Magazine)) { if ((Object)(object)GM.CurrentMovementManager.Hands[0].CurrentInteractable == (Object)null && (Object)(object)GM.CurrentMovementManager.Hands[1].CurrentInteractable != (Object)null) { thisHand = GM.CurrentMovementManager.Hands[0]; } else if ((Object)(object)GM.CurrentMovementManager.Hands[0].CurrentInteractable != (Object)null && (Object)(object)GM.CurrentMovementManager.Hands[1].CurrentInteractable == (Object)null) { thisHand = GM.CurrentMovementManager.Hands[1]; } else if ((Object)(object)GM.CurrentMovementManager.Hands[0].CurrentInteractable == (Object)null && (Object)(object)GM.CurrentMovementManager.Hands[1].CurrentInteractable == (Object)null) { thisHand = null; } else if ((Object)(object)GM.CurrentMovementManager.Hands[0].CurrentInteractable != (Object)null && (Object)(object)GM.CurrentMovementManager.Hands[1].CurrentInteractable != (Object)null) { thisHand = null; } if (!((Object)(object)thisHand != (Object)null)) { return; } if (gun.Magazine.IsBeltBox && rot.transform.localEulerAngles.y < 45f && thisHand.Input.IsGrabbing) { if ((Object)(object)thisHand.CurrentInteractable == (Object)null) { thisHand.ForceSetInteractable((FVRInteractiveObject)(object)fold); ((FVRInteractiveObject)fold).BeginInteraction(thisHand); } } else if (gun.Magazine.IsBeltBox && rot.transform.localEulerAngles.y < 45f && !thisHand.Input.IsGrabbing) { gun.EjectMag(false); } } else if (Object.op_Implicit((Object)(object)gun.Magazine)) { } } } public class BeltAppear : MonoBehaviour { public GameObject beltemptyreal; public FVRFireArmTopCover cover; public FVRFoldingStockXAxis lifter; public BoxCollider col; public OpenBoltReceiver gun; public Transform beltpos; public GameObject follower; public int followerX = 0; public int beltL = 20; public float a = 45f; private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) follower.transform.localPosition = new Vector3(0f, 0f, 0f); followerX = 0; } private void OnPKMShotFired(FVRFireArm fireArm) { //IL_0044: 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 (!((Object)(object)fireArm == (Object)(object)gun)) { return; } followerX++; if (followerX >= beltL) { GameObject val = Object.Instantiate(beltemptyreal, beltemptyreal.transform.position, beltemptyreal.transform.rotation); if ((Object)(object)val.GetComponent() == (Object)null) { val.AddComponent(); } if ((Object)(object)val.GetComponent() == (Object)null) { KillAfter val2 = val.AddComponent(); val2.DieTime = 10f; } followerX = 0; } } 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(OnPKMShotFired); } private void FixedUpdate() { //IL_001d: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_023c: 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_0127: 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_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_026f: 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_0206: 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_02b8: Unknown result type (might be due to invalid IL or missing references) follower.transform.localPosition = new Vector3((float)followerX, 0f, 0f); if (!((FVRFireArm)gun).HasBelt && ((Component)cover).transform.localEulerAngles.x >= 45f) { ((Collider)col).enabled = true; if ((Object)(object)((FVRFireArm)gun).Magazine != (Object)null && !((FVRFireArm)gun).Magazine.IsBeltBox) { ((Collider)col).enabled = false; } } else if (((FVRFireArm)gun).HasBelt || ((Component)cover).transform.localEulerAngles.x < 45f) { ((Collider)col).enabled = false; } if (((Component)lifter).transform.localEulerAngles.x <= 22.5f && followerX != 0) { GameObject val = Object.Instantiate(beltemptyreal, beltemptyreal.transform.position, beltemptyreal.transform.rotation); if ((Object)(object)val.GetComponent() == (Object)null) { val.AddComponent(); } if ((Object)(object)val.GetComponent() == (Object)null) { KillAfter val2 = val.AddComponent(); val2.DieTime = 10f; } followerX = 0; } lifter.rotAngle = ((Component)lifter).transform.localEulerAngles.x; if (((Component)lifter).transform.localEulerAngles.x < 45f && (Object)(object)((FVRInteractiveObject)lifter).m_hand == (Object)null) { ((Component)lifter).transform.localEulerAngles = new Vector3(((Component)lifter).transform.localEulerAngles.x + 500f * Time.deltaTime, 0f, 0f); } if (((Component)lifter).transform.localEulerAngles.x > 45f) { ((Component)lifter).transform.localEulerAngles = new Vector3(45f, 0f, 0f); } if (((Component)lifter).transform.localEulerAngles.x < 0f) { ((Component)lifter).transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } 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.ShotFiredEvent -= new ShotFired(OnPKMShotFired); } } public class BeltAppear2 : MonoBehaviour { public FVRFireArmTopCover cover; public FVRFoldingStockXAxis lifter; public BoxCollider col; public OpenBoltReceiver gun; public float a = 45f; private void Start() { } private void Awake() { } private void Update() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) if (!((FVRFireArm)gun).HasBelt && ((Component)cover).transform.localEulerAngles.x >= 45f) { ((Collider)col).enabled = true; } if (((FVRFireArm)gun).HasBelt || ((Component)cover).transform.localEulerAngles.x < 45f) { ((Collider)col).enabled = false; } if (((Component)lifter).transform.localEulerAngles.x < 45f) { a = ((Component)lifter).transform.localEulerAngles.x; ((Component)lifter).transform.localEulerAngles = new Vector3(a + 5f, 0f, 0f); } if (((Component)lifter).transform.localEulerAngles.x == 45f) { a = 45f; } if (((Component)lifter).transform.localEulerAngles.x > 45f) { ((Component)lifter).transform.localEulerAngles = new Vector3(45f, 0f, 0f); } } } public class BeltChange : MonoBehaviour { public OpenBoltReceiver gun2; public FVRFirearmBeltDisplayData data1; public FVRFirearmBeltDisplayData data2; public GameObject rot; public Transform _Magpos; public Transform _Boxpos; 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_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 (rot.transform.localEulerAngles.x < 45f) { ((FVRFireArm)gun2).BeltDD = data1; } if (rot.transform.localEulerAngles.x >= 45f) { ((FVRFireArm)gun2).BeltDD = data2; } ((FVRFireArm)gun2).BeltBoxMountPos = _Boxpos; ((FVRFireArm)gun2).MagazineMountPos = _Magpos; } } public class BeltGrab : MonoBehaviour { public FVRFireArm gun; public GameObject grabpos; private void Start() { } private void Update() { //IL_00dc: 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_0073: 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) if ((Object)(object)gun.Magazine != (Object)null && gun.Magazine.IsBeltBox) { if ((Object)(object)((FVRInteractiveObject)gun.Magazine.BeltGrabTrigger).m_hand != (Object)null) { ((Component)((FVRInteractiveObject)gun.Magazine.BeltGrabTrigger).PoseOverride).transform.position = grabpos.transform.position; ((Component)((FVRInteractiveObject)gun.Magazine.BeltGrabTrigger).PoseOverride_Touch).transform.position = grabpos.transform.position; } else { ((Component)((FVRInteractiveObject)gun.Magazine.BeltGrabTrigger).PoseOverride).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)((FVRInteractiveObject)gun.Magazine.BeltGrabTrigger).PoseOverride_Touch).transform.localPosition = new Vector3(0f, 0f, 0f); } } } } public class Control_Enable : MonoBehaviour { public GameObject objToRead; public GameObject objToAffect; private void Start() { } private void Update() { if (objToRead.activeInHierarchy) { objToAffect.SetActive(true); } else { objToAffect.SetActive(false); } } } public class Control_Enable_Rev : MonoBehaviour { public GameObject objToRead; public GameObject objToAffect; private void Start() { } private void Update() { if (objToRead.activeInHierarchy) { objToAffect.SetActive(false); } else { objToAffect.SetActive(true); } } } public class DoveTail : MonoBehaviour { public GameObject topcoverRot; public Collider topCover; public GameObject dovetail; public WaggleJoint wag; public GameObject switchToRelease; public GameObject barrel; public GameObject grip; public GameObject stock; public GameObject lockpiece; public FVRFireArmAttachmentMount mount; private void Start() { } private void Update() { //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_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) //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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: 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_014b: 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_0195: Unknown result type (might be due to invalid IL or missing references) if (barrel.activeInHierarchy && grip.activeInHierarchy && stock.activeInHierarchy) { dovetail.SetActive(true); if (switchToRelease.transform.localEulerAngles.x > 45f) { if (topcoverRot.transform.localEulerAngles.x < 2f) { wag.angleLimitLeft = 32f; wag.angleLimitRight = 0f; } else if (topcoverRot.transform.localEulerAngles.x > 2f) { wag.angleLimitLeft = 10f; wag.angleLimitRight = 0f; } } else { if (!(switchToRelease.transform.localEulerAngles.x < 45f)) { return; } if (topcoverRot.transform.localEulerAngles.x < 2f) { if (lockpiece.transform.localEulerAngles.x > 45f) { wag.angleLimitLeft = 32f; wag.angleLimitRight = 0f; } else if (lockpiece.transform.localEulerAngles.x < 45f) { wag.angleLimitLeft = 32f; wag.angleLimitRight = -32f; } } else if (topcoverRot.transform.localEulerAngles.x > 2f) { wag.angleLimitLeft = 10f; wag.angleLimitRight = 0f; } } } else { wag.angleLimitLeft = 32f; wag.angleLimitRight = -32f; dovetail.SetActive(false); } } } 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 MagMani : MonoBehaviour { public OpenBoltReceiver gun; public GameObject magmount; public GameObject well; public Collider col; public Collider col2; private void Start() { } private void Update() { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_004f: 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_0195: 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_0160: 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_007f: 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_01c3: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((FVRFireArm)gun).Magazine)) { if ((float)((FVRFireArm)gun).Magazine.m_numRounds == 0f) { col.enabled = true; if (magmount.transform.localEulerAngles.z < 5f) { ((FVRFireArm)gun).EjectMag(true); } else if (!(magmount.transform.localEulerAngles.z >= 5f)) { } } else if ((float)((FVRFireArm)gun).Magazine.m_numRounds > 0f && magmount.transform.localEulerAngles.z == 45f) { col.enabled = false; } } else if (!Object.op_Implicit((Object)(object)((FVRFireArm)gun).Magazine) && magmount.transform.localEulerAngles.z < 5f) { well.transform.localEulerAngles = new Vector3(0f, 0f, 20f); ((Component)this).transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else if (Object.op_Implicit((Object)(object)((FVRFireArm)gun).Magazine) && magmount.transform.localEulerAngles.z < 5f) { well.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (Object.op_Implicit((Object)(object)((FVRFireArm)gun).Magazine)) { col2.enabled = false; } if (!Object.op_Implicit((Object)(object)((FVRFireArm)gun).Magazine)) { col2.enabled = true; } } } } public class MagPosChange : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class MagRotate : MonoBehaviour { public GameObject rot; public FVRFireArm gun; public FVRFoldingStockYAxis fold; private GameObject _player = null; private FVRViveHand leftHand = null; private FVRViveHand rightHand = null; public bool leftGrab; public bool rightGrab; private void Awake() { _player = ((Component)Object.FindObjectOfType()).gameObject; } private void Start() { leftHand = ((Component)_player.transform.Find("Controller (left)")).GetComponent(); rightHand = ((Component)_player.transform.Find("Controller (right)")).GetComponent(); } private void Update() { //IL_021b: 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_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_014c: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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) if (Object.op_Implicit((Object)(object)gun.Magazine)) { if (rightHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { if ((Object)(object)rightHand.CurrentInteractable != (Object)null) { rightGrab = false; } else { rightHand.ForceSetInteractable((FVRInteractiveObject)(object)fold); ((FVRInteractiveObject)fold).BeginInteraction(rightHand); rightGrab = true; } } if (leftHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { if ((Object)(object)leftHand.CurrentInteractable != (Object)null) { leftGrab = false; return; } leftHand.ForceSetInteractable((FVRInteractiveObject)(object)fold); ((FVRInteractiveObject)fold).BeginInteraction(leftHand); leftGrab = true; } else if (!rightHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { gun.EjectMag(false); } else if (!leftHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { gun.EjectMag(false); } else if (rot.transform.localEulerAngles.y != 30f) { } } else if (!Object.op_Implicit((Object)(object)gun.Magazine)) { rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class MagRotate2 : MonoBehaviour { public GameObject rot; public FVRFireArm gun; public MagFold fold; public float foldingangle = 30f; private void Awake() { } private void Start() { } private void Update() { //IL_023d: 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_01c4: 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_0136: 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_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) 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 < foldingangle) { 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 < foldingangle) { gun.EjectMag(false); } else if (rot.transform.localEulerAngles.y >= foldingangle && (Object)(object)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable == (Object)(object)fold) { fold.MinRot = foldingangle; fold.MaxRot = foldingangle; } } else if ((Object)(object)((FVRInteractiveObject)gun).m_hand == (Object)null && rot.transform.localEulerAngles.y < foldingangle) { gun.EjectMag(false); } } else if (!Object.op_Implicit((Object)(object)gun.Magazine)) { fold.MinRot = 0f; fold.MaxRot = foldingangle; rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class SlamOff : MonoBehaviour { public FVRFireArmTopCover cover; public HingeJoint HJ; public GameObject col; public GameObject HJGeo; public GameObject HandRef; public bool Slamed = false; public Vector3 Curpos; public Vector3 Lastpos; public float SlamSpeed; public Rigidbody HJRig; public JointLimits JL; public OpenBoltReceiver gun; public FVRAlternateGrip grip; public AudioEvent slam; public AudioEvent closed; public float X; public GameObject tcb; public Collider colhand; public float timer = 0f; public Vector3 velLinearWorld; public Transform slapdir; public bool ready = false; private void Update() { //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_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_00f1: 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_0058: 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_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_020d: Unknown result type (might be due to invalid IL or missing references) //IL_02be: 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_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0384: 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_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_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0282: 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_0334: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { velLinearWorld = ((FVRInteractiveObject)gun).m_hand.OtherHand.Input.VelLinearWorld; if (ready && Vector3.Distance(((FVRInteractiveObject)gun).m_hand.OtherHand.PalmTransform.position, slapdir.position) < 0.15f && Vector3.Angle(velLinearWorld, slapdir.forward) < 60f && ((Vector3)(ref velLinearWorld)).magnitude > 1.5f) { Slamed = true; } } if (col.transform.localEulerAngles.x >= 10f) { gun.EngageSeer(); } X = HJGeo.transform.localEulerAngles.x; if (X > 90f && X < 180f) { X = 90f; } if (X < 0f || (X > 180f && X < 360f) || ((Object)(object)((FVRInteractiveObject)cover).m_hand == (Object)null && !((FVRFireArm)gun).IsTopCoverUp)) { X = 0f; } else if (X > 0f && X < 90f && (Object)(object)((FVRInteractiveObject)cover).m_hand == (Object)null && ((FVRFireArm)gun).IsTopCoverUp && !Slamed) { ready = true; } col.transform.localEulerAngles = new Vector3(X, 0f, 0f); SlamSpeed = ((Vector3)(ref velLinearWorld)).magnitude; if (Slamed && ready) { HJRig.AddRelativeTorque(new Vector3(SlamSpeed * -1000000f, 0f, 0f), (ForceMode)2); HJRig.AddRelativeTorque(new Vector3(SlamSpeed * -500000f, 0f, 0f), (ForceMode)1); SM.PlayCoreSound((FVRPooledAudioType)41, slam, HandRef.transform.position); ready = false; } if (HJGeo.transform.localEulerAngles.x <= 5f && ((Component)cover).transform.localEulerAngles.x > 10f && (Object)(object)((FVRInteractiveObject)cover).m_hand == (Object)null) { Slamed = false; ((Component)cover).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((FVRFireArm)gun).IsTopCoverUp = false; SM.PlayCoreSound((FVRPooledAudioType)41, closed, HandRef.transform.position); } ((JointLimits)(ref JL)).max = ((Component)cover).gameObject.transform.localEulerAngles.x; ((JointLimits)(ref JL)).min = 0f; HJ.limits = JL; if ((Object)(object)gun == (Object)null) { Object.Destroy((Object)(object)tcb); Object.Destroy((Object)(object)HandRef); Object.Destroy((Object)(object)HJGeo); Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class Assem : FVRPhysicalObject, IFVRDamageable { public Transform Tip; public Vector2 TipRange; [NonSerialized] public bool m_isSpraying; [NonSerialized] public bool m_wasSpraying; [NonSerialized] public bool m_isIgnited; [NonSerialized] public bool m_wasIgnited; public LayerMask LM_sprayCast; [NonSerialized] public RaycastHit m_hit; public string Filltag; public float SprayDistance; public float SprayAngle; public AudioEvent AudEvent_Head; public AudioEvent AudEvent_Tail; public AudioSource AudSource_Loop; public AudioClip AudClip_Spray; public AudioClip AudClip_Fire; public Transform Muzzle; public ParticleSystem PSystem_Spray; public GameObject Proj_Fire; public GameObject IgnitorTrigger; public AudioEvent AudEvent_Rattle; public float RattleRadius; public float RattleHeight; [NonSerialized] public Vector3 m_rattlePos = Vector3.zero; [NonSerialized] public Vector3 m_rattleLastPos = Vector3.zero; [NonSerialized] public Vector3 m_rattleVel = Vector3.zero; [NonSerialized] public bool m_israttleSide; [NonSerialized] public bool m_wasrattleSide; public Transform ballviz; [NonSerialized] public bool m_hasExploed; public GameObject Splode; [NonSerialized] public float m_timeTilCast = 0.03f; public void Damage(Damage d) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)d.Class == 1 || (d.Dam_Thermal > 0f && m_isSpraying)) { Explode(); } } public void Explode() { //IL_0025: 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) if (!m_hasExploed) { m_hasExploed = true; Object.Instantiate(Splode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } public void RattleUpdate() { //IL_0033: 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_004a: 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_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_0063: 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_0025: 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_0070: 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_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_008e: 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_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_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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_019e: 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_01af: 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_01c1: 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) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_0234: 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) m_wasrattleSide = m_israttleSide; if (m_wasrattleSide) { m_rattleVel = ((FVRPhysicalObject)this).RootRigidbody.velocity; } else { m_rattleVel -= ((FVRPhysicalObject)this).RootRigidbody.GetPointVelocity(((Component)this).transform.TransformPoint(m_rattlePos)) * Time.deltaTime; } m_rattleVel += Vector3.up * -0.5f * Time.deltaTime; Vector3 val = ((Component)this).transform.InverseTransformDirection(m_rattleVel); m_rattlePos += val * Time.deltaTime; float num = m_rattlePos.y; Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(m_rattlePos.x, m_rattlePos.z); m_israttleSide = false; float magnitude = ((Vector2)(ref val2)).magnitude; if (magnitude > RattleRadius) { float num2 = RattleRadius - magnitude; val2 = Vector2.op_Implicit(Vector3.ClampMagnitude(Vector2.op_Implicit(val2), RattleRadius)); num += num2 * Mathf.Sign(num); val = Vector3.ProjectOnPlane(val, new Vector3(val2.x, 0f, val2.y)); m_israttleSide = true; } if (Mathf.Abs(num) > RattleHeight) { num = RattleHeight * Mathf.Sign(num); val.y = 0f; m_israttleSide = true; } m_rattlePos = new Vector3(val2.x, num, val2.y); m_rattleVel = ((Component)this).transform.TransformDirection(val); ballviz.localPosition = m_rattlePos; if (m_israttleSide && !m_wasrattleSide) { float num3 = Mathf.Clamp(4f * (Vector3.Distance(m_rattlePos, m_rattleLastPos) / RattleRadius), 0f, 1f); SM.PlayCoreSoundOverrides((FVRPooledAudioType)40, AudEvent_Rattle, ballviz.position, new Vector2(num3 * 0.4f, num3 * 0.4f), new Vector2(1f, 1f)); } m_rattleLastPos = m_rattlePos; } public override void UpdateInteraction(FVRViveHand hand) { ((FVRPhysicalObject)this).UpdateInteraction(hand); m_isSpraying = false; if (((FVRInteractiveObject)this).m_hasTriggeredUpSinceBegin) { ((FVRPhysicalObject)this).SetAnimatedComponent(Tip, Mathf.Lerp(TipRange.x, TipRange.y, hand.Input.TriggerFloat), (InterpStyle)0, (Axis)1); if (hand.Input.TriggerFloat > 0.8f) { m_isSpraying = true; } } } public override void EndInteraction(FVRViveHand hand) { ((FVRPhysicalObject)this).EndInteraction(hand); ((FVRPhysicalObject)this).SetAnimatedComponent(Tip, TipRange.x, (InterpStyle)0, (Axis)1); m_isSpraying = false; } public void Ignite() { if (m_isSpraying) { m_isIgnited = true; } } public override void FVRUpdate() { //IL_0043: 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_0088: 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_0207: 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_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) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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) ((FVRPhysicalObject)this).FVRUpdate(); RattleUpdate(); if (m_isSpraying) { m_timeTilCast -= Time.deltaTime; if (m_isIgnited) { GameObject val = Object.Instantiate(Proj_Fire, Muzzle.position, Muzzle.rotation); val.transform.Rotate(new Vector3(Random.Range(0f - SprayAngle, SprayAngle), Random.Range(0f - SprayAngle, SprayAngle), 0f)); BallisticProjectile component = val.GetComponent(); component.Fire(component.MuzzleVelocityBase, val.transform.forward, (FVRFireArm)null, true); } else { PSystem_Spray.Emit(10); if (m_timeTilCast < 0f) { m_timeTilCast = 0.03f; Vector3 forward = Muzzle.forward; forward = Quaternion.AngleAxis(Random.Range((0f - SprayAngle) * 3f, SprayAngle * 3f), Muzzle.up) * forward; forward = Quaternion.AngleAxis(Random.Range((0f - SprayAngle) * 3f, SprayAngle * 3f), Muzzle.right) * forward; if (Physics.Raycast(Muzzle.position, Muzzle.forward, ref m_hit, SprayDistance, LayerMask.op_Implicit(LM_sprayCast), (QueryTriggerInteraction)1) && ((Component)((RaycastHit)(ref m_hit)).collider).gameObject.CompareTag(Filltag)) { maufunctions component2 = ((Component)((RaycastHit)(ref m_hit)).collider.attachedRigidbody).gameObject.GetComponent(); component2.wetness += 25f; } } } } if (m_isSpraying && !m_wasSpraying) { SM.PlayCoreSound((FVRPooledAudioType)10, AudEvent_Head, Muzzle.position); AudSource_Loop.clip = AudClip_Spray; AudSource_Loop.Play(); } else if (m_wasSpraying && !m_isSpraying) { SM.PlayCoreSound((FVRPooledAudioType)10, AudEvent_Tail, Muzzle.position); AudSource_Loop.Stop(); } if (m_isSpraying && !m_isIgnited) { if (!IgnitorTrigger.activeSelf) { IgnitorTrigger.SetActive(true); } } else if (IgnitorTrigger.activeSelf) { IgnitorTrigger.SetActive(false); } if (!m_isSpraying) { m_isIgnited = false; } if (m_isIgnited && !m_wasIgnited) { AudSource_Loop.clip = AudClip_Fire; AudSource_Loop.Play(); } m_wasSpraying = m_isSpraying; m_wasIgnited = m_isIgnited; } } public class DisableInterfaceAndcolliders : MonoBehaviour { public bool locked = true; public Handgun gun; public GameObject triggerguradrot; public GameObject safetyrot; public FVRFireArmAttachmentMount maglatch; public FVRFireArmAttachmentMount barrel; public FVRFireArmAttachmentMount spring; public FVRFireArmAttachmentMount slide; public FVRFireArmAttachmentMount trigger; public FVRFireArmAttachmentMount triggerguard; public FVRFireArmAttachmentMount safety; public FVRFireArmAttachmentMount lever; public FVRFireArmAttachmentMount hammer; public FVRFireArmAttachmentMount hammerstop; public FVRFireArmAttachmentMount sliderelease; public Collider safetycol; public Collider springcol; public Collider slidecol; public Collider SlideGrab; public GameObject slidepiece; public ManipulateObject springmani; private void Start() { } private void Update() { //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Unknown result type (might be due to invalid IL or missing references) //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0ad9: Unknown result type (might be due to invalid IL or missing references) //IL_0afd: Unknown result type (might be due to invalid IL or missing references) if (slide.HasAttachmentsOnIt()) { ((Behaviour)springmani).enabled = true; if (spring.HasAttachmentsOnIt()) { ((Component)spring.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } if (barrel.HasAttachmentsOnIt()) { ((Component)barrel.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } if (trigger.HasAttachmentsOnIt()) { ((Component)trigger.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } if (triggerguard.HasAttachmentsOnIt()) { ((Component)triggerguard.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } if (lever.HasAttachmentsOnIt()) { ((Component)lever.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); if (((FVRPhysicalObject)lever.AttachmentsList[0]).AttachmentMounts[0].HasAttachmentsOnIt()) { ((Component)((FVRPhysicalObject)lever.AttachmentsList[0]).AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } if (hammer.HasAttachmentsOnIt()) { ((Component)hammer.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } if (hammerstop.HasAttachmentsOnIt()) { ((Component)hammerstop.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } if (sliderelease.HasAttachmentsOnIt()) { ((Component)sliderelease.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } else if (!slide.HasAttachmentsOnIt()) { ((Behaviour)springmani).enabled = false; ((Component)spring).gameObject.transform.localScale = new Vector3(1f, 1f, 1f); if (spring.HasAttachmentsOnIt()) { ((Component)spring.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); if (barrel.HasAttachmentsOnIt()) { ((Component)barrel.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } else if (!spring.HasAttachmentsOnIt() && barrel.HasAttachmentsOnIt()) { ((Component)barrel.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } if (trigger.HasAttachmentsOnIt()) { ((Component)trigger.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } if (triggerguard.HasAttachmentsOnIt()) { ((Component)triggerguard.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } if (lever.HasAttachmentsOnIt()) { ((Component)lever.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); if (((FVRPhysicalObject)lever.AttachmentsList[0]).AttachmentMounts[0].HasAttachmentsOnIt()) { ((Component)((FVRPhysicalObject)lever.AttachmentsList[0]).AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } if (hammer.HasAttachmentsOnIt()) { ((Component)hammer.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } if (hammerstop.HasAttachmentsOnIt()) { ((Component)hammerstop.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } if (sliderelease.HasAttachmentsOnIt()) { ((Component)sliderelease.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } if (safety.HasAttachmentsOnIt()) { if (slide.HasAttachmentsOnIt()) { ((Component)slide.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } else if (!safety.HasAttachmentsOnIt() && slide.HasAttachmentsOnIt()) { if (triggerguradrot.transform.localEulerAngles.x > 10f) { ((Component)slide.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } else { ((Component)slide.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } if (triggerguradrot.transform.localEulerAngles.x < 10f) { SlideGrab.enabled = true; if (safety.HasAttachmentsOnIt()) { ((Component)safety.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } else if (triggerguradrot.transform.localEulerAngles.x > 10f) { SlideGrab.enabled = false; if (safety.HasAttachmentsOnIt()) { ((Component)safety.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } if (!maglatch.HasAttachmentsOnIt()) { ((FVRFireArm)gun).EjectMag(false); } else if (!maglatch.HasAttachmentsOnIt()) { } if (barrel.HasAttachmentsOnIt()) { springcol.enabled = true; } else if (!barrel.HasAttachmentsOnIt()) { springcol.enabled = false; } if (barrel.HasAttachmentsOnIt() && spring.HasAttachmentsOnIt() && lever.HasAttachmentsOnIt() && hammer.HasAttachmentsOnIt() && hammerstop.HasAttachmentsOnIt() && sliderelease.HasAttachmentsOnIt()) { if (lever.HasAttachmentsOnIt()) { slidecol.enabled = true; } else { slidecol.enabled = false; } } else if (!barrel.HasAttachmentsOnIt() || !spring.HasAttachmentsOnIt() || !lever.HasAttachmentsOnIt() || !hammer.HasAttachmentsOnIt() || !hammerstop.HasAttachmentsOnIt() || !sliderelease.HasAttachmentsOnIt()) { slidecol.enabled = false; } if (slide.HasAttachmentsOnIt()) { safetycol.enabled = true; } else if (!slide.HasAttachmentsOnIt()) { safetycol.enabled = false; } if (maglatch.HasAttachmentsOnIt()) { if (((FVRPhysicalObject)maglatch.AttachmentsList[0]).AttachmentMounts[0].HasAttachmentsOnIt()) { ((Component)maglatch.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); if (((FVRPhysicalObject)((FVRPhysicalObject)maglatch.AttachmentsList[0]).AttachmentsList[0]).AttachmentMounts[0].HasAttachmentsOnIt()) { ((Component)((FVRPhysicalObject)maglatch.AttachmentsList[0]).AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); if (((FVRPhysicalObject)((FVRPhysicalObject)((FVRPhysicalObject)maglatch.AttachmentsList[0]).AttachmentsList[0]).AttachmentsList[0]).AttachmentMounts[0].HasAttachmentsOnIt()) { ((Component)((FVRPhysicalObject)((FVRPhysicalObject)maglatch.AttachmentsList[0]).AttachmentsList[0]).AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } else { ((Component)((FVRPhysicalObject)((FVRPhysicalObject)maglatch.AttachmentsList[0]).AttachmentsList[0]).AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } else { ((Component)((FVRPhysicalObject)maglatch.AttachmentsList[0]).AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } else { ((Component)maglatch.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } if (!slide.HasAttachmentsOnIt() || !trigger.HasAttachmentsOnIt() || !triggerguard.HasAttachmentsOnIt() || !safety.HasAttachmentsOnIt()) { locked = true; gun.m_isSafetyEngaged = true; slidepiece.transform.localPosition = new Vector3(0f, 0.0266f, 0.001f); SlideGrab.enabled = false; safetyrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else if (slide.HasAttachmentsOnIt() && trigger.HasAttachmentsOnIt() && triggerguard.HasAttachmentsOnIt() && safety.HasAttachmentsOnIt() && locked) { gun.m_isSafetyEngaged = false; safetyrot.transform.localEulerAngles = new Vector3(30f, 0f, 0f); slidepiece.transform.localPosition = new Vector3(0f, 0.0266f, 0.0394f); locked = false; } } } public class brush : MonoBehaviour { public Transform holder; public maufunctions mauf; public float cd = 0.5f; public GameObject particle; public AudioEvent sweep; public void OnTriggerStay(Collider col) { //IL_00df: 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_00ec: 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_007c: 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_009e: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)col).gameObject).name == "BarrelBrush(Clone)") { cd -= Time.deltaTime; if (cd < 0f) { cd = 0.5f; mauf.malfB += Random.Range(0.1f, 0.25f); Object.Instantiate(particle, ((Component)this).transform.position, ((Component)this).transform.rotation); SM.PlayGenericSound(sweep, ((Component)this).transform.position); } ((Component)col).gameObject.transform.SetParent(holder); ((Component)col).gameObject.transform.localPosition = new Vector3(0f, 0f, ((Component)col).gameObject.transform.localPosition.z); ((Component)col).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } public void OnTriggerExit(Collider col) { if (((Object)((Component)col).gameObject).name == "BarrelBrush(Clone)") { cd = 0.5f; ((Component)col).gameObject.transform.SetParent((Transform)null); } } private void Start() { } private void Update() { } } public class maufunctions : MonoBehaviour { public Handgun gun; public DisableInterfaceAndcolliders diac; public float malf; public float malfB; public Material mat1; public Material mat2; public Material matB; public Material mat3; public GameObject exp; public Transform exppos; public GameObject particle; public float wetness = 0f; public float cd = 0.5f; public AudioEvent sweep; public void OnCollisionStay(Collision col) { //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_00d1: 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_00f3: Unknown result type (might be due to invalid IL or missing references) if (!(((Object)col.gameObject).name == "TuthBrush") && !(((Object)col.gameObject).name == "ToothBrush(Clone)")) { return; } Vector3 relativeVelocity = col.relativeVelocity; if (((Vector3)(ref relativeVelocity)).magnitude > 0.1f && wetness > 0f) { cd -= Time.deltaTime; if (cd < 0f) { cd = 0.5f; wetness -= Random.Range(0.5f, 1f); malf += Random.Range(0.1f, 0.25f); Object.Instantiate(particle, ((Component)this).transform.position, ((Component)this).transform.rotation); SM.PlayGenericSound(sweep, ((Component)this).transform.position); } } else { cd = 0.5f; } } public void OnCollisionExit(Collision col) { if (((Object)col.gameObject).name == "TuthBrush" || ((Object)col.gameObject).name == "ToothBrush(Clone)") { cd = 0.5f; } } private void Start() { malf = Random.Range(75, 100); malfB = Random.Range(75, 100); } private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)gun) { malfB -= 0.1f; if (malf >= 10f) { malf -= Random.Range(0.5f, 2f); } else if (malf < 10f) { malf -= Random.Range(0f, 0.5f); } } } 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 Update() { //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown //IL_0212: 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_0228: 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_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0752: Unknown result type (might be due to invalid IL or missing references) //IL_075e: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) if (wetness > 100f) { wetness = 100f; } else if (wetness < 0f) { wetness = 0f; } matB.SetFloat("_DetailWeight", 1f - malfB * 0.01f); mat1.SetFloat("_WetWeight", wetness * 0.01f); mat2.SetFloat("_WetWeight", wetness * 0.01f); mat3.SetFloat("_WetWeight", wetness * 0.01f); mat1.SetFloat("_DetailWeight", 1f - malf * 0.01f); mat2.SetFloat("_DetailWeight", 1f - malf * 0.01f); mat1.SetFloat("_DecalWeight", 1f - malf * 0.01f); mat2.SetFloat("_DecalWeight", 1f - malf * 0.01f); if (malfB < 0f) { malfB = 0f; } else if (malfB > 100f) { malfB = 100f; } if (malf < 0f) { malf = 0f; GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); ((FVRPhysicalObject)gun).Harnessable = false; ((FVRPhysicalObject)gun).m_isHardnessed = false; if ((Object)(object)((FVRPhysicalObject)gun).m_quickbeltSlot != (Object)null) { ((FVRPhysicalObject)gun).m_quickbeltSlot.CurObject = null; ((FVRPhysicalObject)gun).m_quickbeltSlot = null; } gun.Chamber.EjectRound(gun.RoundPos_Ejection.position, gun.RoundEjectionSpeed, gun.RoundEjectionSpin, false); gun.Chamber.IsAccessible = false; gun.Chamber.IsManuallyChamberable = false; ((FVRInteractiveObject)gun).IsSimpleInteract = true; ((FVRPhysicalObject)gun).DistantGrabbable = false; Object.Instantiate(exp, ((Component)exppos).transform.position, ((Component)exppos).transform.rotation); ((FVRInteractiveObject)gun).ForceBreakInteraction(); if (diac.barrel.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.barrel.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.barrel.AttachmentsList[0]).DistantGrabbable = false; diac.barrel.AttachmentsList[0].DetachFromMount(); } if (diac.spring.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.spring.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.spring.AttachmentsList[0]).DistantGrabbable = false; diac.spring.AttachmentsList[0].DetachFromMount(); } if (diac.slide.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.slide.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.slide.AttachmentsList[0]).DistantGrabbable = false; diac.slide.AttachmentsList[0].DetachFromMount(); } if (diac.trigger.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.trigger.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.trigger.AttachmentsList[0]).DistantGrabbable = false; diac.trigger.AttachmentsList[0].DetachFromMount(); } if (diac.safety.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.safety.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.safety.AttachmentsList[0]).DistantGrabbable = false; diac.safety.AttachmentsList[0].DetachFromMount(); } if (diac.hammer.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.hammer.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.hammer.AttachmentsList[0]).DistantGrabbable = false; diac.hammer.AttachmentsList[0].DetachFromMount(); } if (diac.hammerstop.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.hammerstop.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.hammerstop.AttachmentsList[0]).DistantGrabbable = false; diac.hammerstop.AttachmentsList[0].DetachFromMount(); } if (diac.sliderelease.HasAttachmentsOnIt()) { ((FVRInteractiveObject)diac.sliderelease.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.sliderelease.AttachmentsList[0]).DistantGrabbable = false; diac.sliderelease.AttachmentsList[0].DetachFromMount(); } if (diac.lever.HasAttachmentsOnIt()) { if (((FVRPhysicalObject)diac.lever.AttachmentsList[0]).AttachmentMounts[0].HasAttachmentsOnIt()) { ((FVRInteractiveObject)((FVRPhysicalObject)diac.lever.AttachmentsList[0]).AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)((FVRPhysicalObject)diac.lever.AttachmentsList[0]).AttachmentsList[0]).DistantGrabbable = false; ((FVRPhysicalObject)diac.lever.AttachmentsList[0]).AttachmentsList[0].DetachFromMount(); } ((FVRInteractiveObject)diac.lever.AttachmentsList[0]).IsSimpleInteract = true; ((FVRPhysicalObject)diac.lever.AttachmentsList[0]).DistantGrabbable = false; diac.lever.AttachmentsList[0].DetachFromMount(); } ((Behaviour)this).enabled = false; } else if (malf > 100f) { malf = 100f; } if (malfB <= 100f && malfB > 70f) { ((FVRFireArm)gun).AccuracyClass = (FVRFireArmMechanicalAccuracyClass)3; ((FVRFireArm)gun).DefaultMuzzleEffectSize = (MuzzleEffectSize)0; } else if (malfB <= 70f && malfB > 40f) { ((FVRFireArm)gun).AccuracyClass = (FVRFireArmMechanicalAccuracyClass)4; ((FVRFireArm)gun).DefaultMuzzleEffectSize = (MuzzleEffectSize)2; } else if (malfB <= 40f && malfB > 0f) { ((FVRFireArm)gun).AccuracyClass = (FVRFireArmMechanicalAccuracyClass)63; ((FVRFireArm)gun).DefaultMuzzleEffectSize = (MuzzleEffectSize)4; } } 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.ShotFiredEvent -= new ShotFired(OnShotFired); } } public class BBlast : MonoBehaviour { public float force; public float radius; public void OnTriggerStay(Collider other) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { ((Component)other).gameObject.GetComponent().AddExplosionForce(force, ((Component)this).gameObject.transform.position, radius); } } } public class SingleUseLauncher : MonoBehaviour { public SimpleLauncher tube; public GameObject firedlid; public GameObject unfiredlid; public GameObject backplast; public GameObject rearlid; public GameObject holder; public GameObject backblastpos; public GameObject rearlidpos; public GameObject holderpos; public GameObject trigger; public GameObject pin; public MovableObjectPart pull; public Collider pullcol; public KillAfter ka; public KillAfter kapin; public bool fired = false; public bool pinpulled = false; public WaggleJoint wag; private void FixedUpdate() { //IL_0053: 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_00f2: 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_0229: 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_02da: 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_013f: 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_017d: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)tube).m_hand != (Object)null) { trigger.gameObject.transform.localEulerAngles = new Vector3(15f * (1f - ((FVRInteractiveObject)tube).m_hand.Input.TriggerFloat), 0f, 0f); if (trigger.gameObject.transform.localEulerAngles.x < 5f && tube.Chamber.IsFull && !pullcol.enabled) { tube.Fire(); } } else if ((Object)(object)((FVRInteractiveObject)tube).m_hand == (Object)null) { trigger.gameObject.transform.localEulerAngles = new Vector3(15f, 0f, 0f); } if (!tube.Chamber.IsFull && !fired) { GameObject val = Object.Instantiate(rearlid, rearlidpos.transform.position, rearlidpos.transform.rotation); Rigidbody component = val.GetComponent(); component.AddRelativeForce(new Vector3(0f, 25f, 0f), (ForceMode)2); GameObject val2 = Object.Instantiate(holder, holderpos.transform.position, holderpos.transform.rotation); Rigidbody component2 = val2.GetComponent(); component2.AddRelativeForce(new Vector3(0f, 15f, 0f), (ForceMode)2); Object.Instantiate(backplast, backblastpos.transform.position, backblastpos.transform.rotation); ((Behaviour)ka).enabled = true; firedlid.SetActive(true); unfiredlid.SetActive(false); fired = true; } if (((Component)pull).gameObject.transform.localPosition.z >= 0.025f && !pinpulled) { pinpulled = true; wag.angleLimitLeft = 0f; ((FVRInteractiveObject)pull).ForceBreakInteraction(); pullcol.enabled = false; if ((Object)(object)pin != (Object)null) { Rigidbody val3 = pin.AddComponent(); val3.mass = 0.05f; pin.transform.SetParent((Transform)null); } ((Behaviour)kapin).enabled = true; } else if (((Component)pull).gameObject.transform.localPosition.z < 0.025f && !pinpulled && (Object)(object)pin != (Object)null) { pin.transform.localPosition = ((Component)pull).gameObject.transform.localPosition; } } } public class doublesteam : MonoBehaviour { public GameObject boom; public bool isboomed = false; public FVRFireArmChamber chamber; public GameObject gasholder; public bool IshouldBurst = false; public GameObject fore; private void Start() { gasholder.SetActive(false); } private void Update() { //IL_00c0: 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_0089: 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) if (chamber.IsSpent && chamber.IsFull) { if (!isboomed) { Object.Instantiate(boom, ((Component)chamber).gameObject.transform); isboomed = true; } IshouldBurst = true; } if (!chamber.IsFull) { isboomed = false; } if (IshouldBurst && fore.transform.localEulerAngles.x > 30f) { gasholder.SetActive(true); IshouldBurst = false; } if (fore.transform.localEulerAngles.x < 25f) { gasholder.SetActive(false); IshouldBurst = false; } } } public class EnablewheninQB : MonoBehaviour { public GameObject obj; public FVRPhysicalObject main; private void Start() { } private void Update() { if ((Object)(object)main.m_quickbeltSlot != (Object)null) { obj.SetActive(true); } else { obj.SetActive(false); } } } public class RFG : MonoBehaviour { public FlintlockPseudoRamRod RamRod; public bool isGrenadeInsert = false; public FVRFireArmChamber chamber; public GameObject rfgPrefab; public Transform muzzle; public GameObject block; public bool rdy = false; public void OnTriggerEnter(Collider other) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)other.attachedRigidbody == (Object)null) { return; } GameObject gameObject = ((Component)other.attachedRigidbody).gameObject; if (gameObject.CompareTag("flintlock_ramrod")) { FlintlockRamRod component = gameObject.GetComponent(); if (((FVRInteractiveObject)component).IsHeld) { FVRViveHand hand = ((FVRInteractiveObject)component).m_hand; ((FVRInteractiveObject)component).ForceBreakInteraction(); ((Component)RamRod).gameObject.SetActive(true); RamRod.RState = (RamRodState)0; RamRod.MountToUnder(hand); hand.ForceSetInteractable((FVRInteractiveObject)(object)RamRod); ((FVRInteractiveObject)RamRod).BeginInteraction(hand); Object.Destroy((Object)(object)((Component)other).gameObject); isGrenadeInsert = true; } } } private void Update() { //IL_0088: 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_00cf: Unknown result type (might be due to invalid IL or missing references) if (!isGrenadeInsert) { block.SetActive(false); } if (isGrenadeInsert) { if (chamber.IsFull && !chamber.IsSpent) { rdy = true; } if (chamber.IsSpent && rdy) { block.SetActive(true); Object.Instantiate(rfgPrefab, ((Component)muzzle).transform.position, ((Component)muzzle).transform.rotation); ((Component)RamRod).gameObject.SetActive(false); ((Component)RamRod).gameObject.transform.localPosition = RamRod.Point_Lower_Forward.localPosition; isGrenadeInsert = false; rdy = false; } } } } public class RFGPROJ : MonoBehaviour { public Rigidbody rb; public GameObject explode; public GameObject explosion; public Transform explodpoint; private void Start() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) rb.AddRelativeForce(new Vector3(0f, 0f, 50f), (ForceMode)1); } private 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, explodpoint.position, explodpoint.rotation); Object.Instantiate(explosion, explodpoint.position, explodpoint.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } private void Update() { } } public class SMLEQuickBolt : MonoBehaviour { public BoltActionRifle rifle; public BoltActionRifle_Handle handle; public Vector3 velLinearWorld; public Vector3 velLinearWorld2; public FVRAlternateGrip grip; public Transform slapdirOpen; public Transform slapdirClose; public bool Slamed = false; public float drive = 0f; public bool stop = true; public Vector3 gunrecoilref; public Vector3 gunholdref; public Transform clipEjectdir; public float X; public float Y; private Vector3 Pos; private Vector3 Rot; private GameObject shoulderpos; private GameObject headpos; private GameObject Gunholder; private GameObject Gunref; private float shoulderdis = 0.25f; private bool shouldered = false; public bool wasHarnessed; public FVRQuickBeltSlot slot; 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(shotthis); } private void shotthis(FVRFireArm gun) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0047: 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_005a: Unknown result type (might be due to invalid IL or missing references) Gunref.transform.localPosition = new Vector3(Gunref.transform.localPosition.x, Gunref.transform.localPosition.y, Gunref.transform.localPosition.z - 0.05f); } private void FixedUpdate() { //IL_0047: 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_00c8: Invalid comparison between Unknown and I4 //IL_014a: 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_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_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Invalid comparison between Unknown and I4 //IL_026d: 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) //IL_0217: 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_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: 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_0298: 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_0380: 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_0404: 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_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: 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_042f: Unknown result type (might be due to invalid IL or missing references) if (!Slamed && !stop) { drive -= 10f * Time.deltaTime; handle.DriveBolt(drive); if ((int)handle.HandleState == 0 && handle.rotAngle <= handle.MinRot + 1f) { stop = true; } } if (Slamed && !stop) { drive += 2f * Time.deltaTime; handle.DriveBolt(drive); if ((int)handle.HandleState == 2 && handle.rotAngle == handle.MaxRot) { stop = true; } } drive = Mathf.Clamp(drive, 0f, 1f); if (((FVRPhysicalObject)rifle).IsAltHeld && (Object)(object)((FVRFireArm)rifle).Clip != (Object)null) { velLinearWorld2 = ((FVRInteractiveObject)rifle).m_hand.OtherHand.Input.VelLinearWorld; if (Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, clipEjectdir.position) < 0.1f && Vector3.Angle(velLinearWorld2, clipEjectdir.forward) < 50f && ((Vector3)(ref velLinearWorld2)).magnitude > 1f && ((FVRFireArm)rifle).Clip.m_numRounds <= 0) { ((FVRFireArm)rifle).EjectClip(); } if (Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, clipEjectdir.position) < 0.1f && Vector3.Angle(velLinearWorld2, clipEjectdir.right) < 50f && ((Vector3)(ref velLinearWorld2)).magnitude > 1f) { ((FVRFireArm)rifle).EjectClip(); } if (Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, clipEjectdir.position) < 0.1f && Vector3.Angle(velLinearWorld2, -clipEjectdir.right) < 50f && ((Vector3)(ref velLinearWorld2)).magnitude > 1f) { ((FVRFireArm)rifle).EjectClip(); } } if (((FVRPhysicalObject)rifle).IsAltHeld && !((FVRInteractiveObject)handle).m_isHeld && (Object)(object)((FVRInteractiveObject)rifle).m_hand.OtherHand.m_currentInteractable != (Object)(object)rifle && (Object)(object)((FVRInteractiveObject)rifle).m_hand.OtherHand.m_currentInteractable != (Object)(object)handle) { velLinearWorld = ((FVRInteractiveObject)rifle).m_hand.OtherHand.Input.VelLinearWorld; if (!Slamed && Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, slapdirOpen.position) < 0.125f && Vector3.Angle(velLinearWorld, slapdirOpen.forward) < 50f && ((Vector3)(ref velLinearWorld)).magnitude > 1f) { stop = false; Slamed = true; } if (Slamed && Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, slapdirClose.position) < 0.125f && Vector3.Angle(velLinearWorld, slapdirClose.forward) < 50f && ((Vector3)(ref velLinearWorld)).magnitude > 1f) { stop = false; Slamed = false; } } if (((FVRInteractiveObject)handle).m_isHeld) { drive = Mathf.Abs(((Component)handle.BoltActionHandleRoot).transform.localPosition.z / ((Component)handle.Point_Rearward).transform.localPosition.z); if ((int)handle.HandleState == 0 && handle.rotAngle <= handle.MinRot + 1f) { Slamed = false; } if ((int)handle.HandleState == 2 && handle.rotAngle >= handle.MaxRot - 1f) { Slamed = true; } } } private void Update() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_0185: 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_00c5: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_045c: 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_0482: 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_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: 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_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02be: 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_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Gunholder == (Object)null) { Gunholder = new GameObject("Gunholder"); Debug.Log((object)"GunHolder"); } if ((Object)(object)Gunref == (Object)null) { Gunref = new GameObject("Gunref"); Gunref.transform.SetParent(Gunholder.transform); Debug.Log((object)"Gunref"); } if ((Object)(object)headpos == (Object)null) { headpos = new GameObject("HeadPos"); Debug.Log((object)"Headpos"); } if ((Object)(object)shoulderpos == (Object)null) { shoulderpos = new GameObject("ShoulderPos"); Debug.Log((object)"ShoulderPos"); if ((Object)(object)headpos != (Object)null) { shoulderpos.transform.SetParent(headpos.transform); shoulderpos.transform.localPosition = new Vector3(0.05f, -0.05f, 0f); } } headpos.transform.position = ((Component)GM.CurrentMovementManager.Head).transform.position; headpos.transform.eulerAngles = ((Component)GM.CurrentMovementManager.Head).transform.eulerAngles; if (Vector3.Distance(((FVRFireArm)rifle).StockPos.position, shoulderpos.transform.position) < shoulderdis && ((FVRPhysicalObject)rifle).IsAltHeld && ((FVRInteractiveObject)handle).IsHeld && ((((FVRInteractiveObject)handle).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)handle).m_hand.Input.AXButtonPressed) || (!((FVRInteractiveObject)handle).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)handle).m_hand.Input.TouchpadAxes.y <= -0.9f))) { if (((FVRPhysicalObject)rifle).m_isHardnessed) { wasHarnessed = true; slot = ((FVRPhysicalObject)rifle).m_quickbeltSlot; slot.CurObject = null; ((FVRPhysicalObject)rifle).m_quickbeltSlot = null; ((FVRPhysicalObject)rifle).m_isHardnessed = false; } if (!shouldered) { Gunholder.transform.position = ((FVRFireArm)rifle).Foregrip.transform.position; Gunholder.transform.eulerAngles = ((FVRFireArm)rifle).Foregrip.transform.eulerAngles; Gunref.transform.position = ((Component)rifle).transform.position; Gunref.transform.eulerAngles = ((Component)rifle).transform.eulerAngles; gunholdref = Gunref.transform.localPosition; ((FVRInteractiveObject)rifle).ForceBreakInteraction(); ((FVRInteractiveObject)grip).ForceBreakInteraction(); ((FVRPhysicalObject)rifle).StoreAndDestroyRigidbody(); shouldered = true; } } if (shouldered && GM.CurrentMovementManager.Hands[0].Input.GripPressed) { if (((FVRInteractiveObject)handle).m_isHeld) { if (((FVRInteractiveObject)handle).m_hand.Input.TriggerFloat >= 0.75f && (int)rifle.CurBoltHandleState == 0 && (int)rifle.FireSelector_Modes[rifle.m_fireSelectorMode].ModeType != 0) { rifle.Fire(); } ((Component)rifle).gameObject.transform.SetParent(Gunref.transform); ((Component)rifle).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)rifle).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); Gunref.transform.localEulerAngles = Vector3.zero; Gunref.transform.localPosition = Vector3.SmoothDamp(Gunref.transform.localPosition, gunholdref, ref gunrecoilref, 0.1f); Gunholder.transform.position = ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.position; AxisLookAt(Gunholder.transform, shoulderpos.transform.position, Vector3.back); GM.CurrentMovementManager.Hands[0].Display_Controller.SetActive(false); } else if (!((FVRInteractiveObject)handle).m_isHeld) { if (wasHarnessed && (Object)(object)slot != (Object)null) { ((FVRPhysicalObject)rifle).m_quickbeltSlot = slot; slot.CurObject = (FVRPhysicalObject)(object)rifle; ((FVRPhysicalObject)rifle).m_isHardnessed = true; wasHarnessed = false; } ((FVRPhysicalObject)rifle).BeginInteractionThroughAltGrip(GM.CurrentMovementManager.Hands[0], grip); shouldered = false; } } else if (shouldered && !GM.CurrentMovementManager.Hands[0].Input.GripPressed) { if (wasHarnessed && (Object)(object)slot != (Object)null) { ((FVRPhysicalObject)rifle).m_quickbeltSlot = slot; slot.CurObject = (FVRPhysicalObject)(object)rifle; ((FVRPhysicalObject)rifle).m_isHardnessed = true; wasHarnessed = false; } ((Component)rifle).gameObject.transform.SetParent((Transform)null); ((FVRPhysicalObject)rifle).RecoverRigidbody(); GM.CurrentMovementManager.Hands[0].Display_Controller.SetActive(true); shouldered = 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 OnDestroy() { //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(shotthis); } } public class SlideScope : 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(256, 256, 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() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_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_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) Cam1.fieldOfView = SlideRot.transform.localEulerAngles.x; ((Renderer)Rend).material.SetFloat("_RedDotSize", SlideRot2.transform.localEulerAngles.x * SlideRot2.transform.localEulerAngles.x * SlideRot2.transform.localEulerAngles.x); } } } public class SlideScopeH3 : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class SnapToPoint : MonoBehaviour { public Transform pointSpapTo; private void Start() { } private void Update() { //IL_0029: 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) if ((Object)(object)pointSpapTo != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)pointSpapTo).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)pointSpapTo).transform.eulerAngles; } } } public class SnapToPointRigidbody : MonoBehaviour { public Transform snapTo; [NonSerialized] private Rigidbody body; public float snapTime = 2f; [NonSerialized] private float dropTimer; public void Start() { body = ((Component)this).GetComponent(); } public void FixedUpdate() { //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_00ae: 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_006b: 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_00f6: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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) dropTimer += Time.deltaTime / (snapTime / 2f); body.isKinematic = dropTimer > 1f; if (dropTimer > 1f) { ((Component)this).transform.position = snapTo.position; ((Component)this).transform.rotation = snapTo.rotation; return; } float num = Mathf.Pow(35f, dropTimer); body.velocity = Vector3.Lerp(body.velocity, Vector3.zero, Time.fixedDeltaTime * 4f); if (body.useGravity) { body.AddForce(-Physics.gravity); } ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, snapTo.position, Time.fixedDeltaTime * num * 3f); ((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, snapTo.rotation, Time.fixedDeltaTime * num * 2f); } } public class LookAtPodLeg : MonoBehaviour { public GameObject podleg; public GameObject targ; private void Update() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) AxisLookAt(podleg.transform, targ.gameObject.transform.position, Vector3.right); } 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_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_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(0f, 0f, tr_self.localEulerAngles.z); } } public class PodForeGripCatcher : MonoBehaviour { public FVRFireArm gun; public GameObject smoothrot; public GameObject grabpoint; public GameObject grabpointholder; public GameObject text; public GameObject textb; public GameObject grabreal; public Collider col; public GameObject Gswitch; public bool isGrabbed = false; public GameObject grab; public GameObject baseGeo; public float velx; public float vely; private void OnTriggerStay(Collider other) { //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_01d9: 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_00af: 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_0113: 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_0172: 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) if (Gswitch.transform.localEulerAngles.x > 45f) { textb.SetActive(true); if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { Rigidbody component = ((Component)other).gameObject.GetComponent(); component.isKinematic = true; component.useGravity = false; gun = ((Component)other).gameObject.GetComponent(); if ((Object)(object)gun.Foregrip != (Object)null && !isGrabbed) { grabpoint.transform.position = gun.Foregrip.transform.position; grabpoint.transform.eulerAngles = gun.Foregrip.transform.eulerAngles; ((Component)other).gameObject.transform.SetParent(grabpoint.transform); grabpoint.transform.localPosition = new Vector3(0f, 0f, 0f); grabpoint.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Component)other).gameObject.transform.SetParent(grabpointholder.transform); grabpoint.transform.position = ((Component)other).gameObject.transform.position; grabpoint.transform.eulerAngles = ((Component)other).gameObject.transform.eulerAngles; isGrabbed = true; } ((Component)other).gameObject.transform.SetParent(grabpoint.transform); ((Component)other).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)other).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else { textb.SetActive(false); if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { Rigidbody component2 = ((Component)other).gameObject.GetComponent(); component2.isKinematic = false; component2.useGravity = true; isGrabbed = false; ((Component)other).gameObject.transform.SetParent((Transform)null); gun = null; } } } private void OnTriggerExit(Collider other) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { Rigidbody component = ((Component)other).gameObject.GetComponent(); isGrabbed = false; component.isKinematic = false; component.useGravity = true; ((Component)other).gameObject.transform.SetParent((Transform)null); gun = null; } } private void Start() { } private void Update() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_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_0081: 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_01a6: 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_00e7: 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_012f: 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_01e3: 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) baseGeo.transform.localEulerAngles = new Vector3(0f, grabreal.transform.localEulerAngles.y, 0f); grabreal.transform.localRotation = Quaternion.Slerp(grabreal.transform.localRotation, grabpointholder.transform.localRotation, smoothrot.transform.localEulerAngles.z * Time.deltaTime); if ((Object)(object)gun == (Object)null) { text.SetActive(true); grab.transform.localEulerAngles = new Vector3(0f, 0f, 0f); grab.transform.localPosition = new Vector3(0f, 0f, 0f); grabpoint.transform.localPosition = new Vector3(0f, 0f, 0f); grabpoint.transform.localEulerAngles = new Vector3(0f, 0f, 0f); grabpointholder.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else { text.SetActive(false); grab.transform.eulerAngles = ((Component)gun).transform.eulerAngles; grab.transform.position = ((Component)gun).transform.position; if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { AxisLookAt(grabpointholder.transform, ((Component)((FVRInteractiveObject)gun).m_hand).transform.position, Vector3.back); } } } 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 class MagPhysToggle : MonoBehaviour { public FVRFireArmMagazine mag; public GameObject Phys; private void FixedUpdate() { if ((Object)(object)mag.FireArm == (Object)null) { Phys.SetActive(true); } else if ((Object)(object)mag.FireArm != (Object)null) { Phys.SetActive(false); } } } public class VillarPerosaReal : MonoBehaviour { public FVRInteractiveObject Grab; public OpenBoltReceiver gun; public GameObject trigger; public Rigidbody rig; public GameObject follow; public GameObject inside; public AR15HandleSightFlipper safety; public bool needsafety = true; private void Update() { //IL_01f5: 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_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: 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_0102: 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_0049: 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_0136: 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_018b: 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) if (Grab.m_isHeld) { if (needsafety) { if (safety.m_isLargeAperture) { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else if (!safety.m_isLargeAperture) { trigger.transform.localEulerAngles = new Vector3(5f * Grab.m_hand.Input.TriggerFloat, 0f, 0f); } } else if (!needsafety) { trigger.transform.localEulerAngles = new Vector3(5f * Grab.m_hand.Input.TriggerFloat, 0f, 0f); } if (trigger.transform.localEulerAngles.x > 4f) { gun.ReleaseSeer(); } else if (trigger.transform.localEulerAngles.x <= 4f) { gun.EngageSeer(); } ((Component)rig).gameObject.SetActive(true); ((Component)rig).gameObject.transform.position = ((Component)Grab.m_hand).gameObject.transform.position; ((Component)rig).gameObject.transform.eulerAngles = ((Component)Grab.m_hand).gameObject.transform.eulerAngles; } else if (!Grab.m_isHeld) { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); gun.EngageSeer(); ((Component)rig).gameObject.SetActive(false); ((Component)rig).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)rig).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); follow.transform.localPosition = new Vector3(0f, 0f, 0f); follow.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class HalfMoonClipCylinder : MonoBehaviour { public GameObject FirstMoonClip; public GameObject SecondMoonClip; public RevolverCylinder cylinder; public bool isHalfFull = false; public bool isFull = false; public string MoonClipName; public AR15HandleSightFlipper ejectrod; public Collider ejectrodCol; public float cd = 0f; public Collider col; private void OnTriggerEnter(Collider other) { //IL_01b3: 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_015a: 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_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) || !(((Object)((Component)other).gameObject).name == MoonClipName)) { return; } if (cd <= 0f && !isHalfFull && !isFull) { ((FVRFireArm)cylinder.Revolver).PlayAudioEvent((FirearmAudioEventType)20, 1f); cylinder.SpeedLoaderID = ((FVRPhysicalObject)((Component)other).gameObject.GetComponent()).ObjectWrapper.ItemID; for (int i = 0; i < ((Component)other).gameObject.GetComponent().Chambers.Count; i++) { if (i < cylinder.Revolver.Chambers.Length && ((Component)other).gameObject.GetComponent().Chambers[i].IsLoaded && !cylinder.Revolver.Chambers[i].IsFull) { if (!((Component)other).gameObject.GetComponent().Chambers[i].IsSpent) { cylinder.Revolver.Chambers[i].SetRound(((Component)other).gameObject.GetComponent().Chambers[i].Unload(), ((Component)((Component)other).gameObject.GetComponent().Chambers[i]).transform.position, ((Component)((Component)other).gameObject.GetComponent().Chambers[i]).transform.rotation); continue; } cylinder.Revolver.Chambers[i].Autochamber(((Component)other).gameObject.GetComponent().Chambers[i].Unload()); cylinder.Revolver.Chambers[i].Fire(); } } cd = 1f; Object.Destroy((Object)(object)((Component)other).gameObject); isHalfFull = true; isFull = false; FirstMoonClip.SetActive(true); } if (!(cd <= 0f) || !isHalfFull || isFull) { return; } ((FVRFireArm)cylinder.Revolver).PlayAudioEvent((FirearmAudioEventType)20, 1f); cylinder.SpeedLoaderID = ((FVRPhysicalObject)((Component)other).gameObject.GetComponent()).ObjectWrapper.ItemID; for (int j = 0; j < ((Component)other).gameObject.GetComponent().Chambers.Count; j++) { if (j < cylinder.Revolver.Chambers.Length - 3 && ((Component)other).gameObject.GetComponent().Chambers[j].IsLoaded && !cylinder.Revolver.Chambers[j + 3].IsFull) { if (!((Component)other).gameObject.GetComponent().Chambers[j].IsSpent) { cylinder.Revolver.Chambers[j + 3].SetRound(((Component)other).gameObject.GetComponent().Chambers[j].Unload(), ((Component)((Component)other).gameObject.GetComponent().Chambers[j]).transform.position, ((Component)((Component)other).gameObject.GetComponent().Chambers[j]).transform.rotation); continue; } cylinder.Revolver.Chambers[j + 3].Autochamber(((Component)other).gameObject.GetComponent().Chambers[j].Unload()); cylinder.Revolver.Chambers[j + 3].Fire(); } } cd = 1f; Object.Destroy((Object)(object)((Component)other).gameObject); isHalfFull = false; isFull = true; SecondMoonClip.SetActive(true); } private void FixedUpdate() { //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_0122: 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_0142: 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_0151: 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_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_01af: 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_0318: 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_0332: 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_0386: 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_0395: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051b: 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_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) cd -= Time.deltaTime; cd = Mathf.Clamp(cd, 0f, 1f); if (!ejectrod.m_isLargeAperture && ((Component)ejectrod.Flipsight).transform.localEulerAngles.x >= 5f) { ejectrod.m_isLargeAperture = true; FirstMoonClip.SetActive(false); SecondMoonClip.SetActive(false); if (isHalfFull && !isFull) { bool flag = false; for (int i = 0; i < cylinder.Revolver.Chambers.Length - 3; i++) { if (cylinder.Revolver.Chambers[i].IsFull) { flag = true; } } if (flag) { string key = cylinder.Revolver.Cylinder.Eject(); GameObject val = Object.Instantiate(((AnvilAsset)IM.OD[key]).GetGameObject(), ((Component)cylinder).transform.position - ((Component)cylinder).transform.forward * cylinder.CartridgeLength * 1.6f, ((Component)cylinder).transform.rotation); ((FVRFireArm)cylinder.Revolver).PlayAudioEvent((FirearmAudioEventType)21, 1f); val.GetComponent().velocity = -((Component)cylinder.Revolver.Cylinder).transform.forward * 0.5f; Speedloader component = val.GetComponent(); for (int j = 0; j < cylinder.Revolver.Chambers.Length - 3; j++) { component.Chambers[j].IsLoaded = cylinder.Revolver.Chambers[j].IsFull; component.Chambers[j].IsSpent = cylinder.Revolver.Chambers[j].IsSpent; component.Chambers[j].UpdateViz(); cylinder.Revolver.Chambers[j].SetRound((FVRFireArmRound)null, false); } } } if (!isHalfFull && isFull) { bool flag2 = false; for (int k = 0; k < cylinder.Revolver.Chambers.Length; k++) { if (cylinder.Revolver.Chambers[k].IsFull) { flag2 = true; } } if (flag2) { string speedLoaderID = cylinder.SpeedLoaderID; GameObject val2 = Object.Instantiate(((AnvilAsset)IM.OD[speedLoaderID]).GetGameObject(), ((Component)cylinder).transform.position - ((Component)cylinder).transform.forward * cylinder.CartridgeLength * 1.6f, ((Component)cylinder).transform.rotation); ((FVRFireArm)cylinder.Revolver).PlayAudioEvent((FirearmAudioEventType)21, 1f); val2.GetComponent().velocity = -((Component)cylinder.Revolver.Cylinder).transform.forward * 0.5f; Speedloader component2 = val2.GetComponent(); for (int l = 0; l < cylinder.Revolver.Chambers.Length - 3; l++) { component2.Chambers[l].IsLoaded = cylinder.Revolver.Chambers[l].IsFull; component2.Chambers[l].IsSpent = cylinder.Revolver.Chambers[l].IsSpent; component2.Chambers[l].UpdateViz(); cylinder.Revolver.Chambers[l].SetRound((FVRFireArmRound)null, false); } ((Component)cylinder).gameObject.transform.localEulerAngles = new Vector3(((Component)cylinder).gameObject.transform.localEulerAngles.x, ((Component)cylinder).gameObject.transform.localEulerAngles.y, ((Component)cylinder).gameObject.transform.localEulerAngles.z + 180f); GameObject val3 = Object.Instantiate(((AnvilAsset)IM.OD[speedLoaderID]).GetGameObject(), ((Component)cylinder).transform.position - ((Component)cylinder).transform.forward * cylinder.CartridgeLength * 1.6f, ((Component)cylinder).transform.rotation); ((FVRFireArm)cylinder.Revolver).PlayAudioEvent((FirearmAudioEventType)21, 1f); val2.GetComponent().velocity = -((Component)cylinder.Revolver.Cylinder).transform.forward * 0.5f; Speedloader component3 = val3.GetComponent(); for (int m = 3; m < cylinder.Revolver.Chambers.Length; m++) { component3.Chambers[m - 3].IsLoaded = cylinder.Revolver.Chambers[m].IsFull; component3.Chambers[m - 3].IsSpent = cylinder.Revolver.Chambers[m].IsSpent; component3.Chambers[m - 3].UpdateViz(); cylinder.Revolver.Chambers[m].SetRound((FVRFireArmRound)null, false); } } } cylinder.SpeedLoaderID = null; isHalfFull = false; isFull = false; } if (cylinder.Revolver.isCylinderArmLocked) { ejectrodCol.enabled = false; } else if (!cylinder.Revolver.isCylinderArmLocked) { ejectrodCol.enabled = true; } if (ejectrod.m_isLargeAperture) { col.enabled = true; } else if (!ejectrod.m_isLargeAperture) { col.enabled = false; } } } public class RealFosbery : MonoBehaviour { public GameObject arm; public GameObject explospos; public Revolver gun; public GameObject frame; public GameObject safety; public Collider grab; public FVRInteractiveObject obj; public GameObject refp; public GameObject holder; public AudioEvent cock; public float zref; public Collider Explos; public void OnTriggerStay(Collider other) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { ((Component)other).gameObject.GetComponent().AddExplosionForce(1f, explospos.transform.position, 0.1f); } } 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_0063: 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_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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: 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_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_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_025a: 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_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0384: 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_02be: 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_02dc: 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_0310: 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_031e: Unknown result type (might be due to invalid IL or missing references) if (arm.transform.localEulerAngles.x > 45f && arm.transform.localEulerAngles.x < 75f) { Explos.enabled = true; } else if (arm.transform.localEulerAngles.x < 45f || arm.transform.localEulerAngles.x > 75f) { Explos.enabled = false; } frame.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (gun.m_isCylinderArmLocked && !gun.m_isHammerLocked) { grab.enabled = true; frame.transform.localPosition = new Vector3(0f, 0f, Mathf.Clamp(frame.transform.localPosition.z, -0.0229f, 0f)); } if (gun.m_isHammerLocked) { if (obj.IsHeld) { obj.ForceBreakInteraction(); } grab.enabled = false; } if (!gun.m_isCylinderArmLocked || safety.transform.localEulerAngles.x > 15f) { if (obj.IsHeld) { obj.ForceBreakInteraction(); } grab.enabled = false; frame.transform.localPosition = new Vector3(0f, 0f, 0f); gun.m_isHammerLocked = false; } if (frame.transform.localPosition.z <= -0.02f && !gun.m_isHammerLocked) { gun.m_isHammerLocked = true; SM.PlayCoreSound((FVRPooledAudioType)41, cock, ((Component)this).transform.position); } if (obj.IsHeld && ((Component)obj).transform.localPosition.z <= ((Component)gun.RecockingPoint_Forward).transform.localPosition.z && ((Component)obj).transform.localPosition.z >= ((Component)gun.RecockingPoint_Rearward).transform.localPosition.z) { frame.transform.localPosition = new Vector3(0f, 0f, ((Component)obj).transform.localPosition.z); } if (!obj.IsHeld) { ((Component)obj).transform.localPosition = new Vector3(0f, 0f, 0f); frame.transform.localPosition = new Vector3(0f, 0f, Mathf.SmoothDamp(frame.transform.localPosition.z, 0f, ref zref, 0.1f)); } } } public class WebleyLoader : MonoBehaviour { public GameObject phys; public GameObject hooks; public Speedloader mag; public bool empty = false; public SnapToPointRigidbody snap; public SnapToPointRigidbody snap2; public Rigidbody main; public bool pressed = false; private void OnTriggerStay(Collider other) { if (!empty && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { pressed = true; } } private void Update() { //IL_001b: 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_004a: 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_0253: 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_028b: 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_02a4: Unknown result type (might be due to invalid IL or missing references) hooks.transform.localEulerAngles = new Vector3(0f, 0f, 0f); hooks.transform.localPosition = new Vector3(0f, 0f, Mathf.Clamp(hooks.transform.localPosition.z, -0.01559f, 0.0103f)); if (!mag.Chambers[0].IsLoaded && !mag.Chambers[1].IsLoaded && !mag.Chambers[2].IsLoaded && !mag.Chambers[3].IsLoaded && !mag.Chambers[4].IsLoaded && !mag.Chambers[5].IsLoaded) { empty = true; } if (mag.Chambers[0].IsLoaded || mag.Chambers[1].IsLoaded || mag.Chambers[2].IsLoaded || mag.Chambers[3].IsLoaded || mag.Chambers[4].IsLoaded || mag.Chambers[5].IsLoaded) { empty = false; } if (empty) { pressed = false; ((Behaviour)snap).enabled = true; phys.SetActive(false); } if (!empty) { ((Behaviour)snap).enabled = false; if (pressed) { ((Behaviour)snap2).enabled = false; } else if (!pressed) { ((Behaviour)snap2).enabled = true; ((Behaviour)snap).enabled = false; } if (hooks.transform.localPosition.z < 0.01f) { hooks.transform.localPosition = new Vector3(0f, 0f, hooks.transform.localPosition.z + 0.5f * Time.deltaTime); } phys.SetActive(true); } if (((Behaviour)snap).enabled || ((Behaviour)snap2).enabled) { main.isKinematic = true; } else if (!((Behaviour)snap).enabled && !((Behaviour)snap2).enabled) { main.isKinematic = false; } } } public class XRotate90IfBeltLoaded : MonoBehaviour { public FVRFireArm Firearm; private void Start() { } private void Update() { //IL_004d: 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) if (Firearm.HasBelt) { ((Component)this).transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else { ((Component)this).transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class control_component : MonoBehaviour { public GameObject Comp; public GameObject Comp2; public GameObject Rot; private bool is45; public bool changed; private void Start() { //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) if (Rot.transform.localEulerAngles.x > 45f) { is45 = true; } if (Rot.transform.localEulerAngles.x < 45f) { is45 = false; } } private void over45() { if (is45) { Comp.SetActive(false); Comp2.SetActive(true); changed = true; changed = false; } is45 = false; } private void under45() { if (!is45) { Comp2.SetActive(false); Comp.SetActive(true); changed = true; changed = false; } 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(); } } } }