using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using FistVR; using H3VRUtils.Vehicles; using HarmonyLib; using OtherLoader; using UnityEditor; using UnityEngine; using UnityEngine.UI; using UnityEngine.Windows.Speech; [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 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 MGMount2 : MonoBehaviour { public GameObject mgSpace; public GameObject mgX; public GameObject mgY; public GameObject mgObj; private float mgMoveX; private float mgMoveY; public ClosedBoltWeapon gun; public GameObject proxyrounds; private void OnTriggerStay(Collider other) { //IL_002d: 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_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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) if (gun.Chamber.IsFull) { mgObj.transform.position = ((Component)other).gameObject.transform.position; mgMoveX = mgObj.transform.localPosition.x; mgMoveY = mgObj.transform.localPosition.y; if (mgMoveX > 1f) { mgMoveX = 1f; } if (mgMoveX < 0f) { mgMoveX = 0f; } if (mgMoveY > 1f) { mgMoveY = 1f; } if (mgMoveY < 0f) { mgMoveY = 0f; } mgX.transform.localEulerAngles = new Vector3(0f, (1f - mgMoveX) * 40f, 0f); mgY.transform.localEulerAngles = new Vector3(mgMoveY * 40f, 0f, 0f); } } private void Update() { //IL_0152: 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) //IL_0069: 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) if ((Object)(object)((FVRFireArm)gun).Magazine != (Object)null) { if (!gun.Chamber.IsFull && ((FVRFireArm)gun).Magazine.m_numRounds <= 0) { mgMoveX = 0.5f; mgX.transform.localEulerAngles = new Vector3(0f, 20f, 0f); mgMoveY = 0f; mgY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); proxyrounds.SetActive(false); ((FVRFireArm)gun).ConnectedToBox = false; ((FVRFireArm)gun).HasBelt = false; if (((FVRFireArm)gun).BeltDD.m_roundsOnBelt > 0) { ((FVRFireArm)gun).BeltDD.RemoveRound(true); } } if (((FVRFireArm)gun).Magazine.m_numRounds > 0) { proxyrounds.SetActive(true); } } if ((Object)(object)((FVRFireArm)gun).Magazine == (Object)null) { mgMoveX = 0.5f; mgX.transform.localEulerAngles = new Vector3(0f, 20f, 0f); mgMoveY = 0f; mgY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); proxyrounds.SetActive(false); } } } public class turretrotation : MonoBehaviour { public float lowlimit = 2f; public float highlimit = 47f; public GameObject turretX; public GameObject turretY; public GameObject trigger; public ClosedBoltWeapon gun; public float rotX = 180f; public float rotY = 10f; public GameObject followhands; private void OnTriggerStay(Collider other) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) followhands.transform.position = ((Component)other).gameObject.transform.position; } private void OnTriggerExit(Collider other) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) followhands.transform.localPosition = new Vector3(0f, 0f, 0f); } 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_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_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_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_00df: 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) //IL_0085: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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) if (trigger.transform.localEulerAngles.x > 2f && trigger.transform.localEulerAngles.x < 88f) { gun.Fire(); } if (followhands.transform.localPosition.x >= 0.05f || followhands.transform.localPosition.x <= -0.05f) { rotX += followhands.transform.localPosition.x * 0.75f; turretX.transform.localEulerAngles = new Vector3(0f, rotX, 0f); } if (followhands.transform.localPosition.y >= 0.05f || followhands.transform.localPosition.y <= -0.05f) { rotY += followhands.transform.localPosition.y * 0.25f; turretY.transform.localEulerAngles = new Vector3(0f, 0f, rotY); if (rotY < lowlimit) { rotY = lowlimit; } if (rotY > highlimit) { rotY = highlimit; } } } } public class turretrotation1 : MonoBehaviour { public GameObject seatrot; public GameObject hatch; public float lowlimit = 2f; public float highlimit = 52f; public GameObject turretX; public GameObject turretY; public GameObject trigger; public OpenBoltReceiver gun; public float rotX = 180f; public float rotY = 10f; public GameObject followhands; public string handb; public string handid; public string X; public string Y; public float hx = 0f; public float hy = 0f; public float hz = 0f; public float refx = 0f; public float refy = 0f; public float xrot = 0f; public float yrot = 0f; public SpringJoint SJ; public Rigidbody rigcomt; public Transform rigcomtlock; private void Start() { } private void Update() { //IL_0034: 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_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_032f: 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_0182: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: 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_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03df: 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_0296: 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_0210: 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_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) rigcomt.isKinematic = false; rigcomt.useGravity = false; ((Component)rigcomt).gameObject.transform.localEulerAngles = ((Component)rigcomtlock).transform.localEulerAngles; ((Component)rigcomt).gameObject.transform.localPosition = ((Component)rigcomtlock).transform.localPosition; turretX = GameObject.Find(X); turretY = GameObject.Find(Y); if ((Object)(object)GameObject.Find(handid) != (Object)null) { followhands = GameObject.Find(handid); followhands.transform.SetParent(GameObject.Find(handb).transform); if ((Object)(object)SJ == (Object)null) { followhands.transform.localPosition = new Vector3(0f, 0.027f, 0f); SJ = followhands.AddComponent(); ((Joint)SJ).connectedBody = rigcomt; SJ.spring = 2500f; SJ.damper = 10f; SJ.tolerance = 0f; SJ.maxDistance = 0f; SJ.minDistance = 0f; } hx = followhands.transform.localPosition.x; hz = 0f; if (hx > 0.1f) { hx = 0.1f; } else if (hx < -0.1f) { hx = -0.1f; } if (hatch.transform.localEulerAngles.x > 45f && seatrot.transform.localEulerAngles.x > 45f) { if (hy > 0.052f) { hy = 0.052f; } else if (hy < 0.002f) { hy = 0.002f; } hy = followhands.transform.localPosition.y; } else if (hatch.transform.localEulerAngles.x < 45f || seatrot.transform.localEulerAngles.x < 45f) { hy = 0.027f; } followhands.transform.localPosition = new Vector3(hx, hy, hz); } if (trigger.transform.localEulerAngles.x > 2f && trigger.transform.localEulerAngles.x < 88f) { gun.ReleaseSeer(); } else if (trigger.transform.localEulerAngles.x < 2f || trigger.transform.localEulerAngles.x > 88f) { gun.EngageSeer(); } if (seatrot.transform.localEulerAngles.x < 45f && hatch.transform.localEulerAngles.x > 45f) { turretX.transform.localEulerAngles = new Vector3(0f, Mathf.SmoothDamp(turretX.transform.localEulerAngles.y, 0f, ref refx, 1f), 0f); } else if (seatrot.transform.localEulerAngles.x > 45f || hatch.transform.localEulerAngles.x < 45f) { turretX.transform.localEulerAngles = new Vector3(0f, turretX.transform.localEulerAngles.y + 1500f * followhands.transform.localPosition.x * Time.deltaTime, 0f); } yrot = Mathf.SmoothDamp(yrot, followhands.transform.localPosition.y * 1000f, ref refy, 2f); turretY.transform.localEulerAngles = new Vector3(0f, 0f, yrot); if (turretY.transform.localEulerAngles.z > highlimit) { turretY.transform.localEulerAngles = new Vector3(0f, 0f, highlimit); } else if (turretY.transform.localEulerAngles.z < lowlimit) { turretY.transform.localEulerAngles = new Vector3(0f, 0f, lowlimit); } } } public class ButtonIgnition : FVRInteractiveObject { public VehicleControl vehicle; public VehicleAudioSet audioSet; public float ignitionTime; private float m_it; public float failChance; public Random rand; public void Start() { rand = new Random(); } public override void BeginInteraction(FVRViveHand hand) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) m_it = ignitionTime; if (vehicle.isOn) { SM.PlayGenericSound(audioSet.VehicleStop, ((Component)this).transform.position); m_it = 999999f; vehicle.TurnOffEngine(forcibly: false); } } public override void UpdateInteraction(FVRViveHand hand) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).UpdateInteraction(hand); m_it -= Time.fixedDeltaTime; if (m_it <= 0f) { vehicle.TurnOnEngine(forcibly: false); SM.PlayGenericSound(audioSet.VehicleStart, ((Component)this).transform.position); m_it = 999999f; } } } internal class CarFollow : MonoBehaviour { public VehicleControl _carControl; public Transform _setPos; private FVRMovementManager _playerMovement; private void Awake() { _playerMovement = Object.FindObjectOfType(); } private void Update() { if (_carControl.isOn) { PlayerForwardFollowSet(); } } private void PlayerForwardFollowSet() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) ((Component)_playerMovement).transform.rotation = Quaternion.RotateTowards(((Component)_playerMovement).transform.rotation, ((Component)_setPos).transform.rotation, 5f); } } public class AddScope : MonoBehaviour { public Camera cam; public Shader shad; public MeshRenderer mr1; public int reticlesize = 1024; public float _VR = 0f; public float _VS = 0.25f; public float _ER = 1f; public float _RS = 4.12f; public float _ROX = 0f; public float _ROY = 0f; private void Start() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown RenderTexture val = new RenderTexture(reticlesize, reticlesize, 16, (RenderTextureFormat)0); val.Create(); cam.targetTexture = val; Material val2 = new Material(shad); val2.SetTexture("_MainTex", (Texture)(object)val); val2.SetFloat("_VignetteRadius", _VR); val2.SetFloat("_VignetteSmoothness", _VS); val2.SetFloat("_EyeRelief", _ER); val2.SetTexture("_ReticleTex", (Texture)(object)val); val2.SetFloat("_ReticleScale", _RS); val2.SetFloat("_ReticleOffsetX", _ROX); val2.SetFloat("_ReticleOffsetY", _ROY); ((Renderer)mr1).material = val2; } private void Update() { } } [Serializable] public class DriveShiftNode { public Vector3 localposition; public Vector3 rotation; public int left = -1; public int up = -1; public int right = -1; public int down = -1; public int gear = 0; } public class DriveShift : FVRInteractiveObject { public VehicleControl vehicle; public Text gearText; public int currentNode; public List driveShiftNodes; public VehicleAudioSet audioSet; public void Update() { if (vehicle.carSetting.automaticGear) { if (vehicle.currentGear > 0 && vehicle.speed > 1f) { gearText.text = vehicle.currentGear.ToString(); } else if (vehicle.speed > 1f) { gearText.text = "R"; } else { gearText.text = "N"; } } else if (vehicle.NeutralGear) { gearText.text = "N"; } else if (vehicle.currentGear != 0) { gearText.text = vehicle.currentGear.ToString(); } else { gearText.text = "R"; } } private void Start() { //IL_0039: 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) vehicle.ShiftTo(driveShiftNodes[currentNode].gear); ((Component)this).transform.localPosition = driveShiftNodes[currentNode].localposition; ((Component)this).transform.localEulerAngles = driveShiftNodes[currentNode].rotation; } public override void UpdateInteraction(FVRViveHand hand) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_025e: 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) bool flag = false; if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.left) <= 45f && hand.Input.TouchpadDown && ((Vector2)(ref hand.Input.TouchpadAxes)).magnitude > 0.2f && driveShiftNodes[currentNode].left != -1) { flag = true; currentNode = driveShiftNodes[currentNode].left; } if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.up) <= 45f && hand.Input.TouchpadDown && ((Vector2)(ref hand.Input.TouchpadAxes)).magnitude > 0.2f && driveShiftNodes[currentNode].up != -1) { flag = true; currentNode = driveShiftNodes[currentNode].up; } if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.right) <= 45f && hand.Input.TouchpadDown && ((Vector2)(ref hand.Input.TouchpadAxes)).magnitude > 0.2f && driveShiftNodes[currentNode].right != -1) { flag = true; currentNode = driveShiftNodes[currentNode].right; } if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.down) <= 45f && hand.Input.TouchpadDown && ((Vector2)(ref hand.Input.TouchpadAxes)).magnitude > 0.2f && driveShiftNodes[currentNode].down != -1) { flag = true; currentNode = driveShiftNodes[currentNode].down; } if (flag) { vehicle.ShiftTo(driveShiftNodes[currentNode].gear); ((Component)this).transform.localPosition = driveShiftNodes[currentNode].localposition; ((Component)this).transform.localEulerAngles = driveShiftNodes[currentNode].rotation; } } } public class IfInWater : MonoBehaviour { public GameObject floatScr; public FVRPhysicalObject obj; private void Start() { } private void Update() { if (obj.IsInWater) { floatScr.SetActive(true); } else if (!obj.IsInWater) { floatScr.SetActive(false); } } } public class IsFloating : MonoBehaviour { public FVRPhysicalObject floatObj; public Rigidbody floatObjRB; public Transform floatDir; public float ForceF; private void Start() { } private void Update() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (floatObj.IsInWater) { floatObjRB.AddForce(floatDir.forward * Time.deltaTime * ForceF, (ForceMode)0); } else if (floatObj.IsInWater) { } } } public class ParkingBrakeClick : FVRInteractiveObject { public VehicleControl vehicle; public Vector3 positionOff; public Vector3 positionOn; public Vector3 rotationOff; public Vector3 rotationOn; public bool isOn; public VehicleAudioSet audioSet; public override void SimpleInteraction(FVRViveHand hand) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: 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_0045: 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) ((FVRInteractiveObject)this).SimpleInteraction(hand); isOn = !isOn; if (isOn) { SM.PlayGenericSound(audioSet.HandbrakeUp, ((Component)this).transform.position); ((Component)this).transform.localPosition = positionOn; ((Component)this).transform.localEulerAngles = rotationOn; vehicle.brake = true; } else { SM.PlayGenericSound(audioSet.HandbrakeDown, ((Component)this).transform.position); ((Component)this).transform.localPosition = positionOff; ((Component)this).transform.localEulerAngles = rotationOff; vehicle.brake = false; } } } public class Propeller : MonoBehaviour { public VehicleControl Vehicle; public Rigidbody Prop; public Rigidbody Prop2; public Transform ForceDir; public Transform ForceDir2; public bool propon; public bool isRev; public float ForceP = 400000f; public GameObject PropRot; private void Start() { } public void PropellerON() { //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_002e: 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_004f: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00ba: 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) if (isRev) { Prop.AddForce(ForceDir.forward * Time.deltaTime * ForceP, (ForceMode)0); Prop2.AddForce(ForceDir2.forward * Time.deltaTime * ForceP, (ForceMode)0); } else if (!isRev) { Prop.AddForce(ForceDir.forward * Time.deltaTime * (0f - ForceP), (ForceMode)0); Prop2.AddForce(ForceDir2.forward * Time.deltaTime * (0f - ForceP), (ForceMode)0); } } 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_003b: 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) if (PropRot.transform.localEulerAngles.x >= 45f) { PropellerON(); } else if (!(PropRot.transform.localEulerAngles.x < 45f)) { } if (Vehicle.currentGear == 0) { isRev = true; } else if (Vehicle.currentGear == 1) { isRev = false; } } } public class SteeringWheel : FVRInteractiveObject { public VehicleControl vehicle; public float resetLerpSpeed; public float maxRot; public bool reverseRot; [Header("Debug Values")] public Text rotText; public float rot; public float rh; public float lr; public float inlerp; public float lerp; public float rotAmt; public VehicleAudioSet audioSet; private SteeringWheelGrip leftGrip; private SteeringWheelGrip rightGrip; private FVRViveHand leftHand; private FVRViveHand rightHand; private bool isDualGripping = false; public void RegisterGrip(SteeringWheelGrip grip, FVRViveHand hand) { if ((Object)(object)leftGrip == (Object)null) { leftGrip = grip; leftHand = hand; } else if ((Object)(object)rightGrip == (Object)null && (Object)(object)grip != (Object)(object)leftGrip) { rightGrip = grip; rightHand = hand; } } public void UnregisterGrip(SteeringWheelGrip grip, FVRViveHand hand) { if ((Object)(object)grip == (Object)(object)leftGrip) { leftGrip = null; leftHand = null; } else if ((Object)(object)grip == (Object)(object)rightGrip) { rightGrip = null; rightHand = null; } } public override void BeginInteraction(FVRViveHand hand) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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_0060: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).BeginInteraction(hand); Transform child = ((Component)this).transform.GetChild(0); child.parent = null; Vector3 localEulerAngles = ((Component)this).transform.localEulerAngles; ((Component)this).transform.LookAt(((Component)hand).transform); ((Component)this).transform.localEulerAngles = new Vector3(localEulerAngles.x, ((Component)this).transform.localEulerAngles.y, localEulerAngles.z); child.parent = ((Component)this).transform; } public override void EndInteraction(FVRViveHand hand) { //IL_0028: 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_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_004d: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).EndInteraction(hand); Transform child = ((Component)this).transform.GetChild(0); child.parent = null; ((Component)this).transform.localEulerAngles = new Vector3(((Component)this).transform.localEulerAngles.x, 0f, ((Component)this).transform.localEulerAngles.z); child.parent = ((Component)this).transform; } public override void UpdateInteraction(FVRViveHand hand) { //IL_000e: 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_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_008f: 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_00c1: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).UpdateInteraction(hand); Vector3 localEulerAngles = ((Component)this).transform.localEulerAngles; ((Component)this).transform.LookAt(((Component)hand).transform); Vector3 localEulerAngles2 = ((Component)this).transform.localEulerAngles; rot = Mathf.DeltaAngle((float)Math.Round(localEulerAngles2.y), (float)Math.Round(localEulerAngles.y)); rotAmt += rot; if (rotAmt >= maxRot) { rotAmt = maxRot; ((Component)this).transform.localEulerAngles = localEulerAngles; } else if (rotAmt <= 0f - maxRot) { rotAmt = 0f - maxRot; ((Component)this).transform.localEulerAngles = localEulerAngles; } else { ((Component)this).transform.localEulerAngles = new Vector3(localEulerAngles.x, localEulerAngles2.y, localEulerAngles.z); } rh = localEulerAngles2.y; lr = localEulerAngles.y; SetRot(); bool flag = false; if (hand.Input.TouchpadPressed && ((Vector2)(ref hand.Input.TouchpadAxes)).magnitude > 0.25f) { flag = true; } if (flag) { vehicle.accel = 0f - (float)Math.Pow(((Vector2)(ref hand.Input.TouchpadAxes)).magnitude, 2.0); vehicle.brake = true; } else { vehicle.accel = (float)Math.Pow(hand.Input.TriggerFloat, 2.0); vehicle.brake = false; } } private void FixedUpdate() { //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) //IL_0079: 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_0096: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.m_hand == (Object)null) { float num = resetLerpSpeed; if (rotAmt > 0f) { num = 0f - num; } if (rotAmt > num || rotAmt < 0f - num) { rotAmt += num; ((Component)this).transform.localEulerAngles = new Vector3(((Component)this).transform.localEulerAngles.x, ((Component)this).transform.localEulerAngles.y - num, ((Component)this).transform.localEulerAngles.z); vehicle.accel = 0f; SetRot(); } } } private void SetRot() { bool flag = rotAmt <= 0f; lerp = Mathf.Abs(rotAmt) / maxRot; lerp *= -1f; if (flag) { lerp *= -1f; } if (reverseRot) { lerp = 0f - lerp; } if ((Object)(object)rotText != (Object)null) { rotText.text = lerp.ToString(); } vehicle.steer = lerp; } } public class SteeringWheelGrip : MonoBehaviour { public SteeringWheel stw; public void Update() { //IL_0026: 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) ((Component)stw).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, stw.rotAmt); ((Component)stw).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); } } public class VehicleControl : MonoBehaviour { public enum ControlMode { simple = 1, touch } [Serializable] public class CarWheels { public ConnectWheel wheels; } [Serializable] public class ConnectWheel { public bool frontWheelDrive = true; public Transform frontRight; public Transform frontLeft; public WheelSetting frontSetting; public bool backWheelDrive = true; public Transform backRight; public Transform backLeft; public WheelSetting rearSetting; } [Serializable] public class WheelSetting { public float Radius = 0.4f; public float Weight = 1000f; public float Distance = 0.2f; } [Serializable] public class CarLights { public Light[] brakeLights; public Light[] reverseLights; } [Serializable] public class CarSounds { public AudioSource IdleEngine; public AudioSource LowEngine; public AudioSource HighEngine; public float minPitch = 1f; public float maxPitch = 10f; public AudioSource nitro; public AudioSource switchGear; } [Serializable] public class CarParticles { public GameObject brakeParticlePerfab; public ParticleSystem shiftParticle1; public ParticleSystem shiftParticle2; private GameObject[] wheelParticle = (GameObject[])(object)new GameObject[4]; } [Serializable] public class CarSetting { public bool showNormalGizmos = false; public Transform carSteer; public HitGround[] hitGround; public List cameraSwitchView; public float springs = 25000f; public float dampers = 1500f; public float carPower = 120f; public float shiftPower = 150f; public float brakePower = 8000f; public Vector3 shiftCentre = new Vector3(0f, -0.8f, 0f); public float maxSteerAngle = 25f; public float shiftDownRPM = 1500f; public float shiftUpRPM = 2500f; public float idleRPM = 500f; public float stiffness = 2f; public bool automaticGear = true; public float[] gears = new float[6] { -10f, 9f, 6f, 4.5f, 3f, 2.5f }; public float LimitBackwardSpeed = 60f; public float LimitForwardSpeed = 220f; } [Serializable] public class HitGround { public string tag = "street"; public bool grounded = false; public AudioClip brakeSound; public AudioClip groundSound; public Color brakeColor; } private class WheelComponent { public Transform wheel; public WheelCollider collider; public Vector3 startPos; public float rotation = 0f; public float rotation2 = 0f; public float maxSteer; public bool drive; public float pos_y = 0f; public WheelSetting settings; } public ControlMode controlMode = ControlMode.simple; public bool activeControl = false; public CarWheels carWheels; public CarLights carLights; public CarSounds carSounds; public CarParticles carParticles; public CarSetting carSetting; [HideInInspector] public float steer = 0f; [HideInInspector] public float accel = 0f; [HideInInspector] public bool brake; private bool shifmotor; [HideInInspector] public float curTorque = 100f; [HideInInspector] public float powerShift = 100f; [HideInInspector] public bool shift; private float torque = 100f; [HideInInspector] public float speed = 0f; private float lastSpeed = -10f; private bool shifting = false; private float[] efficiencyTable = new float[22] { 0.6f, 0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 1f, 1f, 0.95f, 0.8f, 0.7f, 0.6f, 0.5f, 0.45f, 0.4f, 0.36f, 0.33f, 0.3f, 0.2f, 0.1f, 0.05f }; private float efficiencyTableStep = 250f; private float Pitch; private float PitchDelay; private float shiftTime = 0f; private float shiftDelay = 0f; [HideInInspector] public int currentGear = 0; [HideInInspector] public bool NeutralGear = true; [HideInInspector] public float motorRPM = 0f; [HideInInspector] public bool Backward = false; [HideInInspector] public float accelFwd = 0f; [HideInInspector] public float accelBack = 0f; [HideInInspector] public float steerAmount = 0f; private float wantedRPM = 0f; private float w_rotate; private float slip; private float slip2 = 0f; private GameObject[] Particle = (GameObject[])(object)new GameObject[4]; private Vector3 steerCurAngle; private Rigidbody myRigidbody; private WheelComponent[] wheels; public bool isOn = true; public bool isForciblyOff = false; public Rigidbody GetRigidbody() { return myRigidbody; } private WheelComponent SetWheelComponent(Transform wheel, float maxSteer, bool drive, float pos_y, WheelSetting setting) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //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) WheelComponent wheelComponent = new WheelComponent(); GameObject val = new GameObject(((Object)wheel).name + "WheelCollider"); val.transform.parent = ((Component)this).transform; val.transform.position = wheel.position; val.transform.eulerAngles = ((Component)this).transform.eulerAngles; pos_y = val.transform.localPosition.y; WheelCollider val2 = (WheelCollider)val.AddComponent(typeof(WheelCollider)); wheelComponent.wheel = wheel; wheelComponent.collider = val.GetComponent(); wheelComponent.drive = drive; wheelComponent.pos_y = pos_y; wheelComponent.maxSteer = maxSteer; wheelComponent.startPos = val.transform.localPosition; wheelComponent.settings = setting; return wheelComponent; } private void Awake() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0223: 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_0250: 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_0284: 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_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) if (carSetting.automaticGear) { NeutralGear = false; } myRigidbody = ((Component)((Component)this).transform).GetComponent(); wheels = new WheelComponent[4]; wheels[0] = SetWheelComponent(carWheels.wheels.frontRight, carSetting.maxSteerAngle, carWheels.wheels.frontWheelDrive, carWheels.wheels.frontRight.position.y, carWheels.wheels.frontSetting); wheels[1] = SetWheelComponent(carWheels.wheels.frontLeft, carSetting.maxSteerAngle, carWheels.wheels.frontWheelDrive, carWheels.wheels.frontLeft.position.y, carWheels.wheels.frontSetting); wheels[2] = SetWheelComponent(carWheels.wheels.backRight, 0f, carWheels.wheels.backWheelDrive, carWheels.wheels.backRight.position.y, carWheels.wheels.rearSetting); wheels[3] = SetWheelComponent(carWheels.wheels.backLeft, 0f, carWheels.wheels.backWheelDrive, carWheels.wheels.backLeft.position.y, carWheels.wheels.rearSetting); if (Object.op_Implicit((Object)(object)carSetting.carSteer)) { steerCurAngle = carSetting.carSteer.localEulerAngles; } WheelComponent[] array = wheels; foreach (WheelComponent wheelComponent in array) { WheelCollider collider = wheelComponent.collider; collider.suspensionDistance = wheelComponent.settings.Distance; JointSpring suspensionSpring = collider.suspensionSpring; suspensionSpring.spring = carSetting.springs; suspensionSpring.damper = carSetting.dampers; collider.suspensionSpring = suspensionSpring; collider.radius = wheelComponent.settings.Radius; collider.mass = wheelComponent.settings.Weight; WheelFrictionCurve val = collider.forwardFriction; ((WheelFrictionCurve)(ref val)).asymptoteValue = 5000f; ((WheelFrictionCurve)(ref val)).extremumSlip = 2f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 20f; ((WheelFrictionCurve)(ref val)).stiffness = carSetting.stiffness; collider.forwardFriction = val; val = collider.sidewaysFriction; ((WheelFrictionCurve)(ref val)).asymptoteValue = 7500f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 2f; ((WheelFrictionCurve)(ref val)).stiffness = carSetting.stiffness; collider.sidewaysFriction = val; } } public void TurnOnEngine(bool forcibly) { if (!isForciblyOff) { isOn = true; } else if (forcibly) { isForciblyOff = false; isOn = true; } } public void TurnOffEngine(bool forcibly) { isForciblyOff = forcibly; isOn = false; } public void ShiftTo(int newGear) { ((Component)carSounds.switchGear).GetComponent().Play(); currentGear = newGear; if (currentGear == 0) { NeutralGear = true; } else { NeutralGear = false; } if (currentGear == -1) { currentGear = 0; } } public void ShiftUp(bool ignoreDelay) { float timeSinceLevelLoad = Time.timeSinceLevelLoad; if ((timeSinceLevelLoad < shiftDelay && !ignoreDelay) || currentGear >= carSetting.gears.Length - 1) { return; } ((Component)carSounds.switchGear).GetComponent().Play(); if (!carSetting.automaticGear) { if (currentGear == 0) { if (NeutralGear) { currentGear++; NeutralGear = false; } else { NeutralGear = true; } } else { currentGear++; } } else { currentGear++; } shiftDelay = timeSinceLevelLoad + 1f; shiftTime = 1.5f; } public void ShiftDown(bool ignoreDelay) { float timeSinceLevelLoad = Time.timeSinceLevelLoad; if ((timeSinceLevelLoad < shiftDelay && !ignoreDelay) || (currentGear <= 0 && !NeutralGear)) { return; } ((Component)carSounds.switchGear).GetComponent().Play(); if (!carSetting.automaticGear) { if (currentGear == 1) { if (!NeutralGear) { currentGear--; NeutralGear = true; } } else if (currentGear == 0) { NeutralGear = false; } else { currentGear--; } } else { currentGear--; } shiftDelay = timeSinceLevelLoad + 0.1f; shiftTime = 2f; } private void OnCollisionEnter(Collision collision) { //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_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_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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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.op_Implicit((Object)(object)((Component)collision.transform.root).GetComponent())) { VehicleControl component = ((Component)collision.transform.root).GetComponent(); Vector3 relativeVelocity = collision.relativeVelocity; component.slip2 = Mathf.Clamp(((Vector3)(ref relativeVelocity)).magnitude, 0f, 10f); myRigidbody.angularVelocity = new Vector3((0f - myRigidbody.angularVelocity.x) * 0.5f, myRigidbody.angularVelocity.y * 0.5f, (0f - myRigidbody.angularVelocity.z) * 0.5f); myRigidbody.velocity = new Vector3(myRigidbody.velocity.x, myRigidbody.velocity.y * 0.5f, myRigidbody.velocity.z); } } private void OnCollisionStay(Collision collision) { if (Object.op_Implicit((Object)(object)((Component)collision.transform.root).GetComponent())) { ((Component)collision.transform.root).GetComponent().slip2 = 5f; } } private void Update() { } private void FixedUpdate() { //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_00b6: 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_0704: 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_0751: Unknown result type (might be due to invalid IL or missing references) //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_079b: Unknown result type (might be due to invalid IL or missing references) //IL_0acf: Unknown result type (might be due to invalid IL or missing references) //IL_0ae0: Unknown result type (might be due to invalid IL or missing references) //IL_0ae5: Unknown result type (might be due to invalid IL or missing references) //IL_0fca: Unknown result type (might be due to invalid IL or missing references) //IL_0fd4: Unknown result type (might be due to invalid IL or missing references) //IL_0ee6: Unknown result type (might be due to invalid IL or missing references) //IL_0eed: Unknown result type (might be due to invalid IL or missing references) //IL_0ef2: Unknown result type (might be due to invalid IL or missing references) //IL_0f0c: Unknown result type (might be due to invalid IL or missing references) //IL_0f17: Unknown result type (might be due to invalid IL or missing references) //IL_0f1c: Unknown result type (might be due to invalid IL or missing references) //IL_0f25: Unknown result type (might be due to invalid IL or missing references) //IL_0fec: Unknown result type (might be due to invalid IL or missing references) //IL_0b3b: Unknown result type (might be due to invalid IL or missing references) //IL_0b40: Unknown result type (might be due to invalid IL or missing references) //IL_0d23: Unknown result type (might be due to invalid IL or missing references) if (!isOn) { accel = 0f; } Vector3 velocity = myRigidbody.velocity; speed = ((Vector3)(ref velocity)).magnitude * 2.7f; if (speed < lastSpeed - 10f && slip < 10f) { slip = lastSpeed / 15f; } lastSpeed = speed; if (slip2 != 0f) { slip2 = Mathf.MoveTowards(slip2, 0f, 0.1f); } myRigidbody.centerOfMass = carSetting.shiftCentre; if (!carWheels.wheels.frontWheelDrive && !carWheels.wheels.backWheelDrive) { accel = 0f; } if (Object.op_Implicit((Object)(object)carSetting.carSteer)) { carSetting.carSteer.localEulerAngles = new Vector3(steerCurAngle.x, steerCurAngle.y, steerCurAngle.z + steer * -510f); } if (carSetting.automaticGear && currentGear == 1 && accel < 0f) { if (speed < 5f) { ShiftDown(ignoreDelay: false); } } else if (carSetting.automaticGear && currentGear == 0 && accel > 0f) { if (speed < 5f) { ShiftUp(ignoreDelay: false); } } else if (carSetting.automaticGear && motorRPM > carSetting.shiftUpRPM && accel > 0f && speed > 10f && !brake) { ShiftUp(ignoreDelay: false); } else if (carSetting.automaticGear && motorRPM < carSetting.shiftDownRPM && currentGear > 1) { ShiftDown(ignoreDelay: false); } if (speed < 1f) { Backward = true; } if (currentGear != 0 || !Backward) { Backward = false; } Light[] brakeLights = carLights.brakeLights; foreach (Light val in brakeLights) { if (brake || accel < 0f || speed < 1f) { val.intensity = Mathf.MoveTowards(val.intensity, 8f, 0.5f); } else { val.intensity = Mathf.MoveTowards(val.intensity, 0f, 0.5f); } ((Behaviour)val).enabled = val.intensity != 0f; } Light[] reverseLights = carLights.reverseLights; foreach (Light val2 in reverseLights) { if (speed > 2f && currentGear == 0) { val2.intensity = Mathf.MoveTowards(val2.intensity, 8f, 0.5f); } else { val2.intensity = Mathf.MoveTowards(val2.intensity, 0f, 0.5f); } ((Behaviour)val2).enabled = val2.intensity != 0f; } wantedRPM = 5500f * accel * 0.1f + wantedRPM * 0.9f; float num = 0f; int num2 = 0; bool flag = false; int num3 = 0; WheelComponent[] array = wheels; WheelHit val4 = default(WheelHit); foreach (WheelComponent wheelComponent in array) { WheelCollider collider = wheelComponent.collider; if (wheelComponent.drive) { num = ((!NeutralGear && brake && currentGear < 2) ? (num + accel * carSetting.idleRPM) : (NeutralGear ? (num + carSetting.idleRPM * accel) : (num + collider.rpm))); num2++; } if (brake || accel < 0f) { if (accel < 0f || (brake && (wheelComponent == wheels[2] || wheelComponent == wheels[3]))) { if (brake && accel > 0f) { slip = Mathf.Lerp(slip, 5f, accel * 0.01f); } else if (speed > 1f) { slip = Mathf.Lerp(slip, 1f, 0.002f); } else { slip = Mathf.Lerp(slip, 1f, 0.02f); } wantedRPM = 0f; collider.brakeTorque = carSetting.brakePower; wheelComponent.rotation = w_rotate; } } else { float brakeTorque; if (accel == 0f || NeutralGear) { float num5 = (collider.brakeTorque = 1000f); brakeTorque = num5; } else { float num5 = (collider.brakeTorque = 0f); brakeTorque = num5; } collider.brakeTorque = brakeTorque; slip = ((!(speed > 0f)) ? (slip = Mathf.Lerp(slip, 0.01f, 0.02f)) : ((!(speed > 100f)) ? (slip = Mathf.Lerp(slip, 1.5f, 0.02f)) : (slip = Mathf.Lerp(slip, 1f + Mathf.Abs(steer), 0.02f)))); w_rotate = wheelComponent.rotation; } WheelFrictionCurve val3 = collider.forwardFriction; ((WheelFrictionCurve)(ref val3)).asymptoteValue = 5000f; ((WheelFrictionCurve)(ref val3)).extremumSlip = 2f; ((WheelFrictionCurve)(ref val3)).asymptoteSlip = 20f; ((WheelFrictionCurve)(ref val3)).stiffness = carSetting.stiffness / (slip + slip2); collider.forwardFriction = val3; val3 = collider.sidewaysFriction; ((WheelFrictionCurve)(ref val3)).stiffness = carSetting.stiffness / (slip + slip2); ((WheelFrictionCurve)(ref val3)).extremumSlip = 0.2f + Mathf.Abs(steer); collider.sidewaysFriction = val3; if (shift && currentGear > 1 && speed > 50f && shifmotor && Mathf.Abs(steer) < 0.2f) { if (powerShift == 0f) { shifmotor = false; } powerShift = Mathf.MoveTowards(powerShift, 0f, Time.deltaTime * 10f); carSounds.nitro.volume = Mathf.Lerp(carSounds.nitro.volume, 1f, Time.deltaTime * 10f); if (!carSounds.nitro.isPlaying) { ((Component)carSounds.nitro).GetComponent().Play(); } curTorque = ((!(powerShift > 0f)) ? carSetting.carPower : carSetting.shiftPower); carParticles.shiftParticle1.emissionRate = Mathf.Lerp(carParticles.shiftParticle1.emissionRate, (float)((powerShift > 0f) ? 50 : 0), Time.deltaTime * 10f); carParticles.shiftParticle2.emissionRate = Mathf.Lerp(carParticles.shiftParticle2.emissionRate, (float)((powerShift > 0f) ? 50 : 0), Time.deltaTime * 10f); } else { if (powerShift > 20f) { shifmotor = true; } carSounds.nitro.volume = Mathf.MoveTowards(carSounds.nitro.volume, 0f, Time.deltaTime * 2f); if (carSounds.nitro.volume == 0f) { carSounds.nitro.Stop(); } powerShift = Mathf.MoveTowards(powerShift, 100f, Time.deltaTime * 5f); curTorque = carSetting.carPower; carParticles.shiftParticle1.emissionRate = Mathf.Lerp(carParticles.shiftParticle1.emissionRate, 0f, Time.deltaTime * 10f); carParticles.shiftParticle2.emissionRate = Mathf.Lerp(carParticles.shiftParticle2.emissionRate, 0f, Time.deltaTime * 10f); } wheelComponent.rotation = Mathf.Repeat(wheelComponent.rotation + Time.deltaTime * collider.rpm * 360f / 60f, 360f); wheelComponent.rotation2 = Mathf.Lerp(wheelComponent.rotation2, collider.steerAngle, 0.1f); wheelComponent.wheel.localRotation = Quaternion.Euler(wheelComponent.rotation, wheelComponent.rotation2, 0f); Vector3 localPosition = wheelComponent.wheel.localPosition; if (collider.GetGroundHit(ref val4)) { if (Object.op_Implicit((Object)(object)carParticles.brakeParticlePerfab)) { if ((Object)(object)Particle[num3] == (Object)null) { Particle[num3] = Object.Instantiate(carParticles.brakeParticlePerfab, wheelComponent.wheel.position, Quaternion.identity); ((Object)Particle[num3]).name = "WheelParticle"; Particle[num3].transform.parent = ((Component)this).transform; Particle[num3].AddComponent(); Particle[num3].GetComponent().maxDistance = 50f; Particle[num3].GetComponent().spatialBlend = 1f; Particle[num3].GetComponent().dopplerLevel = 5f; Particle[num3].GetComponent().rolloffMode = (AudioRolloffMode)2; } ParticleSystem component = Particle[num3].GetComponent(); bool flag2 = false; for (int l = 0; l < carSetting.hitGround.Length; l++) { if (((Component)((WheelHit)(ref val4)).collider).CompareTag(carSetting.hitGround[l].tag)) { flag2 = carSetting.hitGround[l].grounded; if ((brake || Mathf.Abs(((WheelHit)(ref val4)).sidewaysSlip) > 0.5f) && speed > 1f) { Particle[num3].GetComponent().clip = carSetting.hitGround[l].brakeSound; } else if ((Object)(object)Particle[num3].GetComponent().clip != (Object)(object)carSetting.hitGround[l].groundSound && !Particle[num3].GetComponent().isPlaying) { Particle[num3].GetComponent().clip = carSetting.hitGround[l].groundSound; } Particle[num3].GetComponent().startColor = carSetting.hitGround[l].brakeColor; } } if (flag2 && speed > 5f && !brake) { component.enableEmission = true; Particle[num3].GetComponent().volume = 0.5f; if (!Particle[num3].GetComponent().isPlaying) { Particle[num3].GetComponent().Play(); } } else if ((brake || Mathf.Abs(((WheelHit)(ref val4)).sidewaysSlip) > 0.6f) && speed > 1f) { if (accel < 0f || ((brake || Mathf.Abs(((WheelHit)(ref val4)).sidewaysSlip) > 0.6f) && (wheelComponent == wheels[2] || wheelComponent == wheels[3]))) { if (!Particle[num3].GetComponent().isPlaying) { Particle[num3].GetComponent().Play(); } component.enableEmission = true; Particle[num3].GetComponent().volume = 10f; } } else { component.enableEmission = false; Particle[num3].GetComponent().volume = Mathf.Lerp(Particle[num3].GetComponent().volume, 0f, Time.deltaTime * 10f); } } localPosition.y -= Vector3.Dot(wheelComponent.wheel.position - ((WheelHit)(ref val4)).point, ((Component)this).transform.TransformDirection(0f, 1f, 0f) / ((Component)this).transform.lossyScale.x) - collider.radius; localPosition.y = Mathf.Clamp(localPosition.y, -10f, wheelComponent.pos_y); flag = flag || wheelComponent.drive; } else { if ((Object)(object)Particle[num3] != (Object)null) { ParticleSystem component2 = Particle[num3].GetComponent(); component2.enableEmission = false; } localPosition.y = wheelComponent.startPos.y - wheelComponent.settings.Distance; myRigidbody.AddForce(Vector3.down * 5000f); } num3++; wheelComponent.wheel.localPosition = localPosition; } if (num2 > 1) { num /= (float)num2; } motorRPM = 0.95f * motorRPM + 0.05f * Mathf.Abs(num * carSetting.gears[currentGear]); if (motorRPM > 5500f) { motorRPM = 5200f; } int num7 = (int)(motorRPM / efficiencyTableStep); if (num7 >= efficiencyTable.Length) { num7 = efficiencyTable.Length - 1; } if (num7 < 0) { num7 = 0; } float num8 = curTorque * carSetting.gears[currentGear] * efficiencyTable[num7]; WheelComponent[] array2 = wheels; foreach (WheelComponent wheelComponent2 in array2) { WheelCollider collider2 = wheelComponent2.collider; if (wheelComponent2.drive) { float motorTorque = collider2.motorTorque; if (!brake && accel != 0f && !NeutralGear) { if ((speed < carSetting.LimitForwardSpeed && currentGear > 0) || (speed < carSetting.LimitBackwardSpeed && currentGear == 0)) { collider2.motorTorque = motorTorque * 0.9f + num8 * 1f; } else { collider2.motorTorque = 0f; collider2.brakeTorque = 2000f; } } else { collider2.motorTorque = 0f; } } if (brake || slip2 > 2f) { collider2.steerAngle = Mathf.Lerp(collider2.steerAngle, steer * wheelComponent2.maxSteer, 0.02f); continue; } float num9 = Mathf.Clamp(speed / carSetting.maxSteerAngle, 1f, carSetting.maxSteerAngle); collider2.steerAngle = steer * (wheelComponent2.maxSteer / num9); } Pitch = Mathf.Clamp(1.2f + (motorRPM - carSetting.idleRPM) / (carSetting.shiftUpRPM - carSetting.idleRPM), carSounds.minPitch, carSounds.maxPitch); shiftTime = Mathf.MoveTowards(shiftTime, 0f, 0.1f); if (Pitch == 1f) { carSounds.IdleEngine.volume = Mathf.Lerp(carSounds.IdleEngine.volume, 1f, 0.1f); carSounds.LowEngine.volume = Mathf.Lerp(carSounds.LowEngine.volume, 0.5f, 0.1f); carSounds.HighEngine.volume = Mathf.Lerp(carSounds.HighEngine.volume, 0f, 0.1f); } else { carSounds.IdleEngine.volume = Mathf.Lerp(carSounds.IdleEngine.volume, 1.8f - Pitch, 0.1f); if ((Pitch > PitchDelay || accel > 0f) && shiftTime == 0f) { carSounds.LowEngine.volume = Mathf.Lerp(carSounds.LowEngine.volume, 0f, 0.2f); carSounds.HighEngine.volume = Mathf.Lerp(carSounds.HighEngine.volume, 1f, 0.1f); } else { carSounds.LowEngine.volume = Mathf.Lerp(carSounds.LowEngine.volume, 0.5f, 0.1f); carSounds.HighEngine.volume = Mathf.Lerp(carSounds.HighEngine.volume, 0f, 0.2f); } carSounds.HighEngine.pitch = Pitch; carSounds.LowEngine.pitch = Pitch; PitchDelay = Pitch; } if (!isOn) { carSounds.IdleEngine.volume = 0f; carSounds.LowEngine.volume = 0f; carSounds.HighEngine.volume = 0f; } } private void OnDrawGizmos() { //IL_0026: 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_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_0046: 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_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_0075: 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_0099: 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_00b1: Unknown result type (might be due to invalid IL or missing references) if (carSetting.showNormalGizmos && !Application.isPlaying) { Matrix4x4 matrix = Matrix4x4.TRS(((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform.lossyScale); Gizmos.matrix = matrix; Gizmos.color = new Color(1f, 0f, 0f, 0.5f); Gizmos.DrawCube(Vector3.up / 1.5f, new Vector3(2.5f, 2f, 6f)); Gizmos.DrawSphere(carSetting.shiftCentre / ((Component)this).transform.lossyScale.x, 0.2f); } } } public class enginestartsound : MonoBehaviour { public GameObject button; public GameObject sound; public VehicleControl vehicle; 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_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) if (button.transform.localEulerAngles.x >= 45f && !vehicle.isOn) { sound.SetActive(true); } else if (button.transform.localEulerAngles.x < 45f || vehicle.isOn) { sound.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 Bikehandle : MonoBehaviour { public GameObject fakebikeh; public GameObject realbikeh; public ConstantForce forceR; public ConstantForce forceF; public float forcesize; 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_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_00c9: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_00b3: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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) fakebikeh.transform.localEulerAngles = new Vector3(0f, realbikeh.transform.localEulerAngles.y, 0f); if (fakebikeh.transform.localEulerAngles.y >= 2.5f && fakebikeh.transform.localEulerAngles.y <= 35f) { forceF.relativeForce = new Vector3(forcesize, 0f, 0f); forceR.relativeForce = new Vector3(forcesize, 0f, 0f); } if (fakebikeh.transform.localEulerAngles.y <= 357.5f && fakebikeh.transform.localEulerAngles.y >= 325f) { forceF.relativeForce = new Vector3(0f - forcesize, 0f, 0f); forceR.relativeForce = new Vector3(0f - forcesize, 0f, 0f); } if (fakebikeh.transform.localEulerAngles.y < 2.5f || fakebikeh.transform.localEulerAngles.y > 357.5f) { forceF.relativeForce = new Vector3(0f, 0f, 0f); forceR.relativeForce = new Vector3(0f, 0f, 0f); } } } public class moveGC : MonoBehaviour { public VehicleControl vc; public GameObject trackinghead; private float move; 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) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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) //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_0159: 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_00c5: 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_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) if (vc.isOn) { if (trackinghead.transform.localPosition.x > 0.15f) { move = trackinghead.transform.localPosition.x; vc.carSetting.shiftCentre = new Vector3(move, 0.25f, 0.3f); if (move > 0.2f) { move = 0.2f; } } if (trackinghead.transform.localPosition.x < -0.15f) { move = trackinghead.transform.localPosition.x; vc.carSetting.shiftCentre = new Vector3(move, 0.25f, 0.3f); if (move < -0.2f) { move = -0.2f; } } } if (!vc.isOn || (trackinghead.transform.localPosition.x > -0.15f && trackinghead.transform.localPosition.x < 0.15f)) { vc.carSetting.shiftCentre = new Vector3(0f, 0.25f, 0.3f); } } } public class speedlimit : MonoBehaviour { public HingeJoint joint; public float limit; public VehicleControl vehicle; public GameObject needle; public bool isImperial; public float maxSpeed; public Vector3 needleNoSpeed; public Vector3 needleMaxSpeed; public void Update() { //IL_0045: 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_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_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) //IL_0079: 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_00a5: 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) float num = Mathf.Abs(vehicle.speed); if (isImperial) { num *= 0.6213712f; } float num2 = Mathf.InverseLerp(0f, maxSpeed, num); needle.transform.localEulerAngles = Vector3.Lerp(needleNoSpeed, needleMaxSpeed, num2); JointLimits limits = joint.limits; ((JointLimits)(ref limits)).min = needle.transform.localEulerAngles.x - limit; ((JointLimits)(ref limits)).max = limit - needle.transform.localEulerAngles.x; joint.limits = limits; } } public class FIATSAR : MonoBehaviour { public Rigidbody RIG; public FSO125P Vehicle; [Header("RPM Digits (Text)")] public Text rpmThousands; public Text rpmHundreds; public Text rpmTens; public Text rpmOnes; [Header("Speed Needle (Transform)")] public Transform speedNeedle; public float minX = 0f; public float maxX = 180f; public float minSpeed = 0f; public float maxSpeed = 180f; private void Update() { //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_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) //IL_0158: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.RoundToInt(Vehicle.currentRPM); num = Mathf.Clamp(num, 0, 7000); int num2 = num / 1000; int num3 = num % 1000 / 100; int num4 = num % 100 / 10; int num5 = num % 10; if ((Object)(object)rpmThousands != (Object)null) { rpmThousands.text = num2.ToString(); } if ((Object)(object)rpmHundreds != (Object)null) { rpmHundreds.text = num3.ToString(); } if ((Object)(object)rpmTens != (Object)null) { rpmTens.text = num4.ToString(); } if ((Object)(object)rpmOnes != (Object)null) { rpmOnes.text = num5.ToString(); } if ((Object)(object)speedNeedle != (Object)null) { Vector3 velocity = RIG.velocity; float num6 = ((Vector3)(ref velocity)).magnitude * 2.7f; float num7 = Mathf.InverseLerp(minSpeed, maxSpeed, num6); float x = Mathf.Lerp(minX, maxX, num7); Vector3 localPosition = speedNeedle.localPosition; localPosition.x = x; speedNeedle.localPosition = localPosition; } } } public class FIATSteeringWheel : FVRInteractiveObject { public float resetLerpSpeed; public float maxRot; public bool reverseRot; [Header("Debug Values")] public Text rotText; public float rot; public float rh; public float lr; public float inlerp; public float lerp; public float rotAmt; public float CurSteer; public override void BeginInteraction(FVRViveHand hand) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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_0060: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).BeginInteraction(hand); Transform child = ((Component)this).transform.GetChild(0); child.parent = null; Vector3 localEulerAngles = ((Component)this).transform.localEulerAngles; ((Component)this).transform.LookAt(((Component)hand).transform); ((Component)this).transform.localEulerAngles = new Vector3(localEulerAngles.x, ((Component)this).transform.localEulerAngles.y, localEulerAngles.z); child.parent = ((Component)this).transform; } public override void EndInteraction(FVRViveHand hand) { //IL_0028: 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_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_004d: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).EndInteraction(hand); Transform child = ((Component)this).transform.GetChild(0); child.parent = null; ((Component)this).transform.localEulerAngles = new Vector3(((Component)this).transform.localEulerAngles.x, 0f, ((Component)this).transform.localEulerAngles.z); child.parent = ((Component)this).transform; } public override void UpdateInteraction(FVRViveHand hand) { //IL_000e: 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_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_008f: 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_00c1: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).UpdateInteraction(hand); Vector3 localEulerAngles = ((Component)this).transform.localEulerAngles; ((Component)this).transform.LookAt(((Component)hand).transform); Vector3 localEulerAngles2 = ((Component)this).transform.localEulerAngles; rot = Mathf.DeltaAngle((float)Math.Round(localEulerAngles2.y), (float)Math.Round(localEulerAngles.y)); rotAmt += rot; if (rotAmt >= maxRot) { rotAmt = maxRot; ((Component)this).transform.localEulerAngles = localEulerAngles; } else if (rotAmt <= 0f - maxRot) { rotAmt = 0f - maxRot; ((Component)this).transform.localEulerAngles = localEulerAngles; } else { ((Component)this).transform.localEulerAngles = new Vector3(localEulerAngles.x, localEulerAngles2.y, localEulerAngles.z); } rh = localEulerAngles2.y; lr = localEulerAngles.y; CurSteer = SetRot(); } private float SetRot() { bool flag = rotAmt <= 0f; lerp = Mathf.Abs(rotAmt) / maxRot; lerp *= -1f; if (flag) { lerp *= -1f; } if (reverseRot) { lerp = 0f - lerp; } if ((Object)(object)rotText != (Object)null) { rotText.text = lerp.ToString(); } return lerp; } } public class FSO125P : MonoBehaviour { public GameObject HBGeo; public FVRInteractiveObject grabobjHB; public GameObject HandRefHB; public bool IsIgniting; public GameObject IgnitionKeyHole; public FVRInteractiveObject IgnitionInt; public FIATSteeringWheel SteeringwheelInt; public FVRInteractiveObject DriveShiftInt; public GameObject HandRef; public bool shiftPressed; public bool altPressed; public GameObject SteeringWheelGeo; public float StallCD = 0.1f; public int PrevGear = -1; public Rigidbody CarRig; public float MaxVel = 75f; public Transform CarMassC; public GameObject WheelGeoLF; public GameObject WheelGeoRF; public GameObject WheelGeoLR; public GameObject WheelGeoRR; public WheelCollider WheelColLF; public WheelCollider WheelColRF; public WheelCollider WheelColLR; public WheelCollider WheelColRR; public AudioSource EngineIdle; public AudioSource EngineOn; public AudioSource EngineOff; public AudioSource ShiftGear; public AudioSource HandBrakeOn; public AudioSource HandBrakeOff; public float EnginePower = 100f; public float MaxRPM = 6000f; public float currentRPM; public float curRPMRef; public float curRPMRef2; public float torque; public float torqueRef; public float wheelTorque; public AnimationCurve torqueCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6] { new Keyframe(1000f, 80f), new Keyframe(2000f, 110f), new Keyframe(3000f, 125f), new Keyframe(4000f, 130f), new Keyframe(5000f, 120f), new Keyframe(6000f, 100f) }); public float maxTorque = 250f; public float idleRPM = 900f; private float clutchInput; public bool isclutchstepped; public float finalDriveRatio = 4.1f; public float[] gearRatios = new float[6] { -3.8f, 0f, 3.75f, 2.12f, 1.36f, 1f }; private float throttleInput; public GameObject shiftGeo; public GameObject GearGeo; public GameObject Gear1Failed; public GameObject Gear2Failed; public GameObject Gear3Failed; public GameObject Gear4Failed; public GameObject GearRFailed; public GameObject Left; public GameObject Right; public GameObject Middle; public float MaxSteer = 35f; public float curSteer; public float curSteerRef; public float speedlim = 200f; public float steerMul = 2.5f; public float ShiftCD = 1f; public float BrakeForce = 1000f; public float HandBrakeForce = 1500f; public float BrakeInput; public float curVel; public bool isEngineOn; public bool isIgnited; public bool isHandBrakeOn; public bool isHBToggled; public int curGear = 1; public bool shifted; public float RPMRef; public float RPMRefref; public GameObject ReverseLight; public GameObject BrakeLight; public GameObject LightTotal; public Vector3 WLFPos; public Vector3 WLRPos; public Vector3 WRFPos; public Vector3 WRRPos; public Quaternion WLFRot; public Quaternion WLRRot; public Quaternion WRFRot; public Quaternion WRRRot; public float rotLF; public float rotLR; public float rotRF; public float rotRR; public float rotLF2; public float rotRF2; public float maxspeed; public float upforce; public float rotforce; public void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) CarRig.centerOfMass = ((Component)CarMassC).transform.position; CarRig.ResetCenterOfMass(); } private void AxisLookAtXZ(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 AxisLookAtY(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } private void 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_003d: 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_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0274: 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_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0231: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0485: 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_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: 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_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0523: 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_0546: 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_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0564: 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) //IL_0583: 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_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0631: 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_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_066f: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06bd: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_070d: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0745: 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_075e: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Unknown result type (might be due to invalid IL or missing references) //IL_0a65: Unknown result type (might be due to invalid IL or missing references) //IL_0a79: Unknown result type (might be due to invalid IL or missing references) //IL_0a7e: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_0826: Unknown result type (might be due to invalid IL or missing references) //IL_0c0d: Unknown result type (might be due to invalid IL or missing references) //IL_0c12: Unknown result type (might be due to invalid IL or missing references) //IL_0c26: Unknown result type (might be due to invalid IL or missing references) //IL_0c2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a9e: Unknown result type (might be due to invalid IL or missing references) //IL_0aa3: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0abc: Unknown result type (might be due to invalid IL or missing references) //IL_088e: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08b1: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08ca: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_084a: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0f2a: Unknown result type (might be due to invalid IL or missing references) //IL_0f2f: Unknown result type (might be due to invalid IL or missing references) //IL_0f43: Unknown result type (might be due to invalid IL or missing references) //IL_0f48: Unknown result type (might be due to invalid IL or missing references) //IL_0c4b: Unknown result type (might be due to invalid IL or missing references) //IL_0c50: Unknown result type (might be due to invalid IL or missing references) //IL_0c64: Unknown result type (might be due to invalid IL or missing references) //IL_0c69: Unknown result type (might be due to invalid IL or missing references) //IL_08f9: Unknown result type (might be due to invalid IL or missing references) //IL_08fe: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_1284: Unknown result type (might be due to invalid IL or missing references) //IL_1289: Unknown result type (might be due to invalid IL or missing references) //IL_129d: Unknown result type (might be due to invalid IL or missing references) //IL_12a2: Unknown result type (might be due to invalid IL or missing references) //IL_0f67: Unknown result type (might be due to invalid IL or missing references) //IL_0f6c: Unknown result type (might be due to invalid IL or missing references) //IL_0f80: Unknown result type (might be due to invalid IL or missing references) //IL_0f85: Unknown result type (might be due to invalid IL or missing references) //IL_0dba: Unknown result type (might be due to invalid IL or missing references) //IL_0dbf: Unknown result type (might be due to invalid IL or missing references) //IL_0dd3: Unknown result type (might be due to invalid IL or missing references) //IL_0dd8: Unknown result type (might be due to invalid IL or missing references) //IL_0af3: Unknown result type (might be due to invalid IL or missing references) //IL_0af8: Unknown result type (might be due to invalid IL or missing references) //IL_0b0c: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Unknown result type (might be due to invalid IL or missing references) //IL_0b3f: Unknown result type (might be due to invalid IL or missing references) //IL_0b53: Unknown result type (might be due to invalid IL or missing references) //IL_0b58: Unknown result type (might be due to invalid IL or missing references) //IL_0b77: Unknown result type (might be due to invalid IL or missing references) //IL_0a1e: Unknown result type (might be due to invalid IL or missing references) //IL_0a23: Unknown result type (might be due to invalid IL or missing references) //IL_0a3c: Unknown result type (might be due to invalid IL or missing references) //IL_0a41: Unknown result type (might be due to invalid IL or missing references) //IL_0a4a: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_094f: Unknown result type (might be due to invalid IL or missing references) //IL_0954: Unknown result type (might be due to invalid IL or missing references) //IL_140c: Unknown result type (might be due to invalid IL or missing references) //IL_1411: Unknown result type (might be due to invalid IL or missing references) //IL_1425: Unknown result type (might be due to invalid IL or missing references) //IL_142a: Unknown result type (might be due to invalid IL or missing references) //IL_12c1: Unknown result type (might be due to invalid IL or missing references) //IL_12c6: Unknown result type (might be due to invalid IL or missing references) //IL_12da: Unknown result type (might be due to invalid IL or missing references) //IL_12df: Unknown result type (might be due to invalid IL or missing references) //IL_0fa5: Unknown result type (might be due to invalid IL or missing references) //IL_0faa: Unknown result type (might be due to invalid IL or missing references) //IL_0fbe: Unknown result type (might be due to invalid IL or missing references) //IL_0fc3: Unknown result type (might be due to invalid IL or missing references) //IL_0ca0: Unknown result type (might be due to invalid IL or missing references) //IL_0ca5: Unknown result type (might be due to invalid IL or missing references) //IL_0cb9: Unknown result type (might be due to invalid IL or missing references) //IL_0cbe: Unknown result type (might be due to invalid IL or missing references) //IL_0ce7: Unknown result type (might be due to invalid IL or missing references) //IL_0cec: Unknown result type (might be due to invalid IL or missing references) //IL_0d00: Unknown result type (might be due to invalid IL or missing references) //IL_0d05: Unknown result type (might be due to invalid IL or missing references) //IL_0d24: Unknown result type (might be due to invalid IL or missing references) //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Unknown result type (might be due to invalid IL or missing references) //IL_0998: Unknown result type (might be due to invalid IL or missing references) //IL_099d: Unknown result type (might be due to invalid IL or missing references) //IL_09c6: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Unknown result type (might be due to invalid IL or missing references) //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_14d3: Unknown result type (might be due to invalid IL or missing references) //IL_14d8: Unknown result type (might be due to invalid IL or missing references) //IL_14ec: Unknown result type (might be due to invalid IL or missing references) //IL_14f1: Unknown result type (might be due to invalid IL or missing references) //IL_145a: Unknown result type (might be due to invalid IL or missing references) //IL_145f: Unknown result type (might be due to invalid IL or missing references) //IL_1473: Unknown result type (might be due to invalid IL or missing references) //IL_1478: Unknown result type (might be due to invalid IL or missing references) //IL_148c: Unknown result type (might be due to invalid IL or missing references) //IL_1491: Unknown result type (might be due to invalid IL or missing references) //IL_14af: Unknown result type (might be due to invalid IL or missing references) //IL_14b4: Unknown result type (might be due to invalid IL or missing references) //IL_14bd: Unknown result type (might be due to invalid IL or missing references) //IL_1114: Unknown result type (might be due to invalid IL or missing references) //IL_1119: Unknown result type (might be due to invalid IL or missing references) //IL_112d: Unknown result type (might be due to invalid IL or missing references) //IL_1132: Unknown result type (might be due to invalid IL or missing references) //IL_0e0f: Unknown result type (might be due to invalid IL or missing references) //IL_0e14: Unknown result type (might be due to invalid IL or missing references) //IL_0e28: Unknown result type (might be due to invalid IL or missing references) //IL_0e2d: Unknown result type (might be due to invalid IL or missing references) //IL_0e56: Unknown result type (might be due to invalid IL or missing references) //IL_0e5b: Unknown result type (might be due to invalid IL or missing references) //IL_0e6f: Unknown result type (might be due to invalid IL or missing references) //IL_0e74: Unknown result type (might be due to invalid IL or missing references) //IL_0e93: Unknown result type (might be due to invalid IL or missing references) //IL_17f5: Unknown result type (might be due to invalid IL or missing references) //IL_17fa: Unknown result type (might be due to invalid IL or missing references) //IL_180e: Unknown result type (might be due to invalid IL or missing references) //IL_1813: Unknown result type (might be due to invalid IL or missing references) //IL_1516: Unknown result type (might be due to invalid IL or missing references) //IL_151b: Unknown result type (might be due to invalid IL or missing references) //IL_152f: Unknown result type (might be due to invalid IL or missing references) //IL_1534: Unknown result type (might be due to invalid IL or missing references) //IL_1324: Unknown result type (might be due to invalid IL or missing references) //IL_1329: Unknown result type (might be due to invalid IL or missing references) //IL_133d: Unknown result type (might be due to invalid IL or missing references) //IL_1342: Unknown result type (might be due to invalid IL or missing references) //IL_136b: Unknown result type (might be due to invalid IL or missing references) //IL_1370: Unknown result type (might be due to invalid IL or missing references) //IL_1384: Unknown result type (might be due to invalid IL or missing references) //IL_1389: Unknown result type (might be due to invalid IL or missing references) //IL_13a2: Unknown result type (might be due to invalid IL or missing references) //IL_0ffa: Unknown result type (might be due to invalid IL or missing references) //IL_0fff: Unknown result type (might be due to invalid IL or missing references) //IL_1013: Unknown result type (might be due to invalid IL or missing references) //IL_1018: Unknown result type (might be due to invalid IL or missing references) //IL_1041: Unknown result type (might be due to invalid IL or missing references) //IL_1046: Unknown result type (might be due to invalid IL or missing references) //IL_105a: Unknown result type (might be due to invalid IL or missing references) //IL_105f: Unknown result type (might be due to invalid IL or missing references) //IL_107e: Unknown result type (might be due to invalid IL or missing references) //IL_183c: Unknown result type (might be due to invalid IL or missing references) //IL_1841: Unknown result type (might be due to invalid IL or missing references) //IL_1855: Unknown result type (might be due to invalid IL or missing references) //IL_185a: Unknown result type (might be due to invalid IL or missing references) //IL_15de: Unknown result type (might be due to invalid IL or missing references) //IL_15e3: Unknown result type (might be due to invalid IL or missing references) //IL_15f7: Unknown result type (might be due to invalid IL or missing references) //IL_15fc: Unknown result type (might be due to invalid IL or missing references) //IL_155f: Unknown result type (might be due to invalid IL or missing references) //IL_1564: Unknown result type (might be due to invalid IL or missing references) //IL_1578: Unknown result type (might be due to invalid IL or missing references) //IL_157d: Unknown result type (might be due to invalid IL or missing references) //IL_1591: Unknown result type (might be due to invalid IL or missing references) //IL_1596: Unknown result type (might be due to invalid IL or missing references) //IL_15ba: Unknown result type (might be due to invalid IL or missing references) //IL_15bf: Unknown result type (might be due to invalid IL or missing references) //IL_15c8: Unknown result type (might be due to invalid IL or missing references) //IL_1169: Unknown result type (might be due to invalid IL or missing references) //IL_116e: Unknown result type (might be due to invalid IL or missing references) //IL_1182: Unknown result type (might be due to invalid IL or missing references) //IL_1187: Unknown result type (might be due to invalid IL or missing references) //IL_11b0: Unknown result type (might be due to invalid IL or missing references) //IL_11b5: Unknown result type (might be due to invalid IL or missing references) //IL_11c9: Unknown result type (might be due to invalid IL or missing references) //IL_11ce: Unknown result type (might be due to invalid IL or missing references) //IL_11ed: Unknown result type (might be due to invalid IL or missing references) //IL_1914: Unknown result type (might be due to invalid IL or missing references) //IL_1919: Unknown result type (might be due to invalid IL or missing references) //IL_1932: Unknown result type (might be due to invalid IL or missing references) //IL_1937: Unknown result type (might be due to invalid IL or missing references) //IL_194b: Unknown result type (might be due to invalid IL or missing references) //IL_1950: Unknown result type (might be due to invalid IL or missing references) //IL_196a: Unknown result type (might be due to invalid IL or missing references) //IL_196f: Unknown result type (might be due to invalid IL or missing references) //IL_1983: Unknown result type (might be due to invalid IL or missing references) //IL_187e: Unknown result type (might be due to invalid IL or missing references) //IL_1883: Unknown result type (might be due to invalid IL or missing references) //IL_1897: Unknown result type (might be due to invalid IL or missing references) //IL_189c: Unknown result type (might be due to invalid IL or missing references) //IL_16e9: Unknown result type (might be due to invalid IL or missing references) //IL_16ee: Unknown result type (might be due to invalid IL or missing references) //IL_1702: Unknown result type (might be due to invalid IL or missing references) //IL_1707: Unknown result type (might be due to invalid IL or missing references) //IL_1627: Unknown result type (might be due to invalid IL or missing references) //IL_162c: Unknown result type (might be due to invalid IL or missing references) //IL_1640: Unknown result type (might be due to invalid IL or missing references) //IL_1645: Unknown result type (might be due to invalid IL or missing references) //IL_165f: Unknown result type (might be due to invalid IL or missing references) //IL_1664: Unknown result type (might be due to invalid IL or missing references) //IL_1682: Unknown result type (might be due to invalid IL or missing references) //IL_1687: Unknown result type (might be due to invalid IL or missing references) //IL_169b: Unknown result type (might be due to invalid IL or missing references) //IL_16a0: Unknown result type (might be due to invalid IL or missing references) //IL_16ba: Unknown result type (might be due to invalid IL or missing references) //IL_16bf: Unknown result type (might be due to invalid IL or missing references) //IL_16d3: Unknown result type (might be due to invalid IL or missing references) //IL_1726: Unknown result type (might be due to invalid IL or missing references) //IL_172b: Unknown result type (might be due to invalid IL or missing references) //IL_173f: Unknown result type (might be due to invalid IL or missing references) //IL_1744: Unknown result type (might be due to invalid IL or missing references) //IL_21e8: Unknown result type (might be due to invalid IL or missing references) //IL_21ed: Unknown result type (might be due to invalid IL or missing references) //IL_2201: Unknown result type (might be due to invalid IL or missing references) //IL_2206: Unknown result type (might be due to invalid IL or missing references) //IL_176f: Unknown result type (might be due to invalid IL or missing references) //IL_1774: Unknown result type (might be due to invalid IL or missing references) //IL_1788: Unknown result type (might be due to invalid IL or missing references) //IL_178d: Unknown result type (might be due to invalid IL or missing references) //IL_17a7: Unknown result type (might be due to invalid IL or missing references) //IL_17ac: Unknown result type (might be due to invalid IL or missing references) //IL_17d0: Unknown result type (might be due to invalid IL or missing references) //IL_17d5: Unknown result type (might be due to invalid IL or missing references) //IL_17de: Unknown result type (might be due to invalid IL or missing references) //IL_2262: Unknown result type (might be due to invalid IL or missing references) //IL_2267: Unknown result type (might be due to invalid IL or missing references) //IL_227b: Unknown result type (might be due to invalid IL or missing references) //IL_2280: Unknown result type (might be due to invalid IL or missing references) //IL_2225: Unknown result type (might be due to invalid IL or missing references) //IL_222a: Unknown result type (might be due to invalid IL or missing references) //IL_223e: Unknown result type (might be due to invalid IL or missing references) //IL_2243: Unknown result type (might be due to invalid IL or missing references) //IL_19fa: Unknown result type (might be due to invalid IL or missing references) //IL_19ff: Unknown result type (might be due to invalid IL or missing references) //IL_1a13: Unknown result type (might be due to invalid IL or missing references) //IL_1a18: Unknown result type (might be due to invalid IL or missing references) //IL_23d3: Unknown result type (might be due to invalid IL or missing references) //IL_244e: Unknown result type (might be due to invalid IL or missing references) //IL_24a7: Unknown result type (might be due to invalid IL or missing references) //IL_2500: Unknown result type (might be due to invalid IL or missing references) //IL_2572: Unknown result type (might be due to invalid IL or missing references) //IL_2588: Unknown result type (might be due to invalid IL or missing references) //IL_259e: Unknown result type (might be due to invalid IL or missing references) //IL_25b4: Unknown result type (might be due to invalid IL or missing references) //IL_229f: Unknown result type (might be due to invalid IL or missing references) //IL_22a4: Unknown result type (might be due to invalid IL or missing references) //IL_22b8: Unknown result type (might be due to invalid IL or missing references) //IL_22bd: Unknown result type (might be due to invalid IL or missing references) //IL_22e8: Unknown result type (might be due to invalid IL or missing references) //IL_22ed: Unknown result type (might be due to invalid IL or missing references) //IL_2306: Unknown result type (might be due to invalid IL or missing references) //IL_230b: Unknown result type (might be due to invalid IL or missing references) //IL_231f: Unknown result type (might be due to invalid IL or missing references) //IL_2324: Unknown result type (might be due to invalid IL or missing references) //IL_233e: Unknown result type (might be due to invalid IL or missing references) //IL_2343: Unknown result type (might be due to invalid IL or missing references) //IL_2357: Unknown result type (might be due to invalid IL or missing references) //IL_1a37: Unknown result type (might be due to invalid IL or missing references) //IL_1a3c: Unknown result type (might be due to invalid IL or missing references) //IL_1a50: Unknown result type (might be due to invalid IL or missing references) //IL_1a55: Unknown result type (might be due to invalid IL or missing references) //IL_1ab2: Unknown result type (might be due to invalid IL or missing references) //IL_1ab7: Unknown result type (might be due to invalid IL or missing references) //IL_1acb: Unknown result type (might be due to invalid IL or missing references) //IL_1ad0: Unknown result type (might be due to invalid IL or missing references) //IL_1d6a: Unknown result type (might be due to invalid IL or missing references) //IL_1d6f: Unknown result type (might be due to invalid IL or missing references) //IL_1d83: Unknown result type (might be due to invalid IL or missing references) //IL_1d88: Unknown result type (might be due to invalid IL or missing references) //IL_1aef: Unknown result type (might be due to invalid IL or missing references) //IL_1af4: Unknown result type (might be due to invalid IL or missing references) //IL_1b08: Unknown result type (might be due to invalid IL or missing references) //IL_1b0d: Unknown result type (might be due to invalid IL or missing references) //IL_1f8c: Unknown result type (might be due to invalid IL or missing references) //IL_1f91: Unknown result type (might be due to invalid IL or missing references) //IL_1fa5: Unknown result type (might be due to invalid IL or missing references) //IL_1faa: Unknown result type (might be due to invalid IL or missing references) //IL_1da7: Unknown result type (might be due to invalid IL or missing references) //IL_1dac: Unknown result type (might be due to invalid IL or missing references) //IL_1dc0: Unknown result type (might be due to invalid IL or missing references) //IL_1dc5: Unknown result type (might be due to invalid IL or missing references) //IL_1b2d: Unknown result type (might be due to invalid IL or missing references) //IL_1b32: Unknown result type (might be due to invalid IL or missing references) //IL_1b46: Unknown result type (might be due to invalid IL or missing references) //IL_1b4b: Unknown result type (might be due to invalid IL or missing references) //IL_2097: Unknown result type (might be due to invalid IL or missing references) //IL_209c: Unknown result type (might be due to invalid IL or missing references) //IL_20b0: Unknown result type (might be due to invalid IL or missing references) //IL_20b5: Unknown result type (might be due to invalid IL or missing references) //IL_1fc9: Unknown result type (might be due to invalid IL or missing references) //IL_1fce: Unknown result type (might be due to invalid IL or missing references) //IL_1fe2: Unknown result type (might be due to invalid IL or missing references) //IL_1fe7: Unknown result type (might be due to invalid IL or missing references) //IL_1de5: Unknown result type (might be due to invalid IL or missing references) //IL_1dea: Unknown result type (might be due to invalid IL or missing references) //IL_1dfe: Unknown result type (might be due to invalid IL or missing references) //IL_1e03: Unknown result type (might be due to invalid IL or missing references) //IL_1b78: Unknown result type (might be due to invalid IL or missing references) //IL_1b7d: Unknown result type (might be due to invalid IL or missing references) //IL_1b91: Unknown result type (might be due to invalid IL or missing references) //IL_1b96: Unknown result type (might be due to invalid IL or missing references) //IL_211d: Unknown result type (might be due to invalid IL or missing references) //IL_2122: Unknown result type (might be due to invalid IL or missing references) //IL_213b: Unknown result type (might be due to invalid IL or missing references) //IL_2140: Unknown result type (might be due to invalid IL or missing references) //IL_2154: Unknown result type (might be due to invalid IL or missing references) //IL_2159: Unknown result type (might be due to invalid IL or missing references) //IL_2173: Unknown result type (might be due to invalid IL or missing references) //IL_2178: Unknown result type (might be due to invalid IL or missing references) //IL_218c: Unknown result type (might be due to invalid IL or missing references) //IL_20d4: Unknown result type (might be due to invalid IL or missing references) //IL_20d9: Unknown result type (might be due to invalid IL or missing references) //IL_20ed: Unknown result type (might be due to invalid IL or missing references) //IL_20f2: Unknown result type (might be due to invalid IL or missing references) //IL_2012: Unknown result type (might be due to invalid IL or missing references) //IL_2017: Unknown result type (might be due to invalid IL or missing references) //IL_2030: Unknown result type (might be due to invalid IL or missing references) //IL_2035: Unknown result type (might be due to invalid IL or missing references) //IL_2049: Unknown result type (might be due to invalid IL or missing references) //IL_204e: Unknown result type (might be due to invalid IL or missing references) //IL_2068: Unknown result type (might be due to invalid IL or missing references) //IL_206d: Unknown result type (might be due to invalid IL or missing references) //IL_2081: Unknown result type (might be due to invalid IL or missing references) //IL_1e30: Unknown result type (might be due to invalid IL or missing references) //IL_1e35: Unknown result type (might be due to invalid IL or missing references) //IL_1e49: Unknown result type (might be due to invalid IL or missing references) //IL_1e4e: Unknown result type (might be due to invalid IL or missing references) //IL_1bc3: Unknown result type (might be due to invalid IL or missing references) //IL_1bc8: Unknown result type (might be due to invalid IL or missing references) //IL_1bdc: Unknown result type (might be due to invalid IL or missing references) //IL_1be1: Unknown result type (might be due to invalid IL or missing references) //IL_1e7b: Unknown result type (might be due to invalid IL or missing references) //IL_1e80: Unknown result type (might be due to invalid IL or missing references) //IL_1e94: Unknown result type (might be due to invalid IL or missing references) //IL_1e99: Unknown result type (might be due to invalid IL or missing references) //IL_1c4b: Unknown result type (might be due to invalid IL or missing references) //IL_1c50: Unknown result type (might be due to invalid IL or missing references) //IL_1c64: Unknown result type (might be due to invalid IL or missing references) //IL_1c69: Unknown result type (might be due to invalid IL or missing references) //IL_1c00: Unknown result type (might be due to invalid IL or missing references) //IL_1c05: Unknown result type (might be due to invalid IL or missing references) //IL_1c19: Unknown result type (might be due to invalid IL or missing references) //IL_1c1e: Unknown result type (might be due to invalid IL or missing references) //IL_1f03: Unknown result type (might be due to invalid IL or missing references) //IL_1f08: Unknown result type (might be due to invalid IL or missing references) //IL_1f1c: Unknown result type (might be due to invalid IL or missing references) //IL_1f21: Unknown result type (might be due to invalid IL or missing references) //IL_1eb8: Unknown result type (might be due to invalid IL or missing references) //IL_1ebd: Unknown result type (might be due to invalid IL or missing references) //IL_1ed1: Unknown result type (might be due to invalid IL or missing references) //IL_1ed6: Unknown result type (might be due to invalid IL or missing references) //IL_1c88: Unknown result type (might be due to invalid IL or missing references) //IL_1c8d: Unknown result type (might be due to invalid IL or missing references) //IL_1ca1: Unknown result type (might be due to invalid IL or missing references) //IL_1ca6: Unknown result type (might be due to invalid IL or missing references) //IL_1f40: Unknown result type (might be due to invalid IL or missing references) //IL_1f45: Unknown result type (might be due to invalid IL or missing references) //IL_1f59: Unknown result type (might be due to invalid IL or missing references) //IL_1f5e: Unknown result type (might be due to invalid IL or missing references) //IL_1cd3: Unknown result type (might be due to invalid IL or missing references) //IL_1cd8: Unknown result type (might be due to invalid IL or missing references) //IL_1cec: Unknown result type (might be due to invalid IL or missing references) //IL_1cf1: Unknown result type (might be due to invalid IL or missing references) //IL_2a5a: Unknown result type (might be due to invalid IL or missing references) //IL_2a5f: Unknown result type (might be due to invalid IL or missing references) //IL_1d1e: Unknown result type (might be due to invalid IL or missing references) //IL_1d23: Unknown result type (might be due to invalid IL or missing references) //IL_1d37: Unknown result type (might be due to invalid IL or missing references) //IL_1d3c: Unknown result type (might be due to invalid IL or missing references) //IL_3fd4: Unknown result type (might be due to invalid IL or missing references) //IL_3ded: Unknown result type (might be due to invalid IL or missing references) //IL_3df2: Unknown result type (might be due to invalid IL or missing references) //IL_2aef: Unknown result type (might be due to invalid IL or missing references) //IL_2af4: Unknown result type (might be due to invalid IL or missing references) //IL_2a7a: Unknown result type (might be due to invalid IL or missing references) //IL_2a7f: Unknown result type (might be due to invalid IL or missing references) //IL_2aaa: Unknown result type (might be due to invalid IL or missing references) //IL_2ab1: Unknown result type (might be due to invalid IL or missing references) //IL_2b55: Unknown result type (might be due to invalid IL or missing references) //IL_2b5a: Unknown result type (might be due to invalid IL or missing references) //IL_38c3: Unknown result type (might be due to invalid IL or missing references) //IL_38ce: Unknown result type (might be due to invalid IL or missing references) //IL_38df: Unknown result type (might be due to invalid IL or missing references) //IL_38ea: Unknown result type (might be due to invalid IL or missing references) //IL_3a3e: Unknown result type (might be due to invalid IL or missing references) //IL_3a43: Unknown result type (might be due to invalid IL or missing references) //IL_3a7a: Unknown result type (might be due to invalid IL or missing references) //IL_3a7f: Unknown result type (might be due to invalid IL or missing references) //IL_3af4: Unknown result type (might be due to invalid IL or missing references) //IL_3af9: Unknown result type (might be due to invalid IL or missing references) //IL_3c0c: Unknown result type (might be due to invalid IL or missing references) //IL_3c11: Unknown result type (might be due to invalid IL or missing references) //IL_3b92: Unknown result type (might be due to invalid IL or missing references) //IL_3b97: Unknown result type (might be due to invalid IL or missing references) //IL_3cfc: Unknown result type (might be due to invalid IL or missing references) //IL_3d01: Unknown result type (might be due to invalid IL or missing references) HandRefHB.transform.localPosition = new Vector3(0f, Mathf.Clamp(HandRefHB.transform.localPosition.y, 0f, 1f), 0f); AxisLookAtY(HBGeo.transform, HandRefHB.transform.position, Vector3.forward); if (grabobjHB.m_isHeld) { if ((grabobjHB.m_hand.Input.TriggerFloat > 0.75f || HandRefHB.transform.localPosition.y < 0.25f) && isHandBrakeOn) { isHandBrakeOn = false; HandBrakeOff.Play(); } if (!isHandBrakeOn) { HandRefHB.transform.position = ((Component)grabobjHB.m_hand).gameObject.transform.position; } if (HandRefHB.transform.localPosition.y > 0.75f && grabobjHB.m_hand.Input.TriggerFloat <= 0.75f && !isHandBrakeOn) { isHandBrakeOn = true; HandBrakeOn.Play(); } } maxspeed = Mathf.Lerp(maxspeed, speedlim / Mathf.Abs(gearRatios[curGear]), Time.deltaTime); if (IgnitionKeyHole.transform.localEulerAngles.x > 45f) { if (!isEngineOn) { IsIgniting = true; } if ((Object)(object)IgnitionInt.m_hand == (Object)null) { IgnitionKeyHole.transform.localEulerAngles = Vector3.Lerp(IgnitionKeyHole.transform.localEulerAngles, new Vector3(45f, 0f, 0f), Time.deltaTime * 25f); } } if (IgnitionKeyHole.transform.localEulerAngles.x <= 75f) { IsIgniting = false; } if (IgnitionKeyHole.transform.localEulerAngles.x < 15f) { if (isEngineOn) { if (!EngineOff.isPlaying) { EngineOff.Play(); } EngineIdle.Stop(); isEngineOn = false; isIgnited = false; } if ((Object)(object)IgnitionInt.m_hand == (Object)null) { IgnitionKeyHole.transform.localEulerAngles = Vector3.Lerp(IgnitionKeyHole.transform.localEulerAngles, new Vector3(0f, 0f, 0f), Time.deltaTime * 5f); } } if ((Object)(object)DriveShiftInt.m_hand != (Object)null) { if (DriveShiftInt.m_hand.Input.TriggerFloat > 0.25f) { altPressed = true; } if (DriveShiftInt.m_hand.Input.TriggerFloat <= 0.25f) { altPressed = false; } HandRef.transform.position = ((Component)DriveShiftInt.m_hand).gameObject.transform.position; shiftPressed = true; } else if ((Object)(object)DriveShiftInt.m_hand == (Object)null) { HandRef.transform.localPosition = new Vector3(0f, 0f, 0f); altPressed = false; shiftPressed = false; } HandRef.transform.localPosition = new Vector3(Mathf.Clamp(HandRef.transform.localPosition.x, Left.transform.localPosition.x, Right.transform.localPosition.x), 0f, Mathf.Clamp(HandRef.transform.localPosition.z, Middle.transform.localPosition.z - 1f, Middle.transform.localPosition.z + 1f)); GearGeo.transform.localPosition = new Vector3(Mathf.Clamp(GearGeo.transform.localPosition.x, Left.transform.localPosition.x, Right.transform.localPosition.x), 0f, Mathf.Clamp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 1f, Middle.transform.localPosition.z + 1f)); if (((double)GearGeo.transform.localPosition.x > (double)Left.transform.localPosition.x + 0.1 && GearGeo.transform.localPosition.x < Middle.transform.localPosition.x - 0.1f) || ((double)GearGeo.transform.localPosition.x > (double)Middle.transform.localPosition.x + 0.1 && GearGeo.transform.localPosition.x < Right.transform.localPosition.x - 0.1f)) { GearGeo.transform.localPosition = new Vector3(Mathf.Clamp(GearGeo.transform.localPosition.x, Left.transform.localPosition.x, Right.transform.localPosition.x), 0f, Mathf.Clamp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 0.1f, Middle.transform.localPosition.z + 0.1f)); } Vector3 velocity = CarRig.velocity; curVel = ((Vector3)(ref velocity)).magnitude; currentRPM = Mathf.Clamp(currentRPM, 0f, MaxRPM); if (!isclutchstepped && shifted) { HandBrakeOff.Play(); shifted = false; } AxisLookAtXZ(shiftGeo.transform, GearGeo.transform.position, Vector3.forward); if (shiftPressed) { if (GearGeo.transform.localPosition.z > Middle.transform.localPosition.z + 0.1f || GearGeo.transform.localPosition.z < Middle.transform.localPosition.z - 0.1f) { GearGeo.transform.localPosition = new Vector3(GearGeo.transform.localPosition.x, 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, HandRef.transform.localPosition.z, Time.deltaTime * 15f)); } if (GearGeo.transform.localPosition.z >= Middle.transform.localPosition.z - 0.1f && GearGeo.transform.localPosition.z <= Middle.transform.localPosition.z + 0.1f) { GearGeo.transform.localPosition = new Vector3(Mathf.Lerp(GearGeo.transform.localPosition.x, HandRef.transform.localPosition.x, Time.deltaTime * 7.5f), 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, HandRef.transform.localPosition.z, Time.deltaTime * 15f)); } GearGeo.transform.localPosition = new Vector3(GearGeo.transform.localPosition.x, 0f, GearGeo.transform.localPosition.z); } if (GearGeo.transform.localPosition.x >= Right.transform.localPosition.x - 0.1f && GearGeo.transform.localPosition.z > Middle.transform.localPosition.z + 0.5f) { if (!shiftPressed) { GearGeo.transform.localPosition = new Vector3(Mathf.Lerp(GearGeo.transform.localPosition.x, Right.transform.localPosition.x, Time.deltaTime * 10f), 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z + 1f, Time.deltaTime * 10f)); } if (!shifted && isclutchstepped && ShiftCD <= 0f) { HandBrakeOff.Play(); ShiftCD = 0.5f; Debug.Log((object)"Shifted"); shifted = true; } if (curGear != 0) { ShiftGear.Play(); PrevGear = curGear; } curGear = 0; } if (GearGeo.transform.localPosition.x <= Left.transform.localPosition.x + 0.1f) { if (GearGeo.transform.localPosition.z > Middle.transform.localPosition.z + 0.5f) { if (!shiftPressed) { GearGeo.transform.localPosition = new Vector3(Mathf.Lerp(GearGeo.transform.localPosition.x, Left.transform.localPosition.x, Time.deltaTime * 10f), 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z + 1f, Time.deltaTime * 10f)); } if (!shifted && isclutchstepped && ShiftCD <= 0f) { HandBrakeOff.Play(); ShiftCD = 0.5f; Debug.Log((object)"Shifted"); shifted = true; } if (curGear != 2) { ShiftGear.Play(); PrevGear = curGear; } curGear = 2; } if (GearGeo.transform.localPosition.z < Middle.transform.localPosition.z - 0.5f) { if (!shiftPressed) { GearGeo.transform.localPosition = new Vector3(Mathf.Lerp(GearGeo.transform.localPosition.x, Left.transform.localPosition.x, Time.deltaTime * 10f), 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 1f, Time.deltaTime * 10f)); } if (!shifted && isclutchstepped && ShiftCD <= 0f) { HandBrakeOff.Play(); ShiftCD = 0.5f; Debug.Log((object)"Shifted"); shifted = true; } if (curGear != 3) { ShiftGear.Play(); PrevGear = curGear; } curGear = 3; } } if (GearGeo.transform.localPosition.x <= Middle.transform.localPosition.x + 0.1f && GearGeo.transform.localPosition.x >= Middle.transform.localPosition.x - 0.1f) { if (GearGeo.transform.localPosition.z > Middle.transform.localPosition.z + 0.5f) { if (!shiftPressed) { GearGeo.transform.localPosition = new Vector3(Mathf.Lerp(GearGeo.transform.localPosition.x, Middle.transform.localPosition.x, Time.deltaTime * 10f), 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z + 1f, Time.deltaTime * 10f)); } if (!shifted && isclutchstepped && ShiftCD <= 0f) { HandBrakeOff.Play(); ShiftCD = 0.5f; Debug.Log((object)"Shifted"); shifted = true; } if (curGear != 4) { ShiftGear.Play(); PrevGear = curGear; } curGear = 4; } if (GearGeo.transform.localPosition.z < Middle.transform.localPosition.z - 0.5f) { if (!shiftPressed) { GearGeo.transform.localPosition = new Vector3(Mathf.Lerp(GearGeo.transform.localPosition.x, Middle.transform.localPosition.x, Time.deltaTime * 10f), 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 1f, Time.deltaTime * 10f)); } if (!shifted && isclutchstepped && ShiftCD <= 0f) { HandBrakeOff.Play(); ShiftCD = 0.5f; Debug.Log((object)"Shifted"); shifted = true; } if (curGear != 5) { ShiftGear.Play(); PrevGear = curGear; } curGear = 5; } } if (GearGeo.transform.localPosition.z <= Middle.transform.localPosition.z + 0.5f && GearGeo.transform.localPosition.z >= Middle.transform.localPosition.z - 0.5f) { if (!shiftPressed) { curGear = 1; PrevGear = 1; GearGeo.transform.localPosition = new Vector3(Mathf.Lerp(GearGeo.transform.localPosition.x, Middle.transform.localPosition.x, Time.deltaTime * 10f), 0f, Mathf.Lerp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z, Time.deltaTime * 10f)); } if (!shifted && isclutchstepped && ShiftCD <= 0f) { HandBrakeOff.Play(); ShiftCD = 0.5f; Debug.Log((object)"Shifted"); shifted = true; } } if (Mathf.Abs(GearGeo.transform.localPosition.z - Middle.transform.localPosition.z) <= 0.1f) { GearGeo.transform.localPosition = new Vector3(Mathf.Clamp(GearGeo.transform.localPosition.x, Left.transform.localPosition.x, Right.transform.localPosition.x), 0f, GearGeo.transform.localPosition.z); } if (Mathf.Abs(GearGeo.transform.localPosition.z - Middle.transform.localPosition.z) > 0.1f) { if (GearGeo.transform.localPosition.x <= Left.transform.localPosition.x + 0.1f) { GearGeo.transform.localPosition = new Vector3(Mathf.Clamp(GearGeo.transform.localPosition.x, Left.transform.localPosition.x, Left.transform.localPosition.x + 0.075f), 0f, GearGeo.transform.localPosition.z); } if (GearGeo.transform.localPosition.x >= Right.transform.localPosition.x - 0.1f) { GearGeo.transform.localPosition = new Vector3(Mathf.Clamp(GearGeo.transform.localPosition.x, Right.transform.localPosition.x - 0.075f, Right.transform.localPosition.x), 0f, Mathf.Clamp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 0.1f, Middle.transform.localPosition.z + 1f)); } if (GearGeo.transform.localPosition.x >= Middle.transform.localPosition.x - 0.1f && GearGeo.transform.localPosition.x <= Middle.transform.localPosition.x + 0.1f) { GearGeo.transform.localPosition = new Vector3(Mathf.Clamp(GearGeo.transform.localPosition.x, Middle.transform.localPosition.x - 0.075f, Middle.transform.localPosition.x + 0.075f), 0f, GearGeo.transform.localPosition.z); } } if ((double)Mathf.Abs(GearGeo.transform.localPosition.x - Middle.transform.localPosition.x) <= 0.1 || Mathf.Abs(GearGeo.transform.localPosition.x - Right.transform.localPosition.x) <= 0.1f || Mathf.Abs(GearGeo.transform.localPosition.x - Left.transform.localPosition.x) <= 0.1f) { if (isclutchstepped) { Gear1Failed.SetActive(false); Gear2Failed.SetActive(false); Gear3Failed.SetActive(false); Gear4Failed.SetActive(false); GearRFailed.SetActive(false); GearGeo.transform.localPosition = new Vector3(GearGeo.transform.localPosition.x, 0f, Mathf.Clamp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 1f, Middle.transform.localPosition.z + 1f)); } if (!isclutchstepped) { if (!shiftPressed) { Gear1Failed.SetActive(false); Gear2Failed.SetActive(false); Gear3Failed.SetActive(false); Gear4Failed.SetActive(false); GearRFailed.SetActive(false); } if (shiftPressed) { if (GearGeo.transform.localPosition.z <= Middle.transform.localPosition.z + 0.075f || GearGeo.transform.localPosition.z >= Middle.transform.localPosition.z - 0.075f) { Gear1Failed.SetActive(false); Gear2Failed.SetActive(false); Gear4Failed.SetActive(false); Gear3Failed.SetActive(false); GearRFailed.SetActive(false); } if (GearGeo.transform.localPosition.z > Middle.transform.localPosition.z + 0.075f && GearGeo.transform.localPosition.z < Middle.transform.localPosition.z + 0.75f) { if (GearGeo.transform.localPosition.x < Left.transform.localPosition.x + 0.1f) { Gear1Failed.SetActive(true); } if (GearGeo.transform.localPosition.x >= Left.transform.localPosition.x + 0.1f) { Gear1Failed.SetActive(false); } if (GearGeo.transform.localPosition.x > Middle.transform.localPosition.x - 0.1f && GearGeo.transform.localPosition.x < Middle.transform.localPosition.x + 0.1f) { Gear3Failed.SetActive(true); } if (GearGeo.transform.localPosition.x < Middle.transform.localPosition.x - 0.1f || GearGeo.transform.localPosition.x > Middle.transform.localPosition.x + 0.1f) { Gear3Failed.SetActive(false); } if (GearGeo.transform.localPosition.x > Right.transform.localPosition.x - 0.1f) { GearRFailed.SetActive(true); } if (GearGeo.transform.localPosition.x <= Right.transform.localPosition.x - 0.1f) { GearRFailed.SetActive(false); } } if (GearGeo.transform.localPosition.z < Middle.transform.localPosition.z - 0.075f && GearGeo.transform.localPosition.z > Middle.transform.localPosition.z - 0.75f) { if (GearGeo.transform.localPosition.x < Left.transform.localPosition.x + 0.1f) { Gear2Failed.SetActive(true); } if (GearGeo.transform.localPosition.x >= Left.transform.localPosition.x + 0.1f) { Gear2Failed.SetActive(false); } if (GearGeo.transform.localPosition.x > Middle.transform.localPosition.x - 0.1f && GearGeo.transform.localPosition.x < Middle.transform.localPosition.x + 0.1f) { Gear4Failed.SetActive(true); } if (GearGeo.transform.localPosition.x < Middle.transform.localPosition.x - 0.1f || GearGeo.transform.localPosition.x > Middle.transform.localPosition.x + 0.1f) { Gear4Failed.SetActive(false); } } if (GearGeo.transform.localPosition.z < Middle.transform.localPosition.z + 0.75f && GearGeo.transform.localPosition.z > Middle.transform.localPosition.z - 0.75f) { GearGeo.transform.localPosition = new Vector3(GearGeo.transform.localPosition.x, 0f, Mathf.Clamp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 0.1f, Middle.transform.localPosition.z + 0.1f)); } if (GearGeo.transform.localPosition.z >= Middle.transform.localPosition.z + 0.75f || GearGeo.transform.localPosition.z <= Middle.transform.localPosition.z - 0.75f) { GearGeo.transform.localPosition = new Vector3(GearGeo.transform.localPosition.x, 0f, Mathf.Clamp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 1f, Middle.transform.localPosition.z + 1f)); } } } } else { Gear1Failed.SetActive(false); Gear2Failed.SetActive(false); Gear3Failed.SetActive(false); Gear4Failed.SetActive(false); GearRFailed.SetActive(false); } if ((GearGeo.transform.localPosition.x > Left.transform.localPosition.x + 0.1f && GearGeo.transform.localPosition.x < Middle.transform.localPosition.x - 0.1f) || (GearGeo.transform.localPosition.x > Middle.transform.localPosition.x + 0.1f && GearGeo.transform.localPosition.x < Right.transform.localPosition.x - 0.1f)) { GearGeo.transform.localPosition = new Vector3(GearGeo.transform.localPosition.x, 0f, Mathf.Clamp(GearGeo.transform.localPosition.z, Middle.transform.localPosition.z - 0.1f, Middle.transform.localPosition.z + 0.1f)); } rotLF = Mathf.Repeat(rotLF + Time.deltaTime * WheelColLF.rpm * 360f / 60f, 360f); rotLF2 = Mathf.Lerp(rotLF2, WheelColLF.steerAngle, 0.1f); WheelGeoLF.transform.localRotation = Quaternion.Euler(rotLF, rotLF2, 0f); rotRF = Mathf.Repeat(rotRF + Time.deltaTime * WheelColRF.rpm * 360f / 60f, 360f); rotRF2 = Mathf.Lerp(rotRF2, WheelColRF.steerAngle, 0.1f); WheelGeoRF.transform.localRotation = Quaternion.Euler(rotRF, rotRF2, 0f); rotLR = Mathf.Repeat(rotLR + Time.deltaTime * WheelColLR.rpm * 360f / 60f, 360f); WheelGeoLR.transform.localRotation = Quaternion.Euler(rotLR, 0f, 0f); rotRR = Mathf.Repeat(rotRR + Time.deltaTime * WheelColRR.rpm * 360f / 60f, 360f); WheelGeoRR.transform.localRotation = Quaternion.Euler(rotRR, 0f, 0f); WheelColLF.GetWorldPose(ref WLFPos, ref WLFRot); WheelColRF.GetWorldPose(ref WRFPos, ref WRFRot); WheelColRR.GetWorldPose(ref WRRPos, ref WRRRot); WheelColLR.GetWorldPose(ref WLRPos, ref WLRRot); WheelGeoLF.transform.position = WLFPos; WheelGeoLR.transform.position = WLRPos; WheelGeoRF.transform.position = WRFPos; WheelGeoRR.transform.position = WRRPos; WheelColLF.steerAngle = curSteer; WheelColRF.steerAngle = curSteer; if (ShiftCD > 0f) { ShiftCD -= Time.deltaTime; } else if (ShiftCD < 0f) { ShiftCD = 0f; } if (isHandBrakeOn) { WheelColLR.brakeTorque = BrakeForce * BrakeInput + HandBrakeForce; WheelColRR.brakeTorque = BrakeForce * BrakeInput + HandBrakeForce; if ((Object)(object)((FVRInteractiveObject)SteeringwheelInt).m_hand != (Object)null) { if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TouchpadAxes.y < -0.5f) { BrakeInput = Mathf.MoveTowards(BrakeInput, 1f, Time.deltaTime * 5f); if (isEngineOn) { BrakeLight.SetActive(true); } else if (!isEngineOn && curGear != 1) { BrakeLight.SetActive(false); } } if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TouchpadAxes.y >= -0.5f) { BrakeInput = Mathf.MoveTowards(BrakeInput, 0f, Time.deltaTime * 5f); WheelColLR.brakeTorque = HandBrakeForce; WheelColRR.brakeTorque = HandBrakeForce; BrakeLight.SetActive(false); } } else if ((Object)(object)((FVRInteractiveObject)SteeringwheelInt).m_hand == (Object)null) { BrakeInput = Mathf.MoveTowards(BrakeInput, 0f, Time.deltaTime * 5f); WheelColLR.brakeTorque = HandBrakeForce; WheelColRR.brakeTorque = HandBrakeForce; BrakeLight.SetActive(false); } WheelColLR.motorTorque = 0f; WheelColRR.motorTorque = 0f; } else if (!isHandBrakeOn) { WheelColLR.brakeTorque = BrakeForce * BrakeInput; WheelColRR.brakeTorque = BrakeForce * BrakeInput; if ((Object)(object)((FVRInteractiveObject)SteeringwheelInt).m_hand != (Object)null) { if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TouchpadAxes.y < -0.5f) { BrakeInput = Mathf.MoveTowards(BrakeInput, 1f, Time.deltaTime * 5f); BrakeLight.SetActive(true); if (isEngineOn) { BrakeLight.SetActive(true); } else if (!isEngineOn && curGear != 1) { BrakeLight.SetActive(false); } } else if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TouchpadAxes.y > -0.5f) { BrakeInput = Mathf.MoveTowards(BrakeInput, 0f, Time.deltaTime * 5f); BrakeLight.SetActive(false); } } else if ((Object)(object)((FVRInteractiveObject)SteeringwheelInt).m_hand == (Object)null) { BrakeInput = Mathf.MoveTowards(BrakeInput, 0f, Time.deltaTime * 5f); BrakeLight.SetActive(false); } } if (altPressed) { clutchInput = Mathf.MoveTowards(clutchInput, 0f, Time.deltaTime * 5f); } else { clutchInput = Mathf.MoveTowards(clutchInput, 1f, Time.deltaTime * 5f); } if (clutchInput < 0.5f && !isclutchstepped) { isclutchstepped = true; } if (clutchInput > 0.75f && isclutchstepped) { isclutchstepped = false; } if (isEngineOn) { Vector3 velocity2 = CarRig.velocity; if (((Vector3)(ref velocity2)).magnitude > maxspeed) { Vector3 velocity3 = CarRig.velocity; float magnitude = ((Vector3)(ref velocity3)).magnitude; magnitude = Mathf.Lerp(magnitude, maxspeed, Time.deltaTime); CarRig.velocity = Vector3.ClampMagnitude(CarRig.velocity, magnitude); } float num = gearRatios[curGear]; float num2 = torqueCurve.Evaluate(currentRPM); float num3 = throttleInput * num2; Vector3 velocity4 = CarRig.velocity; if (((Vector3)(ref velocity4)).magnitude < maxspeed) { if (curGear != 1) { wheelTorque = num3 / (finalDriveRatio * num) * currentRPM; } else if (curGear == 1) { wheelTorque = 0f; } } Vector3 velocity5 = CarRig.velocity; if (((Vector3)(ref velocity5)).magnitude >= maxspeed) { wheelTorque = 0f; } if (!isclutchstepped) { WheelColLR.motorTorque = wheelTorque / 2f; WheelColRR.motorTorque = wheelTorque / 2f; } if (isclutchstepped) { torque = 0f; } else if (!isclutchstepped) { if (PrevGear == 0) { if (curGear == 1) { RPMRef *= 0.8f; torque += 600f; AudioSource engineIdle = EngineIdle; engineIdle.pitch *= 0.8f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 2) { RPMRef *= 0.85f; torque += 550f; AudioSource engineIdle2 = EngineIdle; engineIdle2.pitch *= 0.85f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 3) { RPMRef *= 0.65f; torque += 1500f; AudioSource engineIdle3 = EngineIdle; engineIdle3.pitch *= 0.65f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 4) { RPMRef *= 0.46f; torque += 3500f; AudioSource engineIdle4 = EngineIdle; engineIdle4.pitch *= 0.46f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 5) { RPMRef *= 0.2f; torque += 5500f; AudioSource engineIdle5 = EngineIdle; engineIdle5.pitch *= 0.2f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } } if (PrevGear == 2) { if (curGear == 0) { RPMRef *= 1.08f; torque -= 100f; AudioSource engineIdle6 = EngineIdle; engineIdle6.pitch *= 1.08f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 1) { RPMRef *= 0.9f; torque += 500f; AudioSource engineIdle7 = EngineIdle; engineIdle7.pitch *= 0.9f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 3) { RPMRef *= 0.6f; torque += 1600f; AudioSource engineIdle8 = EngineIdle; engineIdle8.pitch *= 0.6f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 4) { RPMRef *= 0.4f; torque += 4000f; AudioSource engineIdle9 = EngineIdle; engineIdle9.pitch *= 0.4f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 5) { RPMRef *= 0.18f; torque += 6000f; AudioSource engineIdle10 = EngineIdle; engineIdle10.pitch *= 0.18f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } } if (PrevGear == 3) { if (curGear == 0) { RPMRef *= 1.28f; torque -= 1500f; AudioSource engineIdle11 = EngineIdle; engineIdle11.pitch *= 1.28f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 1) { RPMRef *= 1.19f; torque -= 450f; AudioSource engineIdle12 = EngineIdle; engineIdle12.pitch *= 1.19f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 2) { RPMRef *= 1.05f; torque -= 200f; AudioSource engineIdle13 = EngineIdle; engineIdle13.pitch *= 1.05f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 4) { RPMRef *= 0.75f; torque += 2000f; AudioSource engineIdle14 = EngineIdle; engineIdle14.pitch *= 0.75f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 5) { RPMRef *= 0.58f; torque += 4000f; AudioSource engineIdle15 = EngineIdle; engineIdle15.pitch *= 0.58f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } } if (PrevGear == 4) { if (curGear == 0) { RPMRef *= 1.38f; torque -= 3500f; AudioSource engineIdle16 = EngineIdle; engineIdle16.pitch *= 1.38f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 1) { RPMRef *= 1.29f; torque -= 2550f; AudioSource engineIdle17 = EngineIdle; engineIdle17.pitch *= 1.29f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 2) { RPMRef *= 1.15f; torque -= 1550f; AudioSource engineIdle18 = EngineIdle; engineIdle18.pitch *= 1.15f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 3) { RPMRef *= 1.05f; torque -= 2000f; AudioSource engineIdle19 = EngineIdle; engineIdle19.pitch *= 1.05f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 5) { RPMRef *= 0.68f; torque += 1500f; AudioSource engineIdle20 = EngineIdle; engineIdle20.pitch *= 0.68f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } } if (PrevGear == 5) { if (curGear == 0) { RPMRef *= 1.48f; torque -= 4500f; AudioSource engineIdle21 = EngineIdle; engineIdle21.pitch *= 1.48f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 1) { RPMRef *= 1.39f; torque -= 3550f; AudioSource engineIdle22 = EngineIdle; engineIdle22.pitch *= 1.39f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 2) { RPMRef *= 1.25f; torque -= 2550f; AudioSource engineIdle23 = EngineIdle; engineIdle23.pitch *= 1.25f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 3) { RPMRef *= 1.17f; torque -= 2000f; AudioSource engineIdle24 = EngineIdle; engineIdle24.pitch *= 1.17f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } if (curGear == 4) { RPMRef *= 1.07f; torque -= 1500f; AudioSource engineIdle25 = EngineIdle; engineIdle25.pitch *= 1.07f; Debug.Log((object)"RPMHIGH"); PrevGear = -1; } } if (PrevGear == 1) { if (curGear == 0) { RPMRef *= 0.8f; torque += 2550f; AudioSource engineIdle26 = EngineIdle; engineIdle26.pitch *= 0.8f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 2) { RPMRef *= 0.9f; torque += 2500f; AudioSource engineIdle27 = EngineIdle; engineIdle27.pitch *= 0.9f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 3) { RPMRef *= 0.6f; torque += 5600f; AudioSource engineIdle28 = EngineIdle; engineIdle28.pitch *= 0.6f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 4) { RPMRef *= 0.4f; torque += 8000f; AudioSource engineIdle29 = EngineIdle; engineIdle29.pitch *= 0.4f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } if (curGear == 5) { RPMRef *= 0.18f; torque += 16000f; AudioSource engineIdle30 = EngineIdle; engineIdle30.pitch *= 0.18f; Debug.Log((object)"RPMLOW"); PrevGear = -1; } } torque = wheelTorque; } float num4 = (WheelColLR.rpm + WheelColRR.rpm) / 2f; if (((curVel <= 4f && currentRPM < 5500f && torque > 400f && curGear == 5 && !isclutchstepped) || (curVel <= 2f && currentRPM < 4500f && torque > 250f && curGear == 4 && !isclutchstepped) || (curVel <= 1.5f && currentRPM < 2500f && torque > 500f && curGear == 3 && !isclutchstepped) || (curVel <= 0.25f && currentRPM < 1500f && torque > 150f && curGear == 2 && !isclutchstepped) || (curVel <= 0.25f && currentRPM < 1500f && torque < -150f && curGear == 0 && !isclutchstepped)) && isEngineOn) { RPMRef = 0f; ShiftCD = 0.5f; currentRPM = 0f; torque = 0f; WheelColLR.motorTorque = 0f; WheelColRR.motorTorque = 0f; isEngineOn = false; EngineIdle.Stop(); EngineOff.Play(); CarRig.AddRelativeForce(Vector3.up * upforce, (ForceMode)1); CarRig.AddRelativeTorque(Vector3.right * rotforce, (ForceMode)1); Debug.Log((object)"Engine stalled!"); } RPMRef = Mathf.SmoothDamp(RPMRef, MaxRPM, ref RPMRefref, 1.25f); if (curGear != 1) { currentRPM = Mathf.SmoothDamp(currentRPM, Mathf.Lerp(500f, 400f + (0.5f + curVel / MaxVel) * (RPMRef - 450f), throttleInput), ref curRPMRef, 0.1f / (1.1f - curVel / MaxVel)); } else if (curGear == 1) { currentRPM = Mathf.SmoothDamp(currentRPM, Mathf.Lerp(900f, RPMRef, throttleInput), ref curRPMRef, 0.25f); } LightTotal.SetActive(true); EngineIdle.pitch = Mathf.Lerp(EngineIdle.pitch, 0.75f + 0.5f * currentRPM / MaxRPM, Time.deltaTime); if ((Object)(object)((FVRInteractiveObject)SteeringwheelInt).m_hand == (Object)null) { Vector3 velocity6 = CarRig.velocity; if (((Vector3)(ref velocity6)).magnitude < maxspeed) { throttleInput = Mathf.MoveTowards(throttleInput, 0.05f, Time.deltaTime); } Vector3 velocity7 = CarRig.velocity; if (((Vector3)(ref velocity7)).magnitude >= maxspeed) { throttleInput = Mathf.MoveTowards(throttleInput, 0.05f, Time.deltaTime * 50f); } } if ((Object)(object)((FVRInteractiveObject)SteeringwheelInt).m_hand != (Object)null) { if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TriggerFloat > 0.5f) { Vector3 velocity8 = CarRig.velocity; if (((Vector3)(ref velocity8)).magnitude < maxspeed && currentRPM < 0.99f * MaxRPM) { if (curGear == 1) { throttleInput = Mathf.MoveTowards(throttleInput, 1f, Time.deltaTime); } else if (curGear != 1) { throttleInput = Mathf.MoveTowards(throttleInput, 1f, Time.deltaTime / (float)Mathf.Abs(curGear - 1)); } } Vector3 velocity9 = CarRig.velocity; if (((Vector3)(ref velocity9)).magnitude >= maxspeed || currentRPM >= 0.99f * MaxRPM) { throttleInput = Mathf.MoveTowards(throttleInput, 0.05f, Time.deltaTime * 50f); } } if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TriggerFloat <= 0.5f) { Vector3 velocity10 = CarRig.velocity; if (((Vector3)(ref velocity10)).magnitude < maxspeed) { if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TouchpadAxes.y < -0.5f) { throttleInput = Mathf.MoveTowards(throttleInput, 0.05f, Time.deltaTime); } else if (((FVRInteractiveObject)SteeringwheelInt).m_hand.Input.TouchpadAxes.y >= -0.5f) { if (curGear == 1) { throttleInput = Mathf.MoveTowards(throttleInput, 0.05f, Time.deltaTime * 5f); } else if (curGear != 1) { throttleInput = Mathf.MoveTowards(throttleInput, 0.05f, Time.deltaTime * 5f); } } } Vector3 velocity11 = CarRig.velocity; if (((Vector3)(ref velocity11)).magnitude >= maxspeed) { throttleInput = Mathf.MoveTowards(throttleInput, 0.05f, Time.deltaTime * 50f); } } } if (curGear == 0) { ReverseLight.SetActive(true); } if (curGear == 1) { ReverseLight.SetActive(false); } if (curGear == 2) { ReverseLight.SetActive(false); } if (curGear == 3) { ReverseLight.SetActive(false); } if (curGear == 4) { ReverseLight.SetActive(false); } if (curGear == 5) { ReverseLight.SetActive(false); } } else if (!isEngineOn) { Vector3 velocity12 = CarRig.velocity; if (((Vector3)(ref velocity12)).magnitude > 1f) { WheelColLR.brakeTorque = 500000f; WheelColRR.brakeTorque = 500000f; } WheelColLR.motorTorque = 0f; WheelColRR.motorTorque = 0f; curRPMRef = 0f; wheelTorque = 0f; PrevGear = -1; EngineIdle.pitch = 0f; RPMRef = 0f; throttleInput = 0f; currentRPM = 0f; torque = 0f; ReverseLight.SetActive(false); LightTotal.SetActive(false); if (IsIgniting && curGear == 1 && !EngineIdle.isPlaying && !EngineOn.isPlaying && !isIgnited) { isIgnited = true; EngineOn.Play(); } if ((!IsIgniting || curGear != 1) && !EngineIdle.isPlaying && EngineOn.isPlaying) { isIgnited = false; EngineOn.Stop(); } if (isIgnited && !EngineIdle.isPlaying && !EngineOn.isPlaying) { isEngineOn = true; EngineIdle.Play(); isIgnited = false; } } SteeringWheelGeo.transform.localEulerAngles = new Vector3(0f, 0f, SteeringwheelInt.CurSteer * -510f); if ((Object)(object)((FVRInteractiveObject)SteeringwheelInt).m_hand != (Object)null) { curSteer = MaxSteer * SteeringwheelInt.CurSteer; } if (curSteer < 0f - MaxSteer) { curSteer = 0f - MaxSteer; } else if (curSteer > MaxSteer) { curSteer = MaxSteer; } } } public class SWGrab : FVRInteractiveObject { public FVRInteractiveObject SW; public void Update() { if ((Object)(object)base.m_hand != (Object)null) { FVRViveHand hand = base.m_hand; ((FVRInteractiveObject)this).ForceBreakInteraction(); hand.ForceSetInteractable(SW); SW.BeginInteraction(hand); } } } public class SpeedAndRPM : MonoBehaviour { [Header("Vehicle Reference")] public VehicleControl vehicle; [Header("RPM Digits (Text)")] public Text rpmThousands; public Text rpmHundreds; public Text rpmTens; public Text rpmOnes; [Header("Speed Needle (Transform)")] public Transform speedNeedle; public float minX = 0f; public float maxX = 180f; public float minSpeed = 0f; public float maxSpeed = 180f; private void Update() { //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_015f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)vehicle == (Object)null)) { int num = Mathf.RoundToInt(vehicle.motorRPM); num = Mathf.Clamp(num, 0, 9999); int num2 = num / 1000; int num3 = num % 1000 / 100; int num4 = num % 100 / 10; int num5 = num % 10; if ((Object)(object)rpmThousands != (Object)null) { rpmThousands.text = num2.ToString(); } if ((Object)(object)rpmHundreds != (Object)null) { rpmHundreds.text = num3.ToString(); } if ((Object)(object)rpmTens != (Object)null) { rpmTens.text = num4.ToString(); } if ((Object)(object)rpmOnes != (Object)null) { rpmOnes.text = num5.ToString(); } if ((Object)(object)speedNeedle != (Object)null) { float speed = vehicle.speed; float num6 = Mathf.InverseLerp(minSpeed, maxSpeed, speed); float x = Mathf.Lerp(minX, maxX, num6); Vector3 localPosition = speedNeedle.localPosition; localPosition.x = x; speedNeedle.localPosition = localPosition; } } } } public class FireRope : MonoBehaviour { public ClosedBoltWeapon gun; public GameObject trigger; public FVRFireArmChamber chamber; public GameObject MuzzleFlash; public Transform muzzle; public bool fired = false; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_006e: 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) if (trigger.transform.localPosition.z >= 0.1f) { if (chamber.IsFull && !chamber.IsSpent) { gun.Fire(); if (!fired) { Object.Instantiate(MuzzleFlash, ((Component)muzzle).transform.position, ((Component)muzzle).transform.rotation); fired = true; } } } else if (trigger.transform.localPosition.z < 0.1f) { fired = false; } } } public class HMDScope : MonoBehaviour { public FVRFireArmAttachment main; public GameObject HMDpiece; public GameObject HMD; public GameObject Screen; public GameObject Cam; private void Start() { } private void FixedUpdate() { //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_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) if ((Object)(object)main.curMount != (Object)null) { HMDpiece.SetActive(true); } else if ((Object)(object)main.curMount == (Object)null) { HMDpiece.SetActive(false); } if (HMD.transform.localEulerAngles.z > 45f) { Screen.SetActive(true); Cam.SetActive(true); } else if (HMD.transform.localEulerAngles.z < 45f) { Screen.SetActive(false); Cam.SetActive(false); } } } public class LookWithMuzzle : MonoBehaviour { public GameObject camerarot; public FVRFireArmAttachment att; private void FixedUpdate() { //IL_0032: 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_00fe: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)att.curMount == (Object)null) { camerarot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else if ((Object)(object)att.curMount != (Object)null) { if ((Object)(object)((Component)att.curMount.MyObject).gameObject.GetComponent() != (Object)null) { camerarot.transform.eulerAngles = ((Component)((Component)att.curMount.MyObject).gameObject.GetComponent().MuzzlePos).transform.eulerAngles; } else if ((Object)(object)((Component)att.curMount.MyObject).gameObject.GetComponent() == (Object)null) { camerarot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } } public class SlideScope : MonoBehaviour { public GameObject SlideRot; public Camera Cam1; private RenderTexture rt1; private Material mt1; public MeshRenderer mr1; public Shader sd; 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) Cam1.fieldOfView = SlideRot.transform.localEulerAngles.x; } } public class nvandthr : MonoBehaviour { public PIPScope scope; public AR15HandleSightFlipper nv; public AR15HandleSightFlipper thr; public GameObject power; public AudioEvent click; private void Start() { } 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_00c5: 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_006c: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) if (power.gameObject.transform.localEulerAngles.z > 15f) { scope.enableThermal = false; scope.enableNightvision = false; if (!nv.m_isLargeAperture) { nv.m_isLargeAperture = true; SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).transform.position); } if (!thr.m_isLargeAperture) { thr.m_isLargeAperture = true; SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).transform.position); } } else if (power.gameObject.transform.localEulerAngles.z < 15f) { if (!nv.m_isLargeAperture) { nv.m_isLargeAperture = true; scope.enableNightvision = true; scope.enableThermal = false; SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).transform.position); } if (!thr.m_isLargeAperture) { thr.m_isLargeAperture = true; scope.enableNightvision = false; scope.enableThermal = true; SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).transform.position); } } } } public class AircraftSeat : FVRInteractiveObject { public static Dictionary currentSeat = new Dictionary(); public FVRViveHand hand; public GameObject SitPos; public GameObject EjectPos; public Transform _setPos; private FVRMovementManager _playerMovement; public bool isplayerrotated = false; public Collider VS; public bool is_inseat = false; public GravityMode gravitymode = (GravityMode)3; public Transform parent; public override void SimpleInteraction(FVRViveHand hand) { //IL_003a: 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_004f: 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_00d4: Invalid comparison between Unknown and I4 //IL_009a: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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) ((FVRInteractiveObject)this).SimpleInteraction(hand); if (hand.IsThisTheRightHand) { hand = hand.OtherHand; } if ((Object)(object)this.hand == (Object)null) { gravitymode = GM.Options.SimulationOptions.PlayerGravityMode; GM.Options.SimulationOptions.PlayerGravityMode = (GravityMode)3; if (currentSeat.ContainsKey(hand)) { currentSeat[hand].RemoveHand(); } currentSeat.Add(hand, this); this.hand = hand; hand.MovementManager.TeleportToPoint(SitPos.transform.position, false, SitPos.transform.localEulerAngles); } else if ((Object)(object)hand == (Object)(object)this.hand) { if ((int)gravitymode != 3) { GM.Options.SimulationOptions.PlayerGravityMode = gravitymode; } gravitymode = (GravityMode)3; RemoveHand(); is_inseat = false; if ((Object)(object)EjectPos != (Object)null) { ((Component)hand.MovementManager).transform.position = EjectPos.transform.position; } } } public void Awake() { _playerMovement = Object.FindObjectOfType(); } public void Update() { //IL_005a: 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_00a2: 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_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_0107: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) if (is_inseat) { VS.enabled = true; } else if (!is_inseat) { VS.enabled = false; } if ((Object)(object)hand != (Object)null) { if (Vector3.Distance(((Component)hand.MovementManager).transform.position, ((Component)this).transform.position) > 25f) { is_inseat = false; RemoveHand(); } ((Component)GM.CurrentPlayerBody).gameObject.transform.position = SitPos.transform.position; ((Component)hand.MovementManager).transform.position = SitPos.transform.position; Vector3 eulerAngles = ((Component)hand.MovementManager).transform.eulerAngles; ((Component)hand.MovementManager).transform.eulerAngles = Vector3.Lerp(((Component)hand.MovementManager).transform.eulerAngles, eulerAngles, 0.2f * Time.deltaTime); PlayerForwardFollowSet(); isplayerrotated = true; if (GM.CurrentPlayerBody.GetPlayerHealth() <= 0f) { is_inseat = false; RemoveHand(); } if (((Component)hand.MovementManager).transform.position.y < GM.CurrentSceneSettings.CatchHeight) { is_inseat = false; RemoveHand(); } } } public void PlayerForwardFollowSet() { //IL_001e: 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_0038: Unknown result type (might be due to invalid IL or missing references) is_inseat = true; ((Component)_playerMovement).transform.rotation = Quaternion.RotateTowards(((Component)_playerMovement).transform.rotation, ((Component)_setPos).transform.rotation, 5f); } public void RemoveHand() { //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_0069: Unknown result type (might be due to invalid IL or missing references) if (currentSeat.ContainsKey(hand)) { currentSeat.Remove(hand); } hand = null; if (isplayerrotated) { ((Component)_playerMovement).transform.eulerAngles = new Vector3(0f, ((Component)_playerMovement).transform.eulerAngles.y, 0f); isplayerrotated = false; } } public void OnDestroy() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0026: 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_0052: 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_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) if ((int)gravitymode != 3) { GM.Options.SimulationOptions.PlayerGravityMode = gravitymode; } gravitymode = (GravityMode)3; is_inseat = false; ((Component)_playerMovement).transform.eulerAngles = new Vector3(0f, ((Component)_playerMovement).transform.eulerAngles.y, 0f); } } public class CarSteer : FVRPhysicalObject { public VehicleControl vehicle; public VehicleAudioSet audioSet; public GameObject steerwheel; public float steerr; public Text rotText; public float rot; public float rh; public float lr; public float inlerp; public float lerp; public float rotAmt; public float resetLerpSpeed; public float maxRot; public bool reverseRot; public DriveShift driveshift; public override void BeginInteraction(FVRViveHand hand) { ((FVRPhysicalObject)this).BeginInteraction(hand); } public override void EndInteraction(FVRViveHand hand) { ((FVRPhysicalObject)this).EndInteraction(hand); } public override void UpdateInteraction(FVRViveHand hand) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) ((FVRPhysicalObject)this).UpdateInteraction(hand); rotAmt = steerwheel.transform.localEulerAngles.y; SetRot(); bool flag = false; if (hand.Input.TouchpadPressed && ((Vector2)(ref hand.Input.TouchpadAxes)).magnitude > 0.25f) { flag = true; } if (flag) { vehicle.accel = 0f - (float)Math.Pow(((Vector2)(ref hand.Input.TouchpadAxes)).magnitude, 2.0); vehicle.brake = true; } else if (driveshift.currentNode == 1) { vehicle.accel = (float)Math.Pow(hand.Input.TriggerFloat, 2.0); vehicle.brake = false; } else if (driveshift.currentNode == 0) { vehicle.accel = (float)Math.Pow(hand.Input.TriggerFloat, 0.5); vehicle.brake = false; } } private void FixedUpdate() { } private void SetRot() { //IL_002c: 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) if (rotAmt > 510f) { steerwheel.transform.localEulerAngles = new Vector3(0f, 510f, 0f); } if (rotAmt < -510f) { steerwheel.transform.localEulerAngles = new Vector3(0f, -510f, 0f); } bool flag = rotAmt <= 0f; lerp = Mathf.Abs(rotAmt) / maxRot; lerp *= -1f; if (flag) { lerp *= -1f; } if (reverseRot) { lerp = 0f - lerp; } vehicle.steer = lerp; } } 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 MGMount : MonoBehaviour { public ClosedBoltWeapon gun; public GameObject mgSpace; public GameObject mgX; public GameObject mgY; public GameObject mgObj; private float mgMoveX; private float mgMoveY; private GameObject player; public GameObject trigger; private void OnTriggerStay(Collider other) { //IL_0032: 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_004d: 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_006b: 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_013e: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)other).gameObject).name == "Rcol") { mgObj.transform.position = ((Component)other).gameObject.transform.position; mgMoveX = mgObj.transform.localPosition.x; mgMoveY = mgObj.transform.localPosition.y; if (mgMoveX > 1f) { mgMoveX = 1f; } if (mgMoveX < 0f) { mgMoveX = 0f; } if (mgMoveY > 1f) { mgMoveY = 1f; } if (mgMoveY < 0f) { mgMoveY = 0f; } mgX.transform.localEulerAngles = new Vector3(0f, (1f - mgMoveX) * 40f, 0f); mgY.transform.localEulerAngles = new Vector3(mgMoveY * 40f, 0f, 0f); } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Rcol") { ((Component)other).gameObject.transform.parent = player.transform; } } private void Start() { } private void Update() { //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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) player = GameObject.Find("[CameraRig]Fixed"); if ((Object)(object)player == (Object)null || trigger.transform.localEulerAngles.x < 2f || trigger.transform.localEulerAngles.x > 88f) { } if (trigger.transform.localEulerAngles.x > 2f && trigger.transform.localEulerAngles.x < 88f) { gun.Fire(); } } } } public class DemoScript : MonoBehaviour { private enum RotationAxes { MouseXAndY, MouseX, MouseY } public List Mirrors; public GameObject LightBulb; public Toggle RecursionToggle; private float rotationModifier = -1f; private float moveModifier = 1f; private Material lightBulbMaterial; private RotationAxes axes = RotationAxes.MouseXAndY; private float sensitivityX = 15f; private float sensitivityY = 15f; private float minimumX = -360f; private float maximumX = 360f; private float minimumY = -60f; private float maximumY = 60f; private float rotationX = 0f; private float rotationY = 0f; private Quaternion originalRotation; 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) originalRotation = ((Component)this).transform.localRotation; Renderer component = LightBulb.GetComponent(); if (Application.isPlaying) { component.sharedMaterial = component.material; } lightBulbMaterial = component.sharedMaterial; } private void Update() { RotateMirror(); MoveLightBulb(); UpdateMouseLook(); UpdateMovement(); } public void MirrorRecursionToggled() { ChangeMirrorRecursion(); } public void ChangeMirrorRecursion() { foreach (GameObject mirror in Mirrors) { MirrorScript component = mirror.GetComponent(); component.MirrorRecursion = RecursionToggle.isOn; } } private void UpdateMovement() { float num = 4f * Time.deltaTime; if (Input.GetKey((KeyCode)119)) { ((Component)this).transform.Translate(0f, 0f, num); } else if (Input.GetKey((KeyCode)115)) { ((Component)this).transform.Translate(0f, 0f, 0f - num); } if (Input.GetKey((KeyCode)97)) { ((Component)this).transform.Translate(0f - num, 0f, 0f); } else if (Input.GetKey((KeyCode)100)) { ((Component)this).transform.Translate(num, 0f, 0f); } if (Input.GetKeyDown((KeyCode)109)) { RecursionToggle.isOn = !RecursionToggle.isOn; } } private void RotateMirror() { //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_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) GameObject val = Mirrors[0]; Quaternion rotation = val.transform.rotation; float y = ((Quaternion)(ref rotation)).eulerAngles.y; if (y > 65f && y < 100f) { rotationModifier = 0f - rotationModifier; y -= 65f; val.transform.Rotate(0f, 0f - y, 0f); } else if (y > 100f && y < 295f) { rotationModifier = 0f - rotationModifier; y = 295f - y; val.transform.Rotate(0f, y, 0f); } else { val.transform.Rotate(0f, rotationModifier * Time.deltaTime * 20f, 0f); } } private void MoveLightBulb() { //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_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_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_00be: 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) float x = LightBulb.transform.position.x; if (x > 5f) { moveModifier = 0f - moveModifier; x = 5f; } else if (x < -5f) { moveModifier = 0f - moveModifier; x = -5f; } else { x += Time.deltaTime * moveModifier; } Light component = LightBulb.GetComponent(); LightBulb.transform.position = new Vector3(x, LightBulb.transform.position.y, LightBulb.transform.position.z); float num = Mathf.Min(1f, component.intensity); lightBulbMaterial.SetColor("_EmissionColor", new Color(num, num, num)); } private void UpdateMouseLook() { //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_0093: 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_00a9: 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_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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_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_0133: Unknown result type (might be due to invalid IL or missing references) if (axes == RotationAxes.MouseXAndY) { rotationX += Input.GetAxis("Mouse X") * sensitivityX; rotationY += Input.GetAxis("Mouse Y") * sensitivityY; rotationX = ClampAngle(rotationX, minimumX, maximumX); rotationY = ClampAngle(rotationY, minimumY, maximumY); Quaternion val = Quaternion.AngleAxis(rotationX, Vector3.up); Quaternion val2 = Quaternion.AngleAxis(rotationY, -Vector3.right); ((Component)this).transform.localRotation = originalRotation * val * val2; } else if (axes == RotationAxes.MouseX) { rotationX += Input.GetAxis("Mouse X") * sensitivityX; rotationX = ClampAngle(rotationX, minimumX, maximumX); Quaternion val3 = Quaternion.AngleAxis(rotationX, Vector3.up); ((Component)this).transform.localRotation = originalRotation * val3; } else { rotationY += Input.GetAxis("Mouse Y") * sensitivityY; rotationY = ClampAngle(rotationY, minimumY, maximumY); Quaternion val4 = Quaternion.AngleAxis(0f - rotationY, Vector3.right); ((Component)this).transform.localRotation = originalRotation * val4; } } public static float ClampAngle(float angle, float min, float max) { if (angle < -360f) { angle += 360f; } if (angle > 360f) { angle -= 360f; } return Mathf.Clamp(angle, min, max); } } public class MirrorCameraScript : MonoBehaviour { public GameObject MirrorObject; public bool VRMode; public bool FlipLookDirection = true; public bool UseMirrorUp = true; [Range(0.5f, 2f)] public float FOVScale = 1f; public Vector2 UVScale = Vector2.one; public Vector2 UVOffset = Vector2.zero; public float FOVMul = 2f; public bool UseStandardProjection = false; [Range(0.0001f, 0.5f)] public float NearPlaneOffset = 0.01f; public bool debug_ForceCullingMaskAll = false; private Renderer mirrorRenderer; private Material mirrorMaterial; private MirrorScript mirrorScript; private Camera cameraObject; private RenderTexture reflectionTexture; private int oldReflectionTextureSize; private static bool renderingMirror; private MaterialPropertyBlock propertyBlock; private void Start() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown mirrorScript = ((Component)this).GetComponentInParent(); cameraObject = ((Component)this).GetComponent(); cameraObject.stereoTargetEye = (StereoTargetEyeMask)0; if (mirrorScript.AddFlareLayer) { ((Component)cameraObject).gameObject.AddComponent(); } mirrorRenderer = MirrorObject.GetComponent(); if (Application.isPlaying) { Material[] sharedMaterials = mirrorRenderer.sharedMaterials; foreach (Material val in sharedMaterials) { if (((Object)val).name == "MirrorMaterial") { mirrorRenderer.sharedMaterial = val; break; } } } mirrorMaterial = mirrorRenderer.sharedMaterial; propertyBlock = new MaterialPropertyBlock(); CreateRenderTexture(); } private void CreateRenderTexture() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown if ((Object)(object)reflectionTexture == (Object)null || oldReflectionTextureSize != mirrorScript.TextureSize) { if (Object.op_Implicit((Object)(object)reflectionTexture)) { Object.DestroyImmediate((Object)(object)reflectionTexture); } reflectionTexture = new RenderTexture(mirrorScript.TextureSize, mirrorScript.TextureSize, 16); ((Texture)reflectionTexture).filterMode = (FilterMode)1; reflectionTexture.antiAliasing = 1; ((Object)reflectionTexture).name = "MirrorRenderTexture_" + ((Object)this).GetInstanceID(); ((Object)reflectionTexture).hideFlags = (HideFlags)61; ((Texture)reflectionTexture).wrapMode = (TextureWrapMode)1; mirrorMaterial.SetTexture("_MainTex", (Texture)(object)reflectionTexture); oldReflectionTextureSize = mirrorScript.TextureSize; } if ((Object)(object)cameraObject.targetTexture != (Object)(object)reflectionTexture) { cameraObject.targetTexture = reflectionTexture; } } private void Update() { //IL_005b: 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_00dc: Unknown result type (might be due to invalid IL or missing references) if (FOVScale > 1f) { FOVScale = 1f; } if (FOVScale < 0.01f) { FOVScale = 0.01f; } FOVScale = 1f / (FOVMul * Vector3.Distance(((Component)GM.CurrentMovementManager.Head).gameObject.transform.position, MirrorObject.transform.position)); CreateRenderTexture(); if ((Object)(object)mirrorRenderer != (Object)null) { mirrorRenderer.GetPropertyBlock(propertyBlock); propertyBlock.SetVector("_UVScaleOffset", new Vector4(UVScale.x, UVScale.y, UVOffset.x, UVOffset.y)); mirrorRenderer.SetPropertyBlock(propertyBlock); } } private void OnDrawGizmos() { //IL_0017: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_0080: 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) if (!((Object)(object)MirrorObject == (Object)null)) { Gizmos.color = Color.blue; Vector3 position = MirrorObject.transform.position; Vector3 val = ((!((Object)(object)mirrorScript != (Object)null) || !mirrorScript.NormalIsForward) ? MirrorObject.transform.up : MirrorObject.transform.forward); Gizmos.DrawRay(position, val * 0.5f); } } private void UpdateCameraProperties(Camera src, Camera dest) { //IL_0003: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) dest.clearFlags = src.clearFlags; dest.backgroundColor = src.backgroundColor; if ((int)src.clearFlags == 1) { Skybox component = ((Component)src).GetComponent(); Skybox component2 = ((Component)dest).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.material != (Object)null) { ((Behaviour)component2).enabled = true; component2.material = component.material; } else { ((Behaviour)component2).enabled = false; } } dest.orthographic = src.orthographic; dest.orthographicSize = src.orthographicSize; dest.aspect = src.aspect; dest.renderingPath = src.renderingPath; } internal void RenderMirror() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_0140: 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_014b: 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_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_0163: 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_0171: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_019b: 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_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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: 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_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021b: 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_0238: 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_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_029b: 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_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: 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_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: 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_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02da: 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_02de: Unknown result type (might be due to invalid IL or missing references) Camera current = Camera.current; if (renderingMirror || !((Behaviour)this).enabled || (Object)(object)current == (Object)null || (Object)(object)mirrorRenderer == (Object)null || (Object)(object)mirrorMaterial == (Object)null || !mirrorRenderer.enabled) { return; } if (VRMode) { if ((int)current.stereoActiveEye == 1) { return; } mirrorMaterial.EnableKeyword("MIRROR_RECURSION"); } else { mirrorMaterial.DisableKeyword("MIRROR_RECURSION"); } renderingMirror = true; int pixelLightCount = QualitySettings.pixelLightCount; if (QualitySettings.pixelLightCount != mirrorScript.MaximumPerPixelLights) { QualitySettings.pixelLightCount = mirrorScript.MaximumPerPixelLights; } try { Camera val = ((!VRMode) ? current : Camera.main); UpdateCameraProperties(val, cameraObject); Vector3 position = MirrorObject.transform.position; Vector3 val2 = ((!mirrorScript.NormalIsForward) ? MirrorObject.transform.up : MirrorObject.transform.forward); Vector3 normalized = ((Vector3)(ref val2)).normalized; float num = 0f - Vector3.Dot(normalized, position); Vector3 position2 = ((Component)val).transform.position; float num2 = Vector3.Dot(normalized, position2) + num; Vector3 val3 = position2 - 2f * num2 * normalized; ((Component)cameraObject).transform.position = val3; Vector3 val4 = position - val3; Vector3 val5 = ((Vector3)(ref val4)).normalized; if (FlipLookDirection) { val5 = -val5; } Vector3 val6 = ((!UseMirrorUp) ? Vector3.up : ((!mirrorScript.NormalIsForward) ? MirrorObject.transform.forward : MirrorObject.transform.up)); ((Component)cameraObject).transform.rotation = Quaternion.LookRotation(val5, val6); cameraObject.worldToCameraMatrix = ((Component)cameraObject).transform.worldToLocalMatrix; if (UseStandardProjection) { cameraObject.ResetProjectionMatrix(); cameraObject.fieldOfView = val.fieldOfView * FOVScale; } else { float num3 = val.fieldOfView * FOVScale; Matrix4x4 projection = Matrix4x4.Perspective(num3, val.aspect, val.nearClipPlane, val.farClipPlane); Vector3 pos = position + normalized * NearPlaneOffset; Vector4 clipPlane = CameraSpacePlane(cameraObject.worldToCameraMatrix, pos, normalized, 1f); cameraObject.projectionMatrix = CalculateObliqueMatrix(projection, clipPlane); } if (debug_ForceCullingMaskAll) { cameraObject.cullingMask = -1; } else { cameraObject.cullingMask = -17 & ((LayerMask)(ref mirrorScript.ReflectLayers)).value; } cameraObject.farClipPlane = mirrorScript.FarClipPlane; GL.invertCulling = true; cameraObject.Render(); GL.invertCulling = false; } finally { renderingMirror = false; if (QualitySettings.pixelLightCount != pixelLightCount) { QualitySettings.pixelLightCount = pixelLightCount; } } } private void OnDisable() { if (Object.op_Implicit((Object)(object)reflectionTexture)) { Object.DestroyImmediate((Object)(object)reflectionTexture); reflectionTexture = null; } } private Vector4 CameraSpacePlane(Matrix4x4 worldToCameraMatrix, Vector3 pos, Vector3 normal, float sideSign) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_0037: 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_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_004a: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Matrix4x4)(ref worldToCameraMatrix)).MultiplyPoint(pos); Vector3 val2 = ((Matrix4x4)(ref worldToCameraMatrix)).MultiplyVector(normal); Vector3 val3 = ((Vector3)(ref val2)).normalized * sideSign; return new Vector4(val3.x, val3.y, val3.z, 0f - Vector3.Dot(val, val3)); } private Matrix4x4 CalculateObliqueMatrix(Matrix4x4 projection, Vector4 clipPlane) { //IL_0003: 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_0034: 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_003b: 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_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_00ad: 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_00b4: Unknown result type (might be due to invalid IL or missing references) Vector4 val = ((Matrix4x4)(ref projection)).inverse * new Vector4(Mathf.Sign(clipPlane.x), Mathf.Sign(clipPlane.y), 1f, 1f); Vector4 val2 = clipPlane * (2f / Vector4.Dot(clipPlane, val)); ((Matrix4x4)(ref projection))[2] = val2.x - ((Matrix4x4)(ref projection))[3]; ((Matrix4x4)(ref projection))[6] = val2.y - ((Matrix4x4)(ref projection))[7]; ((Matrix4x4)(ref projection))[10] = val2.z - ((Matrix4x4)(ref projection))[11]; ((Matrix4x4)(ref projection))[14] = val2.w - ((Matrix4x4)(ref projection))[15]; return projection; } } public class MirrorReflectionScript : MonoBehaviour { private MirrorCameraScript childScript; private void Start() { childScript = ((Component)((Component)this).gameObject.transform.parent).gameObject.GetComponentInChildren(); if ((Object)(object)childScript == (Object)null) { Debug.LogError((object)"Child script (MirrorCameraScript) should be in sibling object"); } } private void OnWillRenderObject() { childScript.RenderMirror(); } } public class MirrorScript : MonoBehaviour { [Tooltip("Maximum number of per pixel lights that will show in the mirrored image")] public int MaximumPerPixelLights = 2; [Tooltip("Texture size for the mirror, depending on how close the player can get to the mirror, this will need to be larger")] public int TextureSize = 768; [Tooltip("Subtracted from the near plane of the mirror")] public float ClipPlaneOffset = 0.07f; [Tooltip("Far clip plane for mirro camera")] public float FarClipPlane = 1000f; [Tooltip("What layers will be reflected?")] public LayerMask ReflectLayers = LayerMask.op_Implicit(-1); [Tooltip("Add a flare layer to the reflection camera?")] public bool AddFlareLayer = false; [Tooltip("For quads, the normal points forward (true). For planes, the normal points up (false)")] public bool NormalIsForward = true; [Tooltip("Aspect ratio (width / height). Set to 0 to use default.")] public float AspectRatio = 0f; [Tooltip("Set to true if you have multiple mirrors facing each other to get an infinite effect, otherwise leave as false for a more realistic mirror effect.")] public bool MirrorRecursion; } namespace JerryAr.FIAT125R { [BepInPlugin("JerryAr.FIAT125R", "FIAT125R", "1.3.0")] [BepInProcess("h3vr.exe")] [Description("Built with MeatKit")] [BepInDependency("h3vr.otherloader", "1.3.0")] public class FIAT125RPlugin : 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.FIAT125R"); OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.FIAT125R", "", "", "fiat125r", ""); } } } [RequireComponent(typeof(MeshFilter))] [RequireComponent(typeof(MeshRenderer))] public class MeshCombiner : MonoBehaviour { private const int Mesh16BitBufferVertexLimit = 65535; [SerializeField] private bool createMultiMaterialMesh = false; [SerializeField] private bool combineInactiveChildren = false; [SerializeField] private bool deactivateCombinedChildren = true; [SerializeField] private bool deactivateCombinedChildrenMeshRenderers = false; [SerializeField] private bool generateUVMap = false; [SerializeField] private bool destroyCombinedChildren = false; [SerializeField] private string folderPath = "Prefabs/CombinedMeshes"; [SerializeField] [Tooltip("MeshFilters with Meshes which we don't want to combine into one Mesh.")] private MeshFilter[] meshFiltersToSkip = (MeshFilter[])(object)new MeshFilter[0]; public bool CreateMultiMaterialMesh { get { return createMultiMaterialMesh; } set { createMultiMaterialMesh = value; } } public bool CombineInactiveChildren { get { return combineInactiveChildren; } set { combineInactiveChildren = value; } } public bool DeactivateCombinedChildren { get { return deactivateCombinedChildren; } set { deactivateCombinedChildren = value; CheckDeactivateCombinedChildren(); } } public bool DeactivateCombinedChildrenMeshRenderers { get { return deactivateCombinedChildrenMeshRenderers; } set { deactivateCombinedChildrenMeshRenderers = value; CheckDeactivateCombinedChildren(); } } public bool GenerateUVMap { get { return generateUVMap; } set { generateUVMap = value; } } public bool DestroyCombinedChildren { get { return destroyCombinedChildren; } set { destroyCombinedChildren = value; CheckDestroyCombinedChildren(); } } public string FolderPath { get { return folderPath; } set { folderPath = value; } } private void CheckDeactivateCombinedChildren() { if (deactivateCombinedChildren || deactivateCombinedChildrenMeshRenderers) { destroyCombinedChildren = false; } } private void CheckDestroyCombinedChildren() { if (destroyCombinedChildren) { deactivateCombinedChildren = false; deactivateCombinedChildrenMeshRenderers = false; } } public void CombineMeshes(bool showCreatedMeshInfo) { //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_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_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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: 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) Vector3 localScale = ((Component)this).transform.localScale; int siblingIndex = ((Component)this).transform.GetSiblingIndex(); Transform parent = ((Component)this).transform.parent; ((Component)this).transform.parent = null; Quaternion rotation = ((Component)this).transform.rotation; Vector3 position = ((Component)this).transform.position; Vector3 localScale2 = ((Component)this).transform.localScale; ((Component)this).transform.rotation = Quaternion.identity; ((Component)this).transform.position = Vector3.zero; ((Component)this).transform.localScale = Vector3.one; if (!createMultiMaterialMesh) { CombineMeshesWithSingleMaterial(showCreatedMeshInfo); } else { CombineMeshesWithMutliMaterial(showCreatedMeshInfo); } ((Component)this).transform.rotation = rotation; ((Component)this).transform.position = position; ((Component)this).transform.localScale = localScale2; ((Component)this).transform.parent = parent; ((Component)this).transform.SetSiblingIndex(siblingIndex); ((Component)this).transform.localScale = localScale; } private MeshFilter[] GetMeshFiltersToCombine() { MeshFilter[] meshFilters = ((Component)this).GetComponentsInChildren(combineInactiveChildren); meshFiltersToSkip = meshFiltersToSkip.Where((MeshFilter meshFilter) => (Object)(object)meshFilter != (Object)(object)meshFilters[0]).ToArray(); meshFiltersToSkip = meshFiltersToSkip.Where((MeshFilter meshFilter) => (Object)(object)meshFilter != (Object)null).ToArray(); for (int i = 0; i < meshFiltersToSkip.Length; i++) { meshFilters = meshFilters.Where((MeshFilter meshFilter) => (Object)(object)meshFilter != (Object)(object)meshFiltersToSkip[i]).ToArray(); } return meshFilters; } private void CombineMeshesWithSingleMaterial(bool showCreatedMeshInfo) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown MeshFilter[] meshFiltersToCombine = GetMeshFiltersToCombine(); CombineInstance[] array = (CombineInstance[])(object)new CombineInstance[meshFiltersToCombine.Length - 1]; long num = 0L; for (int i = 0; i < meshFiltersToCombine.Length - 1; i++) { ((CombineInstance)(ref array[i])).subMeshIndex = 0; ((CombineInstance)(ref array[i])).mesh = meshFiltersToCombine[i + 1].sharedMesh; ((CombineInstance)(ref array[i])).transform = ((Component)meshFiltersToCombine[i + 1]).transform.localToWorldMatrix; num += ((CombineInstance)(ref array[i])).mesh.vertices.Length; } MeshRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren(combineInactiveChildren); if (componentsInChildren.Length >= 2) { ((Renderer)componentsInChildren[0]).sharedMaterials = (Material[])(object)new Material[1]; ((Renderer)componentsInChildren[0]).sharedMaterial = ((Renderer)componentsInChildren[1]).sharedMaterial; } else { ((Renderer)componentsInChildren[0]).sharedMaterials = (Material[])(object)new Material[0]; } Mesh val = new Mesh(); ((Object)val).name = ((Object)this).name; if (num <= 65535) { val.CombineMeshes(array); GenerateUV(val); meshFiltersToCombine[0].sharedMesh = val; DeactivateCombinedGameObjects(meshFiltersToCombine); if (showCreatedMeshInfo) { Debug.Log((object)("Mesh \"" + ((Object)this).name + "\" was created from " + array.Length + " children meshes and has " + num + " vertices.")); } } else if (showCreatedMeshInfo) { Debug.Log((object)("The mesh vertex limit is 65535! The created mesh had " + num + " vertices. Upgrade Unity version to 2017.3 or higher to avoid this limit (some old devices, like Android with Mali-400 GPU, do not support over 65535 vertices).")); } } private void CombineMeshesWithMutliMaterial(bool showCreatedMeshInfo) { //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_01a6: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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) MeshFilter[] meshFiltersToCombine = GetMeshFiltersToCombine(); MeshRenderer[] array = (MeshRenderer[])(object)new MeshRenderer[meshFiltersToCombine.Length]; array[0] = ((Component)this).GetComponent(); List list = new List(); for (int i = 0; i < meshFiltersToCombine.Length - 1; i++) { array[i + 1] = ((Component)meshFiltersToCombine[i + 1]).GetComponent(); if (!((Object)(object)array[i + 1] != (Object)null)) { continue; } Material[] sharedMaterials = ((Renderer)array[i + 1]).sharedMaterials; for (int j = 0; j < sharedMaterials.Length; j++) { if (!list.Contains(sharedMaterials[j])) { list.Add(sharedMaterials[j]); } } } List list2 = new List(); long num = 0L; for (int k = 0; k < list.Count; k++) { List list3 = new List(); for (int l = 0; l < meshFiltersToCombine.Length - 1; l++) { if (!((Object)(object)array[l + 1] != (Object)null)) { continue; } Material[] sharedMaterials2 = ((Renderer)array[l + 1]).sharedMaterials; for (int m = 0; m < sharedMaterials2.Length; m++) { if ((Object)(object)list[k] == (Object)(object)sharedMaterials2[m]) { CombineInstance item = default(CombineInstance); ((CombineInstance)(ref item)).subMeshIndex = m; ((CombineInstance)(ref item)).mesh = meshFiltersToCombine[l + 1].sharedMesh; ((CombineInstance)(ref item)).transform = ((Component)meshFiltersToCombine[l + 1]).transform.localToWorldMatrix; list3.Add(item); num += ((CombineInstance)(ref item)).mesh.vertices.Length; } } } Mesh val = new Mesh(); if (num <= 65535) { val.CombineMeshes(list3.ToArray(), true); } CombineInstance item2 = default(CombineInstance); ((CombineInstance)(ref item2)).subMeshIndex = 0; ((CombineInstance)(ref item2)).mesh = val; ((CombineInstance)(ref item2)).transform = Matrix4x4.identity; list2.Add(item2); } ((Renderer)array[0]).sharedMaterials = list.ToArray(); Mesh val2 = new Mesh(); ((Object)val2).name = ((Object)this).name; if (num <= 65535) { val2.CombineMeshes(list2.ToArray(), false); GenerateUV(val2); meshFiltersToCombine[0].sharedMesh = val2; DeactivateCombinedGameObjects(meshFiltersToCombine); if (showCreatedMeshInfo) { Debug.Log((object)("Mesh \"" + ((Object)this).name + "\" was created from " + (meshFiltersToCombine.Length - 1) + " children meshes and has " + list2.Count + " submeshes, and " + num + " vertices.")); } } else if (showCreatedMeshInfo) { Debug.Log((object)("The mesh vertex limit is 65535! The created mesh had " + num + " vertices. Upgrade Unity version to 2017.3 or higher to avoid this limit (some old devices, like Android with Mali-400 GPU, do not support over 65535 vertices).")); } } private void DeactivateCombinedGameObjects(MeshFilter[] meshFilters) { for (int i = 0; i < meshFilters.Length - 1; i++) { if (!destroyCombinedChildren) { if (deactivateCombinedChildren) { ((Component)meshFilters[i + 1]).gameObject.SetActive(false); } if (deactivateCombinedChildrenMeshRenderers) { MeshRenderer component = ((Component)meshFilters[i + 1]).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((Renderer)component).enabled = false; } } } else { Object.DestroyImmediate((Object)(object)((Component)meshFilters[i + 1]).gameObject); } } } private void GenerateUV(Mesh combinedMesh) { //IL_000f: 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) if (generateUVMap) { UnwrapParam val = default(UnwrapParam); UnwrapParam.SetDefaults(ref val); Unwrapping.GenerateSecondaryUVSet(combinedMesh, val); } } } namespace JerryComponent { public class ReticleGunDetect : MonoBehaviour { public GameObject laserobj; public LaserLight laser; private void Update() { //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_041f: 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_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_0338: 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) if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent() != (Object)null) { if ((Object)(object)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable == (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos != (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } } else if ((Object)(object)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable).gameObject.GetComponent() == (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos != (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos == (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable).gameObject.GetComponent() != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos != (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos == (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } } } } } else if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable != (Object)null && (Object)(object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent() != (Object)null) { if ((Object)(object)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable == (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().MuzzlePos != (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } } else if ((Object)(object)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent() == (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().MuzzlePos != (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().MuzzlePos == (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent() != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent().MuzzlePos != (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent().MuzzlePos == (Object)null) { laserobj.transform.eulerAngles = ((Component)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent().MuzzlePos).gameObject.transform.eulerAngles; laser.IsActive = true; } } } } if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable == (Object)null && (Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable == (Object)null) { laserobj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); laser.IsActive = false; } } } } public class ReticleOverLayOnNV : PIPScopeGUIDrawer { public Material uiMaterial; public Texture2D hostileTexture; public Color hostileColor = new Color(0.9f, 0.3f, 0.25f, 0.8f); public float iconSize = 32f; public float iconEdgeOffset = 8f; public bool scaleWithDistance = true; public Vector2 iconSizeMinMax = new Vector2(16f, 64f); public bool forceCircularBorder; public LaserLight laser; public override void DrawGUI(PIPScope scope, Canvas canvas, Vector2 canvasSize) { //IL_015d: 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) if ((Object)(object)GM.TNH_Manager == (Object)null) { return; } bool flag = (Object)(object)GM.TNH_Manager.CurHoldPoint != (Object)null; bool flag2 = (Object)(object)GM.TNH_Manager.TAHReticle != (Object)null; List list = GM.TNH_Manager.ActiveSupplyPointIndicies(); if (flag || list.Count != 0 || flag2) { float num = Mathf.Max(canvasSize.x, canvasSize.y); float num2 = Mathf.Min(canvasSize.x, canvasSize.y); Transform scopeTransform = ((scope.enableThermal && (Object)(object)scope.thermalScopeCam != (Object)null) ? ((Component)scope.thermalScopeCam).transform : ((Component)scope.scopeCam).transform); float num3 = ((!scope.enableThermal || !(scope.thermalOverlayFOV > 0f)) ? GetCameraFov((scope.enableThermal && (Object)(object)scope.thermalScopeCam != (Object)null) ? scope.thermalScopeCam.cam : scope.pipScopeCam.cam) : scope.thermalOverlayFOV); float degreesToPixels = num / num3; if (laser.IsActive) { uiMaterial.mainTexture = (Texture)(object)hostileTexture; uiMaterial.color = hostileColor; uiMaterial.SetPass(0); DrawTransformIcon(scope, scopeTransform, canvasSize, degreesToPixels, ((Component)laser.laserDot).gameObject.transform); } } } public float GetCameraFov(Camera cam) { if (cam.aspect > 1f) { return VerticalToHorizontalFOV(cam.fieldOfView, cam.aspect); } return cam.fieldOfView; } public void DrawIcon(Vector2 position, Vector2 size) { //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_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_0057: 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) Matrix4x4 val = Matrix4x4.TRS(new Vector3(position.x - size.x * 0.5f, position.y - size.y * 0.5f, 0f), Quaternion.identity, new Vector3(size.x, size.y, 1f)); Graphics.DrawMeshNow(PIPScopeGUIUtility.GetQuad(), val); } public void DrawTransformIcon(PIPScope scope, Transform scopeTransform, Vector2 canvasSize, float degreesToPixels, Transform t) { //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_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_0016: 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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_002d: 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_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_0110: 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_0227: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ec: 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_01fc: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 worldToLocalMatrix = scopeTransform.worldToLocalMatrix; Vector3 val = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(t.position); Vector3 val2 = Vector3.Normalize(val); Quaternion val3 = Quaternion.LookRotation(val2); Vector3 eulerAngles = ((Quaternion)(ref val3)).eulerAngles; Vector2 val4 = EulerAngleToDirection(eulerAngles, degreesToPixels); float num = iconSize; if (scaleWithDistance) { num *= 25f; float magnitude = ((Vector3)(ref val)).magnitude; num /= Mathf.Max(0.001f, magnitude); num = Mathf.Clamp(num, iconSizeMinMax.x, iconSizeMinMax.y); } num = Mathf.Round(num * 0.5f) * 2f; if (scope.thermalOverlayCircular || forceCircularBorder) { float num2 = (Mathf.Min(canvasSize.x, canvasSize.y) - num) * 0.5f - iconEdgeOffset; float num3 = val4.x * val4.x + val4.y * val4.y; if (num3 > num2 * num2) { val4 *= num2 / Mathf.Sqrt(num3); } } else { Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor((canvasSize.x - num) * 0.5f - iconEdgeOffset, (canvasSize.y - num) * 0.5f - iconEdgeOffset); if (Mathf.Abs(val4.x) > val5.x || Mathf.Abs(val4.y) > val5.y) { Vector2 normalized = ((Vector2)(ref val4)).normalized; float num4 = Vector2.Angle(Vector2.right, normalized); float num5 = Mathf.Abs(val5.y / Mathf.Cos((90f - num4) * ((float)Math.PI / 180f))); float num6 = Mathf.Abs(val5.x / Mathf.Sin((90f - num4) * ((float)Math.PI / 180f))); val4 = normalized * Mathf.Min(num5, num6); } } val4.x = Mathf.Round(val4.x); val4.y = Mathf.Round(val4.y); DrawIcon(val4, new Vector2(num, num)); } public Vector2 EulerAngleToDirection(Vector3 eulerAngle, float degreesToPixels) { //IL_00b1: 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_00b8: Unknown result type (might be due to invalid IL or missing references) Vector2 result = default(Vector2); ((Vector2)(ref result))..ctor(eulerAngle.y, 0f - eulerAngle.x); result.x = Mathf.Repeat(result.x, 360f); result.y = Mathf.Repeat(result.y, 360f); if (result.x > 180f) { result.x -= 360f; } if (result.y > 180f) { result.y -= 360f; } result.x *= degreesToPixels; result.y *= degreesToPixels; return result; } public float VerticalToHorizontalFOV(float verticalFOV, float aspect) { return Mathf.Atan(Mathf.Tan(verticalFOV * 0.5f * ((float)Math.PI / 180f)) * aspect) * 2f * ((float)Math.PI / 180f); } } namespace JerryComponent { public class TacEarPro2 : MonoBehaviour { public GameObject powerswitch; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 200f; public float alfHalfMin = 400f; public float alfIncRate = 10f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.5f; public GameObject on; public GameObject off; public GameObject whole; public Transform PlugPort; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void OnSosigGunFired(SosigWeapon sosigWeapon) { alf.cutoffFrequency = alfHalfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent += new SosiggunFired(OnSosigGunFired); } private void Denoise() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } private void Update() { Denoise(); } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent -= new SosiggunFired(OnSosigGunFired); } } public class NVGKnob : MonoBehaviour { public PIPScope scope; public GameObject powerknob; public float refgain; public float reflum; public bool started = false; public float onspeed = 0.5f; public float offspeed = 2.5f; public AudioSource whing; public float volref; public float pitref; public float aref; public float rref; public float gref; public float bref; public float pitch = 1f; public float volume = 0.025f; private void Start() { //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) scope.reticleIllumination = new Color(0f, 0f, 0f, 0f); scope.nvDef.nightVisionTargetBrightness = 0f; scope.nightVisionManualGainFactor = 0f; refgain = 0f; reflum = 0f; volref = 0f; pitref = 0f; whing.volume = 0f; whing.pitch = 0f; } private void FixedUpdate() { //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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)scope).enabled = true; scope.UpdateParameters(); if (powerknob.transform.localEulerAngles.x <= 15f) { scope.reticleIllumination = new Color(Mathf.SmoothDamp(scope.reticleIllumination.a, 0f, ref aref, offspeed), Mathf.SmoothDamp(scope.reticleIllumination.r, 0f, ref rref, offspeed), Mathf.SmoothDamp(scope.reticleIllumination.g, 0f, ref gref, offspeed), Mathf.SmoothDamp(scope.reticleIllumination.b, 0f, ref bref, offspeed)); scope.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scope.nvDef.nightVisionTargetBrightness, 0f, ref refgain, offspeed); scope.nightVisionManualGainFactor = Mathf.SmoothDamp(scope.nightVisionManualGainFactor, 0f, ref reflum, offspeed); whing.volume = Mathf.SmoothDamp(whing.volume, 0f, ref volref, offspeed); whing.pitch = Mathf.SmoothDamp(whing.pitch, 0f, ref pitref, offspeed); started = false; } else if (powerknob.transform.localEulerAngles.x > 15f) { scope.nightVisionManualGainFactor = Mathf.SmoothDamp(scope.nightVisionManualGainFactor, 1f, ref reflum, onspeed); whing.volume = Mathf.SmoothDamp(whing.volume, volume, ref volref, onspeed); whing.pitch = Mathf.SmoothDamp(whing.pitch, pitch, ref pitref, onspeed); scope.reticleIllumination = new Color(Mathf.SmoothDamp(scope.reticleIllumination.a, 1f, ref aref, onspeed), Mathf.SmoothDamp(scope.reticleIllumination.r, 1f, ref rref, onspeed), Mathf.SmoothDamp(scope.reticleIllumination.g, 1f, ref gref, onspeed), Mathf.SmoothDamp(scope.reticleIllumination.b, 1f, ref bref, onspeed)); if (!started) { scope.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scope.nvDef.nightVisionTargetBrightness, 1f, ref refgain, onspeed); } if (scope.nvDef.nightVisionTargetBrightness > 0.9f) { scope.reticleIllumination = new Color(1f, 1f, 1f, 1f); scope.nightVisionManualGainFactor = 1f; scope.nvDef.nightVisionTargetBrightness = 1f; started = true; } } } } public class PNV57EControl : MonoBehaviour { public GameObject phys; public GameObject armreal; public GameObject armfake; public Vector3 velLinearWorldL; public Vector3 velLinearWorldR; public Transform slapdirUP; public Transform slapdirDown; public HeadAttachment HA; public PIPScope scopeL; public PIPScope scopeR; public GameObject powerknob; public float refgain; public float reflum; public AudioEvent flip; public bool started = false; public float onspeed = 0.5f; public float offspeed = 2.5f; public bool isheadmounted = true; public AudioSource whing; public float volref; public float pitref; public float volume; public float pitch; private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) powerknob.transform.localEulerAngles = new Vector3(30f, 0f, 0f); scopeL.nvDef.nightVisionTargetBrightness = 0f; scopeL.nightVisionManualGainFactor = 0f; scopeR.nvDef.nightVisionTargetBrightness = 0f; scopeR.nightVisionManualGainFactor = 0f; refgain = 0f; reflum = 0f; volref = 0f; pitref = 0f; whing.volume = 0f; whing.pitch = 0f; } private void FixedUpdate() { //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Invalid comparison between Unknown and I4 //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_0281: 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_01eb: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Invalid comparison between Unknown and I4 //IL_029c: 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_0200: 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_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_037e: 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_0253: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)scopeL).enabled = true; scopeL.UpdateParameters(); ((Behaviour)scopeR).enabled = true; scopeR.UpdateParameters(); if (isheadmounted) { armfake.transform.localEulerAngles = armreal.transform.localEulerAngles; phys.transform.SetParent(((Component)GM.CurrentMovementManager.Head).gameObject.transform); phys.transform.localPosition = Vector3.zero; phys.transform.localEulerAngles = Vector3.zero; velLinearWorldL = GM.CurrentMovementManager.Hands[0].Input.VelLinearWorld; velLinearWorldR = GM.CurrentMovementManager.Hands[1].Input.VelLinearWorld; if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable == (Object)null && (int)HA.MAState == 0 && Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapdirUP.position) < 0.15f && Vector3.Angle(velLinearWorldL, slapdirUP.forward) < 60f && ((Vector3)(ref velLinearWorldL)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } else if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable == (Object)null && (int)HA.MAState == 1 && Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapdirDown.position) < 0.15f && Vector3.Angle(velLinearWorldL, slapdirDown.forward) < 60f && ((Vector3)(ref velLinearWorldL)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable == (Object)null && (int)HA.MAState == 0 && Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapdirUP.position) < 0.15f && Vector3.Angle(velLinearWorldR, slapdirUP.forward) < 60f && ((Vector3)(ref velLinearWorldR)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } else if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable == (Object)null && (int)HA.MAState == 1 && Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapdirDown.position) < 0.15f && Vector3.Angle(velLinearWorldR, slapdirDown.forward) < 60f && ((Vector3)(ref velLinearWorldR)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } } if (powerknob.transform.localEulerAngles.x > 15f) { scopeL.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeL.nvDef.nightVisionTargetBrightness, 0f, ref refgain, offspeed); scopeL.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeL.nightVisionManualGainFactor, 0f, ref reflum, offspeed); scopeR.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeR.nvDef.nightVisionTargetBrightness, 0f, ref refgain, offspeed); scopeR.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeR.nightVisionManualGainFactor, 0f, ref reflum, offspeed); whing.volume = Mathf.SmoothDamp(whing.volume, 0f, ref volref, offspeed); whing.pitch = Mathf.SmoothDamp(whing.pitch, 0f, ref pitref, offspeed); started = false; } else if (powerknob.transform.localEulerAngles.x < 15f) { scopeL.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeL.nightVisionManualGainFactor, 1f, ref reflum, onspeed); scopeR.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeR.nightVisionManualGainFactor, 1f, ref reflum, onspeed); whing.volume = Mathf.SmoothDamp(whing.volume, volume, ref volref, onspeed); whing.pitch = Mathf.SmoothDamp(whing.pitch, pitch, ref pitref, onspeed); if (!started) { scopeL.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeL.nvDef.nightVisionTargetBrightness, 1f, ref refgain, onspeed); scopeR.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeR.nvDef.nightVisionTargetBrightness, 1f, ref refgain, onspeed); } if (scopeL.nvDef.nightVisionTargetBrightness > 0.9f && scopeR.nvDef.nightVisionTargetBrightness > 0.9f) { started = true; } } } private void OnDestroy() { Object.Destroy((Object)(object)phys); } } public class PNV57EControlAdj : MonoBehaviour { public GameObject phys; public PIPScope scopeL; public PIPScope scopeR; public GameObject powerknob; public float refgain; public float reflum; public AudioEvent flip; public bool started = false; public float onspeed = 0.5f; public float offspeed = 2.5f; public bool isheadmounted = true; public AudioSource whing; public float volref; public float pitref; public float volume; public float pitch; public GameObject root; public int scopePara; private void Start() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) scopePara = GM.Options.SimulationOptions.ScopeRecursiveRendering; GM.Options.SimulationOptions.ScopeRecursiveRendering = 0; GM.RefreshQuality(); powerknob.transform.localEulerAngles = new Vector3(30f, 0f, 0f); scopeL.nvDef.nightVisionTargetBrightness = 0f; scopeL.nightVisionManualGainFactor = 0f; scopeR.nvDef.nightVisionTargetBrightness = 0f; scopeR.nightVisionManualGainFactor = 0f; refgain = 0f; reflum = 0f; volref = 0f; pitref = 0f; whing.volume = 0f; whing.pitch = 0f; } private void FixedUpdate() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) root.transform.localPosition = new Vector3(0f, 0f, 0f); ((Behaviour)scopeL).enabled = true; scopeL.UpdateParameters(); ((Behaviour)scopeR).enabled = true; scopeR.UpdateParameters(); if (isheadmounted) { phys.transform.SetParent(((Component)GM.CurrentMovementManager.Head).gameObject.transform); phys.transform.localPosition = Vector3.zero; phys.transform.localEulerAngles = Vector3.zero; } if (powerknob.transform.localEulerAngles.x > 15f) { scopeL.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeL.nvDef.nightVisionTargetBrightness, 0f, ref refgain, offspeed); scopeL.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeL.nightVisionManualGainFactor, 0f, ref reflum, offspeed); scopeR.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeR.nvDef.nightVisionTargetBrightness, 0f, ref refgain, offspeed); scopeR.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeR.nightVisionManualGainFactor, 0f, ref reflum, offspeed); whing.volume = Mathf.SmoothDamp(whing.volume, 0f, ref volref, offspeed); whing.pitch = Mathf.SmoothDamp(whing.pitch, 0f, ref pitref, offspeed); started = false; } else if (powerknob.transform.localEulerAngles.x < 15f) { scopeL.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeL.nightVisionManualGainFactor, 1f, ref reflum, onspeed); scopeR.nightVisionManualGainFactor = Mathf.SmoothDamp(scopeR.nightVisionManualGainFactor, 1f, ref reflum, onspeed); whing.volume = Mathf.SmoothDamp(whing.volume, volume, ref volref, onspeed); whing.pitch = Mathf.SmoothDamp(whing.pitch, pitch, ref pitref, onspeed); if (!started) { scopeL.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeL.nvDef.nightVisionTargetBrightness, 1f, ref refgain, onspeed); scopeR.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scopeR.nvDef.nightVisionTargetBrightness, 1f, ref refgain, onspeed); } if (scopeL.nvDef.nightVisionTargetBrightness > 0.9f && scopeR.nvDef.nightVisionTargetBrightness > 0.9f) { started = true; } } } private void OnDestroy() { Object.Destroy((Object)(object)phys); GM.Options.SimulationOptions.ScopeRecursiveRendering = scopePara; GM.RefreshQuality(); } } public class PVS7Control : MonoBehaviour { public GameObject phys; public GameObject armreal; public GameObject armfake; public Vector3 velLinearWorldL; public Vector3 velLinearWorldR; public Transform slapdirUP; public Transform slapdirDown; public HeadAttachment HA; public PIPScope scope; public GameObject powerknob; public float refgain; public float reflum; public AudioEvent flip; public bool started = false; public float onspeed = 0.5f; public float offspeed = 2.5f; public bool isheadmounted = true; private void Start() { scope.nvDef.nightVisionTargetBrightness = 0f; scope.nightVisionManualGainFactor = 0f; refgain = 0f; reflum = 0f; } private void FixedUpdate() { //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_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_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_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_01b3: Invalid comparison between Unknown and I4 //IL_0107: 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_026a: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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_0132: 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_0331: Invalid comparison between Unknown and I4 //IL_0285: 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_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) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)scope).enabled = true; scope.UpdateParameters(); if (isheadmounted) { armfake.transform.localEulerAngles = armreal.transform.localEulerAngles; phys.transform.SetParent(((Component)GM.CurrentMovementManager.Head).gameObject.transform); phys.transform.localPosition = Vector3.zero; phys.transform.localEulerAngles = Vector3.zero; velLinearWorldL = GM.CurrentMovementManager.Hands[0].Input.VelLinearWorld; velLinearWorldR = GM.CurrentMovementManager.Hands[1].Input.VelLinearWorld; if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable == (Object)null && (int)HA.MAState == 0 && Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapdirUP.position) < 0.15f && Vector3.Angle(velLinearWorldL, slapdirUP.forward) < 60f && ((Vector3)(ref velLinearWorldL)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } else if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable == (Object)null && (int)HA.MAState == 1 && Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapdirDown.position) < 0.15f && Vector3.Angle(velLinearWorldL, slapdirDown.forward) < 60f && ((Vector3)(ref velLinearWorldL)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable == (Object)null && (int)HA.MAState == 0 && Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapdirUP.position) < 0.15f && Vector3.Angle(velLinearWorldR, slapdirUP.forward) < 60f && ((Vector3)(ref velLinearWorldR)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } else if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable == (Object)null && (int)HA.MAState == 1 && Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapdirDown.position) < 0.15f && Vector3.Angle(velLinearWorldR, slapdirDown.forward) < 60f && ((Vector3)(ref velLinearWorldR)).magnitude > 1.5f) { HA.ToggleFlip(); SM.PlayCoreSound((FVRPooledAudioType)41, flip, phys.transform.position); } } if (powerknob.transform.localEulerAngles.x > 15f) { scope.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scope.nvDef.nightVisionTargetBrightness, 0f, ref refgain, offspeed); scope.nightVisionManualGainFactor = Mathf.SmoothDamp(scope.nightVisionManualGainFactor, 0f, ref reflum, offspeed); started = false; } else if (powerknob.transform.localEulerAngles.x < 15f) { scope.nightVisionManualGainFactor = Mathf.SmoothDamp(scope.nightVisionManualGainFactor, 1f, ref reflum, onspeed); if (!started) { scope.nvDef.nightVisionTargetBrightness = Mathf.SmoothDamp(scope.nvDef.nightVisionTargetBrightness, 1f, ref refgain, onspeed); } if (scope.nvDef.nightVisionTargetBrightness > 0.9f) { started = true; } } } private void OnDestroy() { Object.Destroy((Object)(object)phys); } } public class bighelmet : MonoBehaviour { public GameObject main; public GameObject l; public GameObject r; public GameObject nvg; public PIPScope caml; public PIPScope camr; public bool onhead = false; public bool shouldChangeNVGArm = true; public GameObject gearb; public Vector3 movepos; public Vector3 scale; public Vector3 scaleNVG; public void FixedUpdate() { //IL_011f: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_008d: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: 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_01d2: 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_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_021d: 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_0265: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gearb != (Object)null) { if (!onhead) { if (shouldChangeNVGArm) { l.transform.localEulerAngles = new Vector3(0f, 0f, l.transform.localEulerAngles.z + 10f); r.transform.localEulerAngles = new Vector3(0f, 0f, r.transform.localEulerAngles.z - 10f); caml.cameraClipRearLens = 0.05f; camr.cameraClipRearLens = 0.05f; l.transform.localScale = new Vector3(0.5f, 0.5f, 1f); r.transform.localScale = new Vector3(0.5f, 0.5f, 1f); } nvg.gameObject.transform.localScale = scaleNVG; main.gameObject.transform.localPosition = movepos; main.transform.localScale = scale; onhead = true; } } else { if (!((Object)(object)gearb == (Object)null)) { return; } gearb = GameObject.Find("Gearbig"); if (onhead && shouldChangeNVGArm) { if (shouldChangeNVGArm) { l.transform.localEulerAngles = new Vector3(0f, 0f, l.transform.localEulerAngles.z - 10f); r.transform.localEulerAngles = new Vector3(0f, 0f, r.transform.localEulerAngles.z + 10f); l.transform.localScale = new Vector3(1f, 1f, 1f); r.transform.localScale = new Vector3(1f, 1f, 1f); caml.cameraClipRearLens = 0.011f; camr.cameraClipRearLens = 0.011f; } nvg.gameObject.transform.localScale = new Vector3(1f, 1f, 1f); main.transform.localScale = new Vector3(1f, 1f, 1f); main.gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); onhead = false; } } } } internal class BikeSteer : FVRPhysicalObject { public VehicleControl vehicle; public VehicleAudioSet audioSet; public GameObject steerwheel; public float steerr; public Text rotText; public float rot; public float rh; public float lr; public float inlerp; public float lerp; public float rotAmt; public float resetLerpSpeed; public float maxRot; public bool reverseRot; public DriveShift driveshift; public override void BeginInteraction(FVRViveHand hand) { ((FVRPhysicalObject)this).BeginInteraction(hand); } public override void EndInteraction(FVRViveHand hand) { ((FVRPhysicalObject)this).EndInteraction(hand); } public override void UpdateInteraction(FVRViveHand hand) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) ((FVRPhysicalObject)this).UpdateInteraction(hand); rotAmt = steerwheel.transform.localEulerAngles.y; SetRot(); bool flag = false; if (hand.Input.TouchpadPressed && ((Vector2)(ref hand.Input.TouchpadAxes)).magnitude > 0.25f) { flag = true; } if (flag) { vehicle.accel = 0f - (float)Math.Pow(((Vector2)(ref hand.Input.TouchpadAxes)).magnitude, 2.0); vehicle.brake = true; } else if (driveshift.currentNode == 1) { vehicle.accel = (float)Math.Pow(hand.Input.TriggerFloat, 2.0); vehicle.brake = false; } else if (driveshift.currentNode == 0) { vehicle.accel = (float)Math.Pow(hand.Input.TriggerFloat, 0.5); vehicle.brake = false; } } private void FixedUpdate() { if ((Object)(object)((FVRInteractiveObject)this).m_hand == (Object)null) { float num = resetLerpSpeed; if (rotAmt > 0f) { num = 0f - num; } if (rotAmt > num || rotAmt < 0f - num) { rotAmt += num; vehicle.accel = 0f; SetRot(); } } } private void SetRot() { bool flag = rotAmt > 180f; if (!flag) { lerp = Mathf.Abs(rotAmt) / maxRot; lerp *= -1f; } else if (flag) { lerp = Mathf.Abs(360f - rotAmt) / maxRot; } if (reverseRot) { lerp = 0f - lerp; } if ((Object)(object)rotText != (Object)null) { rotText.text = lerp.ToString(); } vehicle.steer = lerp; } } public class RandomMusic : MonoBehaviour { public GameObject toggle; public GameObject[] _BGMs; public GameObject _Selected; public AudioSource _BGMnow; public Random Rand; public int _MaxNum; private bool playmusic; private bool musicpicked = false; public void Awake() { } private void RandomPick() { if (playmusic && !musicpicked) { Rand = new Random(); Rand.Next(_MaxNum); _Selected = _BGMs[Rand.Next(_MaxNum)]; _Selected.SetActive(true); musicpicked = true; } } 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_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) if (toggle.transform.localEulerAngles.x >= 45f) { playmusic = true; RandomPick(); ref AudioSource bGMnow = ref _BGMnow; Component component = _Selected.GetComponent(typeof(AudioSource)); bGMnow = (AudioSource)(object)((component is AudioSource) ? component : null); if ((!_BGMnow.isPlaying || !musicpicked) && !_BGMnow.isPlaying && musicpicked) { _Selected.SetActive(false); musicpicked = false; RandomPick(); } } if (toggle.transform.localEulerAngles.x < 45f) { _Selected.SetActive(false); playmusic = false; musicpicked = false; } } } public class AutoAdjustHeight2 : MonoBehaviour { public GameObject headpos; public GameObject headposref; public GameObject seatheight; public AircraftSeat acs; public float lasttime = 5f; public float speedmul = 5f; private void Start() { } private void Update() { //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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_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_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_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_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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_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_0124: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_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_0173: Unknown result type (might be due to invalid IL or missing references) if (acs.is_inseat) { if (lasttime > 0f) { lasttime -= Time.deltaTime; headpos.transform.position = ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position; seatheight.transform.localPosition = new Vector3(seatheight.transform.localPosition.x + (headposref.transform.localPosition.x - headpos.transform.localPosition.x) * speedmul * Time.deltaTime, seatheight.transform.localPosition.y + (headposref.transform.localPosition.y - headpos.transform.localPosition.y) * speedmul * Time.deltaTime, seatheight.transform.localPosition.z + (headposref.transform.localPosition.z - headpos.transform.localPosition.z) * speedmul * Time.deltaTime); } } else { lasttime = 5f; headpos.transform.localPosition = new Vector3(0f, 0f, 0f); seatheight.transform.localPosition = new Vector3(0f, 0f, 0f); } } } public class AutoRange : MonoBehaviour { public PIPScopeController scope; public GameObject Triggerswitch; public int rangenum; public float cal; public Text text; public Transform Direction; public LayerMask layerMask; private void Start() { } public void Awake() { Direction = ((Component)this).gameObject.transform; } public void FixedUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_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) RaycastHit val = default(RaycastHit); if (Physics.Raycast(((Component)this).transform.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, float.PositiveInfinity, LayerMask.op_Implicit(layerMask))) { float distance = ((RaycastHit)(ref val)).distance; cal = distance / 100f - 1f; if (cal < 0f) { cal = 0f; } else if (cal > 29f) { cal = 29f; } rangenum = (int)cal; if (Triggerswitch.transform.localEulerAngles.x > 45f) { scope.ZeroDistanceIndex = rangenum; } } } } public class CannonSafety : MonoBehaviour { public ClosedBoltWeapon gun; public FVRFireArmChamber chamber; private void Start() { } private void Update() { if (chamber.IsFull) { gun.m_fireSelectorMode = 0; } else if (!chamber.IsFull) { gun.m_fireSelectorMode = 1; } } } public class ElevLimit : MonoBehaviour { public GameObject MG; 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_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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (MG.transform.localEulerAngles.z < 2f) { MG.transform.localEulerAngles = new Vector3(0f, 0f, 2f); } else if (MG.transform.localEulerAngles.z > 88f) { MG.transform.localEulerAngles = new Vector3(0f, 0f, 88f); } } } public class FireRopeOB2 : 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //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_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 (trigger.transform.localEulerAngles.x > 2f && trigger.transform.localEulerAngles.x < 88f) { gun.ReleaseSeer(); } else if (trigger.transform.localEulerAngles.x < 2f || trigger.transform.localEulerAngles.x > 88f) { gun.EngageSeer(); } } } public class HandCrankHandle : MonoBehaviour { public string objdragged; private void Update() { //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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_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_007a: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0159: 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_016c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GameObject.Find(objdragged) != (Object)null) { ((Component)this).gameObject.transform.SetParent(GameObject.Find(objdragged).transform); } if (((Component)this).transform.localPosition.y > 0.05f) { ((Component)this).transform.localPosition = new Vector3(0f, 0.05f, ((Component)this).transform.localPosition.z); } else if (((Component)this).transform.localPosition.y < -0.05f) { ((Component)this).transform.localPosition = new Vector3(0f, -0.05f, ((Component)this).transform.localPosition.z); } if (((Component)this).transform.localPosition.z > 0.05f) { ((Component)this).transform.localPosition = new Vector3(0f, ((Component)this).transform.localPosition.y, 0.05f); } else if (((Component)this).transform.localPosition.z < -0.05f) { ((Component)this).transform.localPosition = new Vector3(0f, ((Component)this).transform.localPosition.y, -0.05f); } } } public class LockExceptXAxis : MonoBehaviour { private void Update() { //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) ((Component)this).gameObject.transform.localEulerAngles = new Vector3(((Component)this).gameObject.transform.localEulerAngles.x, 0f, 0f); } } public class OnlyOne : MonoBehaviour { private void OnEnable() { //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 SmokeLauncher : MonoBehaviour { public GameObject trigger; public ParticleSystem PS1; public ParticleSystem PS2; public ParticleSystem PS3; public ParticleSystem PS4; public bool shoot = false; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) if (trigger.transform.localEulerAngles.x > 2f && trigger.transform.localEulerAngles.x < 88f) { if (!shoot) { PS1.Play(); PS2.Play(); PS3.Play(); PS4.Play(); shoot = true; } } else if (trigger.transform.localEulerAngles.x < 2f || trigger.transform.localEulerAngles.x > 88f) { shoot = false; } } } public class SmokeOnRotate : MonoBehaviour { public GameObject rot; public ParticleSystem PS; 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_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) if (rot.transform.localEulerAngles.x > 45f) { PS.Play(); } else if (rot.transform.localEulerAngles.x <= 45f) { PS.Stop(); } } } 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 SpawnID : MonoBehaviour { public FVRObject turret; public FVRObject cannon; public FVRObject wh; public FVRObject wv; public string bh; public string bv; public GameObject t; public GameObject g; public string whid; public string wvid; public string turretid; public string cannonid; public string turretposid; public string cannonposid; public FVRObject hhandle; public string hposid; public string hcrankid; public string hhandleid; public GameObject hhandleobj; public Rigidbody hrig; public SpringJoint hcj; public FVRObject hand; public string handb; public string handid; public FVRObject vhandle; public string vposid; public string vcrankid; public string vhandleid; public GameObject vhandleobj; public Rigidbody vrig; public SpringJoint vcj; public string lsb; public string rsb; public string stl; public string str; public FVRObject ls; public FVRObject rs; private void Awake() { //IL_0033: 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_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) //IL_010d: 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_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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GameObject.Find(stl) == (Object)null) { Object.Instantiate(((AnvilAsset)ls).GetGameObject(), GameObject.Find(lsb).transform.position, GameObject.Find(lsb).transform.rotation); } if ((Object)(object)GameObject.Find(str) == (Object)null) { Object.Instantiate(((AnvilAsset)rs).GetGameObject(), GameObject.Find(rsb).transform.position, GameObject.Find(rsb).transform.rotation); } if ((Object)(object)GameObject.Find(handid) == (Object)null) { Object.Instantiate(((AnvilAsset)hand).GetGameObject(), ((Component)this).gameObject.transform); } if ((Object)(object)GameObject.Find(turretid) == (Object)null) { Object.Instantiate(((AnvilAsset)turret).GetGameObject(), GameObject.Find(turretposid).transform.position, GameObject.Find(turretposid).transform.rotation); } if ((Object)(object)GameObject.Find(cannonid) == (Object)null) { Object.Instantiate(((AnvilAsset)cannon).GetGameObject(), GameObject.Find(cannonposid).transform.position, GameObject.Find(cannonposid).transform.rotation); } if ((Object)(object)GameObject.Find(whid) == (Object)null) { Object.Instantiate(((AnvilAsset)wh).GetGameObject(), GameObject.Find(bh).transform.position, GameObject.Find(bh).transform.rotation); } if ((Object)(object)GameObject.Find(wvid) == (Object)null) { Object.Instantiate(((AnvilAsset)wv).GetGameObject(), GameObject.Find(bv).transform.position, GameObject.Find(bv).transform.rotation); } if ((Object)(object)GameObject.Find(hposid) != (Object)null) { Object.Instantiate(((AnvilAsset)hhandle).GetGameObject(), GameObject.Find(hposid).transform); } if ((Object)(object)GameObject.Find(vposid) != (Object)null) { Object.Instantiate(((AnvilAsset)vhandle).GetGameObject(), GameObject.Find(vposid).transform); } } private void Update() { //IL_009c: 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_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0272: 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_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hhandleobj == (Object)null) { hhandleobj = GameObject.Find(hhandleid); } if ((Object)(object)vhandleobj == (Object)null) { vhandleobj = GameObject.Find(vhandleid); } if ((Object)(object)hcj == (Object)null) { hcj = hhandleobj.AddComponent(); ((Joint)hcj).connectedBody = GameObject.Find(hcrankid).GetComponent(); ((Joint)hcj).anchor = new Vector3(0f, 0f, 0f); hcj.spring = 10000f; hcj.damper = 100f; hcj.tolerance = 1E-11f; } if ((Object)(object)vcj == (Object)null) { vcj = vhandleobj.AddComponent(); ((Joint)vcj).connectedBody = GameObject.Find(vcrankid).GetComponent(); ((Joint)vcj).anchor = new Vector3(0f, 0f, 0f); vcj.spring = 10000f; vcj.damper = 100f; vcj.tolerance = 1E-11f; } if ((Object)(object)hhandleobj != (Object)null && (Object)(object)GameObject.Find(hposid) != (Object)null) { hhandleobj.GetComponent().isKinematic = false; } if ((Object)(object)vhandleobj != (Object)null && (Object)(object)GameObject.Find(vposid) != (Object)null) { vhandleobj.GetComponent().isKinematic = false; } if (!((Object)(object)GameObject.Find(turretid) != (Object)null)) { return; } t = GameObject.Find(turretid); t.transform.SetParent(GameObject.Find(turretposid).transform); t.transform.localPosition = new Vector3(0f, 0f, 0f); t.transform.localEulerAngles = new Vector3(0f, t.transform.localEulerAngles.y, 0f); if ((Object)(object)GameObject.Find(cannonid) != (Object)null) { g = GameObject.Find(cannonid); g.transform.SetParent(GameObject.Find(cannonposid).transform); g.transform.localPosition = new Vector3(0f, 0f, 0f); float num = g.transform.localEulerAngles.z; if (num > 15f) { num = 15f; } else if (num < 0.5f) { num = 0.5f; } g.transform.localEulerAngles = new Vector3(0f, 0f, num); } } } public class TankCommanderVoiceControl : MonoBehaviour { public string geol = "SphereL(Clone)"; public string geor = "SphereR(Clone)"; public GameObject DriverGeo; public GameObject Phys; private KeywordRecognizer keyword; private Dictionary dic = new Dictionary(); public AR15HandleSightFlipper EngineSwitch; public AR15HandleSightFlipper DriverHatch; public AR15HandleSightFlipper Gear; public AR15HandleSightFlipper Light; public bool fore = false; public bool l = false; public bool r = false; public bool hasCrew = false; public bool engineOn = false; public bool moveForward = false; public bool moveRearward = false; public bool turnLeft = false; public bool turnRight = false; private void Start() { //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Expected O, but got Unknown //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Expected O, but got Unknown Phys.SetActive(false); dic.Add("Водитель, введите.", CrewOn); dic.Add("Водитель, уходите.", CrewOff); dic.Add("Driver, on board.", CrewOn); dic.Add("Driver, get in.", CrewOn); dic.Add("Driver, off board.", CrewOff); dic.Add("Driver, bail out.", CrewOff); dic.Add("驾驶员,上车。", CrewOn); dic.Add("驾驶员,登车。.", CrewOn); dic.Add("驾驶员,下车。", CrewOff); dic.Add("驾驶员,弃车。", CrewOff); dic.Add("Водитель, запусти двигатель.", EngineOn); dic.Add("Водитель, выключите двигатель.", EngineOff); dic.Add("Водитель, вперед.", MoveFore); dic.Add("Водитель, подай назад.", MoveRear); dic.Add("Водитель, слева.", TurnLeft); dic.Add("Водитель, справа.", TurnRight); dic.Add("Водитель, впереди.", GoStraight); dic.Add("Водитель, остановись.", HoldStop); dic.Add("Водитель, выходи.", HatchOpen); dic.Add("Водитель, садись.", HatchClose); dic.Add("Driver, turn on the engine.", EngineOn); dic.Add("Driver, start the engine.", EngineOn); dic.Add("Driver, turn off the engine.", EngineOff); dic.Add("Driver, stop the engine.", EngineOff); dic.Add("驾驶员,启动引擎。", EngineOn); dic.Add("驾驶员,引擎启动。", EngineOn); dic.Add("驾驶员,关闭引擎。", EngineOff); dic.Add("驾驶员,引擎关闭。", EngineOff); dic.Add("Driver, keep moving forward.", MoveFore); dic.Add("Driver, move forward.", MoveFore); dic.Add("Driver, forward.", MoveFore2); dic.Add("Driver, keep moving rearward.", MoveRear); dic.Add("Driver, move backward.", MoveRear); dic.Add("Driver, backward.", MoveRear); dic.Add("Driver, keep turning Left.", TurnLeft); dic.Add("Driver, turn Left.", TurnLeft); dic.Add("Driver, Left.", TurnLeft2); dic.Add("Driver, keep turning Right.", TurnRight); dic.Add("Driver, turn Right.", TurnRight); dic.Add("Driver, Right.", TurnRight2); dic.Add("Driver, move straight.", GoStraight); dic.Add("Driver, stop.", HoldStop); dic.Add("Driver, hold position.", HoldStop); dic.Add("驾驶员,保持前进。", MoveFore); dic.Add("驾驶员,向前保持。", MoveFore); dic.Add("驾驶员,前进。", MoveFore2); dic.Add("驾驶员,后退。", MoveRear); dic.Add("驾驶员,倒车。", MoveRear); dic.Add("驾驶员,后撤。", MoveRear); dic.Add("驾驶员,保持左转。", TurnLeft); dic.Add("驾驶员,向左保持。", TurnLeft); dic.Add("驾驶员,左转。", TurnLeft2); dic.Add("驾驶员,保持右转。", TurnRight); dic.Add("驾驶员,向右保持。", TurnRight); dic.Add("驾驶员,右转。", TurnRight2); dic.Add("驾驶员,直行。", GoStraight); dic.Add("驾驶员,停下。", HoldStop); dic.Add("驾驶员,停车。", HoldStop); dic.Add("Driver, turn out.", HatchOpen); dic.Add("Driver, open the hatch.", HatchOpen); dic.Add("Driver, turn in.", HatchClose); dic.Add("Driver, close the hatch.", HatchClose); dic.Add("Driver, turn on the head light.", LightOn); dic.Add("Driver, turn off the head light.", LightOff); dic.Add("Водитель,высунуться.", HatchOpen); dic.Add("Водитель,открытый люк.", HatchOpen); dic.Add("Водитель,сжиматься назад.", HatchClose); dic.Add("Водитель,закрыть люк.", HatchClose); dic.Add("驾驶员,探出。", HatchOpen); dic.Add("驾驶员,打开舱门。", HatchOpen); dic.Add("驾驶员,缩回。", HatchClose); dic.Add("驾驶员,关闭舱门。", HatchClose); keyword = new KeywordRecognizer(dic.Keys.ToArray()); ((PhraseRecognizer)keyword).OnPhraseRecognized += new PhraseRecognizedDelegate(Keyword_OnPhraseRecognized); ((PhraseRecognizer)keyword).Start(); } private void Keyword_OnPhraseRecognized(PhraseRecognizedEventArgs args) { Debug.Log((object)args.text); dic[args.text](); } public void CrewOn() { hasCrew = true; } public void CrewOff() { hasCrew = false; } public void EngineOn() { if (hasCrew) { EngineSwitch.m_isLargeAperture = false; } } public void EngineOff() { if (hasCrew) { EngineSwitch.m_isLargeAperture = true; } } public void MoveFore() { moveForward = true; moveRearward = false; } public void MoveRear() { moveForward = false; moveRearward = true; } public void TurnLeft() { turnLeft = true; turnRight = false; } public void TurnRight() { turnLeft = false; turnRight = true; } public void MoveFore2() { if (hasCrew) { Gear.m_isLargeAperture = true; fore = true; } } public void TurnLeft2() { if (hasCrew) { Gear.m_isLargeAperture = true; l = true; } } public void TurnRight2() { if (hasCrew) { Gear.m_isLargeAperture = true; r = true; } } public void GoStraight() { turnLeft = false; turnRight = false; } public void HoldStop() { moveForward = false; moveRearward = false; turnLeft = false; turnRight = false; } public void HatchOpen() { if (hasCrew) { DriverHatch.m_isLargeAperture = true; } } public void HatchClose() { if (hasCrew) { DriverHatch.m_isLargeAperture = false; } } public void LightOn() { if (hasCrew) { Light.m_isLargeAperture = false; } } public void LightOff() { if (hasCrew) { Light.m_isLargeAperture = true; } } private void Update() { //IL_0057: 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_00e2: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0396: 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_028b: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: 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_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0488: 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_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) if (hasCrew) { if (fore) { float num = 5f; num -= Time.deltaTime; if (num > 0f) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); fore = false; } } if (l) { float num2 = 5f; num2 -= Time.deltaTime; if (num2 > 0f) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); l = false; } } if (r) { float num3 = 5f; num3 -= Time.deltaTime; if (num3 > 0f) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); } } DriverGeo.SetActive(true); Phys.SetActive(true); if (moveForward) { Gear.m_isLargeAperture = true; if (!turnLeft && !turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); } else if (!turnLeft && turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); } else if (turnLeft && !turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); } } else if (moveRearward) { Gear.m_isLargeAperture = false; if (!turnLeft && !turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); } else if (turnLeft && !turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); } else if (!turnLeft && turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.2f); } } else if (!moveForward && !moveRearward) { Gear.m_isLargeAperture = true; if (!turnLeft && !turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0f); } else if (!turnLeft && turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0f); } else if (turnLeft && !turnRight) { ((Component)GameObject.Find(geol).transform).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)GameObject.Find(geor).transform).transform.localPosition = new Vector3(0f, 0f, 0.1f); } } } else if (!hasCrew) { DriverGeo.SetActive(false); Phys.SetActive(false); } } private void OnDestroy() { ((PhraseRecognizer)keyword).Stop(); } } public class TankCommanderVoiceControl2 : MonoBehaviour { public SosigLink sosigLink; public GameObject GunnerGeo; public TurretHandCranks THC; public GameObject Phys; public GameObject PhysCannon; private KeywordRecognizer keyword; private Dictionary dic = new Dictionary(); public AR15HandleSightFlipper CannonTrigger; public AR15HandleSightFlipper GunnerHatch; public AR15HandleSightFlipper PKTTrigger; public bool hasCrew = false; public bool moveLeft = false; public bool moveRight = false; public bool moveUp = false; public bool moveDown = false; public bool moveLeft2 = false; public bool moveRight2 = false; public bool moveUp2 = false; public bool moveDown2 = false; public float timer = 0.5f; public GameObject sightX; public GameObject sightY; public float EngageRange = 15f; public float EngageAngle = 45f; public LayerMask LatchingMask; public LayerMask BlockingMask; public Transform FireArm; public float PrecisionAngle = 5f; public AR15HandleSightFlipper IR; public AR15HandleSightFlipper Smoke; private void Start() { //IL_0b0e: Unknown result type (might be due to invalid IL or missing references) //IL_0b18: Expected O, but got Unknown //IL_0b25: Unknown result type (might be due to invalid IL or missing references) //IL_0b2f: Expected O, but got Unknown Phys.SetActive(false); dic.Add("Наводчик, введите.", CrewOn); dic.Add("Наводчик, уходите.", CrewOff); dic.Add("Gunner, on board.", CrewOn); dic.Add("Gunner, get in.", CrewOn); dic.Add("Gunner, off board.", CrewOff); dic.Add("Gunner, bail out.", CrewOff); dic.Add("炮手,上车。", CrewOn); dic.Add("炮手,下车。", CrewOff); dic.Add("炮手,登车。", CrewOn); dic.Add("炮手,弃车。", CrewOff); dic.Add("Наводчик, слева.", TurnLeft2); dic.Add("Наводчик, справа.", TurnRight2); dic.Add("Наводчик, вверх.", MoveUp2); dic.Add("Наводчик, вниз.", MoveDown2); dic.Add("Наводчик, огонь.", FireCannon); dic.Add("Наводчик, пулеметный огонь.", FirePKT); dic.Add("Наводчик, захват цели.", LockTarget); dic.Add("Наводчик, разблокируй.", CancelTarget); dic.Add("Наводчик, выходи.", HatchOpen); dic.Add("Наводчик, садись.", HatchClose); dic.Add("Наводчик, остановись.", HoldStop); dic.Add("Gunner, keep aiming upward.", MoveUp); dic.Add("Gunner, aim upward.", MoveUp); dic.Add("Gunner, upward.", MoveUp2); dic.Add("Gunner, keep aiming downward.", MoveDown); dic.Add("Gunner, aim downward.", MoveDown); dic.Add("Gunner, downward.", MoveDown2); dic.Add("Gunner, keep aiming Left.", TurnRight); dic.Add("Gunner, turn Left.", TurnRight); dic.Add("Gunner, Left.", TurnRight2); dic.Add("Gunner, keep aiming Right.", TurnLeft); dic.Add("Gunner, turn Right ward.", TurnLeft); dic.Add("Gunner, Right.", TurnLeft2); dic.Add("Gunner, fire.", FireCannon); dic.Add("Gunner, open fire.", FireCannon); dic.Add("Gunner, fire main gun.", FireCannon); dic.Add("Gunner, PKT fire.", FirePKT); dic.Add("Gunner, PKT open fire.", FirePKT); dic.Add("Gunner, fire PKT.", FirePKT); dic.Add("Gunner, stop.", HoldStop); dic.Add("Gunner, hold position.", HoldStop); dic.Add("Gunner, search target.", SeekTarget); dic.Add("Gunner, look for target.", SeekTarget); dic.Add("Gunner, lock on.", LockTarget); dic.Add("Gunner, lock target.", LockTarget); dic.Add("Gunner, lock.", LockTarget); dic.Add("Gunner, aim target.", LockTarget); dic.Add("Gunner, aim.", LockTarget); dic.Add("Gunner, cancel target.", CancelTarget); dic.Add("Gunner, cancel locking.", CancelTarget); dic.Add("Gunner, cancel aiming.", CancelTarget); dic.Add("Gunner, cancel.", CancelTarget); dic.Add("炮手,向上瞄准。", MoveUp); dic.Add("炮手,往上瞄准。", MoveUp); dic.Add("炮手,向上。", MoveUp2); dic.Add("炮手,向下瞄准。", MoveDown); dic.Add("炮手,往下瞄准。", MoveDown); dic.Add("炮手,向下。", MoveDown2); dic.Add("炮手,向左瞄准。", TurnLeft); dic.Add("炮手,往左瞄准。", TurnLeft); dic.Add("炮手,向左。", TurnLeft2); dic.Add("炮手,向右瞄准。", TurnRight); dic.Add("炮手,往右瞄准。", TurnRight); dic.Add("炮手,向右。", TurnRight2); dic.Add("炮手,开火。", FireCannon); dic.Add("炮手,发射。", FireCannon); dic.Add("炮手,主炮开火。", FireCannon); dic.Add("炮手,机枪开火。", FirePKT); dic.Add("炮手,机枪发射。", FirePKT); dic.Add("炮手,机枪。", FirePKT); dic.Add("炮手,停下。", HoldStop); dic.Add("炮手,保持位置。", HoldStop); dic.Add("炮手,瞄准目标。", LockTarget); dic.Add("炮手,锁定目标。", LockTarget); dic.Add("炮手,瞄准。", LockTarget); dic.Add("炮手,锁定。", LockTarget); dic.Add("炮手,给我瞅紧了对面那个逼。", LockTarget); dic.Add("炮手,取消目标。", CancelTarget); dic.Add("炮手,放弃目标。", CancelTarget); dic.Add("炮手,取消瞄准。", CancelTarget); dic.Add("炮手,取消。", CancelTarget); dic.Add("Gunner, turn out.", HatchOpen); dic.Add("Gunner, open the hatch.", HatchOpen); dic.Add("Gunner, turn in.", HatchClose); dic.Add("Gunner, close the hatch.", HatchClose); dic.Add("Наводчик,высунуться.", HatchOpen); dic.Add("Наводчик,открытый люк.", HatchOpen); dic.Add("Наводчик,сжиматься назад.", HatchClose); dic.Add("Наводчик,закрыть люк.", HatchClose); dic.Add("炮手,探出。", HatchOpen); dic.Add("炮手,打开舱门。", HatchOpen); dic.Add("炮手,缩回。", HatchClose); dic.Add("炮手,关闭舱门。", HatchClose); dic.Add("Gunner, turn on IR light.", IROn); dic.Add("Gunner, turn off IR light.", IROff); dic.Add("Gunner, deploy smoke.", FireSmoke); dic.Add("炮手,开启红外大灯。", IROn); dic.Add("炮手,关闭红外大灯。", IROff); dic.Add("Наводчик, Включи свет.", IROn); dic.Add("Наводчик, Выключите свет.", IROff); keyword = new KeywordRecognizer(dic.Keys.ToArray()); ((PhraseRecognizer)keyword).OnPhraseRecognized += new PhraseRecognizedDelegate(Keyword_OnPhraseRecognized); ((PhraseRecognizer)keyword).Start(); } private void Keyword_OnPhraseRecognized(PhraseRecognizedEventArgs args) { Debug.Log((object)args.text); dic[args.text](); } public void CrewOn() { hasCrew = true; } public void CrewOff() { hasCrew = false; } public void MoveUp() { moveUp = true; moveDown = false; } public void MoveDown() { moveUp = false; moveDown = true; } public void TurnLeft() { moveLeft = true; moveRight = false; } public void TurnRight() { moveLeft = false; moveRight = true; } public void MoveUp2() { if (hasCrew && (Object)(object)THC.vWheel != (Object)null) { moveUp2 = true; } } public void MoveDown2() { if (hasCrew && (Object)(object)THC.vWheel != (Object)null) { moveDown2 = true; } } public void TurnLeft2() { if (hasCrew && (Object)(object)THC.hWheel != (Object)null) { moveLeft2 = true; } } public void TurnRight2() { if (hasCrew && (Object)(object)THC.hWheel != (Object)null) { moveRight2 = true; } } public void FireCannon() { if (hasCrew) { CannonTrigger.m_isLargeAperture = !CannonTrigger.m_isLargeAperture; } } public void FireSmoke() { if (hasCrew) { Smoke.m_isLargeAperture = !Smoke.m_isLargeAperture; } } public void FirePKT() { if (hasCrew) { PKTTrigger.m_isLargeAperture = !PKTTrigger.m_isLargeAperture; } } public void HoldStop() { moveUp = false; moveDown = false; moveLeft = false; moveRight = false; } public void HatchOpen() { if (hasCrew) { GunnerHatch.m_isLargeAperture = true; } } public void HatchClose() { if (hasCrew) { GunnerHatch.m_isLargeAperture = false; } } public void SeekTarget() { if (hasCrew) { sosigLink = SearchTarget(); } } public void LockTarget() { if (hasCrew) { sosigLink = FindTarget(); } } public void CancelTarget() { if (hasCrew) { sosigLink = null; } } public void IROn() { if (hasCrew) { IR.m_isLargeAperture = false; } } public void IROff() { if (hasCrew) { IR.m_isLargeAperture = true; } } 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_016f: 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_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_01f2: 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_0191: 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_0357: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_029f: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: 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_0690: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)sosigLink == (Object)null) { sightX.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (hasCrew) { GunnerGeo.SetActive(true); if ((Object)(object)sosigLink != (Object)null) { XAxisLookAt(sightX.transform, ((Component)sosigLink).gameObject.transform.position, Vector3.forward); YAxisLookAt(sightY.transform, ((Component)sosigLink).gameObject.transform.position, Vector3.forward); if (sightY.transform.localEulerAngles.y > 0f && sightY.transform.localEulerAngles.y < 180f) { if ((Object)(object)THC.hWheel != (Object)null) { THC.hWheel.AddRelativeTorque(new Vector3(-200f, 0f, 0f), (ForceMode)0); } } else if (sightY.transform.localEulerAngles.y < 360f && sightY.transform.localEulerAngles.y > 180f && (Object)(object)THC.hWheel != (Object)null) { THC.hWheel.AddRelativeTorque(new Vector3(200f, 0f, 0f), (ForceMode)0); } if (sightX.transform.localEulerAngles.x > 0f && sightX.transform.localEulerAngles.x < 180f) { if ((Object)(object)THC.vWheel != (Object)null) { THC.vWheel.AddRelativeTorque(new Vector3(200f, 0f, 0f), (ForceMode)0); } } else if (sightX.transform.localEulerAngles.x > 180f && sightX.transform.localEulerAngles.x < 360f && (Object)(object)THC.vWheel != (Object)null) { THC.vWheel.AddRelativeTorque(new Vector3(-200f, 0f, 0f), (ForceMode)0); } } if (moveUp2) { timer -= Time.deltaTime; if (timer >= 0f) { if ((Object)(object)THC.vWheel != (Object)null) { THC.vWheel.AddRelativeTorque(new Vector3(-300f, 0f, 0f), (ForceMode)0); } } else if (timer < 0f) { moveUp2 = false; timer = 0.5f; } } if (moveDown2) { timer -= Time.deltaTime; if (timer >= 0f) { if ((Object)(object)THC.vWheel != (Object)null) { THC.vWheel.AddRelativeTorque(new Vector3(300f, 0f, 0f), (ForceMode)0); } } else if (timer < 0f) { moveDown2 = false; timer = 0.5f; } } if (moveLeft2) { timer -= Time.deltaTime; if (timer >= 0f) { if ((Object)(object)THC.hWheel != (Object)null) { THC.hWheel.AddRelativeTorque(new Vector3(-300f, 0f, 0f), (ForceMode)0); } } else if (timer < 0f) { moveLeft2 = false; timer = 0.5f; } } if (moveRight2) { timer -= Time.deltaTime; if (timer >= 0f) { if ((Object)(object)THC.hWheel != (Object)null) { THC.hWheel.AddRelativeTorque(new Vector3(300f, 0f, 0f), (ForceMode)0); } } else if (timer < 0f) { moveRight2 = false; timer = 0.5f; } } Phys.SetActive(true); PhysCannon.SetActive(true); if (moveUp) { if ((Object)(object)THC.vWheel != (Object)null) { THC.vWheel.AddRelativeTorque(new Vector3(-500f, 0f, 0f), (ForceMode)0); } } else if (moveDown && (Object)(object)THC.vWheel != (Object)null) { THC.vWheel.AddRelativeTorque(new Vector3(500f, 0f, 0f), (ForceMode)0); } if (moveLeft) { if ((Object)(object)THC.hWheel != (Object)null) { THC.hWheel.AddRelativeTorque(new Vector3(-500f, 0f, 0f), (ForceMode)0); } } else if (moveRight) { if ((Object)(object)THC.hWheel != (Object)null) { THC.hWheel.AddRelativeTorque(new Vector3(500f, 0f, 0f), (ForceMode)0); } } else if (!moveUp && !moveDown && !moveLeft && moveRight) { } } else if (!hasCrew) { GunnerGeo.SetActive(false); Phys.SetActive(false); PhysCannon.SetActive(false); } } private SosigLink SearchTarget() { //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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Invalid comparison between Unknown and I4 //IL_00c7: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_014f: 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) Collider[] array = Physics.OverlapSphere(((Component)FireArm).transform.position, 500f, LayerMask.op_Implicit(LatchingMask)); List list = new List(); for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i].attachedRigidbody != (Object)null && !list.Contains(array[i].attachedRigidbody)) { list.Add(array[i].attachedRigidbody); } } SosigLink result = null; float num = 360f; for (int j = 0; j < list.Count; j++) { SosigLink component = ((Component)list[j]).GetComponent(); if ((Object)(object)component != (Object)null && (int)component.S.BodyState != 3) { Vector3 val = ((Component)list[j]).transform.position - ((Component)FireArm).transform.position; float num2 = Vector3.Angle(val, ((Component)FireArm).transform.forward); Sosig s = component.S; SosigLink val2 = ((!(num2 <= 360f)) ? s.Links[1] : s.Links[0]); if (!Physics.Linecast(((Component)FireArm).transform.position, ((Component)val2).transform.position, LayerMask.op_Implicit(BlockingMask), (QueryTriggerInteraction)1)) { result = val2; num = num2; } } } return result; } private SosigLink FindTarget() { //IL_002b: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_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_0130: 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_019a: 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_01ac: Unknown result type (might be due to invalid IL or missing references) float num = EngageRange * Mathf.Tan(0.5f * EngageAngle * ((float)Math.PI / 180f)); Collider[] array = Physics.OverlapCapsule(((Component)FireArm).transform.position, ((Component)FireArm).transform.position + ((Component)FireArm).transform.forward * EngageRange, num, LayerMask.op_Implicit(LatchingMask)); List list = new List(); for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i].attachedRigidbody != (Object)null && !list.Contains(array[i].attachedRigidbody)) { list.Add(array[i].attachedRigidbody); } } SosigLink result = null; float num2 = EngageAngle; for (int j = 0; j < list.Count; j++) { SosigLink component = ((Component)list[j]).GetComponent(); if ((Object)(object)component != (Object)null && (int)component.S.BodyState != 3) { Vector3 val = ((Component)list[j]).transform.position - ((Component)FireArm).transform.position; float num3 = Vector3.Angle(val, ((Component)FireArm).transform.forward); Sosig s = component.S; SosigLink val2 = ((!(num3 <= PrecisionAngle)) ? s.Links[1] : s.Links[0]); if (num3 < num2 && !Physics.Linecast(((Component)FireArm).transform.position, ((Component)val2).transform.position, LayerMask.op_Implicit(BlockingMask), (QueryTriggerInteraction)1)) { result = val2; num2 = num3; } } } return result; } private void XAxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } private void YAxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, 0f); } private void OnDestroy() { ((PhraseRecognizer)keyword).Stop(); } } public class TankControl : MonoBehaviour { public GameObject switchgear; public DriveShift ds; public VehicleControl veh; public GameObject Lstick; public GameObject Rstick; public string lsb; public string rsb; public string stl; public string str; public float zl; public float zr; public string geol; public string geor; 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_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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0168: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0317: 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_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: 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_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: 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_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: 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_0423: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: 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_04ee: 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_0448: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046b: 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_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) if (switchgear.transform.localEulerAngles.x < 45f) { veh.currentGear = 1; ds.currentNode = 1; } if (switchgear.transform.localEulerAngles.x > 45f) { veh.currentGear = 0; ds.currentNode = -1; } if ((Object)(object)GameObject.Find(stl) != (Object)null) { Lstick = GameObject.Find(stl); Lstick.transform.SetParent(GameObject.Find(lsb).transform); zl = Lstick.transform.localPosition.z; if (zl < 0.01f) { zl = 0.01f; } else if (zl > 0.2f) { zl = 0.2f; } Lstick.transform.localPosition = new Vector3(0f, 0f, zl); GameObject.Find(geol).transform.localPosition = new Vector3(0f, 0f, Lstick.transform.localPosition.z * 5f); } if ((Object)(object)GameObject.Find(str) != (Object)null) { Rstick = GameObject.Find(str); Rstick.transform.SetParent(GameObject.Find(rsb).transform); zr = Rstick.transform.localPosition.z; if (zr < 0.01f) { zr = 0.01f; } else if (zr > 0.2f) { zr = 0.2f; } Rstick.transform.localPosition = new Vector3(0f, 0f, zr); GameObject.Find(geor).transform.localPosition = new Vector3(0f, 0f, Rstick.transform.localPosition.z * 5f); } if (!veh.isOn) { return; } if (((Component)GameObject.Find(geol).transform).transform.localPosition.z >= 0.2f || ((Component)GameObject.Find(geor).transform).transform.localPosition.z >= 0.2f) { veh.accel = (GameObject.Find(geol).transform.localPosition.z + GameObject.Find(geor).transform.localPosition.z) / 2f; veh.brake = false; if (GameObject.Find(geor).transform.localPosition.z - GameObject.Find(geol).transform.localPosition.z > 0.2f || GameObject.Find(geor).transform.localPosition.z - GameObject.Find(geol).transform.localPosition.z < -0.2f) { veh.steer = GameObject.Find(geol).transform.localPosition.z - GameObject.Find(geor).transform.localPosition.z; } else if (GameObject.Find(geor).transform.localPosition.z - GameObject.Find(geol).transform.localPosition.z < 0.2f && GameObject.Find(geor).transform.localPosition.z - GameObject.Find(geol).transform.localPosition.z > -0.2f) { veh.steer = 0f; } } else if (GameObject.Find(geol).transform.localPosition.z < 0.2f && GameObject.Find(geor).transform.localPosition.z < 0.2f && GameObject.Find(geol).transform.localPosition.z > -0.2f && GameObject.Find(geor).transform.localPosition.z > -0.2f) { veh.accel = 0f; veh.brake = true; } } } public class TankTurret : MonoBehaviour { public string cannongeoid; public GameObject gun; private void Start() { } private void Update() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GameObject.Find(cannongeoid) != (Object)null) { gun.transform.localEulerAngles = new Vector3(0f, 0f, GameObject.Find(cannongeoid).transform.localEulerAngles.z); } } } public class TurnOnEngine : MonoBehaviour { public VehicleControl car; public GameObject engineswitch; public AudioSource audioon; public AudioSource audiooff; public bool ignited = false; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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 (engineswitch.transform.localEulerAngles.x > 45f) { if (!ignited) { audioon.Play(); ignited = true; } } else if (engineswitch.transform.localEulerAngles.x < 45f && ignited) { ignited = false; audiooff.Play(); car.isOn = false; } if (ignited && !audioon.isPlaying) { car.isOn = true; } } } public class TurretHandCranks : MonoBehaviour { public FVRObject shell; public Transform shelleject; public GameObject ejector; public bool ejected = false; public Rigidbody bh; public Rigidbody bv; public string whid; public string wvid; public string hMountid; public string vMountid; public GameObject hch; public GameObject hcv; public HingeJoint hh; public HingeJoint hv; public FVRFireArmChamber chamber; public Rigidbody hWheel; public Rigidbody vWheel; public GameObject hMount; public GameObject vMount; public float speedV = 10f; public float speedH = 10f; public GameObject audioh; public GameObject audiov; public Vector3 v_localAngleVelo; public Vector3 h_localAngleVelo; public JointSpring jsX; public JointSpring jsY; private void Awake() { jsX.spring = 10f; jsX.damper = 10f; jsY.spring = 10f; jsY.damper = 10f; } private void Update() { //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_00bf: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_0321: 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_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0360: 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_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_0574: 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) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) hMount = GameObject.Find(hMountid); vMount = GameObject.Find(vMountid); hch = GameObject.Find(whid); hch.transform.SetParent(((Component)bh).transform); float num = hch.transform.localEulerAngles.x; if (num > 30f && num < 180f) { num = 29.9f; } else if (num > 180f && num < 330f) { num = 330.1f; } hch.transform.localEulerAngles = new Vector3(num, 0f, 0f); hcv = GameObject.Find(wvid); hcv.transform.SetParent(((Component)bv).transform); float num2 = hcv.transform.localEulerAngles.x; if (num2 > 30f && num2 < 180f) { num2 = 29.9f; } else if (num2 > 180f && num2 < 330f) { num2 = 330.1f; } hcv.transform.localEulerAngles = new Vector3(num2, 0f, 0f); hWheel = hch.GetComponent(); h_localAngleVelo = ((Component)hWheel).transform.InverseTransformVector(hWheel.angularVelocity); vWheel = hcv.GetComponent(); v_localAngleVelo = ((Component)vWheel).transform.InverseTransformVector(vWheel.angularVelocity); if ((Object)(object)hh == (Object)null) { hh = hch.AddComponent(); ((Joint)hh).connectedBody = bh; ((Joint)hh).autoConfigureConnectedAnchor = false; ((Joint)hh).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)hh).anchor = new Vector3(0f, 0f, 0f); hh.useSpring = true; hh.spring = jsX; } if ((Object)(object)hv == (Object)null) { hv = hcv.AddComponent(); ((Joint)hv).connectedBody = bv; ((Joint)hv).autoConfigureConnectedAnchor = false; ((Joint)hv).connectedAnchor = new Vector3(0f, 0f, 0f); ((Joint)hv).anchor = new Vector3(0f, 0f, 0f); hv.useSpring = true; hv.spring = jsY; } if (!ejected && ejector.transform.localEulerAngles.z > 44f) { GameObject val = Object.Instantiate(((AnvilAsset)shell).GetGameObject(), ((Component)shelleject).transform.position, ((Component)shelleject).transform.rotation); Rigidbody component = val.GetComponent(); component.AddRelativeForce(new Vector3(0f, 0f, 10f), (ForceMode)2); ejected = true; } if (ejector.transform.localEulerAngles.z < 35f) { ejected = false; } if (!chamber.IsFull) { if (vMount.transform.localEulerAngles.z > 8.1f) { vMount.transform.localEulerAngles = new Vector3(0f, 0f, vMount.transform.localEulerAngles.z - 10f * Time.deltaTime); } else if (vMount.transform.localEulerAngles.z < 7.9f) { vMount.transform.localEulerAngles = new Vector3(0f, 0f, vMount.transform.localEulerAngles.z + 10f * Time.deltaTime); } } else if (chamber.IsFull) { if (v_localAngleVelo.x >= 0.01f || v_localAngleVelo.x <= -0.01f) { audiov.SetActive(true); if (vMount.transform.localEulerAngles.z > 15f) { vMount.transform.localEulerAngles = new Vector3(0f, 0f, 15f); vMount.transform.Rotate(0f * Time.deltaTime, 0f, 0f); } if (vMount.transform.localEulerAngles.z < 0.5f) { vMount.transform.localEulerAngles = new Vector3(0f, 0f, 0.5f); vMount.transform.Rotate(0f * Time.deltaTime, 0f, 0f); } else { vMount.transform.Rotate(new Vector3(0f, 0f, v_localAngleVelo.x * (0f - speedV) * Time.deltaTime)); } } else if (v_localAngleVelo.x < 0.01f && v_localAngleVelo.x > -0.01f) { audiov.SetActive(false); } } if (h_localAngleVelo.x >= 0.01f || h_localAngleVelo.x <= -0.01f) { audioh.SetActive(true); hMount.transform.Rotate(new Vector3(0f, h_localAngleVelo.x * speedH * -2f * Time.deltaTime, 0f)); } else if (h_localAngleVelo.x < 0.01f && h_localAngleVelo.x > -0.01f) { audioh.SetActive(false); } } } public class UnFrezeeRig : MonoBehaviour { public Rigidbody rig; private void Start() { } private void Update() { rig.isKinematic = false; } } public class OldAssCarStartUp : MonoBehaviour { public Rigidbody handleLever; public VehicleControl vehicle; public GameObject startblock; public float speed = 0.001f; public GameObject ignitebutton; public AudioSource startaudio; public float pitchspeed = 0.01f; private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) startblock.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ignitebutton.SetActive(false); startaudio.pitch = 0f; } 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0152: 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_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_00bc: Unknown result type (might be due to invalid IL or missing references) if (startblock.transform.localEulerAngles.x < 90f && !vehicle.isOn && handleLever.angularVelocity.y > 1f) { startaudio.Play(); startaudio.pitch = startblock.transform.localEulerAngles.x * pitchspeed; startblock.transform.Rotate(new Vector3(handleLever.angularVelocity.y * speed * Time.deltaTime, 0f, 0f)); } if (startblock.transform.localEulerAngles.x >= 90f) { startaudio.Stop(); startaudio.pitch = 0f; vehicle.TurnOnEngine(forcibly: true); } if (vehicle.isOn) { ignitebutton.SetActive(true); startblock.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (!vehicle.isOn) { ignitebutton.SetActive(false); } } } public class DriveShiftGrab : MonoBehaviour { public VehicleControl VC; public FVRInteractiveObject grabobj; public GameObject DRGeo; public GameObject HBGeo; public DriveShift DR; public GameObject HandRef; public FVRInteractiveObject grabobjHB; public GameObject HandRefHB; public ParkingBrakeClick HB; public GameObject click; public GameObject down; public GameObject gear1; public GameObject gear2; public GameObject gear3; public GameObject gear4; public GameObject gear5; public GameObject gear6; public Vector3 handrefref; [Header("H档位限制设置")] public float minX = 0f; public float maxX = 2f; public float minZ = 0f; public float maxZ = 1f; private Vector3[] gearPositions = (Vector3[])(object)new Vector3[4] { new Vector3(0f, 0f, 0f), new Vector3(2f, 0f, 0f), new Vector3(0f, 0f, 1f), new Vector3(2f, 0f, 1f) }; private Vector3[] validPathways = (Vector3[])(object)new Vector3[10] { new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 1f), new Vector3(2f, 0f, 0f), new Vector3(2f, 0f, 1f), new Vector3(0f, 0f, 0f), new Vector3(1f, 0f, 0f), new Vector3(2f, 0f, 0f), new Vector3(0f, 0f, 1f), new Vector3(1f, 0f, 1f), new Vector3(2f, 0f, 1f) }; private Vector3 currentPosition; private Vector3 targetPosition; private bool isInGear = true; private void Update() { //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_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_005f: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0ce3: Unknown result type (might be due to invalid IL or missing references) //IL_0ce8: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) //IL_0a1f: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0e34: Unknown result type (might be due to invalid IL or missing references) //IL_0e39: Unknown result type (might be due to invalid IL or missing references) //IL_0d0c: Unknown result type (might be due to invalid IL or missing references) //IL_0d11: Unknown result type (might be due to invalid IL or missing references) //IL_0a97: Unknown result type (might be due to invalid IL or missing references) //IL_0a9c: Unknown result type (might be due to invalid IL or missing references) //IL_0a49: Unknown result type (might be due to invalid IL or missing references) //IL_0a63: Unknown result type (might be due to invalid IL or missing references) //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0a81: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0f85: Unknown result type (might be due to invalid IL or missing references) //IL_0f8a: Unknown result type (might be due to invalid IL or missing references) //IL_0e5d: Unknown result type (might be due to invalid IL or missing references) //IL_0e62: Unknown result type (might be due to invalid IL or missing references) //IL_0da2: Unknown result type (might be due to invalid IL or missing references) //IL_0da7: Unknown result type (might be due to invalid IL or missing references) //IL_0b14: Unknown result type (might be due to invalid IL or missing references) //IL_0b19: Unknown result type (might be due to invalid IL or missing references) //IL_0ac6: Unknown result type (might be due to invalid IL or missing references) //IL_0ae0: Unknown result type (might be due to invalid IL or missing references) //IL_0ae5: Unknown result type (might be due to invalid IL or missing references) //IL_0aee: Unknown result type (might be due to invalid IL or missing references) //IL_0afe: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_1045: Unknown result type (might be due to invalid IL or missing references) //IL_104a: Unknown result type (might be due to invalid IL or missing references) //IL_106b: Unknown result type (might be due to invalid IL or missing references) //IL_1070: Unknown result type (might be due to invalid IL or missing references) //IL_0fa8: Unknown result type (might be due to invalid IL or missing references) //IL_0fad: Unknown result type (might be due to invalid IL or missing references) //IL_0ef3: Unknown result type (might be due to invalid IL or missing references) //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0ba0: Unknown result type (might be due to invalid IL or missing references) //IL_0ba5: Unknown result type (might be due to invalid IL or missing references) //IL_0b37: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0be7: Unknown result type (might be due to invalid IL or missing references) //IL_0bec: Unknown result type (might be due to invalid IL or missing references) //IL_0bc3: Unknown result type (might be due to invalid IL or missing references) //IL_0bc8: Unknown result type (might be due to invalid IL or missing references) //IL_0b66: Unknown result type (might be due to invalid IL or missing references) //IL_0b7a: Unknown result type (might be due to invalid IL or missing references) //IL_0b8a: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: 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_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_10b5: Unknown result type (might be due to invalid IL or missing references) //IL_10ba: Unknown result type (might be due to invalid IL or missing references) //IL_0c64: Unknown result type (might be due to invalid IL or missing references) //IL_0c69: Unknown result type (might be due to invalid IL or missing references) //IL_0c16: Unknown result type (might be due to invalid IL or missing references) //IL_0c26: Unknown result type (might be due to invalid IL or missing references) //IL_0c2b: Unknown result type (might be due to invalid IL or missing references) //IL_0c3e: Unknown result type (might be due to invalid IL or missing references) //IL_0c4e: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_0c93: Unknown result type (might be due to invalid IL or missing references) //IL_0ca3: Unknown result type (might be due to invalid IL or missing references) //IL_0ca8: Unknown result type (might be due to invalid IL or missing references) //IL_0cbb: Unknown result type (might be due to invalid IL or missing references) //IL_0ccb: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: 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_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_1122: Unknown result type (might be due to invalid IL or missing references) //IL_1127: Unknown result type (might be due to invalid IL or missing references) //IL_110c: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0350: 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_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: 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_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_043c: 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_0397: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0526: 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_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0802: Unknown result type (might be due to invalid IL or missing references) //IL_071e: Unknown result type (might be due to invalid IL or missing references) //IL_0723: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_0947: Unknown result type (might be due to invalid IL or missing references) //IL_094c: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_0928: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_0825: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_069d: 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_0679: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Unknown result type (might be due to invalid IL or missing references) //IL_09a4: Unknown result type (might be due to invalid IL or missing references) //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Unknown result type (might be due to invalid IL or missing references) //IL_0985: Unknown result type (might be due to invalid IL or missing references) //IL_098e: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Unknown result type (might be due to invalid IL or missing references) //IL_07a4: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: 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_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_09dd: Unknown result type (might be due to invalid IL or missing references) //IL_09e2: Unknown result type (might be due to invalid IL or missing references) //IL_09eb: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Unknown result type (might be due to invalid IL or missing references) //IL_0882: Unknown result type (might be due to invalid IL or missing references) //IL_088b: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: 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) //IL_07e6: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08df: Unknown result type (might be due to invalid IL or missing references) //IL_08e8: Unknown result type (might be due to invalid IL or missing references) HandRef.transform.localPosition = new Vector3(Mathf.Clamp(HandRef.transform.localPosition.x, 0f, 2f), 0f, Mathf.Clamp(HandRef.transform.localPosition.z, 0f, 1f)); HandRefHB.transform.localPosition = new Vector3(0f, Mathf.Clamp(HandRefHB.transform.localPosition.y, 0f, 1f), 0f); if (grabobj.m_isHeld) { if (grabobj.m_hand.Input.TriggerFloat > 0.75f) { HandRef.transform.position = Vector3.Lerp(HandRef.transform.position, ((Component)grabobj.m_hand).gameObject.transform.position, 0.05f); if (HandRef.transform.localPosition.x > 2f) { HandRef.transform.localPosition = new Vector3(2f, 0f, HandRef.transform.localPosition.z); } else if (HandRef.transform.localPosition.x < 0f) { HandRef.transform.localPosition = new Vector3(0f, 0f, HandRef.transform.localPosition.z); } if (HandRef.transform.localPosition.z > 1f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 1f); } else if (HandRef.transform.localPosition.z < 0f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 0f); } if (HandRef.transform.localPosition.x >= 0f && HandRef.transform.localPosition.x <= 0.2f) { if (HandRef.transform.localPosition.z < 0f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 0f); } if (HandRef.transform.localPosition.z > 1f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 1f); } } if (HandRef.transform.localPosition.x > 0.2f && HandRef.transform.localPosition.x < 1.8f) { if (HandRef.transform.localPosition.z < 0.4f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 0.4f); } if (HandRef.transform.localPosition.z > 0.6f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 0.6f); } } if (HandRef.transform.localPosition.x >= 1.8f && HandRef.transform.localPosition.x <= 2f) { if (HandRef.transform.localPosition.z < 0f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 0f); } if (HandRef.transform.localPosition.z > 1f) { HandRef.transform.localPosition = new Vector3(HandRef.transform.localPosition.x, 0f, 1f); } } if (HandRef.transform.localPosition.z > 0.6f || HandRef.transform.localPosition.z < 0.4f) { if (HandRef.transform.localPosition.x >= 0f && HandRef.transform.localPosition.x <= 0.5f) { if (HandRef.transform.localPosition.x < 0f) { HandRef.transform.localPosition = new Vector3(0f, 0f, HandRef.transform.localPosition.z); } if (HandRef.transform.localPosition.x > 0.2f) { HandRef.transform.localPosition = new Vector3(0.2f, 0f, HandRef.transform.localPosition.z); } } if (HandRef.transform.localPosition.x > 0.5f && HandRef.transform.localPosition.x < 1.5f) { if (HandRef.transform.localPosition.x < 0.8f) { HandRef.transform.localPosition = new Vector3(0.8f, 0f, HandRef.transform.localPosition.z); } if (HandRef.transform.localPosition.x > 1.2f) { HandRef.transform.localPosition = new Vector3(1.2f, 0f, HandRef.transform.localPosition.z); } } if (HandRef.transform.localPosition.x >= 1.5f && HandRef.transform.localPosition.x <= 2f) { if (HandRef.transform.localPosition.x < 1.8f) { HandRef.transform.localPosition = new Vector3(1.8f, 0f, HandRef.transform.localPosition.z); } if (HandRef.transform.localPosition.x > 2f) { HandRef.transform.localPosition = new Vector3(2f, 0f, HandRef.transform.localPosition.z); } } } if (HandRef.transform.localPosition.z <= 0.6f || HandRef.transform.localPosition.z >= 0.4f) { if (HandRef.transform.localPosition.x < 0f) { HandRef.transform.localPosition = new Vector3(0f, 0f, HandRef.transform.localPosition.z); } if (HandRef.transform.localPosition.x > 2f) { HandRef.transform.localPosition = new Vector3(2f, 0f, HandRef.transform.localPosition.z); } } } } else if (!grabobj.m_isHeld) { if (HandRef.transform.localPosition.x >= 1.5f) { HandRef.transform.localPosition = Vector3.SmoothDamp(HandRef.transform.localPosition, new Vector3(2f, 0f, HandRef.transform.localPosition.z), ref handrefref, 0.1f); } if (HandRef.transform.localPosition.x <= 0.5f) { HandRef.transform.localPosition = Vector3.SmoothDamp(HandRef.transform.localPosition, new Vector3(0f, 0f, HandRef.transform.localPosition.z), ref handrefref, 0.1f); } if (HandRef.transform.localPosition.x > 0.5f && HandRef.transform.localPosition.x < 1.5f) { HandRef.transform.localPosition = Vector3.SmoothDamp(HandRef.transform.localPosition, new Vector3(1f, 0f, 0.5f), ref handrefref, 0.1f); } if (HandRef.transform.localPosition.x <= 0.5f || HandRef.transform.localPosition.x >= 1.5f) { if (HandRef.transform.localPosition.z >= 0.5f) { HandRef.transform.localPosition = Vector3.SmoothDamp(HandRef.transform.localPosition, new Vector3(HandRef.transform.localPosition.x, 0f, 1f), ref handrefref, 0.1f); } if (HandRef.transform.localPosition.z < 0.5f) { HandRef.transform.localPosition = Vector3.SmoothDamp(HandRef.transform.localPosition, new Vector3(HandRef.transform.localPosition.x, 0f, 0f), ref handrefref, 0.1f); } } } if ((double)HandRef.transform.localPosition.z > 0.75) { if ((double)HandRef.transform.localPosition.x > 1.75) { DR.currentNode = 4; VC.currentGear = 4; VC.NeutralGear = false; gear1.SetActive(false); gear2.SetActive(false); gear3.SetActive(false); gear4.SetActive(false); gear5.SetActive(true); gear6.SetActive(false); } if (HandRef.transform.localPosition.x <= 0.25f) { DR.currentNode = 2; VC.currentGear = 2; VC.NeutralGear = false; gear1.SetActive(true); gear2.SetActive(false); gear3.SetActive(false); gear4.SetActive(false); gear5.SetActive(false); gear6.SetActive(false); } } if ((double)HandRef.transform.localPosition.z < 0.25) { if ((double)HandRef.transform.localPosition.x > 1.75) { DR.currentNode = 0; VC.currentGear = 0; VC.NeutralGear = false; gear1.SetActive(false); gear2.SetActive(false); gear3.SetActive(false); gear4.SetActive(false); gear5.SetActive(false); gear6.SetActive(true); } if (HandRef.transform.localPosition.x <= 0.25f) { DR.currentNode = 3; VC.currentGear = 3; VC.NeutralGear = false; gear1.SetActive(false); gear2.SetActive(true); gear3.SetActive(false); gear4.SetActive(false); gear5.SetActive(false); gear6.SetActive(false); } } if (HandRef.transform.localPosition.x > 0.75f && HandRef.transform.localPosition.x < 1.25f) { DR.currentNode = 1; VC.currentGear = 1; VC.NeutralGear = true; gear1.SetActive(false); gear2.SetActive(false); gear3.SetActive(true); gear4.SetActive(false); gear5.SetActive(false); gear6.SetActive(false); } AxisLookAt(DRGeo.transform, HandRef.transform.position, Vector3.forward); AxisLookAtY(HBGeo.transform, HandRefHB.transform.position, Vector3.forward); if (grabobjHB.m_isHeld) { if (grabobjHB.m_hand.Input.TriggerFloat > 0.75f || HandRefHB.transform.localPosition.y < 0.25f) { HB.isOn = false; } if (!HB.isOn) { HandRefHB.transform.position = ((Component)grabobjHB.m_hand).gameObject.transform.position; } if (HandRefHB.transform.localPosition.y > 0.75f && grabobjHB.m_hand.Input.TriggerFloat <= 0.75f) { HB.isOn = true; } } if (HB.isOn) { VC.brake = true; down.SetActive(false); click.SetActive(true); } else if (!HB.isOn) { down.SetActive(true); click.SetActive(false); } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } private void AxisLookAtY(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } private void EnforceHLimits() { //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_0053: 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_007b: 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_0066: Unknown result type (might be due to invalid IL or missing references) Vector3 val = currentPosition; val.x = Mathf.Clamp(val.x, minX, maxX); val.z = Mathf.Clamp(val.z, minZ, maxZ); val.y = 0f; if (!IsOnValidHPath(val)) { val = FindNearestValidPosition(val); } HandRef.transform.localPosition = val; currentPosition = val; } private bool IsOnValidHPath(Vector3 position) { if ((position.x >= 0f && position.x <= 0.2f) || (position.x >= 1.8f && position.x <= 2f)) { return position.z >= minZ && position.z <= maxZ; } if (position.z <= 0.6f && position.z >= 0.4f) { return position.x >= minX && position.x <= maxX; } return false; } private Vector3 FindNearestValidPosition(Vector3 invalidPosition) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_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_0031: 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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_0071: 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_005a: 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_0079: Unknown result type (might be due to invalid IL or missing references) Vector3 result = invalidPosition; float num = float.MaxValue; for (int i = 0; i < validPathways.Length; i += 2) { Vector3 lineStart = validPathways[i]; Vector3 lineEnd = validPathways[i + 1]; Vector3 nearestPointOnLine = GetNearestPointOnLine(lineStart, lineEnd, invalidPosition); float num2 = Vector3.Distance(invalidPosition, nearestPointOnLine); if (num2 < num) { num = num2; result = nearestPointOnLine; } } return result; } private Vector3 GetNearestPointOnLine(Vector3 lineStart, Vector3 lineEnd, Vector3 point) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) Vector3 val = lineEnd - lineStart; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Distance(lineStart, lineEnd); Vector3 val2 = point - lineStart; float num2 = Vector3.Dot(val2, normalized); num2 = Mathf.Clamp(num2, 0f, num); return lineStart + normalized * num2; } public int GetCurrentGear() { //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) for (int i = 0; i < gearPositions.Length; i++) { if (Vector3.Distance(((Component)this).transform.localPosition, gearPositions[i]) < 0.1f) { return i + 1; } } return 0; } public void SnapToNearestGear() { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) Vector3 localPosition = ((Component)this).transform.localPosition; Vector3 val = gearPositions[0]; float num = Vector3.Distance(localPosition, val); for (int i = 1; i < gearPositions.Length; i++) { float num2 = Vector3.Distance(localPosition, gearPositions[i]); if (num2 < num) { num = num2; val = gearPositions[i]; } } ((Component)this).transform.localPosition = val; } public bool CanMoveTo(Vector3 targetPos) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) targetPos.y = 0f; targetPos.x = Mathf.Clamp(targetPos.x, minX, maxX); targetPos.z = Mathf.Clamp(targetPos.z, minZ, maxZ); return IsOnValidHPath(targetPos); } } public class ParentPlayer : MonoBehaviour { public AircraftSeat seat; private void Start() { } private void Update() { if (seat.is_inseat) { ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.SetParent(((Component)this).gameObject.transform); ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.SetParent(((Component)this).gameObject.transform); ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent(((Component)this).gameObject.transform); } if (!seat.is_inseat) { ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.SetParent(((Component)GM.CurrentMovementManager).gameObject.transform); ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.SetParent(((Component)GM.CurrentMovementManager).gameObject.transform); ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); } } private void OnDestroy() { ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.SetParent(((Component)GM.CurrentMovementManager).gameObject.transform); ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.SetParent(((Component)GM.CurrentMovementManager).gameObject.transform); ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); } } public class Slotarea : MonoBehaviour { public GameObject parent; private void OnTriggerStay(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if (!((Object)(object)component != (Object)null) || !((Object)(object)gameObject != (Object)(object)parent) || (int)component.QBSlotType != 0 || ((FVRInteractiveObject)component).m_isHeld || !((Object)(object)component.m_quickbeltSlot == (Object)null)) { return; } float num = Vector3.Distance(((Component)component).transform.position, ((Component)GM.CurrentPlayerBody.LeftHand).transform.position); float num2 = Vector3.Distance(((Component)component).transform.position, ((Component)GM.CurrentPlayerBody.RightHand).transform.position); if (num < 0.25f || num2 < 0.25f) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = false; component2.isKinematic = true; } } } private void OnTriggerExit(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && (int)component.QBSlotType == 0 && ((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = true; component2.isKinematic = false; } } } } public class WheelChairWheel : MonoBehaviour { public AircraftSeat seat; public GameObject nav; public Vector3 velLinearWorldL; public Vector3 velLinearWorldR; public Transform slapdirDownL; public Transform slapdirDownR; public Rigidbody wheelL; public Rigidbody wheelR; public Rigidbody chair; public float cd = 0f; public GameObject L; public GameObject L2; public GameObject R; public GameObject R2; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable != (Object)null && (Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent() != (Object)null && (Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent() == (Object)(object)firearm) { cd = 0.5f; } if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable != (Object)null && (Object)(object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent() != (Object)null && (Object)(object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent() == (Object)(object)firearm) { cd = 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 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); } private void Start() { } private void FixedUpdate() { if ((Object)(object)seat.hand != (Object)null) { nav.SetActive(true); } else if ((Object)(object)seat.hand == (Object)null) { nav.SetActive(false); } } private void Update() { //IL_026a: 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_0286: 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_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: 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_0333: 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_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: 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_030b: 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_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) if (cd < 0f) { cd = 0f; } if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable != (Object)null && (Object)(object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent() != (Object)null && cd > 0f) { cd -= Time.deltaTime; if ((Object)(object)seat.hand != (Object)null) { L.transform.rotation = ((Component)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().MuzzlePos).transform.rotation; chair.AddForce(100000f * ((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject.GetComponent().RecoilProfile.ZLinearPerShot * (L.transform.position - L2.transform.position), (ForceMode)0); } } if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable != (Object)null && (Object)(object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent() != (Object)null && cd > 0f) { cd -= Time.deltaTime; if ((Object)(object)seat.hand != (Object)null) { R.transform.rotation = ((Component)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().MuzzlePos).transform.rotation; chair.AddForce(100000f * ((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject.GetComponent().RecoilProfile.ZLinearPerShot * (R.transform.position - R2.transform.position), (ForceMode)0); } } velLinearWorldL = GM.CurrentMovementManager.Hands[0].Input.VelLinearWorld; velLinearWorldR = GM.CurrentMovementManager.Hands[1].Input.VelLinearWorld; if (Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapdirDownL.position) < 0.5f && Vector3.Angle(velLinearWorldL, slapdirDownL.forward) < 45f && ((Vector3)(ref velLinearWorldL)).magnitude > 1.5f) { wheelL.AddRelativeTorque(new Vector3(1000000f, 0f, 0f), (ForceMode)1); } if (Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapdirDownR.position) < 0.5f && Vector3.Angle(velLinearWorldR, slapdirDownR.forward) < 45f && ((Vector3)(ref velLinearWorldR)).magnitude > 1.5f) { wheelR.AddRelativeTorque(new Vector3(1000000f, 0f, 0f), (ForceMode)1); } if (Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapdirDownL.position) < 0.5f && Vector3.Angle(velLinearWorldL, slapdirDownL.up) < 45f && ((Vector3)(ref velLinearWorldL)).magnitude > 1.5f) { wheelL.AddRelativeTorque(new Vector3(-1000000f, 0f, 0f), (ForceMode)1); } if (Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapdirDownR.position) < 0.5f && Vector3.Angle(velLinearWorldR, slapdirDownR.up) < 45f && ((Vector3)(ref velLinearWorldR)).magnitude > 1.5f) { wheelR.AddRelativeTorque(new Vector3(-1000000f, 0f, 0f), (ForceMode)1); } } } public class control_component : MonoBehaviour { public GameObject Comp; public GameObject Comp2; public GameObject Rot; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (Rot.transform.localEulerAngles.x >= 45f) { Comp.SetActive(false); Comp2.SetActive(true); } else { Comp.SetActive(true); Comp2.SetActive(false); } } } public class seatanimation : MonoBehaviour { public bool is_seated = false; public GameObject seatbody; public GameObject seatgeo; public GameObject normalbody; private Collider seat; private GameObject sitpos; public GameObject head; public GameObject headrot; public GameObject headGEO; public GameObject lockpos; public GameObject lowerbody; public GameObject helmetreal; public GameObject helmetseat; public GameObject leftfootsit; public GameObject rightfootsit; public GameObject hands; public GameObject handsbase; public GameObject handL; public GameObject handR; public GameObject handLGeo; public GameObject handRGeo; public GameObject handLpos; public GameObject handRpos; public GameObject rootreal; public GameObject rootreallock; public GameObject rootgeo; public GameObject rootgeolock; public GameObject sensor; private void Start() { } private void OnTriggerStay(Collider other) { if (((Object)((Component)other).gameObject).name == "VehicleSeat") { is_seated = true; seat = other; sitpos = ((Component)seat).gameObject; } if (!(((Object)((Component)other).gameObject).name != "VehicleSeat")) { } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "VehicleSeat") { is_seated = false; } if (!(((Object)((Component)other).gameObject).name != "VehicleSeat")) { } } private void FixedUpdate() { //IL_003b: 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_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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: 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_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_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_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0462: 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_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: 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_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0502: 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_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)sitpos == (Object)null || (Object)(object)seat == (Object)null) { } seatbody.transform.position = head.transform.position; handL.transform.position = handLpos.transform.position; handR.transform.position = handRpos.transform.position; handL.transform.eulerAngles = handLpos.transform.eulerAngles; handR.transform.eulerAngles = handRpos.transform.eulerAngles; handLGeo.transform.position = handL.transform.position; handRGeo.transform.position = handR.transform.position; rootreal.transform.localPosition = rootreallock.transform.localPosition; rootgeo.transform.localPosition = rootgeolock.transform.localPosition; sensor.transform.position = seatbody.transform.position; if (is_seated) { sitpos = ((Component)seat).gameObject; seatgeo.SetActive(true); normalbody.SetActive(false); helmetreal.SetActive(false); helmetseat.SetActive(true); seatbody.transform.parent = sitpos.transform; handL.transform.parent = sitpos.transform; handR.transform.parent = sitpos.transform; hands.transform.parent = sitpos.transform; hands.transform.localPosition = new Vector3(0f, 375f, 0f); float num = Mathf.Clamp(seatbody.transform.localPosition.x, -10f, 10f); float num2 = Mathf.Clamp(seatbody.transform.localPosition.y, 400f, 435f); float num3 = Mathf.Clamp(seatbody.transform.localPosition.z, -75f, -55f); float num4 = Mathf.Clamp(handL.transform.localPosition.x, -50f, 45f); float num5 = Mathf.Clamp(handL.transform.localPosition.y, 300f, 460f); float num6 = Mathf.Clamp(handL.transform.localPosition.z, -80f, 10f); float num7 = Mathf.Clamp(handR.transform.localPosition.x, -45f, 50f); float num8 = Mathf.Clamp(handR.transform.localPosition.y, 300f, 460f); float num9 = Mathf.Clamp(handR.transform.localPosition.z, -80f, 10f); seatbody.transform.localPosition = new Vector3(num, num2, num3); headGEO.transform.eulerAngles = headrot.transform.eulerAngles; lockpos.transform.eulerAngles = new Vector3(sitpos.transform.eulerAngles.x, headrot.transform.eulerAngles.y, sitpos.transform.eulerAngles.z); handL.transform.localPosition = new Vector3(num4, num5, num6); handR.transform.localPosition = new Vector3(num7, num8, num9); seatbody.transform.eulerAngles = new Vector3(sitpos.transform.eulerAngles.x, sitpos.transform.eulerAngles.y, sitpos.transform.eulerAngles.z); lowerbody.transform.eulerAngles = new Vector3(sitpos.transform.eulerAngles.x, sitpos.transform.eulerAngles.y, sitpos.transform.eulerAngles.z); rightfootsit.transform.position = sitpos.transform.GetChild(1).position; leftfootsit.transform.position = sitpos.transform.GetChild(0).position; } if (!is_seated) { seat = null; sitpos = null; seatgeo.SetActive(false); normalbody.SetActive(true); helmetreal.SetActive(true); helmetseat.SetActive(false); seatbody.transform.parent = head.transform; seatbody.transform.localEulerAngles = new Vector3(0f, 0f, 0f); seatbody.transform.localPosition = new Vector3(0f, 0f, 0f); handL.transform.parent = hands.transform; handR.transform.parent = hands.transform; hands.transform.parent = handsbase.transform; hands.transform.localEulerAngles = new Vector3(0f, 0f, 0f); hands.transform.localPosition = new Vector3(0f, 0f, 0f); } } } public class seatdetect : MonoBehaviour { public AircraftSeat seat; public bool isHead = false; public seatanimation sa = null; public GameObject head = null; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "HeadSensor") { isHead = true; head = ((Component)other).gameObject; sa = head.GetComponent(); } } private void Update() { if (seat.isplayerrotated && isHead && (Object)(object)head != (Object)null && (Object)(object)sa != (Object)null) { sa.is_seated = true; } if (!seat.isplayerrotated) { isHead = false; sa.is_seated = false; head = null; sa = null; } if (!((Object)(object)head == (Object)null) && !((Object)(object)sa == (Object)null)) { } } } public class Slotarea1 : MonoBehaviour { public GameObject parent; private void OnTriggerStay(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 = false; component2.isKinematic = true; } } } private void OnTriggerExit(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && (int)component.QBSlotType == 0 && ((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = true; component2.isKinematic = false; } } } } }