using System; using System.Collections; 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.MonoScripts.VisualModifiers; using HarmonyLib; using OtherLoader; using Sodalite.Api; using UnityEditor; using UnityEngine; using UnityEngine.AI; 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 GunShipLeave : MonoBehaviour { public GameObject planeprop; private void Start() { } private void Update() { } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(planeprop, ((Component)this).transform.position, ((Component)this).transform.rotation); } } public class GunShipScript : MonoBehaviour { public GameObject marker; public Transform markerholder; public GameObject markerswitch; public GameObject dots; public GameObject penref1; public GameObject penref2; public GameObject penref3; public GameObject pengeoonpaper1; public GameObject pengeoonpaper2; public GameObject pengeoonpaper3; public GameObject parentfordots; public float X = 30f; public float Y = 30f; public Camera cam; public GameObject fovSwitch; public KillAfter k1; public KillAfter k2; public KillAfter k3; public KillAfter k4; public KillAfter k5; public KillAfter k6; public Transform parent; public OpenBoltReceiver g_40mmCannon; public OpenBoltReceiver g_105mmCannon; public JoyStickJetSuit jsjs; public GameObject g_40mmRot; public GameObject g_105mmRot; public GameObject c_CameraRot; public GameObject laser; public GameObject shutdown; public Transform sitpos; public bool backtoplyer = false; public GameObject gunSwitch; public Vector3 vel = Vector3.zero; private void Start() { ((Component)GM.CurrentMovementManager).transform.SetParent(parent); } 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_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_01b6: 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_0060: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06f5: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_022c: 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_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0302: 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_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_036c: 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_0391: 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_03b9: 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_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_041b: 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_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0761: 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_051d: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_07c7: Unknown result type (might be due to invalid IL or missing references) //IL_07cc: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_060c: 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_08fe: Unknown result type (might be due to invalid IL or missing references) //IL_0930: Unknown result type (might be due to invalid IL or missing references) //IL_0935: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_095b: Unknown result type (might be due to invalid IL or missing references) if (shutdown.transform.localEulerAngles.x > 45f) { if (!backtoplyer) { marker.transform.SetParent(markerholder); marker.transform.localPosition = new Vector3(0f, 0f, 0f); marker.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Component)GM.CurrentMovementManager).transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).transform.position = new Vector3(((Component)this).gameObject.transform.position.x, ((Component)this).gameObject.transform.position.y, ((Component)this).gameObject.transform.position.z); ((Component)GM.CurrentMovementManager).transform.eulerAngles = new Vector3(0f, ((Component)this).gameObject.transform.localEulerAngles.y, 0f); backtoplyer = true; ((Behaviour)k1).enabled = true; ((Behaviour)k2).enabled = true; ((Behaviour)k3).enabled = true; ((Behaviour)k4).enabled = true; ((Behaviour)k5).enabled = true; ((Behaviour)k6).enabled = true; } } else { if (!(shutdown.transform.localEulerAngles.x < 45f)) { return; } if (markerswitch.transform.localEulerAngles.x > 45f) { marker.transform.SetParent(((Component)GM.CurrentMovementManager.RightHand).transform); marker.transform.localEulerAngles = new Vector3(0f, 0f, 0f); marker.transform.localPosition = new Vector3(0f, 0f, 0f); penref1.transform.position = ((Component)GM.CurrentMovementManager.RightHand).transform.position; penref2.transform.position = ((Component)GM.CurrentMovementManager.RightHand).transform.position; penref3.transform.position = ((Component)GM.CurrentMovementManager.RightHand).transform.position; penref1.transform.localPosition = new Vector3(Mathf.Clamp(penref1.transform.localPosition.x, -0.25f, 0.25f), Mathf.Clamp(penref1.transform.localPosition.y, -0.15f, 0.15f), 0f); penref2.transform.localPosition = new Vector3(Mathf.Clamp(penref2.transform.localPosition.x, -0.25f, 0.25f), Mathf.Clamp(penref2.transform.localPosition.y, -0.15f, 0.15f), 0f); penref3.transform.localPosition = new Vector3(Mathf.Clamp(penref3.transform.localPosition.x, -0.2f, 0.2f), Mathf.Clamp(penref3.transform.localPosition.y, -0.1f, 0.1f), 0f); if (GM.CurrentMovementManager.Hands[1].Input.TriggerPressed) { if (Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref1.transform.position) < 0.05f) { marker.SetActive(false); pengeoonpaper1.SetActive(true); Object.Instantiate(dots, penref1.transform.position, penref1.transform.rotation, parentfordots.transform); } else if (Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref2.transform.position) < 0.05f) { marker.SetActive(false); pengeoonpaper2.SetActive(true); Object.Instantiate(dots, penref2.transform.position, penref2.transform.rotation, parentfordots.transform); } else if (Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref3.transform.position) < 0.05f) { marker.SetActive(false); pengeoonpaper3.SetActive(true); Object.Instantiate(dots, penref3.transform.position, penref3.transform.rotation, parentfordots.transform); } else if (Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref1.transform.position) > 0.05f && Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref2.transform.position) > 0.05f && Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref3.transform.position) > 0.05f) { marker.SetActive(true); pengeoonpaper1.SetActive(false); pengeoonpaper2.SetActive(false); pengeoonpaper3.SetActive(false); } } else { marker.SetActive(true); pengeoonpaper1.SetActive(false); pengeoonpaper2.SetActive(false); pengeoonpaper3.SetActive(false); } } else { marker.transform.SetParent(markerholder); marker.transform.localPosition = new Vector3(0f, 0f, 0f); marker.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (fovSwitch.transform.localEulerAngles.x < 45f) { cam.fieldOfView = 60f; } else { cam.fieldOfView = 15f; } ((Component)GM.CurrentMovementManager).transform.position = ((Component)sitpos).transform.position; ((Component)GM.CurrentMovementManager).transform.eulerAngles = ((Component)sitpos).transform.eulerAngles; if (!((Object)(object)((FVRInteractiveObject)jsjs).m_hand != (Object)null)) { return; } if (((FVRInteractiveObject)jsjs).m_hand.Input.TriggerPressed) { if (gunSwitch.transform.localEulerAngles.x > 45f) { g_105mmCannon.ReleaseSeer(); } else { g_40mmCannon.ReleaseSeer(); } } else { g_40mmCannon.EngageSeer(); g_105mmCannon.EngageSeer(); } X -= 5f * jsjs.num1 * Time.deltaTime; Y -= 5f * jsjs.num2 * Time.deltaTime; if (X > 60f) { X = 60f; } else if (X < 0f) { X = 0f; } if (Y > 60f) { Y = 60f; } else if (Y < 0f) { Y = 0f; } c_CameraRot.transform.localEulerAngles = new Vector3(X, Y, 0f); if (laser.activeInHierarchy) { AxisLookAt(g_40mmRot.transform, laser.transform.position, Vector3.forward); AxisLookAt(g_105mmRot.transform, laser.transform.position, Vector3.forward); } } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } } public class GunshipActivate : MonoBehaviour { public GameObject switchAct; public GameObject AC; 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (switchAct.transform.localEulerAngles.x > 45f) { Object.Instantiate(AC, ((Component)GM.CurrentMovementManager).transform.position, ((Component)GM.CurrentMovementManager).transform.rotation); Object.Destroy((Object)(object)this); } } private void OnDestroy() { Object.Destroy((Object)(object)((Component)this).gameObject); } } public class CPGScript : MonoBehaviour { public AircraftSeat seat; public HeadRotate HR; private void Start() { } private void FixedUpdate() { if ((Object)(object)seat.hand != (Object)null) { ((Behaviour)HR).enabled = true; } else if ((Object)(object)seat.hand == (Object)null) { ((Behaviour)HR).enabled = false; } } } public class CannonPod : FVRPhysicalObject { public string targetObj = "AH64CannonBase"; public string targetRig = "AH64CannonY"; public string targetGrip = "AH64 Gun Grip(Clone)"; public Transform muzzle; public HingeJoint HJ; public bool spawned = false; private void Update() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GameObject.Find(targetObj) != (Object)null && !spawned) { ((Component)this).gameObject.transform.position = GameObject.Find(targetObj).transform.position; ((Component)this).gameObject.transform.eulerAngles = GameObject.Find(targetObj).transform.eulerAngles; ((Joint)HJ).connectedBody = GameObject.Find(targetRig).GetComponent(); spawned = true; } if ((Object)(object)GameObject.Find(targetGrip) != (Object)null && (Object)(object)GameObject.Find(targetGrip).GetComponent() != (Object)null) { ((FVRFireArm)GameObject.Find(targetGrip).GetComponent()).MuzzlePos = muzzle; } } } public class FireRopeOB2 : MonoBehaviour { public OpenBoltReceiver OB; public GameObject rot; private void Start() { } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_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 (rot.transform.localEulerAngles.x > 25f && rot.transform.localEulerAngles.x < 75f) { OB.ReleaseSeer(); } else if (rot.transform.localEulerAngles.x < 25f || rot.transform.localEulerAngles.x > 75f) { OB.EngageSeer(); } } } public class GunGrip : MonoBehaviour { public GameObject realmuzzle; public string muzzle = "AH64CannonMuzzle"; public string targetObj = "AH64GunGripBase"; public string eject = "AH64CannonEject"; public string heli = "AH-64D_BLKII(Clone)"; public string tailrotor = "AH64TailRotorForce"; public OpenBoltReceiver OBR; public SnapToPointRigidbody STPR; public bool spawned = false; private void Start() { } private void Update() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GameObject.Find(muzzle) != (Object)null) { realmuzzle.transform.position = GameObject.Find(muzzle).transform.position; realmuzzle.transform.eulerAngles = GameObject.Find(muzzle).transform.eulerAngles; } if ((Object)(object)GameObject.Find(targetObj) != (Object)null && !spawned) { STPR.snapTo = GameObject.Find(targetObj).transform; OBR.RoundPos_Ejecting = GameObject.Find(eject).transform; OBR.RoundPos_Ejection = GameObject.Find(eject).transform; spawned = true; } if ((Object)(object)GameObject.Find(heli) != (Object)null) { GameObject.Find(heli).GetComponent().stickobj = (FVRInteractiveObject)(object)OBR; } if ((Object)(object)GameObject.Find(tailrotor) != (Object)null) { GameObject.Find(tailrotor).GetComponent().Stick = (FVRPhysicalObject)(object)OBR; } } } public class M4ForCrews : MonoBehaviour { public string GUNID; public GameObject GUN; public FVRPhysicalObject grab; public Transform gunpos; public Rigidbody gunrig; private void Start() { } private void Update() { //IL_0109: 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) if ((Object)(object)GUN == (Object)null) { if (IM.OD.ContainsKey(GUNID)) { AnvilCallback gameObjectAsync = ((AnvilAsset)IM.OD[GUNID]).GetGameObjectAsync(); if (Object.op_Implicit((Object)(object)gameObjectAsync.Result)) { GUN = Object.Instantiate(gameObjectAsync.Result, ((Component)gunpos).transform); grab = GUN.gameObject.GetComponent(); gunrig = GUN.gameObject.GetComponent(); } } } else if ((Object)(object)GUN != (Object)null && (Object)(object)((FVRInteractiveObject)grab).m_hand == (Object)null) { gunrig.useGravity = false; GUN.transform.SetParent(gunpos); GUN.transform.localEulerAngles = new Vector3(0f, 0f, 0f); GUN.transform.localPosition = new Vector3(0f, 0f, 0f); } } } public class M4ForCrews2 : MonoBehaviour { public string GUNID; public GameObject GUNPILOT; public GameObject GUNCPG; public ClosedBoltWeapon grabPilot; public ClosedBoltWeapon grabCPG; public Transform gunposPilot; public Transform gunposCPG; public Rigidbody gunrigpilot; public Rigidbody gunrigcpg; public GameObject rot1; public GameObject rot2; private void Start() { } private void Update() { //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_00dd: 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_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GUNPILOT == (Object)null) { if ((Object)(object)GameObject.Find(GUNID) != (Object)null) { GUNPILOT = GameObject.Find(GUNID); ((Object)GUNPILOT).name = "M4PILOT"; grabPilot = GUNPILOT.gameObject.GetComponent(); gunrigpilot = GUNPILOT.gameObject.GetComponent(); } } else if ((Object)(object)GUNPILOT != (Object)null) { if (grabPilot.m_fireSelectorMode == 0) { gunrigpilot.useGravity = false; GUNPILOT.transform.SetParent(gunposPilot); GUNPILOT.transform.localEulerAngles = new Vector3(0f, 0f, 0f); GUNPILOT.transform.localPosition = new Vector3(0f, 0f, 0f); } else if (grabPilot.m_fireSelectorMode != 0) { GUNPILOT.transform.SetParent((Transform)null); } if ((Object)(object)GUNCPG == (Object)null) { if ((Object)(object)GameObject.Find(GUNID) != (Object)null) { GUNCPG = GameObject.Find(GUNID); ((Object)GUNCPG).name = "M4CPG"; grabCPG = GUNCPG.gameObject.GetComponent(); gunrigcpg = GUNCPG.gameObject.GetComponent(); } } else if ((Object)(object)GUNCPG != (Object)null) { if (grabCPG.m_fireSelectorMode == 0) { gunrigcpg.useGravity = false; GUNCPG.transform.SetParent(gunposCPG); GUNCPG.transform.localEulerAngles = new Vector3(0f, 0f, 0f); GUNCPG.transform.localPosition = new Vector3(0f, 0f, 0f); } else if (grabCPG.m_fireSelectorMode != 0) { GUNCPG.transform.SetParent((Transform)null); } } } if ((Object)(object)grabPilot != (Object)null && rot1.transform.localEulerAngles.z < 45f) { grabPilot.m_fireSelectorMode = 0; } if ((Object)(object)grabCPG != (Object)null && rot2.transform.localEulerAngles.z < 45f) { grabCPG.m_fireSelectorMode = 0; } } } public class MissilePod : MonoBehaviour { public string targetObj = "AH64IRSTLowerY"; public Transform muzzle; public bool spawned = false; public HingeJoint HJ; private void Start() { } private void Update() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GameObject.Find(targetObj) != (Object)null && !spawned) { ((Component)this).gameObject.transform.position = GameObject.Find(targetObj).transform.position; ((Component)this).gameObject.transform.eulerAngles = GameObject.Find(targetObj).transform.eulerAngles; ((Joint)HJ).connectedBody = GameObject.Find(targetObj).GetComponent(); spawned = true; } } } public class PilotScript : MonoBehaviour { public AircraftSeat seat; public HeadRotate HR1; public HeadRotate HR2; public string targetGun = "AH64CannonX(Clone)"; public string targetcam = "AH64IRSTLowerX(Clone)"; public SpringJoint SJ; public string campos = "AH64IRSTCAMPOS"; public GameObject TAS; private void Start() { } private void FixedUpdate() { //IL_007c: 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) if ((Object)(object)GameObject.Find(targetGun) != (Object)null) { HR1.headGEO = GameObject.Find(targetcam); ((Joint)SJ).connectedBody = GameObject.Find(targetGun).GetComponent(); } if ((Object)(object)GameObject.Find(campos) != (Object)null) { TAS.transform.position = GameObject.Find(campos).transform.position; TAS.transform.eulerAngles = GameObject.Find(campos).transform.eulerAngles; } if ((Object)(object)seat.hand != (Object)null) { HR1.activate = true; HR2.activate = true; } else if ((Object)(object)seat.hand == (Object)null) { HR1.activate = false; HR2.activate = false; } } } public class TrueLockToHead : MonoBehaviour { public GameObject thisobj; private void Start() { } private void Update() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GM.CurrentMovementManager != (Object)null) { thisobj.transform.SetParent(((Component)GM.CurrentMovementManager.Head).transform); thisobj.transform.localPosition = new Vector3(0f, 0f, 0f); thisobj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class Unfreeze : MonoBehaviour { public Rigidbody thisobj; private void Start() { } private void FixedUpdate() { thisobj.isKinematic = false; } } } public class GSCamera : GSCameraAux { } [RequireComponent(typeof(WheelCollider))] public class GSWheelAux : GLandingGear { } public class GSurfaceCenter : GCenter { } public class GSurfaceDrive : GDrive { } [RequireComponent(typeof(Rigidbody))] public class GSurfaceManager : GAircraft { } public class GSurfacePivot : GPivot { } public class GSurfaceTrail : GTrail { } public class GSurfaceWindZone : GWindBasic { } public class GSAreaHeight : MonoBehaviour { private float baseHeight = 0f; public float coefHeight = 0.01f; public GameObject viewer = null; private Vector3 position = Vector3.zero; private void Start() { //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) baseHeight = ((Component)this).gameObject.transform.position.y; } private void Update() { //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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)viewer != (Object)null) { position = ((Component)this).gameObject.transform.position; if (viewer.transform.position.y > baseHeight) { position.y = baseHeight + (viewer.transform.position.y - baseHeight) * coefHeight; } else { position.y = baseHeight; } ((Component)this).gameObject.transform.position = position; } } } public class GSCameraAux : MonoBehaviour { private GAircraft sm = null; public Camera attachToCamera = null; private GUITexture crossair = null; public Light sunlight = null; public bool sunlightAttach = true; public float sunlightAttachDistance = 100f; public float sunlightAttachFilter = 0.01f; public float inputHorizontalMouseSensivity = 3.4f; public float inputVerticalMouseSensivity = 2.1f; public float inputWheelMouseSensivity = 2.1f; public KeyCode inputExternalCameraKeyForToggle = (KeyCode)99; private bool inputExternalCameraKeyForToggled = false; private int currentCameraPosition = 0; private int countCameraPositions = 0; public KeyCode inputFixedPositionCameraKeyForToggle = (KeyCode)118; private bool inputFixedPositionCameraKeyForToggled = false; public bool enableRecoverVehicle = true; public bool enableRecoverVehicleReset = false; public Vector3 enableRecoverVehiclePosition = Vector3.zero; public Vector3 enableRecoverVehicleRotation = Vector3.zero; public KeyCode inputRecoverVehicleKeyForToggle = (KeyCode)111; private bool inputRecoverVehicleKeyForToggled = false; private bool cameraFixedPositionEnabled = false; private bool cameraExternalEnabled_lastValue = true; private bool cameraOnFixedUpdate = true; private int cameraOnFixedUpdate_count = 0; public GameObject cameraAlternateFollow = null; public bool globalSimulationScaleApplyToCamera = true; private float globalSimulationScale = 1f; public float cameraExternalMinHeight = -93f; public bool cameraExternalMinHeightAutoProbe = true; public LayerMask cameraExternalMinHeightAutoProbeLayermask = LayerMask.op_Implicit(-24); private float cameraExternalMinHeightScale = 1f; public float cameraExternalMinHeightAutoProbeDelta = 5f; public float cameraExternalMinHeightAutoProbeDeltaProbe = 1000f; public bool cameraExternalEnabled = false; public float cameraExternalNearClipPlane = 2f; public float cameraExternalFarClipPlane = 8000f; public float cameraExternalFilter = 0.1f; private float cameraExternalDistance = 2f; public float cameraExternalDistanceMin = 0.4f; public float cameraExternalDistanceMax = 101f; public float cameraExternalDistanceStep = 1.25f; public bool cameraExternalUpWorld = true; public float cameraInternalSensivity = 1.35f; public float cameraInternalNearClipPlane = 0.175f; public float cameraInternalFarClipPlane = 5000f; public float cameraInternalFilter = 1f; private float cameraInternalFov = 60f; public float cameraInternalFovMin = 15f; public float cameraInternalFovMax = 110f; public float cameraInternalFovStep = 15f; public bool cameraInternalUpWorld = false; public bool cameraInternalUpWorldMix = true; public float cameraInternalUpWorldMixing = 0.5f; public bool cameraInternalDontVertical = false; public bool cameraInternalDontVerticalMix = true; public float cameraInternalDontVerticalMixing = 0.5f; public float cameraInternalGsMixing = 0.05f; public float cameraInternalGsMax = 0.7f; public bool cameraInternalGsPosition = true; public float cameraInternalGsPositionDelta = 0.075f; public float cameraInternalGsPositionHDelta = 0.1f; public bool cameraInternalGsRotation = true; public float cameraInternalGsRotationDelta = 0.2f; public bool enableSpecialForce = true; public float specialForceMagnitude = 10000f; public KeyCode specialForceApplyZeroRotate = (KeyCode)117; public KeyCode specialForceApplyLeft = (KeyCode)106; public KeyCode specialForceApplyRight = (KeyCode)108; public KeyCode specialForceApplyForward = (KeyCode)105; public KeyCode specialForceApplyForceBack = (KeyCode)107; public KeyCode specialForceApplyForceUp = (KeyCode)121; public KeyCode specialForceApplyDown = (KeyCode)104; public bool fogRenderingEnabled = false; private FogMode initialFogMode = (FogMode)1; private float initialFogValue = 0f; public float fog01 = 0f; public float extremeFogValue = -1f; public bool skyboxRenderingEnabled = false; private Color skyboxRenderingColor; private Color skyboxRenderingColorTop; public float skyboxRenderingColorTopDeltaHeight = 10000f; public float skyboxRenderingColorUpwardsScatteringDistance = 30000f; public float skyboxRenderingColorDownwardsScatteringDistance = 3000000f; public bool skyboxRenderingColor0Enabled = false; public Color skyboxRenderingColor0 = skyboxRenderingColor0Default; public float skyboxRenderingColor0Height = 0f; public float skyboxRenderingColor0Distance = 1000f; public Color skyboxRenderingColor1 = skyboxRenderingColor1Default; public float skyboxRenderingColor1Height = 1500f; public Color skyboxRenderingColor2 = skyboxRenderingColor2Default; public float skyboxRenderingColor2Height = 15000f; public Color skyboxRenderingColor3 = skyboxRenderingColor3Default; public float skyboxRenderingColor3Height = 45000f; [NonSerialized] public int skyboxAngleColors; [NonSerialized] public Color32[] skyboxAngleColor = null; [NonSerialized] public int[,] skyboxSideAngles; [NonSerialized] public int[,] skyboxTopAngles; [NonSerialized] public int[,] skyboxBottomAngles; private Color tmp_skyboxRenderingColorm1; private Color tmp_skyboxRenderingColor0; private Color tmp_skyboxRenderingColor1; private Color tmp_skyboxRenderingColor2; private Color tmp_skyboxRenderingColor3; private Color tmp_skyboxRenderingColor4; public int skyboxTextureWidth = 64; public int skyboxTextureHeight = 64; public int skyboxRenderNth = 5; public int skyboxRenderSidesPerNth = 2; private int skyboxRenderNth_count = 0; private int skyboxRenderNth_tex = 0; private Skybox skyboxComponent = null; private Material skyboxMaterial = null; private Texture2D _FrontTex = null; private Texture2D _LeftTex = null; private Texture2D _RightTex = null; private Texture2D _BackTex = null; private Texture2D _UpTex = null; private Texture2D _DownTex = null; [NonSerialized] private Color32[] pixels = null; public bool searchSounds = true; [HideInInspector] public GUIText speedmeter; [HideInInspector] public GUIText autopilotmeter; [HideInInspector] public GameObject scene; [HideInInspector] public GameObject ground; [HideInInspector] public GameObject clouds; private AudioSource[] soundmin = null; private string soundmin_pivotId = ""; private float soundmin_pivotScale = 1f; private float soundmin_pitchBase = 1f; private float soundmin_pitchScale = 1f; private int soundmin_count; private int soundmin_countmax = 10; private AudioSource[] soundmax = null; private string soundmax_pivotId = ""; private float soundmax_pivotScale = 1f; private float soundmax_pitchBase = 0.1f; private float soundmax_pitchScale = 1f; private int soundmax_count; private int soundmax_countmax = 10; private AudioSource[] soundstall = null; private int soundstall_count; private int soundstall_countmax = 10; private bool iscrashed = false; private AudioSource[] soundcrash = null; private int soundcrash_count; private int soundcrash_countmax = 10; public string searchScreenCursorObjectName = "Screen cursor"; public string searchScreenSpeedMeterObjectName = "Screen speed meter"; public string searchScreenAutopilotMeterObjectName = "Screen autopilot meter"; public string searchSceneObjectName = "Scene"; public float searchSceneObjectGranularity = 1500f; public string searchGroundObjectName = "Scene ground"; public float searchGroundObjectGranularity = 150f; public string searchCloudsObjectName = "Scene clouds"; public float searchCloudsObjectGranularity = 1500f; public float searchCloudsWindSpeedMultiplier = 5f; private Vector3 worldup = Vector3.up; private Vector3 cameraposition = Vector3.zero; private Quaternion cameraorientation = Quaternion.identity; private bool camerafixed = false; private Vector3 cameralookat = Vector3.zero; private Vector3 cameraup = Vector3.up; private Vector3 cameraposition_filtered = Vector3.zero; private Vector3 cameralookat_filtered = Vector3.zero; private Vector3 cameraup_filtered = Vector3.up; private float camera_filter = 0.01f; private int scheduleRecoverVehicle = 0; private float gs_old = 0f; private float hgs_old = 0f; private float ProcessSounds_granularityPitch = 0.01f; private float ProcessSounds_granularityTime = 0.25f; private float ProcessSounds_granularityTime2 = 5.25f; private float ProcessSounds_granularityTimeRemaining = 0f; private float ProcessSounds_granularityTime2Remaining = 0f; public static Color skyboxRenderingColor0Default => new Color(0.41015625f, 0.41015625f, 0.41015625f, 1f); public static Color skyboxRenderingColor1Default => new Color(0.48828125f, 0.68359375f, 0.99609375f, 1f); public static Color skyboxRenderingColor2Default => new Color(0.19140625f, 0.30078125f, 0.47265625f, 1f); public static Color skyboxRenderingColor3Default => new Color(0f, 0f, 0f, 1f); public bool recoverVehicle() { //IL_0032: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)sm != (Object)null) { sm.isCrashed = false; if (enableRecoverVehicleReset) { sm.placeAt(enableRecoverVehiclePosition, enableRecoverVehicleRotation, applySpeed: true, 0f * sm.globalSimulationScale, applyThrottle: true, 0f); } else if (Input.GetKey((KeyCode)304) || Input.GetKey((KeyCode)303)) { sm.placeAt(((Component)this).gameObject.transform.position + new Vector3(0f, 500f * sm.globalSimulationScale, 0f), new Vector3(-30f, ((Component)this).gameObject.transform.eulerAngles.y, 0f), 100f * sm.globalSimulationScale); } else { sm.placeAt(((Component)this).gameObject.transform.position + new Vector3(0f, 50f * sm.globalSimulationScale, 0f), new Vector3(-30f, ((Component)this).gameObject.transform.eulerAngles.y, 0f), 100f * sm.globalSimulationScale); } sm.ignore_check_simulation_broken(); } return true; } private void FindNodes(GameObject e, int r) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown for (int i = 0; i < e.transform.childCount; i++) { GameObject gameObject = ((Component)e.transform.GetChild(i)).gameObject; if (!gameObject.activeSelf) { continue; } if (searchSounds) { if (((Object)gameObject).name.Contains("_soundmin_") && soundmin_count < soundmin_countmax) { soundmin[soundmin_count] = (AudioSource)gameObject.GetComponent("AudioSource"); if ((Object)(object)soundmin[soundmin_count] != (Object)null) { soundmin[soundmin_count].loop = true; soundmin[soundmin_count].volume = 0f; soundmin_pivotId = GAircraft.ReplaceStringIgnoreCase(((Object)gameObject).name, "pivotId", soundmin_pivotId); soundmin_pivotScale = GAircraft.ReplaceFloatIgnoreCase(((Object)gameObject).name, "pivotScale", soundmin_pivotScale); soundmin_pitchBase = GAircraft.ReplaceFloatIgnoreCase(((Object)gameObject).name, "pitchBase", soundmin_pitchBase); soundmin_pitchScale = GAircraft.ReplaceFloatIgnoreCase(((Object)gameObject).name, "pitchScale", soundmin_pitchScale); soundmin[soundmin_count].Play((ulong)Mathf.FloorToInt((float)soundmin_count * 1.7f * 44100f)); soundmin_count++; } } if (((Object)gameObject).name.Contains("_soundmax_") && soundmax_count < soundmax_countmax) { soundmax[soundmax_count] = (AudioSource)gameObject.GetComponent("AudioSource"); if ((Object)(object)soundmax[soundmax_count] != (Object)null) { soundmax[soundmax_count].loop = true; soundmax[soundmax_count].volume = 0f; soundmax_pivotId = GAircraft.ReplaceStringIgnoreCase(((Object)gameObject).name, "pivotId", soundmax_pivotId); soundmax_pivotScale = GAircraft.ReplaceFloatIgnoreCase(((Object)gameObject).name, "pivotScale", soundmax_pivotScale); soundmax_pitchBase = GAircraft.ReplaceFloatIgnoreCase(((Object)gameObject).name, "pitchBase", soundmax_pitchBase); soundmax_pitchScale = GAircraft.ReplaceFloatIgnoreCase(((Object)gameObject).name, "pitchScale", soundmax_pitchScale); soundmax[soundmax_count].Play((ulong)Mathf.FloorToInt((float)soundmax_count * 1.9f * 44100f)); soundmax_count++; } } if (((Object)gameObject).name.Contains("_soundstall_") && soundstall_count < soundstall_countmax) { soundstall[soundstall_count] = (AudioSource)gameObject.GetComponent("AudioSource"); if ((Object)(object)soundstall[soundstall_count] != (Object)null) { soundstall[soundstall_count].loop = true; soundstall[soundstall_count].volume = 0f; soundstall[soundstall_count].Play((ulong)Mathf.FloorToInt((float)soundstall_count * 1.9f * 44100f)); soundstall_count++; } } if (((Object)gameObject).name.Contains("_soundcrash_") && soundcrash_count < soundcrash_countmax) { soundcrash[soundcrash_count] = (AudioSource)gameObject.GetComponent("AudioSource"); if ((Object)(object)soundcrash[soundcrash_count] != (Object)null) { soundcrash[soundcrash_count].loop = false; soundcrash[soundcrash_count].volume = 0f; soundcrash_count++; } } } if (r < 10) { FindNodes(gameObject, r + 1); } } } private void Skybox_Start() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Expected O, but got Unknown if ((Object)(object)skyboxComponent == (Object)null) { skyboxComponent = (Skybox)((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).gameObject.GetComponent("Skybox"); } if ((Object)(object)skyboxComponent == (Object)null) { ((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).gameObject.AddComponent(); } if ((Object)(object)skyboxComponent == (Object)null) { skyboxComponent = (Skybox)((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).gameObject.GetComponent("Skybox"); } if (!((Object)(object)skyboxComponent != (Object)null)) { return; } if ((Object)(object)skyboxMaterial == (Object)null) { skyboxMaterial = new Material(Shader.Find("RenderFX/Skybox")); } if ((Object)(object)skyboxMaterial != (Object)null) { int num = skyboxTextureWidth; int num2 = skyboxTextureHeight; if ((Object)(object)_FrontTex == (Object)null) { _FrontTex = new Texture2D(num, num2, (TextureFormat)5, false); } if ((Object)(object)_LeftTex == (Object)null) { _LeftTex = new Texture2D(num, num2, (TextureFormat)5, false); } if ((Object)(object)_RightTex == (Object)null) { _RightTex = new Texture2D(num, num2, (TextureFormat)5, false); } if ((Object)(object)_BackTex == (Object)null) { _BackTex = new Texture2D(num, num2, (TextureFormat)5, false); } if ((Object)(object)_UpTex == (Object)null) { _UpTex = new Texture2D(num, num2, (TextureFormat)5, false); } if ((Object)(object)_DownTex == (Object)null) { _DownTex = new Texture2D(num, num2, (TextureFormat)5, false); } ((Texture)_FrontTex).wrapMode = (TextureWrapMode)1; ((Texture)_LeftTex).wrapMode = (TextureWrapMode)1; ((Texture)_RightTex).wrapMode = (TextureWrapMode)1; ((Texture)_BackTex).wrapMode = (TextureWrapMode)1; ((Texture)_UpTex).wrapMode = (TextureWrapMode)1; ((Texture)_DownTex).wrapMode = (TextureWrapMode)1; skyboxMaterial.SetTexture("_FrontTex", (Texture)(object)_FrontTex); skyboxMaterial.SetTexture("_LeftTex", (Texture)(object)_LeftTex); skyboxMaterial.SetTexture("_RightTex", (Texture)(object)_RightTex); skyboxMaterial.SetTexture("_BackTex", (Texture)(object)_BackTex); skyboxMaterial.SetTexture("_UpTex", (Texture)(object)_UpTex); skyboxMaterial.SetTexture("_DownTex", (Texture)(object)_DownTex); if (pixels == null) { pixels = (Color32[])(object)new Color32[num * num2]; } skyboxAngleColors = Mathf.FloorToInt(Mathf.Sqrt((float)(num * num + num2 * num2)) + (float)Mathf.Max(num, num2)) * 4 + 1; if (skyboxAngleColor == null) { skyboxAngleColor = (Color32[])(object)new Color32[skyboxAngleColors]; } if (skyboxTopAngles == null) { skyboxTopAngles = new int[num, num2]; } if (skyboxSideAngles == null) { skyboxSideAngles = new int[num, num2]; } if (skyboxBottomAngles == null) { skyboxBottomAngles = new int[num, num2]; } float num3 = 0f; float num4 = 0f; float num5 = 0f; for (int i = 0; i < num; i++) { for (int j = 0; j < num2; j++) { float num6 = ((float)i - (float)num / 2f) * 2f / (float)num; float num7 = ((float)j - (float)num2 / 2f) * 2f / (float)num2; pixels[i + j * num].a = byte.MaxValue; num3 = Mathf.Atan(1f / Mathf.Sqrt(num6 * num6 + num7 * num7)); skyboxTopAngles[i, j] = Mathf.RoundToInt((float)skyboxAngleColors * ((num3 + (float)Math.PI / 2f) / (float)Math.PI)); if (skyboxTopAngles[i, j] < 0) { skyboxTopAngles[i, j] = 0; } if (skyboxTopAngles[i, j] >= skyboxAngleColors) { skyboxTopAngles[i, j] = skyboxAngleColors - 1; } num4 = Mathf.Atan(num7 / Mathf.Sqrt(1f + num6 * num6)); skyboxSideAngles[i, j] = Mathf.RoundToInt((float)skyboxAngleColors * ((num4 + (float)Math.PI / 2f) / (float)Math.PI)); if (skyboxSideAngles[i, j] < 0) { skyboxSideAngles[i, j] = 0; } if (skyboxSideAngles[i, j] >= skyboxAngleColors) { skyboxSideAngles[i, j] = skyboxAngleColors - 1; } num5 = Mathf.Atan(-1f / Mathf.Sqrt(num6 * num6 + num7 * num7)); skyboxBottomAngles[i, j] = Mathf.RoundToInt((float)skyboxAngleColors * ((num5 + (float)Math.PI / 2f) / (float)Math.PI)); if (skyboxBottomAngles[i, j] < 0) { skyboxBottomAngles[i, j] = 0; } if (skyboxBottomAngles[i, j] >= skyboxAngleColors) { skyboxBottomAngles[i, j] = skyboxAngleColors - 1; } } } } else { Debug.Log((object)"Failed to create material from shader RenderFX/Skybox"); } skyboxComponent.material = skyboxMaterial; } private void Start() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Invalid comparison between Unknown and I4 //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_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Invalid comparison between Unknown and I4 //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Invalid comparison between Unknown and I4 if ((Object)(object)GameObject.Find(searchScreenCursorObjectName) != (Object)null) { crossair = (GUITexture)GameObject.Find(searchScreenCursorObjectName).GetComponent("GUITexture"); } if ((Object)(object)GameObject.Find(searchScreenSpeedMeterObjectName) != (Object)null) { speedmeter = (GUIText)GameObject.Find(searchScreenSpeedMeterObjectName).GetComponent("GUIText"); } if ((Object)(object)GameObject.Find(searchScreenAutopilotMeterObjectName) != (Object)null) { autopilotmeter = (GUIText)GameObject.Find(searchScreenAutopilotMeterObjectName).GetComponent("GUIText"); } scene = GameObject.Find(searchSceneObjectName); ground = GameObject.Find(searchGroundObjectName); clouds = GameObject.Find(searchCloudsObjectName); cameraExternalEnabled_lastValue = !cameraExternalEnabled; if (searchSounds) { soundmin = (AudioSource[])(object)new AudioSource[soundmin_countmax]; soundmax = (AudioSource[])(object)new AudioSource[soundmax_countmax]; soundstall = (AudioSource[])(object)new AudioSource[soundstall_countmax]; soundcrash = (AudioSource[])(object)new AudioSource[soundcrash_countmax]; soundmin_count = 0; soundmax_count = 0; soundstall_count = 0; soundcrash_count = 0; } FindNodes(((Component)this).gameObject, 0); sm = (GAircraft)(object)((Component)this).gameObject.GetComponent("GAircraft"); if (enableRecoverVehicle) { enableRecoverVehiclePosition = ((Component)sm).transform.position; enableRecoverVehicleRotation = ((Component)sm).transform.eulerAngles; } initialFogMode = RenderSettings.fogMode; FogMode val = initialFogMode; if ((int)val != 1) { if ((int)val == 2 || (int)val == 3) { initialFogValue = RenderSettings.fogDensity; } } else { initialFogValue = RenderSettings.fogEndDistance; } if (extremeFogValue < 0f) { extremeFogValue = initialFogValue; } } private void Update() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (globalSimulationScaleApplyToCamera && (Object)(object)sm != (Object)null) { globalSimulationScale = sm.globalSimulationScale; } if (Input.GetKeyUp(inputExternalCameraKeyForToggle)) { inputExternalCameraKeyForToggled = true; } if (Input.GetKeyUp(inputFixedPositionCameraKeyForToggle)) { inputFixedPositionCameraKeyForToggled = true; } if (Input.GetKeyUp(inputRecoverVehicleKeyForToggle)) { inputRecoverVehicleKeyForToggled = true; } ProcessSkybox(); if (GAircraft.isSimulationPaused) { ProcessSounds(Time.deltaTime); } else if (!cameraOnFixedUpdate) { ProcessCamera(Time.deltaTime); } } private void FixedUpdate() { if (globalSimulationScaleApplyToCamera && (Object)(object)sm != (Object)null) { globalSimulationScale = sm.globalSimulationScale; } if (!GAircraft.isSimulationPaused && cameraOnFixedUpdate) { ProcessCamera(Time.fixedDeltaTime); } } private bool getSkyboxRenderingColor(float height, bool renderSpace, out Color output) { //IL_0010: 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_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_004e: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) if (height < skyboxRenderingColor1Height) { output = skyboxRenderingColor1; } else if (height < skyboxRenderingColor2Height) { output = skyboxRenderingColor1 * (skyboxRenderingColor2Height - height) / (skyboxRenderingColor2Height - skyboxRenderingColor1Height) + skyboxRenderingColor2 * (height - skyboxRenderingColor1Height) / (skyboxRenderingColor2Height - skyboxRenderingColor1Height); } else if (renderSpace) { if (height < skyboxRenderingColor3Height) { output = skyboxRenderingColor2 * (skyboxRenderingColor3Height - height) / (skyboxRenderingColor3Height - skyboxRenderingColor2Height) + skyboxRenderingColor3 * (height - skyboxRenderingColor2Height) / (skyboxRenderingColor3Height - skyboxRenderingColor2Height); } else { output = skyboxRenderingColor3; } } else { output = skyboxRenderingColor2; } return true; } private bool PreProcessSkyboxTexture(float height) { //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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0053: 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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0768: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Unknown result type (might be due to invalid IL or missing references) //IL_0772: 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_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0a95: Unknown result type (might be due to invalid IL or missing references) //IL_0a9a: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0721: 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) float num = 0f; int num2 = 0; float num3 = 0f; if (skyboxRenderingColor0Enabled) { tmp_skyboxRenderingColorm1 = skyboxRenderingColor0; } tmp_skyboxRenderingColor0 = skyboxRenderingColor; tmp_skyboxRenderingColor1 = skyboxRenderingColor1; tmp_skyboxRenderingColor2 = skyboxRenderingColor2; tmp_skyboxRenderingColor3 = skyboxRenderingColor3; tmp_skyboxRenderingColor4 = skyboxRenderingColorTop; if (height + skyboxRenderingColorTopDeltaHeight < skyboxRenderingColor3Height) { tmp_skyboxRenderingColor3 = skyboxRenderingColorTop; } if (height + skyboxRenderingColorTopDeltaHeight < skyboxRenderingColor2Height) { tmp_skyboxRenderingColor2 = skyboxRenderingColorTop; } if (height + skyboxRenderingColorTopDeltaHeight < skyboxRenderingColor1Height) { tmp_skyboxRenderingColor1 = skyboxRenderingColorTop; } if (skyboxRenderingColor0Enabled) { num = ((!(skyboxRenderingColor0Height - height > 0f)) ? Mathf.Atan((skyboxRenderingColor0Height - height) / skyboxRenderingColor0Distance) : Mathf.Atan((skyboxRenderingColor0Height - height) / skyboxRenderingColor0Distance)); } float num4 = ((!(skyboxRenderingColor1Height - height > 0f)) ? Mathf.Atan((skyboxRenderingColor1Height - height) / skyboxRenderingColorDownwardsScatteringDistance) : Mathf.Atan((skyboxRenderingColor1Height - height) / skyboxRenderingColorUpwardsScatteringDistance)); float num5 = ((!(skyboxRenderingColor2Height - height > 0f)) ? Mathf.Atan((skyboxRenderingColor2Height - height) / skyboxRenderingColorDownwardsScatteringDistance) : Mathf.Atan((skyboxRenderingColor2Height - height) / skyboxRenderingColorUpwardsScatteringDistance)); float num6 = ((!(skyboxRenderingColor3Height - height > 0f)) ? Mathf.Atan((skyboxRenderingColor3Height - height) / skyboxRenderingColorDownwardsScatteringDistance) : Mathf.Atan((skyboxRenderingColor3Height - height) / skyboxRenderingColorUpwardsScatteringDistance)); if (skyboxRenderingColor0Enabled) { num2 = Mathf.RoundToInt((float)skyboxAngleColors * ((num + (float)Math.PI / 2f) / (float)Math.PI)); } int num7 = Mathf.RoundToInt((float)skyboxAngleColors * ((num4 + (float)Math.PI / 2f) / (float)Math.PI)); int num8 = Mathf.RoundToInt((float)skyboxAngleColors * ((num5 + (float)Math.PI / 2f) / (float)Math.PI)); int num9 = Mathf.RoundToInt((float)skyboxAngleColors * ((num6 + (float)Math.PI / 2f) / (float)Math.PI)); int num10 = num7; int num11 = num9; if (skyboxRenderingColor0Enabled && num10 < num2 + 4) { num10 = num2 + 4; } if (num7 < num10 + 4) { num7 = num10 + 4; } if (num8 < num7 + 4) { num8 = num7 + 4; } if (num9 < num8 + 4) { num9 = num8 + 4; } if (num11 < num9 + 4) { num11 = num9 + 4; } if (skyboxRenderingColor0Enabled) { num3 = 255f / (float)(num10 - num2); } float num12 = 255f / (float)(num7 - num10); float num13 = 255f / (float)(num8 - num7); float num14 = 255f / (float)(num9 - num8); float num15 = 255f / (float)(num11 - num9); if (skyboxRenderingColor0Enabled) { for (int i = 0; i < skyboxAngleColors; i++) { if (i < num2) { ref Color32 reference = ref skyboxAngleColor[i]; reference = Color32.op_Implicit(tmp_skyboxRenderingColorm1); } else if (i < num10) { skyboxAngleColor[i].r = (byte)((tmp_skyboxRenderingColor0.r * (float)(i - num2) + tmp_skyboxRenderingColorm1.r * (float)(num10 - i)) * num3); skyboxAngleColor[i].g = (byte)((tmp_skyboxRenderingColor0.g * (float)(i - num2) + tmp_skyboxRenderingColorm1.g * (float)(num10 - i)) * num3); skyboxAngleColor[i].b = (byte)((tmp_skyboxRenderingColor0.b * (float)(i - num2) + tmp_skyboxRenderingColorm1.b * (float)(num10 - i)) * num3); } else if (i < num7) { skyboxAngleColor[i].r = (byte)((tmp_skyboxRenderingColor1.r * (float)(i - num10) + tmp_skyboxRenderingColor0.r * (float)(num7 - i)) * num12); skyboxAngleColor[i].g = (byte)((tmp_skyboxRenderingColor1.g * (float)(i - num10) + tmp_skyboxRenderingColor0.g * (float)(num7 - i)) * num12); skyboxAngleColor[i].b = (byte)((tmp_skyboxRenderingColor1.b * (float)(i - num10) + tmp_skyboxRenderingColor0.b * (float)(num7 - i)) * num12); } else if (i < num8) { skyboxAngleColor[i].r = (byte)((tmp_skyboxRenderingColor2.r * (float)(i - num7) + tmp_skyboxRenderingColor1.r * (float)(num8 - i)) * num13); skyboxAngleColor[i].g = (byte)((tmp_skyboxRenderingColor2.g * (float)(i - num7) + tmp_skyboxRenderingColor1.g * (float)(num8 - i)) * num13); skyboxAngleColor[i].b = (byte)((tmp_skyboxRenderingColor2.b * (float)(i - num7) + tmp_skyboxRenderingColor1.b * (float)(num8 - i)) * num13); } else if (i < num9) { skyboxAngleColor[i].r = (byte)((tmp_skyboxRenderingColor3.r * (float)(i - num8) + tmp_skyboxRenderingColor2.r * (float)(num9 - i)) * num14); skyboxAngleColor[i].g = (byte)((tmp_skyboxRenderingColor3.g * (float)(i - num8) + tmp_skyboxRenderingColor2.g * (float)(num9 - i)) * num14); skyboxAngleColor[i].b = (byte)((tmp_skyboxRenderingColor3.b * (float)(i - num8) + tmp_skyboxRenderingColor2.b * (float)(num9 - i)) * num14); } else if (i < num11) { skyboxAngleColor[i].r = (byte)((tmp_skyboxRenderingColor4.r * (float)(i - num9) + tmp_skyboxRenderingColor3.r * (float)(num11 - i)) * num15); skyboxAngleColor[i].g = (byte)((tmp_skyboxRenderingColor4.g * (float)(i - num9) + tmp_skyboxRenderingColor3.g * (float)(num11 - i)) * num15); skyboxAngleColor[i].b = (byte)((tmp_skyboxRenderingColor4.b * (float)(i - num9) + tmp_skyboxRenderingColor3.b * (float)(num11 - i)) * num15); } else { ref Color32 reference2 = ref skyboxAngleColor[i]; reference2 = Color32.op_Implicit(tmp_skyboxRenderingColor4); } } } else { for (int j = 0; j < skyboxAngleColors; j++) { if (j < num10) { ref Color32 reference3 = ref skyboxAngleColor[j]; reference3 = Color32.op_Implicit(tmp_skyboxRenderingColor0); } else if (j < num7) { skyboxAngleColor[j].r = (byte)((tmp_skyboxRenderingColor1.r * (float)(j - num10) + tmp_skyboxRenderingColor0.r * (float)(num7 - j)) * num12); skyboxAngleColor[j].g = (byte)((tmp_skyboxRenderingColor1.g * (float)(j - num10) + tmp_skyboxRenderingColor0.g * (float)(num7 - j)) * num12); skyboxAngleColor[j].b = (byte)((tmp_skyboxRenderingColor1.b * (float)(j - num10) + tmp_skyboxRenderingColor0.b * (float)(num7 - j)) * num12); } else if (j < num8) { skyboxAngleColor[j].r = (byte)((tmp_skyboxRenderingColor2.r * (float)(j - num7) + tmp_skyboxRenderingColor1.r * (float)(num8 - j)) * num13); skyboxAngleColor[j].g = (byte)((tmp_skyboxRenderingColor2.g * (float)(j - num7) + tmp_skyboxRenderingColor1.g * (float)(num8 - j)) * num13); skyboxAngleColor[j].b = (byte)((tmp_skyboxRenderingColor2.b * (float)(j - num7) + tmp_skyboxRenderingColor1.b * (float)(num8 - j)) * num13); } else if (j < num9) { skyboxAngleColor[j].r = (byte)((tmp_skyboxRenderingColor3.r * (float)(j - num8) + tmp_skyboxRenderingColor2.r * (float)(num9 - j)) * num14); skyboxAngleColor[j].g = (byte)((tmp_skyboxRenderingColor3.g * (float)(j - num8) + tmp_skyboxRenderingColor2.g * (float)(num9 - j)) * num14); skyboxAngleColor[j].b = (byte)((tmp_skyboxRenderingColor3.b * (float)(j - num8) + tmp_skyboxRenderingColor2.b * (float)(num9 - j)) * num14); } else if (j < num11) { skyboxAngleColor[j].r = (byte)((tmp_skyboxRenderingColor4.r * (float)(j - num9) + tmp_skyboxRenderingColor3.r * (float)(num11 - j)) * num15); skyboxAngleColor[j].g = (byte)((tmp_skyboxRenderingColor4.g * (float)(j - num9) + tmp_skyboxRenderingColor3.g * (float)(num11 - j)) * num15); skyboxAngleColor[j].b = (byte)((tmp_skyboxRenderingColor4.b * (float)(j - num9) + tmp_skyboxRenderingColor3.b * (float)(num11 - j)) * num15); } else { ref Color32 reference4 = ref skyboxAngleColor[j]; reference4 = Color32.op_Implicit(tmp_skyboxRenderingColor4); } } } return true; } private bool ProcessSkyboxTexture(Texture2D tex, float height, int mode) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) if (pixels == null) { Skybox_Start(); } int width = ((Texture)tex).width; int height2 = ((Texture)tex).height; for (int i = 0; i < height2; i++) { switch (mode) { case -1: { for (int k = 0; k < width; k++) { ref Color32 reference2 = ref pixels[k + i * width]; reference2 = skyboxAngleColor[skyboxBottomAngles[k, i]]; } break; } case 0: { for (int l = 0; l < width; l++) { ref Color32 reference3 = ref pixels[l + i * width]; reference3 = skyboxAngleColor[skyboxSideAngles[l, i]]; } break; } case 1: { for (int j = 0; j < width; j++) { ref Color32 reference = ref pixels[j + i * width]; reference = skyboxAngleColor[skyboxTopAngles[j, i]]; } break; } } } tex.SetPixels32(pixels); tex.Apply(false); return true; } private void ProcessSkybox() { //IL_0050: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Invalid comparison between Unknown and I4 //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Invalid comparison between Unknown and I4 //IL_0128: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Invalid comparison between Unknown and I4 //IL_018b: 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_01cd: 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) //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_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0343: 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_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) float num = ((!((Object)(object)sm != (Object)null)) ? 0f : sm.height); if (fogRenderingEnabled) { if (skyboxRenderingColor0Enabled) { RenderSettings.fogColor = skyboxRenderingColor0; } else { RenderSettings.fogColor = skyboxRenderingColor; } FogMode val = initialFogMode; if ((int)val != 1) { if ((int)val == 2 || (int)val == 3) { RenderSettings.fogDensity = initialFogValue * (1f - fog01) + extremeFogValue * fog01; } } else { RenderSettings.fogEndDistance = initialFogValue * (1f - fog01) + extremeFogValue * fog01; } } if (!skyboxRenderingEnabled) { return; } if ((Object)(object)skyboxComponent == (Object)null) { Skybox_Start(); } ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).clearFlags = (CameraClearFlags)1; getSkyboxRenderingColor(((Component)this).gameObject.transform.position.y + ((!((Object)(object)sm != (Object)null)) ? 0f : sm.height), renderSpace: false, out skyboxRenderingColor); ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).backgroundColor = skyboxRenderingColor; skyboxRenderNth_count--; if (skyboxRenderNth_count > 0) { return; } skyboxRenderNth_count = skyboxRenderNth; getSkyboxRenderingColor(((Component)this).gameObject.transform.position.y + num + skyboxRenderingColorTopDeltaHeight, renderSpace: true, out skyboxRenderingColorTop); PreProcessSkyboxTexture(((Component)this).gameObject.transform.position.y + num); for (int i = 0; i < skyboxRenderSidesPerNth; i++) { skyboxRenderNth_tex++; if (skyboxRenderNth_tex > 5) { skyboxRenderNth_tex = 0; } switch (skyboxRenderNth_tex) { case 0: if ((Object)(object)_FrontTex != (Object)null) { ProcessSkyboxTexture(_FrontTex, ((Component)this).gameObject.transform.position.y + num, 0); } break; case 1: if ((Object)(object)_LeftTex != (Object)null) { ProcessSkyboxTexture(_LeftTex, ((Component)this).gameObject.transform.position.y + num, 0); } break; case 2: if ((Object)(object)_RightTex != (Object)null) { ProcessSkyboxTexture(_RightTex, ((Component)this).gameObject.transform.position.y + num, 0); } break; case 3: if ((Object)(object)_BackTex != (Object)null) { ProcessSkyboxTexture(_BackTex, ((Component)this).gameObject.transform.position.y + num, 0); } break; case 4: if ((Object)(object)_UpTex != (Object)null) { ProcessSkyboxTexture(_UpTex, ((Component)this).gameObject.transform.position.y + num, 1); } break; case 5: if ((Object)(object)_DownTex != (Object)null) { ProcessSkyboxTexture(_DownTex, ((Component)this).gameObject.transform.position.y + num, -1); } break; } } } private void ProcessCamera(float timeLapsus) { //IL_000d: 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_0233: 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_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0268: 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_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0355: 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_033f: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0945: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_0706: Unknown result type (might be due to invalid IL or missing references) //IL_0721: 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_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_078a: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07cf: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_0b1d: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: Unknown result type (might be due to invalid IL or missing references) //IL_0aa7: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: 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_0ace: Unknown result type (might be due to invalid IL or missing references) //IL_0ade: 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_0af0: Unknown result type (might be due to invalid IL or missing references) //IL_0af5: Unknown result type (might be due to invalid IL or missing references) //IL_0afa: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Unknown result type (might be due to invalid IL or missing references) //IL_0a08: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_10e8: Unknown result type (might be due to invalid IL or missing references) //IL_10f9: Unknown result type (might be due to invalid IL or missing references) //IL_10ff: Unknown result type (might be due to invalid IL or missing references) //IL_110a: Unknown result type (might be due to invalid IL or missing references) //IL_110f: 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_111b: Unknown result type (might be due to invalid IL or missing references) //IL_112c: 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_113d: Unknown result type (might be due to invalid IL or missing references) //IL_1142: Unknown result type (might be due to invalid IL or missing references) //IL_1147: Unknown result type (might be due to invalid IL or missing references) //IL_114e: Unknown result type (might be due to invalid IL or missing references) //IL_115f: Unknown result type (might be due to invalid IL or missing references) //IL_1165: Unknown result type (might be due to invalid IL or missing references) //IL_1170: Unknown result type (might be due to invalid IL or missing references) //IL_1175: Unknown result type (might be due to invalid IL or missing references) //IL_117a: Unknown result type (might be due to invalid IL or missing references) //IL_107b: Unknown result type (might be due to invalid IL or missing references) //IL_1080: Unknown result type (might be due to invalid IL or missing references) //IL_11a6: Unknown result type (might be due to invalid IL or missing references) //IL_10b1: Unknown result type (might be due to invalid IL or missing references) //IL_10c1: Unknown result type (might be due to invalid IL or missing references) //IL_10cc: Unknown result type (might be due to invalid IL or missing references) //IL_10d1: Unknown result type (might be due to invalid IL or missing references) //IL_10d6: Unknown result type (might be due to invalid IL or missing references) //IL_10db: Unknown result type (might be due to invalid IL or missing references) //IL_11d7: Unknown result type (might be due to invalid IL or missing references) //IL_11dd: Unknown result type (might be due to invalid IL or missing references) //IL_0d4f: Unknown result type (might be due to invalid IL or missing references) //IL_0d5f: 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_0dac: Unknown result type (might be due to invalid IL or missing references) //IL_0db1: Unknown result type (might be due to invalid IL or missing references) //IL_13a0: Unknown result type (might be due to invalid IL or missing references) //IL_13a5: Unknown result type (might be due to invalid IL or missing references) //IL_13c4: Unknown result type (might be due to invalid IL or missing references) //IL_13c9: Unknown result type (might be due to invalid IL or missing references) //IL_13ec: Unknown result type (might be due to invalid IL or missing references) //IL_0ed3: Unknown result type (might be due to invalid IL or missing references) //IL_0ed9: 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_0f21: Unknown result type (might be due to invalid IL or missing references) //IL_0f26: Unknown result type (might be due to invalid IL or missing references) //IL_0f2b: Unknown result type (might be due to invalid IL or missing references) //IL_0e95: Unknown result type (might be due to invalid IL or missing references) //IL_0e9b: Unknown result type (might be due to invalid IL or missing references) //IL_0ea0: Unknown result type (might be due to invalid IL or missing references) //IL_0ea5: Unknown result type (might be due to invalid IL or missing references) //IL_0eaa: Unknown result type (might be due to invalid IL or missing references) //IL_0eaf: Unknown result type (might be due to invalid IL or missing references) //IL_0ec0: Unknown result type (might be due to invalid IL or missing references) //IL_0ec5: Unknown result type (might be due to invalid IL or missing references) //IL_1434: Unknown result type (might be due to invalid IL or missing references) //IL_1224: Unknown result type (might be due to invalid IL or missing references) //IL_1229: Unknown result type (might be due to invalid IL or missing references) //IL_0e37: Unknown result type (might be due to invalid IL or missing references) //IL_0e3c: Unknown result type (might be due to invalid IL or missing references) //IL_0e1b: Unknown result type (might be due to invalid IL or missing references) //IL_0e20: Unknown result type (might be due to invalid IL or missing references) //IL_0dce: Unknown result type (might be due to invalid IL or missing references) //IL_0dd9: Unknown result type (might be due to invalid IL or missing references) //IL_0de9: Unknown result type (might be due to invalid IL or missing references) //IL_0dfa: Unknown result type (might be due to invalid IL or missing references) //IL_0dff: Unknown result type (might be due to invalid IL or missing references) //IL_0e04: Unknown result type (might be due to invalid IL or missing references) //IL_1913: Unknown result type (might be due to invalid IL or missing references) //IL_15a1: Unknown result type (might be due to invalid IL or missing references) //IL_15a6: Unknown result type (might be due to invalid IL or missing references) //IL_15f3: Unknown result type (might be due to invalid IL or missing references) //IL_15f8: Unknown result type (might be due to invalid IL or missing references) //IL_1237: Unknown result type (might be due to invalid IL or missing references) //IL_1239: Unknown result type (might be due to invalid IL or missing references) //IL_1244: Unknown result type (might be due to invalid IL or missing references) //IL_1249: Unknown result type (might be due to invalid IL or missing references) //IL_124e: Unknown result type (might be due to invalid IL or missing references) //IL_1253: Unknown result type (might be due to invalid IL or missing references) //IL_1260: Unknown result type (might be due to invalid IL or missing references) //IL_0fb1: Unknown result type (might be due to invalid IL or missing references) //IL_0fb6: Unknown result type (might be due to invalid IL or missing references) //IL_0f95: Unknown result type (might be due to invalid IL or missing references) //IL_0f9a: 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_0f53: Unknown result type (might be due to invalid IL or missing references) //IL_0f63: Unknown result type (might be due to invalid IL or missing references) //IL_0f74: Unknown result type (might be due to invalid IL or missing references) //IL_0f79: Unknown result type (might be due to invalid IL or missing references) //IL_0f7e: Unknown result type (might be due to invalid IL or missing references) //IL_127e: Unknown result type (might be due to invalid IL or missing references) //IL_1283: Unknown result type (might be due to invalid IL or missing references) //IL_0e4f: Unknown result type (might be due to invalid IL or missing references) //IL_0e5f: Unknown result type (might be due to invalid IL or missing references) //IL_0e66: Unknown result type (might be due to invalid IL or missing references) //IL_0e71: Unknown result type (might be due to invalid IL or missing references) //IL_0e76: Unknown result type (might be due to invalid IL or missing references) //IL_0e7b: Unknown result type (might be due to invalid IL or missing references) //IL_1666: Unknown result type (might be due to invalid IL or missing references) //IL_166b: Unknown result type (might be due to invalid IL or missing references) //IL_12a7: Unknown result type (might be due to invalid IL or missing references) //IL_12ac: Unknown result type (might be due to invalid IL or missing references) //IL_12db: Unknown result type (might be due to invalid IL or missing references) //IL_12e0: Unknown result type (might be due to invalid IL or missing references) //IL_0fc9: Unknown result type (might be due to invalid IL or missing references) //IL_0fd9: Unknown result type (might be due to invalid IL or missing references) //IL_0fe0: Unknown result type (might be due to invalid IL or missing references) //IL_0feb: Unknown result type (might be due to invalid IL or missing references) //IL_0ff0: Unknown result type (might be due to invalid IL or missing references) //IL_0ff5: Unknown result type (might be due to invalid IL or missing references) //IL_1373: Unknown result type (might be due to invalid IL or missing references) //IL_1723: Unknown result type (might be due to invalid IL or missing references) //IL_1728: Unknown result type (might be due to invalid IL or missing references) //IL_172d: Unknown result type (might be due to invalid IL or missing references) //IL_1780: Unknown result type (might be due to invalid IL or missing references) //IL_1785: Unknown result type (might be due to invalid IL or missing references) //IL_178a: Unknown result type (might be due to invalid IL or missing references) if (enableSpecialForce && Input.GetKey(specialForceApplyZeroRotate)) { ((Component)this).gameObject.GetComponent().angularVelocity = Vector3.zero; } if (scheduleRecoverVehicle > 0) { scheduleRecoverVehicle--; if (scheduleRecoverVehicle == 0) { recoverVehicle(); } } if (enableRecoverVehicle && inputRecoverVehicleKeyForToggled) { inputRecoverVehicleKeyForToggled = false; recoverVehicle(); } if (cameraOnFixedUpdate_count > 0) { cameraOnFixedUpdate_count--; } else if (inputExternalCameraKeyForToggled) { inputExternalCameraKeyForToggled = false; if (cameraExternalEnabled) { cameraExternalEnabled = false; if ((Object)(object)sm != (Object)null && sm.globalDebugNodes) { Debug.Log((object)("Internal Camera " + currentCameraPosition + " Selected")); } } else { currentCameraPosition++; if (currentCameraPosition >= countCameraPositions) { currentCameraPosition = 0; cameraExternalEnabled = true; if ((Object)(object)sm != (Object)null && sm.globalDebugNodes) { Debug.Log((object)"External Camera Selected"); } } else if ((Object)(object)sm != (Object)null && sm.globalDebugNodes) { Debug.Log((object)("Internal Camera " + currentCameraPosition + " Selected")); } } cameraOnFixedUpdate_count = 50; } if (inputFixedPositionCameraKeyForToggled) { inputFixedPositionCameraKeyForToggled = false; cameraFixedPositionEnabled = !cameraFixedPositionEnabled; if (cameraFixedPositionEnabled) { cameraposition += ((Component)this).gameObject.GetComponent().velocity * 4f; } } if (enableSpecialForce && Input.GetKey(specialForceApplyLeft)) { ((Component)this).gameObject.GetComponent().AddForce(-((Component)this).gameObject.transform.right * specialForceMagnitude); } if (enableSpecialForce && Input.GetKey(specialForceApplyRight)) { ((Component)this).gameObject.GetComponent().AddForce(((Component)this).gameObject.transform.right * specialForceMagnitude); } if (enableSpecialForce && Input.GetKey(specialForceApplyForward)) { ((Component)this).gameObject.GetComponent().AddForce(((Component)this).gameObject.transform.forward * specialForceMagnitude); } if (enableSpecialForce && Input.GetKey(specialForceApplyForceBack)) { ((Component)this).gameObject.GetComponent().AddForce(-((Component)this).gameObject.transform.forward * specialForceMagnitude); } if (enableSpecialForce && Input.GetKey(specialForceApplyForceUp)) { ((Component)this).gameObject.GetComponent().AddForce(((Component)this).gameObject.transform.up * specialForceMagnitude); } if (enableSpecialForce && Input.GetKey(specialForceApplyDown)) { ((Component)this).gameObject.GetComponent().AddForce(-((Component)this).gameObject.transform.up * specialForceMagnitude); } if (cameraExternalEnabled != cameraExternalEnabled_lastValue) { if (cameraExternalEnabled) { ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).nearClipPlane = cameraExternalNearClipPlane * globalSimulationScale; ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).farClipPlane = cameraExternalFarClipPlane * globalSimulationScale; } else { ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).nearClipPlane = cameraInternalNearClipPlane * globalSimulationScale; ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).farClipPlane = cameraInternalFarClipPlane * globalSimulationScale; } cameraExternalEnabled_lastValue = cameraExternalEnabled; } float num = (Input.mousePosition.x - (float)Screen.width / 2f) / (float)Screen.width; float num2 = (Input.mousePosition.y - (float)Screen.height / 2f) / (float)Screen.height; if (num > 0.5f) { num = 0.5f; } if (num < -0.5f) { num = -0.5f; } if (num2 > 0.5f) { num2 = 0.5f; } if (num2 < -0.5f) { num2 = -0.5f; } float num3 = gs_old * (1f - cameraInternalGsMixing) + sm.gaugesGs_output * cameraInternalGsMixing; if (num3 > cameraInternalGsMax) { num3 = cameraInternalGsMax; } if (num3 < 0f - cameraInternalGsMax) { num3 = 0f - cameraInternalGsMax; } gs_old = num3; float num4 = hgs_old * (1f - cameraInternalGsMixing) + sm.gaugesHGs_output * cameraInternalGsMixing; if (num4 > cameraInternalGsMax) { num4 = cameraInternalGsMax; } if (num4 < 0f - cameraInternalGsMax) { num4 = 0f - cameraInternalGsMax; } hgs_old = num4; Vector3 position = ((Component)this).gameObject.transform.position; if ((Object)(object)cameraAlternateFollow != (Object)null) { position = cameraAlternateFollow.transform.position; } if (cameraExternalEnabled) { if (Input.GetAxis("Mouse ScrollWheel") > 0f && cameraExternalDistance > cameraExternalDistanceMin) { cameraExternalDistance -= cameraExternalDistanceStep * inputWheelMouseSensivity / 10f; } if (Input.GetAxis("Mouse ScrollWheel") < 0f && cameraExternalDistance < cameraExternalDistanceMax) { cameraExternalDistance += cameraExternalDistanceStep * inputWheelMouseSensivity / 10f; } if (!cameraFixedPositionEnabled) { cameraposition = position + new Vector3((0f - ((Component)this).gameObject.transform.forward.x) * 20f - ((Component)this).gameObject.transform.right.x * 40f * num * inputHorizontalMouseSensivity / 3f, -40f * (num2 * inputVerticalMouseSensivity / 3f - 0.25f), (0f - ((Component)this).gameObject.transform.forward.z) * 20f - ((Component)this).gameObject.transform.right.z * 40f * num * inputHorizontalMouseSensivity / 3f) * cameraExternalDistance * cameraExternalMinHeightScale * globalSimulationScale; } cameralookat = position; if (cameraExternalUpWorld) { cameraup = worldup; } else { cameraup = ((Component)this).gameObject.transform.up; } if (cameraFixedPositionEnabled) { ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).fieldOfView = 20f; } else { ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).fieldOfView = 80f; } camera_filter = cameraExternalFilter; cameraOnFixedUpdate = true; } else { if (Input.GetAxis("Mouse ScrollWheel") > 0f && cameraInternalFov > cameraInternalFovMin) { cameraInternalFov -= cameraInternalFovStep * inputWheelMouseSensivity * cameraInternalSensivity / 10f; } if (Input.GetAxis("Mouse ScrollWheel") < 0f && cameraInternalFov < cameraInternalFovMax) { cameraInternalFov += cameraInternalFovStep * inputWheelMouseSensivity * cameraInternalSensivity / 10f; } cameraorientation = ((Component)this).gameObject.transform.rotation; camerafixed = false; countCameraPositions = 0; if (!cameraFixedPositionEnabled) { cameraposition = ((Component)this).gameObject.transform.TransformPoint(0f, 0.4f, -0.4f); } if (!cameraFixedPositionEnabled && (Object)(object)sm != (Object)null && sm.labeled_surfacemisc != null) { for (int i = 0; i < sm.labeled_surfacemisc_count; i++) { if (sm.labeled_surfacemisc[i].cameraPosition) { if (currentCameraPosition == countCameraPositions) { cameraposition = sm.labeled_surfacemisc[i].gameObject.transform.position; cameraorientation = sm.labeled_surfacemisc[i].gameObject.transform.rotation; camerafixed = !sm.labeled_surfacemisc[i].cameraCanRotate; } countCameraPositions++; } } } if (!camerafixed) { if (cameraInternalGsPosition) { cameraposition -= ((Component)this).gameObject.transform.up * num3 * cameraInternalGsPositionDelta; } if (cameraInternalGsPosition) { cameraposition -= ((Component)this).gameObject.transform.right * num4 * cameraInternalGsPositionHDelta; } } if ((Object)(object)cameraAlternateFollow != (Object)null) { cameraposition = cameraAlternateFollow.transform.position; } float num5 = ((cameraInternalDontVertical && cameraInternalDontVerticalMix) ? ((!cameraInternalGsRotation) ? (0f - Mathf.Sin((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity * (1f - cameraInternalDontVerticalMixing))) : (0f - Mathf.Sin((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity * (1f - cameraInternalDontVerticalMixing) + num3 * cameraInternalGsRotationDelta))) : (cameraInternalDontVertical ? ((!cameraInternalGsRotation) ? (0f - Mathf.Sin(0f)) : (0f - Mathf.Sin(num3 * cameraInternalGsRotationDelta))) : ((!cameraInternalGsRotation) ? (0f - Mathf.Sin((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity)) : (0f - Mathf.Sin((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity + num3 * cameraInternalGsRotationDelta))))); float num6 = ((cameraInternalDontVertical && cameraInternalDontVerticalMix) ? ((!cameraInternalGsRotation) ? Mathf.Cos((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity * (1f - cameraInternalDontVerticalMixing)) : Mathf.Cos((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity * (1f - cameraInternalDontVerticalMixing) + num3 * cameraInternalGsRotationDelta)) : (cameraInternalDontVertical ? ((!cameraInternalGsRotation) ? Mathf.Cos(0f) : Mathf.Cos(num3 * cameraInternalGsRotationDelta)) : ((!cameraInternalGsRotation) ? Mathf.Cos((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity) : Mathf.Cos((0f - num2) * inputVerticalMouseSensivity * cameraInternalSensivity + num3 * cameraInternalGsRotationDelta)))); if ((Object)(object)cameraAlternateFollow != (Object)null) { cameralookat = cameraposition + cameraAlternateFollow.transform.rotation * new Vector3((0f - Mathf.Cos(-(float)Math.PI / 2f - num * inputHorizontalMouseSensivity * cameraInternalSensivity)) * num6, num5, (0f - Mathf.Sin(-(float)Math.PI / 2f - num * inputHorizontalMouseSensivity * cameraInternalSensivity)) * num6); if (cameraInternalUpWorld && cameraInternalUpWorldMix) { cameraup = worldup * cameraInternalUpWorldMixing + cameraAlternateFollow.transform.up * (1f - cameraInternalUpWorldMixing); } else if (cameraInternalUpWorld) { cameraup = worldup; } else { cameraup = cameraAlternateFollow.transform.up; } if (cameraInternalGsRotation) { cameraup -= cameraAlternateFollow.transform.right * num4 * cameraInternalGsRotationDelta; } } else if (camerafixed) { cameralookat = cameraposition + cameraorientation * Vector3.forward; cameraup = ((Component)this).gameObject.transform.up; } else { cameralookat = cameraposition + cameraorientation * new Vector3((0f - Mathf.Cos(-(float)Math.PI / 2f - num * inputHorizontalMouseSensivity * cameraInternalSensivity)) * num6, num5, (0f - Mathf.Sin(-(float)Math.PI / 2f - num * inputHorizontalMouseSensivity * cameraInternalSensivity)) * num6); if (cameraInternalUpWorld && cameraInternalUpWorldMix) { cameraup = worldup * cameraInternalUpWorldMixing + ((Component)this).gameObject.transform.up * (1f - cameraInternalUpWorldMixing); } else if (cameraInternalUpWorld) { cameraup = worldup; } else { cameraup = ((Component)this).gameObject.transform.up; } if (cameraInternalGsRotation) { cameraup -= ((Component)this).gameObject.transform.right * num4 * cameraInternalGsRotationDelta; } } ((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main).fieldOfView = cameraInternalFov; camera_filter = cameraInternalFilter; cameraOnFixedUpdate = false; } if (sunlightAttach && (Object)(object)sunlight != (Object)null) { ((Component)sunlight).transform.position = (1f - sunlightAttachFilter) * ((Component)sunlight).transform.position + sunlightAttachFilter * (((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).transform.position - ((Component)sunlight).transform.forward * sunlightAttachDistance); } cameraposition_filtered = cameraposition_filtered * (1f - camera_filter) + cameraposition * camera_filter; cameralookat_filtered = cameralookat_filtered * (1f - camera_filter) + cameralookat * camera_filter; cameraup_filtered = cameraup_filtered * (1f - camera_filter) + cameraup * camera_filter; ((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).transform.position = cameraposition_filtered; ((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).transform.LookAt(cameralookat_filtered, cameraup_filtered); cameraExternalMinHeightScale = 1f; if (cameraExternalEnabled) { Vector3 position2 = ((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).transform.position; RaycastHit val = default(RaycastHit); if (cameraExternalMinHeightAutoProbe && Physics.Raycast(position2 + Vector3.up * cameraExternalMinHeightAutoProbeDeltaProbe, -Vector3.up, ref val, 1E+09f, LayerMask.op_Implicit(cameraExternalMinHeightAutoProbeLayermask)) && position2.y < ((RaycastHit)(ref val)).point.y + cameraExternalMinHeightAutoProbeDelta) { cameraExternalMinHeightScale *= 1f / ((((RaycastHit)(ref val)).point.y + cameraExternalMinHeightAutoProbeDelta - position2.y) * 0.1f + 1f); position2.y = ((RaycastHit)(ref val)).point.y + cameraExternalMinHeightAutoProbeDelta * cameraExternalMinHeightScale; } if (position2.y < cameraExternalMinHeight) { cameraExternalMinHeightScale *= 1f / ((cameraExternalMinHeight - position2.y) * 1f + 1f); position2.y = cameraExternalMinHeight; } ((Component)((!((Object)(object)attachToCamera == (Object)null)) ? attachToCamera : Camera.main)).transform.position = position2; } if ((Object)(object)crossair != (Object)null) { Cursor.visible = false; float num7 = 64f; crossair.pixelInset = new Rect(Input.mousePosition.x - (float)Screen.width / 2f - num7 / 2f, Input.mousePosition.y - (float)Screen.height / 2f - num7 / 2f, num7, num7); } if ((Object)(object)speedmeter != (Object)null) { speedmeter.pixelOffset = new Vector2((float)(-Screen.width) / 2f + 10f, (float)Screen.height / 2f - 10f); float num8 = 15f; float num9 = 331.3f + 0.606f * num8; if ((Object)(object)sm != (Object)null) { GUIText obj = speedmeter; string[] obj2 = new string[28] { "speed: ", (Mathf.Floor(sm.speed / sm.globalSimulationScale * 3.6f * 100f) / 100f).ToString(), " km/h | ", (Mathf.Floor(sm.speed / sm.globalSimulationScale * 1.9438444f * 100f) / 100f).ToString(), " knots | M", (Mathf.Floor(sm.speed / sm.globalSimulationScale / num9 * 100f) / 100f).ToString(), " | ", (Mathf.Floor(sm.speed / sm.globalSimulationScale * 100f) / 100f).ToString(), " m/s | alternate method: ", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null }; Vector3 velocity = ((Component)this).gameObject.GetComponent().velocity; obj2[9] = (Mathf.Floor(((Vector3)(ref velocity)).magnitude / sm.globalSimulationScale * 100f) / 100f).ToString(); obj2[10] = " m/s\nheight "; obj2[11] = (Mathf.Floor(((Component)this).gameObject.transform.position.y + ((!((Object)(object)sm != (Object)null)) ? 0f : sm.height) + 102.84f) / sm.globalSimulationScale).ToString(); obj2[12] = "m | "; obj2[13] = (Mathf.Floor((((Component)this).gameObject.transform.position.y + ((!((Object)(object)sm != (Object)null)) ? 0f : sm.height) + 102.84f) / 0.3048f) / sm.globalSimulationScale).ToString(); obj2[14] = " feet | vertical distance to ground: "; obj2[15] = (Mathf.Floor(sm.distanceToGround / sm.globalSimulationScale * 100f) / 100f).ToString(); obj2[16] = " m\nwind: "; Vector3 val2 = GWindBasic.windAt(((Component)this).gameObject.transform.position); obj2[17] = (Mathf.Floor(((Vector3)(ref val2)).magnitude / sm.globalSimulationScale * 3.6f * 100f) / 100f).ToString(); obj2[18] = "km/h | "; Vector3 val3 = GWindBasic.windAt(((Component)this).gameObject.transform.position); obj2[19] = (Mathf.Floor(((Vector3)(ref val3)).magnitude / sm.globalSimulationScale * 1.9438444f * 100f) / 100f).ToString(); obj2[20] = " knots\nsensivity: "; obj2[21] = sm.inputSensivity.ToString(); obj2[22] = " | trim ailerons: "; obj2[23] = sm.inputAileronsTrim.ToString(); obj2[24] = " | trim elevator: "; obj2[25] = sm.inputElevatorTrim.ToString(); obj2[26] = " | trim rudder: "; obj2[27] = sm.inputRudderTrim.ToString(); obj.text = string.Concat(obj2); if (sm.stall > 0f) { GUIText obj3 = speedmeter; obj3.text = obj3.text + "\nSTALL: " + Mathf.RoundToInt(sm.stall * 100f) + "%"; } } else { speedmeter.text = "Cannot locate GAircraft attached to the same object where GSCameraAux is attached."; } } if ((Object)(object)autopilotmeter != (Object)null) { autopilotmeter.pixelOffset = new Vector2((float)(-Screen.width) / 2f + 10f, (float)(-Screen.height) / 2f + 10f + 10f); } ProcessGround(timeLapsus); ProcessClouds(timeLapsus); ProcessSounds(timeLapsus); } private void ProcessGround(float timeLapsus) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_010e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ground != (Object)null) { float num = searchGroundObjectGranularity; Vector3 position = ground.transform.position; if (position.x - ((Component)this).gameObject.transform.position.x > num) { position.x -= num; } if (position.x - ((Component)this).gameObject.transform.position.x < 0f - num) { position.x += num; } if (position.z - ((Component)this).gameObject.transform.position.z > num) { position.z -= num; } if (position.z - ((Component)this).gameObject.transform.position.z < 0f - num) { position.z += num; } ground.transform.position = position; } } public void ProcessClouds(float timeLapsus) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)clouds != (Object)null) { float num = searchCloudsObjectGranularity; Vector3 position = clouds.transform.position; Vector3 val = GWindBasic.windAt(position) * searchCloudsWindSpeedMultiplier * timeLapsus; position += val; if (position.x - ((Component)this).gameObject.transform.position.x > num) { position.x -= num; } if (position.x - ((Component)this).gameObject.transform.position.x < 0f - num) { position.x += num; } if (position.z - ((Component)this).gameObject.transform.position.z > num) { position.z -= num; } if (position.z - ((Component)this).gameObject.transform.position.z < 0f - num) { position.z += num; } clouds.transform.position = position; } } public static void ProcessSounds_getVolumeAndPitch(float inputmin, float inputmax, float soundmin_pivotScale, float soundmin_pitchBase, float soundmin_pitchScale, float soundmax_pivotScale, float soundmax_pitchBase, float soundmax_pitchScale, out float volume_soundmin, out float volume_soundmax, out float pitch_soundmin, out float pitch_soundmax) { volume_soundmin = inputmin / soundmin_pivotScale; volume_soundmax = inputmax / soundmax_pivotScale; pitch_soundmin = soundmin_pitchBase + volume_soundmin * 2f * soundmin_pitchScale; volume_soundmin = volume_soundmin * 2f * GAircraft.globalVolume; if (volume_soundmax > 0.5f) { pitch_soundmax = soundmax_pitchBase + volume_soundmax * 1.25f * soundmax_pitchScale; volume_soundmax = (volume_soundmax - 0.5f) * 2f * 2f * GAircraft.globalVolume; } else { pitch_soundmax = soundmax_pitchBase; volume_soundmax = 0f; } if (GAircraft.isSimulationPaused) { volume_soundmin = 0f; volume_soundmax = 0f; } } public static void ProcessSounds_getVolumeAndPitch(float input, float pivotScale, out float volume_soundmin, out float volume_soundmax, out float pitch_soundmin, out float pitch_soundmax) { float num = 1f; float num2 = 1f; float num3 = 1f; float num4 = 1f; ProcessSounds_getVolumeAndPitch(input, input, pivotScale, num, num2, pivotScale, num3, num4, out volume_soundmin, out volume_soundmax, out pitch_soundmin, out pitch_soundmax); } public static void ProcessSounds_getVolumeAndPitch(float input, out float volume_soundmin, out float volume_soundmax, out float pitch_soundmin, out float pitch_soundmax) { ProcessSounds_getVolumeAndPitch(input, 20000f, out volume_soundmin, out volume_soundmax, out pitch_soundmin, out pitch_soundmax); } private void ProcessSounds(float timeLapsus) { bool flag = false; bool flag2 = false; if (ProcessSounds_granularityTimeRemaining >= 0f) { ProcessSounds_granularityTimeRemaining -= timeLapsus; } else { ProcessSounds_granularityTimeRemaining += ProcessSounds_granularityTime; flag = true; } if (ProcessSounds_granularityTime2Remaining >= 0f) { ProcessSounds_granularityTime2Remaining -= timeLapsus; } else { ProcessSounds_granularityTime2Remaining += ProcessSounds_granularityTime2; flag2 = true; } if (!searchSounds || !((Object)(object)sm != (Object)null)) { return; } float inputmin = GPivot.toTAxisValue(soundmin_pivotId, sm, "throttle"); float inputmax = GPivot.toTAxisValue(soundmax_pivotId, sm, "throttle"); float volume = sm.stall; ProcessSounds_getVolumeAndPitch(inputmin, inputmax, soundmin_pivotScale, soundmin_pitchBase, soundmin_pitchScale, soundmax_pivotScale, soundmax_pitchBase, soundmax_pitchScale, out var volume_soundmin, out var volume_soundmax, out var pitch_soundmin, out var pitch_soundmax); for (int i = 0; i < soundmin_count; i++) { if (sm.isCrashed) { volume_soundmin = 0f; } soundmin[i].volume = volume_soundmin; if (flag2) { if (soundmin[i].volume > 0f) { soundmin[i].pitch = pitch_soundmin; } } else if (flag && soundmin[i].volume > 0f && Mathf.Abs(soundmin[i].pitch - pitch_soundmin) >= ProcessSounds_granularityPitch) { soundmin[i].pitch = pitch_soundmin; } } for (int j = 0; j < soundmax_count; j++) { if (sm.isCrashed) { volume_soundmax = 0f; } soundmax[j].volume = volume_soundmax; if (flag2) { if (soundmax[j].volume > 0f) { soundmax[j].pitch = pitch_soundmax; } } else if (flag && soundmax[j].volume > 0f && Mathf.Abs(soundmax[j].pitch - pitch_soundmax) >= ProcessSounds_granularityPitch) { soundmax[j].pitch = pitch_soundmax; } } for (int k = 0; k < soundstall_count; k++) { if (sm.isCrashed) { volume = 0f; } soundstall[k].volume = volume; } if (!iscrashed) { if (sm.isCrashed) { iscrashed = true; float volume2 = 1f; for (int l = 0; l < soundcrash_count; l++) { soundcrash[l].volume = volume2; soundcrash[l].Play((ulong)Mathf.FloorToInt((float)l * 1.7f * 44100f)); } } } else if (!sm.isCrashed) { iscrashed = false; } } } public class GSCursorAux : MonoBehaviour { public enum TCursorMode { deltaPosition, deltaVelocity } public enum TRotationMode { none, pivotUp, worldUp } public TCursorMode cursorMode = TCursorMode.deltaPosition; public bool renderBack = false; public GameObject pivotGameobject = null; private Rigidbody pivotRigidbody; public Vector3 localDeltaPosition = Vector3.zero; public Vector3 deltaPosition = Vector3.zero; public bool deltaPositionYaw = true; public float velocityDistance = 1f; public float velocityMin = 0.25f; [HideInInspector] public float angleCalculatorDeltaElementUpDistance = 100f; [HideInInspector] public float angleCalculatorDeltaElementForwardDistance = 0f; public GUITexture targetGUITexture = null; public RotatableGUITexture targetRotatableGUITexture = null; public TRotationMode rotationMode = TRotationMode.pivotUp; private GameObject pivot = null; private Vector3 worldPosition = Vector3.zero; private Vector3 screenPoint = Vector3.zero; private Vector3 screenPoint2 = Vector3.zero; private Vector3 screenPointD = Vector3.zero; private Vector3 velocity = Vector3.zero; private Quaternion yawRotation = Quaternion.identity; private float angleBetween(Vector3 v1, Vector3 v2, Vector3 worldup) { //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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) Vector3 val; if (Vector3.Dot(val = Vector3.Cross(Vector3.Normalize(v1), Vector3.Normalize(v2)), Vector3.Normalize(worldup)) > 0f) { return Mathf.Asin(((Vector3)(ref val)).magnitude) * 180f / (float)Math.PI; } return (0f - Mathf.Asin(((Vector3)(ref val)).magnitude)) * 180f / (float)Math.PI; } private float angle2D(float x, float y) { if (x > 0f) { return Mathf.Atan(y / x) * 180f / (float)Math.PI; } if (x < 0f) { return ((float)Math.PI + Mathf.Atan(y / x)) * 180f / (float)Math.PI; } if (y > 0f) { return 90f; } return -90f; } private void FixedUpdate() { //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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_0083: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: 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_01a1: 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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_038c: 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_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0413: 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_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) pivot = pivotGameobject; if ((Object)(object)pivot == (Object)null) { pivot = ((Component)this).gameObject; } if (deltaPositionYaw) { Quaternion rotation = pivot.transform.rotation; yawRotation = Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f); worldPosition = pivot.transform.TransformPoint(localDeltaPosition) + yawRotation * deltaPosition; } else { worldPosition = pivot.transform.TransformPoint(localDeltaPosition) + deltaPosition; } TCursorMode tCursorMode = cursorMode; if (tCursorMode == TCursorMode.deltaPosition || tCursorMode != TCursorMode.deltaVelocity) { screenPoint = Camera.main.WorldToViewportPoint(worldPosition); } else if ((Object)(object)pivotGameobject != (Object)null) { pivotRigidbody = (Rigidbody)pivotGameobject.GetComponent("Rigidbody"); if ((Object)(object)pivotRigidbody != (Object)null) { velocity = pivotRigidbody.velocity; if (((Vector3)(ref velocity)).magnitude < velocityMin) { velocity = pivotGameobject.transform.forward; } } else { velocity = pivotGameobject.transform.forward; } screenPoint = Camera.main.WorldToViewportPoint(worldPosition + Vector3.Normalize(velocity) * velocityDistance); } else { screenPoint = Camera.main.WorldToViewportPoint(worldPosition + Vector3.forward); ((Component)this).gameObject.SetActive(false); } if ((Object)(object)targetGUITexture != (Object)null) { if (!renderBack && screenPoint.z < 0f) { screenPoint.x = 10f; screenPoint.y = 10f; } screenPoint.z = ((Component)targetGUITexture).transform.localPosition.z; ((Component)targetGUITexture).transform.localPosition = screenPoint; } if (!((Object)(object)targetRotatableGUITexture != (Object)null)) { return; } if (!renderBack && screenPoint.z < 0f) { screenPoint.x = 10f; screenPoint.y = 10f; } screenPoint.z = ((Component)targetRotatableGUITexture).transform.localPosition.z; TRotationMode tRotationMode = rotationMode; if (tRotationMode == TRotationMode.pivotUp || tRotationMode == TRotationMode.worldUp) { switch (rotationMode) { case TRotationMode.pivotUp: if ((Object)(object)pivotGameobject != (Object)null) { screenPoint2 = Camera.main.WorldToViewportPoint(worldPosition + pivotGameobject.transform.up * angleCalculatorDeltaElementUpDistance + pivotGameobject.transform.forward * angleCalculatorDeltaElementForwardDistance); } else { ((Component)this).gameObject.SetActive(false); } break; case TRotationMode.worldUp: screenPoint2 = Camera.main.WorldToViewportPoint(worldPosition + Vector3.up * angleCalculatorDeltaElementUpDistance + pivotGameobject.transform.forward * angleCalculatorDeltaElementForwardDistance); break; } screenPointD = screenPoint2 - screenPoint; screenPointD.z = 0f; targetRotatableGUITexture.angle = 0f - angle2D(screenPointD.x, screenPointD.y) + 90f; } ((Component)targetRotatableGUITexture).transform.localPosition = screenPoint; } } public class GSExplosionAux : MonoBehaviour { private bool debugEnabled = false; private bool alive = false; private bool isActive = true; private GSGunAux controller = null; private GSExplosionAux nextSleeped = null; private float totalLifeTime = 0f; private float lifeTime = -1f; public AudioSource explosionSound = null; public bool ownSound = true; [HideInInspector] public float size = 1f; [HideInInspector] public Vector3 speed = Vector3.zero; private Vector3 scale = Vector3.one; private void FixedUpdate() { //IL_0099: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) if (alive) { if (!(lifeTime >= 0f)) { return; } lifeTime -= Time.fixedDeltaTime; scale.x = size * lifeTime / totalLifeTime; scale.y = size * lifeTime / totalLifeTime; scale.z = size * lifeTime / totalLifeTime; ((Component)this).gameObject.transform.localScale = scale; Transform transform = ((Component)this).gameObject.transform; transform.position += speed * Time.fixedDeltaTime; if (lifeTime < 0f) { alive = false; if (debugEnabled) { Debug.Log((object)"GSExplosionAux: explosion timeout"); } if ((Object)(object)controller != (Object)null && controller.OnExplosionDied(this)) { ((Component)this).gameObject.SetActive(isActive = false); return; } controller = null; nextSleeped = null; Object.Destroy((Object)(object)this); } } else if (isActive) { ((Component)this).gameObject.SetActive(isActive = false); } } public bool explosionWakeUp(GSGunAux controller, float lifeTime, bool debugEnabled) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown if (alive) { return false; } if (ownSound && (Object)(object)explosionSound == (Object)null && (Object)(object)((Component)this).gameObject.GetComponent("AudioSource") != (Object)null) { explosionSound = (AudioSource)((Component)this).gameObject.GetComponent("AudioSource"); } this.debugEnabled = debugEnabled; alive = true; totalLifeTime = lifeTime; this.lifeTime = lifeTime; this.controller = controller; ((Component)this).gameObject.SetActive(isActive = true); if ((Object)(object)explosionSound != (Object)null) { explosionSound.Play(); } return alive; } public bool explosionSleep(GSExplosionAux nextSleeped) { this.nextSleeped = nextSleeped; return true; } public GSExplosionAux explosionNextSleeped() { return nextSleeped; } } public class GSGunAux : MonoBehaviour { public bool debugEnabled = false; [HideInInspector] public GAircraft parent = null; public GAircraft.TAxisSource inputShotSource = GAircraft.TAxisSource.unity_axis; public KeyCode inputShotKey = (KeyCode)13; public string inputShotSourceUnityAxis = "Fire1"; public float inputShotRate = 1f; private float inputShotRate_value = 1f; public GSGunAux dualGunCouple = null; public AudioSource shotSound = null; public bool ownSound = true; public bool raycastEnabled = true; public float raycastMinDistance = 30f; public LayerMask raycastLayermask = LayerMask.op_Implicit(-24); private Rigidbody parentRigidbody = null; public GameObject gunBarrel = null; public float gunVibration = 250f; public GameObject gunHalo = null; public float gunHaloLifetime = 0.1f; public bool shotAfterGunHalo = true; private float gunHaloRemainingLifetime = -1f; private bool gunHaloEnabled = true; public GameObject gunYawPivot = null; public float gunYawPivotOffset = 0f; public float gunYawPivotMin = -180f; public float gunYawPivotMax = 180f; public float gunYawPivotVelocity = 50f; public GameObject gunPitchPivot = null; public float gunPitchPivotOffset = 0f; public float gunPitchPivotMin = -180f; public float gunPitchPivotMax = 180f; public float gunPitchPivotVelocity = 50f; private float applyYaw = 0f; private float currentYaw = 0f; private float applyPitch = 0f; private float currentPitch = 0f; [HideInInspector] public Vector3 targetPosition = Vector3.zero; [HideInInspector] public Vector3 targetDirection = Vector3.zero; [HideInInspector] public Vector3 targetForwardRight = Vector3.zero; [HideInInspector] public Vector3 targetRight = Vector3.zero; private Quaternion aircraftRotation; private Quaternion gunRotation; private Quaternion tmpGunRotation; private Vector3 tmpGunRotationEulerAngles; public GSProjectileAux projectileClass = null; public float projectileBornAtDistance = 1f; public float projectileLifetime = 30f; public float projectileInitialSpeed = 500f; public Vector3 projectileAcceleration = Vector3.zero; public Vector3 projectileLocalAcceleration = Vector3.zero; public float projectileParallelDrag = 0f; public float projectilePerpendicularDrag = 0.05f; private GSProjectileAux firstSleepedProjectile = null; public GSExplosionAux explosionClass = null; public float explosionLifetime = 5f; public float explosionSize = 1f; public float explosionForce = 0f; public Vector3 explosionSpeed = Vector3.zero; private GSExplosionAux firstSleepedExplosion = null; private bool startedOk = false; private float angleBetween(Vector3 v1, Vector3 v2, Vector3 worldup) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) Vector3 val; if (Vector3.Dot(val = Vector3.Cross(v1, v2), worldup) > 0f) { return Mathf.Asin(((Vector3)(ref val)).magnitude) * 180f / (float)Math.PI; } return (0f - Mathf.Asin(((Vector3)(ref val)).magnitude)) * 180f / (float)Math.PI; } private void Start() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown if ((Object)(object)gunBarrel == (Object)null) { gunBarrel = ((Component)this).gameObject; } if (ownSound && (Object)(object)shotSound == (Object)null && (Object)(object)((Component)this).gameObject.GetComponent("AudioSource") != (Object)null) { shotSound = (AudioSource)((Component)this).gameObject.GetComponent("AudioSource"); } Transform transform = ((Component)this).gameObject.transform; int num = 99; while ((Object)(object)transform != (Object)null) { num--; if (num < 0) { break; } if (Object.op_Implicit((Object)(object)((Component)transform).gameObject.GetComponent("GAircraft")) && (Object)(object)parent == (Object)null) { parent = (GAircraft)(object)((Component)transform).gameObject.GetComponent("GAircraft"); } if (Object.op_Implicit((Object)(object)((Component)transform).gameObject.GetComponent("Rigidbody")) && (Object)(object)parentRigidbody == (Object)null) { parentRigidbody = (Rigidbody)((Component)transform).gameObject.GetComponent("Rigidbody"); } transform = transform.parent; if ((Object)(object)transform == (Object)null) { break; } } if ((Object)(object)gunHalo != (Object)null) { gunHalo.SetActive(false); } startedOk = true; } public bool OnExplosionDied(GSExplosionAux explosion) { if (explosion.explosionSleep(firstSleepedExplosion)) { firstSleepedExplosion = explosion; return true; } return false; } public bool explosionPlace(Vector3 position, Quaternion rotation, float size, Vector3 speed) { //IL_0086: 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_00a0: 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) GSExplosionAux gSExplosionAux; if ((Object)(object)firstSleepedExplosion == (Object)null) { if (debugEnabled) { Debug.Log((object)"No more sleeped explosions, instantiating explosion..."); } if (!((Object)(object)explosionClass != (Object)null)) { return false; } gSExplosionAux = Object.Instantiate(explosionClass); } else { gSExplosionAux = firstSleepedExplosion; firstSleepedExplosion = gSExplosionAux.explosionNextSleeped(); } gSExplosionAux.explosionWakeUp(this, explosionLifetime, debugEnabled); ((Component)gSExplosionAux).transform.position = position; ((Component)gSExplosionAux).transform.rotation = rotation; gSExplosionAux.size = size; gSExplosionAux.speed = speed; GWindBasic.blowSet(position, explosionForce, explosionLifetime, 7777f, 1.75f); return true; } public bool OnProjectileImpact(GSProjectileAux projectile, Collision collision) { //IL_000d: 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_0029: Unknown result type (might be due to invalid IL or missing references) explosionPlace(((Component)projectile).gameObject.transform.position, ((Component)projectile).gameObject.transform.rotation, explosionSize, explosionSpeed); if (projectile.projectileSleep(firstSleepedProjectile)) { firstSleepedProjectile = projectile; return true; } return false; } public bool OnProjectileDied(GSProjectileAux projectile) { if (projectile.projectileSleep(firstSleepedProjectile)) { firstSleepedProjectile = projectile; return true; } return false; } public bool projectileShot() { if (debugEnabled) { Debug.Log((object)"GSGunAux: shot performed"); } gunHaloEnabled = true; if ((Object)(object)gunHalo != (Object)null) { gunHalo.SetActive(true); gunHaloRemainingLifetime = gunHaloLifetime; if (!shotAfterGunHalo) { projectileLaunch(); } } else { projectileLaunch(); } if ((Object)(object)shotSound != (Object)null) { shotSound.Play(); } return true; } public bool projectileLaunch() { //IL_0091: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: 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_0229: Unknown result type (might be due to invalid IL or missing references) GSProjectileAux gSProjectileAux; if ((Object)(object)firstSleepedProjectile == (Object)null) { if (debugEnabled) { Debug.Log((object)"No more sleeped projectiles, instantiating projectile..."); } if (!((Object)(object)projectileClass != (Object)null)) { return false; } gSProjectileAux = Object.Instantiate(projectileClass); } else { gSProjectileAux = firstSleepedProjectile; firstSleepedProjectile = gSProjectileAux.projectileNextSleeped(); } gSProjectileAux.projectileWakeUp(this, projectileLifetime, debugEnabled); ((Component)gSProjectileAux).transform.position = gunBarrel.transform.position + gunBarrel.transform.forward * projectileBornAtDistance; ((Component)gSProjectileAux).transform.rotation = gunBarrel.transform.rotation; if ((Object)(object)parentRigidbody != (Object)null) { ((Component)gSProjectileAux).gameObject.GetComponent().velocity = parentRigidbody.velocity + gunBarrel.transform.forward * projectileInitialSpeed; } else { ((Component)gSProjectileAux).gameObject.GetComponent().velocity = gunBarrel.transform.forward * projectileInitialSpeed; } ((Component)gSProjectileAux).gameObject.GetComponent().angularVelocity = Vector3.zero; gSProjectileAux.acceleration = projectileAcceleration; gSProjectileAux.localAcceleration = projectileLocalAcceleration; gSProjectileAux.dragParallel = projectileParallelDrag; gSProjectileAux.dragPerpendicular = projectilePerpendicularDrag; if ((Object)(object)parentRigidbody != (Object)null) { parentRigidbody.AddForceAtPosition(-((Component)gSProjectileAux).gameObject.GetComponent().velocity * ((Component)gSProjectileAux).gameObject.GetComponent().mass / parentRigidbody.mass * 10000f, gunBarrel.transform.position); } if ((Object)(object)parent != (Object)null) { parent.vibrationSet(gunBarrel.transform.forward, (0f - gunVibration) * projectileInitialSpeed * ((Component)gSProjectileAux).gameObject.GetComponent().mass / parentRigidbody.mass, 1f, 777f); } return true; } public bool dualGunCoupleHasBeenFired() { if (inputShotRate_value < 1f / inputShotRate * 0.5f) { inputShotRate_value = 1f / inputShotRate * 0.5f; } return true; } private void FixedUpdate() { //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: 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_0211: 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_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: 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_02a5: 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_018e: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0460: 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_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) if (!startedOk) { return; } if (gunHaloRemainingLifetime >= 0f) { gunHaloRemainingLifetime -= Time.fixedDeltaTime; if (gunHaloRemainingLifetime < 0f) { if (gunHaloEnabled && (Object)(object)gunHalo != (Object)null) { gunHalo.SetActive(false); } gunHaloEnabled = false; if (shotAfterGunHalo) { projectileLaunch(); } } } if ((Object)(object)parent != (Object)null && parent.isCrashed) { return; } if (raycastEnabled) { RaycastHit val = default(RaycastHit); if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), ref val, 1E+09f, LayerMask.op_Implicit(raycastLayermask))) { if (((RaycastHit)(ref val)).distance < raycastMinDistance) { Ray val2 = Camera.main.ScreenPointToRay(Input.mousePosition); targetDirection = Vector3.Normalize(((Ray)(ref val2)).direction); targetPosition = gunBarrel.transform.position + targetDirection * 1000f; } else { targetPosition = ((RaycastHit)(ref val)).point; targetDirection = Vector3.Normalize(targetPosition - gunBarrel.transform.position); } } else { Ray val3 = Camera.main.ScreenPointToRay(Input.mousePosition); targetDirection = Vector3.Normalize(((Ray)(ref val3)).direction); targetPosition = gunBarrel.transform.position + targetDirection * 1000f; } } else { Ray val4 = Camera.main.ScreenPointToRay(Input.mousePosition); targetDirection = Vector3.Normalize(((Ray)(ref val4)).direction); targetPosition = gunBarrel.transform.position + targetDirection * 1000f; } targetForwardRight = Vector3.Normalize(targetDirection - Vector3.Dot(targetDirection, ((Component)this).gameObject.transform.up) * ((Component)this).gameObject.transform.up); targetRight = Vector3.Cross(((Component)this).gameObject.transform.up, targetForwardRight); applyYaw = angleBetween(((Component)this).gameObject.transform.forward, targetForwardRight, ((Component)this).gameObject.transform.up); if (applyYaw > currentYaw) { currentYaw += gunYawPivotVelocity * Time.fixedDeltaTime; } if (applyYaw < currentYaw) { currentYaw -= gunYawPivotVelocity * Time.fixedDeltaTime; } if (currentYaw < gunYawPivotMin) { currentYaw = gunYawPivotMin; } if (currentYaw > gunYawPivotMax) { currentYaw = gunYawPivotMax; } applyPitch = angleBetween(targetForwardRight, targetDirection, targetRight); if (applyPitch > currentPitch) { currentPitch += gunPitchPivotVelocity * Time.fixedDeltaTime; } if (applyPitch < currentPitch) { currentPitch -= gunPitchPivotVelocity * Time.fixedDeltaTime; } if (currentPitch < gunPitchPivotMin) { currentPitch = gunPitchPivotMin; } if (currentPitch > gunPitchPivotMax) { currentPitch = gunPitchPivotMax; } if ((Object)(object)gunYawPivot != (Object)null) { gunYawPivot.transform.localEulerAngles = new Vector3(0f, currentYaw, 0f); } if ((Object)(object)gunPitchPivot != (Object)null) { gunPitchPivot.transform.localEulerAngles = new Vector3(currentPitch, 0f, 0f); } bool flag = false; switch (inputShotSource) { case GAircraft.TAxisSource.keys: case GAircraft.TAxisSource.keys_exp: flag = Input.GetKey(inputShotKey); break; case GAircraft.TAxisSource.unity_axis: case GAircraft.TAxisSource.unity_axis_exp: flag = Input.GetButton(inputShotSourceUnityAxis); break; case GAircraft.TAxisSource.inv_unity_axis: case GAircraft.TAxisSource.inv_unity_axis_exp: flag = !Input.GetButton(inputShotSourceUnityAxis); break; case GAircraft.TAxisSource.mix: case GAircraft.TAxisSource.mix_exp: flag = Input.GetKey(inputShotKey) || Input.GetButton(inputShotSourceUnityAxis); break; case GAircraft.TAxisSource.inv_mix: case GAircraft.TAxisSource.inv_mix_exp: flag = Input.GetKey(inputShotKey) || !Input.GetButton(inputShotSourceUnityAxis); break; } if (flag && inputShotRate_value <= 0f) { inputShotRate_value += 1f / inputShotRate; if ((Object)(object)dualGunCouple != (Object)null) { dualGunCouple.dualGunCoupleHasBeenFired(); } projectileShot(); } if (inputShotRate_value > 0f) { inputShotRate_value -= Time.fixedDeltaTime; } } } public class GSParticleAux : MonoBehaviour { private GAircraft gAircraft = null; private void Start() { gAircraft = GAircraft.findGAircraft(((Component)this).gameObject, 29); } private void Update() { ((Component)this).gameObject.GetComponent().emissionRate = Mathf.FloorToInt(100f * gAircraft.inputThrottle_output); } } [RequireComponent(typeof(Rigidbody))] public class GSProjectileAux : MonoBehaviour { private bool debugEnabled = false; private bool alive = false; private bool isActive = true; private GSGunAux controller = null; private GSProjectileAux nextSleeped = null; private float lifeTime = -1f; [HideInInspector] public Vector3 acceleration = Vector3.zero; [HideInInspector] public Vector3 localAcceleration = Vector3.zero; [HideInInspector] public float dragParallel = 0f; [HideInInspector] public float dragPerpendicular = 0.01f; private Vector3 velocity = Vector3.zero; private Vector3 velocityProjection = Vector3.zero; private Vector3 velocityPerpendicular = Vector3.zero; public bool raycastImprovedCollision = true; public float raycastImprovedCollisionInitialDistance = -1f; public float raycastImprovedCollisionFinalDistance = -1f; public int raycastImprovedCollisionNthFrames = 5; private int raycastImprovedCollisionCurrentFrame = 0; public LayerMask raycastImprovedCollisionLayermask = LayerMask.op_Implicit(-1); private RaycastHit raycastImprovedCollisionHit; public bool raycastImprovedCollisionApplyAtPosition = true; private Vector3 raycastImprovedCollisionApplyPosition = Vector3.zero; public bool raycastImprovedCollisionApplyDirectly = true; public bool raycastImprovedCollisionProjection = true; private bool raycastImprovedCollisionProjected = false; private Vector3 raycastImprovedCollisionProjectionVector = Vector3.zero; private Vector3 calcXScale_xp = new Vector3(0.5f, 0f, 0f); private Vector3 calcXScale_xn = new Vector3(-0.5f, 0f, 0f); private Vector3 calcYScale_yp = new Vector3(0f, 0.5f, 0f); private Vector3 calcYScale_yn = new Vector3(0f, -0.5f, 0f); private Vector3 calcZScale_zp = new Vector3(0f, 0f, 0.5f); private Vector3 calcZScale_zn = new Vector3(0f, 0f, -0.5f); public float calcXScale(GameObject obj) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = obj.transform.TransformPoint(calcXScale_xp) - obj.transform.TransformPoint(calcXScale_xn); return ((Vector3)(ref val)).magnitude; } public float calcYScale(GameObject obj) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = obj.transform.TransformPoint(calcYScale_yp) - obj.transform.TransformPoint(calcYScale_yn); return ((Vector3)(ref val)).magnitude; } public float calcZScale(GameObject obj) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = obj.transform.TransformPoint(calcZScale_zp) - obj.transform.TransformPoint(calcZScale_zn); return ((Vector3)(ref val)).magnitude; } private void OnCollisionEnter(Collision collision) { if (alive) { alive = false; if (debugEnabled) { Debug.Log((object)"GSProjectileAux: projectile impact!"); } if ((Object)(object)controller != (Object)null && controller.OnProjectileImpact(this, collision)) { ((Component)this).gameObject.SetActive(isActive = false); return; } controller = null; nextSleeped = null; Object.Destroy((Object)(object)this); } } private void FixedUpdate() { //IL_004c: 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_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_00b0: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_036f: 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_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0402: 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_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) if (alive) { if (!(lifeTime >= 0f)) { return; } lifeTime -= Time.fixedDeltaTime; if (((Vector3)(ref acceleration)).magnitude > 0f) { ((Component)this).GetComponent().AddForce(acceleration); } if (((Vector3)(ref localAcceleration)).magnitude > 0f) { ((Component)this).GetComponent().AddRelativeForce(localAcceleration); } if (dragParallel > 0f || dragPerpendicular > 0f) { velocity = ((Component)this).GetComponent().velocity; velocityProjection = Vector3.Dot(velocity, ((Component)this).gameObject.transform.forward) * ((Component)this).gameObject.transform.forward; velocityPerpendicular = velocity - velocityProjection; if (dragParallel > 0f) { velocityProjection *= 1f - Mathf.Clamp01(dragParallel * Time.fixedDeltaTime); } if (dragPerpendicular > 0f) { velocityPerpendicular *= 1f - Mathf.Clamp01(dragPerpendicular * Time.fixedDeltaTime); } ((Component)this).GetComponent().velocity = velocityProjection + velocityPerpendicular; } if (lifeTime < 0f) { alive = false; if (debugEnabled) { Debug.Log((object)"GSProjectileAux: projectile timeout"); } if ((Object)(object)controller != (Object)null && controller.OnProjectileDied(this)) { ((Component)this).gameObject.SetActive(isActive = false); return; } controller = null; nextSleeped = null; Object.Destroy((Object)(object)this); } if (!raycastImprovedCollision) { return; } if (raycastImprovedCollisionProjected) { float num = Vector3.Dot(((Component)this).gameObject.transform.position - raycastImprovedCollisionApplyPosition, raycastImprovedCollisionProjectionVector); if (num >= 0f) { if (raycastImprovedCollisionApplyAtPosition) { ((Component)this).gameObject.transform.position = raycastImprovedCollisionApplyPosition; } OnCollisionEnter(null); } } raycastImprovedCollisionCurrentFrame++; if (raycastImprovedCollisionCurrentFrame < raycastImprovedCollisionNthFrames) { return; } raycastImprovedCollisionCurrentFrame = 0; if (raycastImprovedCollisionInitialDistance < 0f) { raycastImprovedCollisionInitialDistance = 0f; float num2; if ((num2 = calcXScale(((Component)this).gameObject)) > raycastImprovedCollisionInitialDistance) { raycastImprovedCollisionInitialDistance = num2; } if ((num2 = calcYScale(((Component)this).gameObject)) > raycastImprovedCollisionInitialDistance) { raycastImprovedCollisionInitialDistance = num2; } if ((num2 = calcZScale(((Component)this).gameObject)) > raycastImprovedCollisionInitialDistance) { raycastImprovedCollisionInitialDistance = num2; } } if (raycastImprovedCollisionFinalDistance < 0f) { Vector3 val = ((Component)this).gameObject.GetComponent().velocity; raycastImprovedCollisionFinalDistance = ((Vector3)(ref val)).magnitude * Time.fixedDeltaTime * (float)raycastImprovedCollisionNthFrames * 100f; } if (Physics.Raycast(((Component)this).gameObject.transform.position + ((Component)this).gameObject.transform.forward * raycastImprovedCollisionInitialDistance, ((Component)this).gameObject.transform.forward, ref raycastImprovedCollisionHit, raycastImprovedCollisionFinalDistance, LayerMask.op_Implicit(raycastImprovedCollisionLayermask))) { if (raycastImprovedCollisionApplyDirectly) { ((Component)this).gameObject.transform.position = ((RaycastHit)(ref raycastImprovedCollisionHit)).point; OnCollisionEnter(null); } else { raycastImprovedCollisionApplyPosition = ((RaycastHit)(ref raycastImprovedCollisionHit)).point; raycastImprovedCollisionProjectionVector = ((Component)this).gameObject.transform.forward; raycastImprovedCollisionProjected = true; } } } else if (isActive) { ((Component)this).gameObject.SetActive(isActive = false); } } public bool projectileWakeUp(GSGunAux controller, float lifeTime, bool debugEnabled) { if (alive) { return false; } this.debugEnabled = debugEnabled; alive = true; this.lifeTime = lifeTime; this.controller = controller; raycastImprovedCollisionProjected = false; ((Component)this).gameObject.SetActive(isActive = true); return alive; } public bool projectileSleep(GSProjectileAux nextSleeped) { this.nextSleeped = nextSleeped; return true; } public GSProjectileAux projectileNextSleeped() { return nextSleeped; } } [RequireComponent(typeof(Rigidbody))] public class GSRotorBreakAux : MonoBehaviour { [HideInInspector] public Vector3 startLocalPosition = Vector3.zero; public GAircraft parentGAircraft = null; public bool debugMessagesEnabled = false; private void Start() { //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) startLocalPosition = ((Component)this).gameObject.transform.localPosition; Transform val = ((Component)this).gameObject.transform; int num = 99; if (!((Object)(object)parentGAircraft == (Object)null)) { return; } while ((Object)(object)val != (Object)null) { num--; if (num < 0) { break; } if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent("GAircraft"))) { parentGAircraft = (GAircraft)(object)((Component)val).gameObject.GetComponent("GAircraft"); break; } val = val.parent; } } private void FixedUpdate() { //IL_000d: 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) ((Component)this).gameObject.transform.localPosition = startLocalPosition; ((Component)this).GetComponent().velocity = Vector3.zero; } private void OnCollisionEnter(Collision collision) { if (debugMessagesEnabled) { Debug.Log((object)("rotor empieza colision" + Time.realtimeSinceStartup)); } if ((Object)(object)parentGAircraft != (Object)null) { parentGAircraft.isCrashed = true; } } private void OnCollisionStay(Collision collision) { if (debugMessagesEnabled) { Debug.Log((object)("rotor sigue colisionando" + Time.realtimeSinceStartup)); } } private void OnCollisionExit(Collision collision) { if (debugMessagesEnabled) { Debug.Log((object)("rotor deja de colisionar" + Time.realtimeSinceStartup)); } } } public class GSShadowAux : MonoBehaviour { private GameObject shadowcontainer; private GameObject shadow; private GameObject sunlight; public LayerMask searchShadowProjectsOverLayerMask = LayerMask.op_Implicit(-24); public string searchShadowLightDirectionObjectName = "Sunlight"; public string searchShadowContainerObjectName = "ShadowContainer"; public string searchShadowChildObjectName = "Shadow"; public float searchShadowAlpha = 0.2f; public float searchShadowSize = 10f; public float searchShadowSizeY = 0.33f; public float searchShadowDistanceMin = 25f; public float searchShadowDistanceMid = 125f; public float searchShadowDistanceMax = 1025f; public bool searchShadowProCompat = false; public float searchShadowDistanceMinFromCamera = 130f; public float searchShadowDistanceMinFromCameraTransition = 15f; private Vector3 shadow_scale; private void Start() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) shadowcontainer = GameObject.Find(searchShadowContainerObjectName); shadow = GameObject.Find(searchShadowChildObjectName); sunlight = GameObject.Find(searchShadowLightDirectionObjectName); shadow_scale = new Vector3(searchShadowSize, searchShadowSize * searchShadowSizeY, searchShadowSize); } private void FixedUpdate() { //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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_009d: 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_00ca: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)shadow != (Object)null) || !((Object)(object)shadowcontainer != (Object)null) || !((Object)(object)sunlight != (Object)null)) { return; } Vector3 position = ((Component)this).gameObject.transform.position; Vector3 forward = sunlight.transform.forward; RaycastHit val = default(RaycastHit); if (Physics.Raycast(position + forward * searchShadowDistanceMin, forward, ref val, 1E+09f, LayerMask.op_Implicit(searchShadowProjectsOverLayerMask))) { shadow.transform.localEulerAngles = ((Component)this).gameObject.transform.localEulerAngles; shadowcontainer.transform.localScale = shadow_scale; shadowcontainer.transform.position = ((RaycastHit)(ref val)).point - forward * 0.1f; Vector3 val2 = shadowcontainer.transform.position - ((Component)Camera.main).transform.position; float magnitude = ((Vector3)(ref val2)).magnitude; float num = ((((RaycastHit)(ref val)).distance < searchShadowDistanceMid) ? ((((RaycastHit)(ref val)).distance - searchShadowDistanceMin) / (searchShadowDistanceMid - searchShadowDistanceMin)) : ((!(((RaycastHit)(ref val)).distance < searchShadowDistanceMax)) ? 0f : ((searchShadowDistanceMax - ((RaycastHit)(ref val)).distance) / (searchShadowDistanceMax - searchShadowDistanceMid)))); if (searchShadowProCompat) { float num2 = ((magnitude < searchShadowDistanceMinFromCamera) ? 0f : ((!(magnitude < searchShadowDistanceMinFromCamera + searchShadowDistanceMinFromCameraTransition)) ? 1f : ((magnitude - searchShadowDistanceMinFromCamera) / searchShadowDistanceMinFromCameraTransition))); if (num2 < num) { num = num2; } } if (num <= 0f) { shadow.GetComponent().enabled = false; return; } shadow.GetComponent().enabled = true; shadow.GetComponent().materials[0].SetFloat("_Alfa", 1f - num * searchShadowAlpha); } else { shadow.GetComponent().enabled = false; } } } public class GSWindMeterAux : MonoBehaviour { private float t = 0f; public string searchPivotObjectName = "WindMeterPivot"; public string searchScalerObjectName = "WindMeterScaler"; public string searchNodeObjectName = "WindMeterNode"; private GameObject pivot = null; private GameObject scaler = null; private GameObject node = null; public float pangle1 = 1.3f; public float pangle2 = 2.3f; public float pangle3 = 3.3f; public float vangle = 30f; public float vscale = 0f; public float globalSimulationScale = 1f; private Vector3 neg_windspeed_filtered = Vector3.zero; private float neg_windspeed_filter = 0.01f; private Vector3 scaler_localScale = Vector3.zero; private Vector3 node_localEulerAngles = Vector3.zero; private Quaternion pivot_rotation = Quaternion.identity; private void Start() { pivot = GameObject.Find(searchPivotObjectName); scaler = GameObject.Find(searchScalerObjectName); node = GameObject.Find(searchNodeObjectName); } private void Update() { //IL_0049: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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_0220: 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_0237: 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) t += Time.fixedDeltaTime; if ((Object)(object)pivot != (Object)null && (Object)(object)scaler != (Object)null && (Object)(object)node != (Object)null) { neg_windspeed_filtered = neg_windspeed_filtered * (1f - neg_windspeed_filter) + -GWindBasic.windAt(((Component)this).gameObject.transform.position) / globalSimulationScale * neg_windspeed_filter; float num = Mathf.Pow(pangle1, -10f / ((Vector3)(ref neg_windspeed_filtered)).magnitude) * (80f + 10f * Mathf.Sin(t * 2f)); float num2 = Mathf.Pow(pangle2, -10f / ((Vector3)(ref neg_windspeed_filtered)).magnitude) * 6f * Mathf.Sin(t * 10f); float num3 = Mathf.Pow(pangle3, -10f / ((Vector3)(ref neg_windspeed_filtered)).magnitude) * 3f * Mathf.Sin(t * 100f); vangle = num + num2 + num3; ((Vector3)(ref scaler_localScale)).Set(1f, 1f, Mathf.Sin(vangle * 0.01745329f) + vscale); ((Vector3)(ref node_localEulerAngles)).Set(-5f + 55f * Mathf.Cos(vangle * 0.01745329f), 0f, 0f); scaler.transform.localScale = scaler_localScale; node.transform.localEulerAngles = node_localEulerAngles; if (neg_windspeed_filtered.x != 0f || neg_windspeed_filtered.y != 0f || neg_windspeed_filtered.z != 0f) { ((Quaternion)(ref pivot_rotation)).SetLookRotation(-neg_windspeed_filtered); } else { Vector3 eulerAngles = ((Quaternion)(ref pivot_rotation)).eulerAngles; ((Vector3)(ref eulerAngles)).Set(0f, 90f, 0f); } pivot.transform.rotation = pivot_rotation; } } } [ExecuteInEditMode] public class RotatableGUITexture : MonoBehaviour { public float angle = 0f; public Texture2D texture = null; public Color color = new Color(0.5f, 0.5f, 0.5f, 0.5f); public Rect pixelInset = new Rect(0f, 0f, 128f, 128f); public float leftBorder = 0f; public float rightBorder = 0f; public float topBorder = 0f; public float bottomBorder = 0f; public bool autoRefresh = true; private Rect rect; private Vector2 pivot; private Color internalcolor = Color.black; private Matrix4x4 matrixBackup; private Color colorBackup; private int depthBackup; private void Start() { refresh(); } public void refresh() { //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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_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) rect = new Rect((float)Screen.width * ((Component)this).transform.localPosition.x + ((Rect)(ref pixelInset)).x, (float)Screen.height * (1f - ((Component)this).transform.localPosition.y) - ((Rect)(ref pixelInset)).y - ((Rect)(ref pixelInset)).height, ((Rect)(ref pixelInset)).width, ((Rect)(ref pixelInset)).height); pivot = new Vector2(((Rect)(ref rect)).xMin + ((Rect)(ref rect)).width * 0.5f, ((Rect)(ref rect)).yMin + ((Rect)(ref rect)).height * 0.5f); } private void OnGUI() { //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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d5: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) if (autoRefresh) { refresh(); } else if (Application.isEditor) { refresh(); } matrixBackup = GUI.matrix; colorBackup = GUI.color; depthBackup = GUI.depth; GUIUtility.RotateAroundPivot(angle, pivot); GUI.color = color; internalcolor.r = color.r * 2f; internalcolor.g = color.g * 2f; internalcolor.b = color.b * 2f; internalcolor.a = color.a * 2f; GUI.color = internalcolor; GUI.depth = Mathf.FloorToInt(((Component)this).transform.localPosition.z); GUI.DrawTexture(rect, (Texture)(object)texture); GUI.matrix = matrixBackup; GUI.color = colorBackup; GUI.depth = depthBackup; } } [RequireComponent(typeof(Rigidbody))] public class GAircraft : MonoBehaviour { public enum TAxisSource { none, keys, keys_exp, unity_axis, inv_unity_axis, unity_axis_exp, inv_unity_axis_exp, user, mix, mix_exp, inv_mix, inv_mix_exp } public enum TSurfaceMethod { rigidbodyGetPointVelocity, rigidbodyGetPointVelocityWithPropwash, deltaFiltered, deltaFilteredWithPropwash } public enum TGroundEffectType { none, airplane, airplanesoft, airplanesoft2, helicopter, helicoptersoft, hovercraft } public enum TCrashType { none, airplane, helicopter } public enum TSensivityChannel { none, elevator, ailerons, rudder } [Serializable] public class LabeledSurfaceDesc { [HideInInspector] public GameObject gameObject = null; public string id = ""; [HideInInspector] public Vector3 lastPosition = Vector3.zero; [HideInInspector] public Vector3 drag = Vector3.zero; [HideInInspector] public Vector3 lift = Vector3.zero; public bool surfaceEnable = true; public bool surfaceEnableThin = true; public bool surfaceEnablePositive = true; public bool surfaceEnableNegative = true; public bool surfaceEnableXPositive = false; public bool surfaceEnableYPositive = false; public bool surfaceEnableZPositive = false; public bool surfaceEnableXNegative = false; public bool surfaceEnableYNegative = false; public bool surfaceEnableZNegative = false; public GSurface.TSurfaceShapeType shapeXPositive = GSurface.TSurfaceShapeType.default_shape; public string shapeXPositiveParameter = ""; public GSurface.TSurfaceShapeType shapeYPositive = GSurface.TSurfaceShapeType.default_shape; public string shapeYPositiveParameter = ""; public GSurface.TSurfaceShapeType shapeZPositive = GSurface.TSurfaceShapeType.default_shape; public string shapeZPositiveParameter = ""; public GSurface.TSurfaceShapeType shapeXNegative = GSurface.TSurfaceShapeType.default_shape; public string shapeXNegativeParameter = ""; public GSurface.TSurfaceShapeType shapeYNegative = GSurface.TSurfaceShapeType.default_shape; public string shapeYNegativeParameter = ""; public GSurface.TSurfaceShapeType shapeZNegative = GSurface.TSurfaceShapeType.default_shape; public string shapeZNegativeParameter = ""; public GSurface.TSurfaceBehaviourType behaviourXPositive = GSurface.TSurfaceBehaviourType.parent_behaviour; public GSurface.TSurfaceBehaviourType behaviourYPositive = GSurface.TSurfaceBehaviourType.parent_behaviour; public GSurface.TSurfaceBehaviourType behaviourZPositive = GSurface.TSurfaceBehaviourType.parent_behaviour; public GSurface.TSurfaceBehaviourType behaviourXNegative = GSurface.TSurfaceBehaviourType.parent_behaviour; public GSurface.TSurfaceBehaviourType behaviourYNegative = GSurface.TSurfaceBehaviourType.parent_behaviour; public GSurface.TSurfaceBehaviourType behaviourZNegative = GSurface.TSurfaceBehaviourType.parent_behaviour; [HideInInspector] public float cachedXScale = 1f; [HideInInspector] public float cachedYScale = 1f; [HideInInspector] public float cachedZScale = 1f; [HideInInspector] public float cachedXSurface = 1f; [HideInInspector] public float cachedYSurface = 1f; [HideInInspector] public float cachedZSurface = 1f; public float coefficientXDragWhenXPositiveFlow = 1f; public float coefficientYDragWhenYPositiveFlow = 1f; public float coefficientZDragWhenZPositiveFlow = 1f; public float coefficientXDragWhenXNegativeFlow = 1f; public float coefficientYDragWhenYNegativeFlow = 1f; public float coefficientZDragWhenZNegativeFlow = 1f; public float coefficientXLiftWhenYPositiveFlow = 0f; public float coefficientXLiftWhenYNegativeFlow = 0f; public float coefficientXLiftWhenZPositiveFlow = 0f; public float coefficientXLiftWhenZNegativeFlow = 0f; public float coefficientYLiftWhenXPositiveFlow = 0f; public float coefficientYLiftWhenXNegativeFlow = 0f; public float coefficientYLiftWhenZPositiveFlow = 0f; public float coefficientYLiftWhenZNegativeFlow = 0.1f; public float coefficientZLiftWhenXPositiveFlow = 0f; public float coefficientZLiftWhenXNegativeFlow = 0f; public float coefficientZLiftWhenYPositiveFlow = 0f; public float coefficientZLiftWhenYNegativeFlow = 0f; [HideInInspector] public LineRenderer lineRenderer = null; public float propWashFactor = 1f; public float coefficientExponent = 2f; public bool surfaceDebug = false; } [Serializable] public class LabeledSurfacePivotDesc { public GameObject gameObject = null; public string id = ""; public GPivot.TAxisOrientation rotationPivotAxis = GPivot.TAxisOrientation.right; public float rotationAroundForwardOffset = 0f; public float rotationAroundRightOffset = 0f; public float rotationAroundUpOffset = 0f; public GPivot.TAxisSource ch1Source = GPivot.TAxisSource.none; public string ch1SourceName = "none"; public float ch1PivotAngleWhenMin = 0f; public float ch1PivotAngleWhenMax = 0f; public float ch1PivotTurnsPerUnit = 1f; public GPivot.TAxisSource ch2Source = GPivot.TAxisSource.none; public string ch2SourceName = "none"; public float ch2PivotAngleWhenMin = 0f; public float ch2PivotAngleWhenMax = 0f; public float ch2PivotTurnsPerUnit = 1f; public GPivot.TAxisSource ch3Source = GPivot.TAxisSource.none; public string ch3SourceName = "none"; public float ch3PivotAngleWhenMin = 0f; public float ch3PivotAngleWhenMax = 0f; public float ch3PivotTurnsPerUnit = 1f; public Vector3 localEulerAngles = Vector3.zero; public float limitMin = -1E+09f; public float limitMax = 1E+09f; } [Serializable] public class LabeledSurfaceMiscDesc { public GameObject gameObject = null; public bool lospeed = false; public bool hispeed = false; public bool cameraPosition = false; public bool cameraCanRotate = true; public string pivotId = ""; public float rpmThreshold = 360f; } [Serializable] public class LabeledSurfaceDriveDesc { public GameObject gameObject = null; [HideInInspector] public Vector3 lastPosition = Vector3.zero; public GDrive.TDriveType type = GDrive.TDriveType.basic; [HideInInspector] public float drive_rpm = 0f; [HideInInspector] public float drive_shaft = 0f; [HideInInspector] public float drive_output = 0f; public bool powered = true; public float poweredFactor = 0f; public float poweredFactorFilter = 0.005f; public GDrive.TDrivePowerControlBy powerControlBy = GDrive.TDrivePowerControlBy.defaultvalue; public string powerControlByPivot = ""; public GDrive.TDrivePowerControlBy powerCollectiveControlBy = GDrive.TDrivePowerControlBy.defaultvalue; public string powerCollectiveControlByPivot = ""; public GDrive.TDrivePowerControlBy powerCyclicForwardControlBy = GDrive.TDrivePowerControlBy.defaultvalue; public string powerCyclicForwardControlByPivot = ""; public GDrive.TDrivePowerControlBy powerCyclicSideControlBy = GDrive.TDrivePowerControlBy.defaultvalue; public string powerCyclicSideControlByPivot = ""; public float throttleIdle = 0f; public float throttleMax = 1f; public float throttleAfterburner = 1.4f; public float throttleRpmConversionRatio = 1f; public float throttleRpmConversionFilter = 0.005f; public float theoreticalEnginePower = 1000f; public float theoreticalTargetRpms = 700f; public float throttleBiasOffset = 0.05f; public float throttleBiasMultiplier = 1.1f; public float throttleForwardRearOffset = -1.1f; public float throttleLeftRightOffset = 0f; public float yawForceMultiplier = 50000f; public float dumperForceMultiplier = 0.875f; public float commonFilter = 0.9f; public float pitchFilter = 0.1f; public float rollFilter = 0.1f; public float yawFilter = 0.1f; public float dumperFilter = 0.1f; public int bladeNumber = 3; public float bladeMass = 1f; public float bladeLength = 0.5f; public float bladeWidthMin = 0.05f; public float bladeWidthMax = 0.15f; public float bladeDepth = 0.05f; public float bladeAngleYaw = 20f; public float bladeAnglePitch = 1f; public float bladeShapeCoefficient = 0.9f; public bool bladeWashEnabled = true; [HideInInspector] public float bladeWashSpeed = 0f; public float bladeWashRadiusNormal = 3f; public float bladeWashRadiusTangent = 20f; public float bladeWashFactor = 0.25f; public float bladeWashSpread = 30f; [HideInInspector] public Vector3 rotorGyroscopicLastUp = Vector3.up; [HideInInspector] public float rotorGyroscopicCoefficient = 0.5f; public float rotorCollectiveBias = 0.5f; public float rotorCollectiveCoefficient = 1f; public float rotorCyclicForwardCoefficient = 0.5f; public float rotorCyclicSideCoefficient = 0.5f; public float rotorAutorotationCoefficient = 0.5f; public Vector3 basicRotorTailOffset = new Vector3(0f, -1.2f, -12f); public float basicRotorBladeForcePoint = 0.1f; public float basicRotorAirdensityBias = 1.201194f; public float basicRotorAirdensityExp = 3.3f; public float overspeedPitchFactor = 45f; public float overspeedPitchFactorExponent = 2f; public float overspeedPitchFactorAtSpeed = 262.5f; public float overspeedPitchFactorMin = 0.1f; public float overspeedPitchFactorMax = 20f; public float overspeedPitchFactorOffsetSpeed = -85f; public float overspeedPitchFactorOffsetValue = -0.1f; public float overspeedPitchFactorMultiplier = 1f; public float overspeedPitchFactorVibration = 1f; public int overspeedPitchFactorVibratorId = 3; public float overspeedRollFactor = 45f; public float overspeedRollFactorExponent = 3f; public float overspeedRollFactorAtSpeed = 431.25f; public float overspeedRollFactorMin = 0.1f; public float overspeedRollFactorMax = 100f; public float overspeedRollFactorOffsetSpeed = -65f; public float overspeedRollFactorOffsetValue = -0.1f; public float overspeedRollFactorMultiplier = 1f; public float overspeedRollFactorVibration = 1f; public int overspeedRollFactorVibratorId = 4; public float overspeedYawFactor = 8000000f; public float overspeedYawFactorExponent = 100f; public float overspeedYawFactorAtSpeed = 525f; public float overspeedYawFactorMin = 1f; public float overspeedYawFactorMax = 1000000f; public float overspeedYawFactorOffsetSpeed = 0f; public float overspeedYawFactorOffsetValue = -1f; public float overspeedYawFactorMultiplier = 1f; public float overspeedYawFactorVibration = 1f; public int overspeedYawFactorVibratorId = 5; public float climbReductionWithSpeed = 0.15f; public float climbReductionWithSpeedAtSpeed = 50f; public float climbReductionWithVerticalSpeed = 0.1f; public float climbReductionWithVerticalSpeedAtSpeed = 5.5f; public float pitchReductionWithRollSpeed = 0.1f; public float pitchReductionWithRollSpeedAtSpeed = 1.75f; public float pitchReductionWithMassFactor = 0.001f; public float rollReductionWithRollSpeed = 2f; public float rollReductionWithRollSpeedAtSpeed = 2.5f; public float rollReductionWithRollSpeedSmooth = 10f; public float rollReductionWithMassFactor = 0.02f; public float rollReductionWithSpeed = 0.1f; public float rollReductionWithSpeedAtSpeed = 50f; public float rollReductionWithSpeedSmooth = 2.5f; public float basicRotorVariationMultiplier = 1f; public float basicRotorVelocityFactor = 10f; public float basicRotorProjectedVelocityFactor = 100f; public float basicRotorProjectedVelocityMultiplier = 10f; public float basicRotorProjectedVelocityForwardOffset = 205.5f; public float basicRotorProjectedVelocityRearOffset = 205.5f; public float basicRotorProjectedVelocityLeftOffset = 290f; public float basicRotorProjectedVelocityRightOffset = 290f; public string shaftOutputPivotId = "engine"; [HideInInspector] public LineRenderer lineRenderer = null; } [Serializable] public class LabeledSurfaceTrailDesc { public GameObject gameObject = null; public GTrail.TTrailMode mode = GTrail.TTrailMode.standard; public int surfaceId_int = -1; public string surfaceId = ""; public float startWidth = 0f; public float endWidth = 0.05f; public Color startColor = Color.grey; public Color endColor = Color.clear; public string materialName = "Particles/Additive"; public float forceThreshold = 100f; public float speedThreshold = 150f; public float heightThreshold = 80000f; public LineRenderer lineRenderer = null; public Vector3[] linePoints = null; public bool[] linePointsEnabled = null; public int linePoint = 0; } public class VibratorSubvibratorDesc { public float totalTime = 0f; public float remainingTime = 0f; public float frequency = 0f; public float amplitude = 0f; } public class VibratorDesc { public float maxTime = 15f; public float minFrequency = 0.15f; public float maxFrequency = 750f; public float expFrequency = 2.5f; public float maxAmplitude = 1f; public float amplitudeToFrequencyRatio = 0.15f; public float saturationAt = 0.5f; public int subvibratorsCount = 0; public VibratorSubvibratorDesc[] subvibrators = null; } public static GAircraft singleton = null; public GameObject Thrrotle_Up; public GameObject Thrrotle_Down; public GameObject Paddle_Left; public GameObject Paddle_Right; public GameObject Stick_Up; public GameObject Stick_Down; public GameObject Stick_Left; public GameObject Stick_Right; public GameObject ThrottleLever; public GameObject StickLeverX; public GameObject StickLeverY; public GameObject RudderRot; public GameObject EngineSwitch; public static float globalVolume = 1f; public bool globalRenderPhysicSurfaces = true; public bool globalRenderForceVectors = true; public bool globalApplyForceVectors = true; [HideInInspector] public float height = 0f; [HideInInspector] public float speed = 0f; [HideInInspector] public float stall = 0f; private float speed_filter = 0.05f; [HideInInspector] public float stalled_surfaces = 0f; [HideInInspector] public float laminar_surfaces = 0f; [HideInInspector] public float analysis_surfaces = 0f; [HideInInspector] public float total_surfaces = 0f; private Vector3 speed_lastPosition = Vector3.zero; [HideInInspector] public float distanceToGround = 0f; [HideInInspector] public float yPositionOfGround = 0f; private Vector3 vibrationDirection = Vector3.forward; private float vibrationAmplitudePeak = 0f; private float vibrationAmplitude = 0f; private float vibrationDuration = 1f; private float vibrationTime = 0f; private float vibrationFrequency = 1f; public float globalSimulationScale = 1f; public float globalDragMultiplier = 10f; public float globalLiftMultiplier = 10f; public GSurface.TSurfaceBehaviourType globalDefaultBehaviour = GSurface.TSurfaceBehaviourType.default_behaviour; public bool globalAnalysisLaminarEnabled = true; public float globalAnalysisLaminarStallMultiplier = 1f; public float globalAnalysisLaminarStallExponent = 1.65f; public GSurface.TSurfaceShapeType globalShapeDefaultSurface = GSurface.TSurfaceShapeType.plane; public string globalShapeDefaultSurfaceParameter = ""; public float globalDefaultLaminarLimitAngle = 15f; public float globalDefaultTurbulentLimitAngle = 35f; public float globalDefaultStallLimitAngle = 33f; public bool globalDebugNodes = true; public bool globalDebugMore = true; [HideInInspector] public static bool GAircraftDropPointVelocity = false; private Vector3 rigidbodyVelocity = Vector3.zero; private Vector3 rigidbodyVelocity_lastValue = Vector3.zero; public float inputTrimStep = 0.05f; public float inputTrimMax = 0.5f; public float inputTrimMin = -0.5f; public KeyCode inputTrimKey = (KeyCode)304; public float inputSensivity = 1f; public float inputSensivityStep = 0.05f; public float inputSensivityMin = 0.05f; public float inputSensivityMax = 1f; public KeyCode inputSensivityKeyForIncrement = (KeyCode)270; public KeyCode inputSensivityKeyForDecrement = (KeyCode)269; public float inputSensivityCoefficientSpeed = 1.000002f; public float inputSensivityCoefficientSpeedLimit = 0.25f; [HideInInspector] public float inputElevator_internal = 0.5f; [HideInInspector] public float inputElevator_output = 0.5f; public TAxisSource inputElevatorSource = TAxisSource.inv_unity_axis; public float inputElevatorSourceExpK = 1.25f; public string inputElevatorSourceUnityAxis = "Vertical"; public KeyCode inputElevatorKeyForIncrement = (KeyCode)115; public KeyCode inputElevatorKeyForDecrement = (KeyCode)119; public float inputElevatorKeySmoothFilter = 0.05f; public float inputElevatorGlobalSmoothFilter = 1f; public float inputElevatorTrim = 0f; public float inputElevatorSensivityCoefficientSpeed = 1f; [HideInInspector] public float inputAilerons_internal = 0.5f; [HideInInspector] public float inputAilerons_output = 0.5f; public TAxisSource inputAileronsSource = TAxisSource.unity_axis; public float inputAileronsSourceExpK = 1.25f; public string inputAileronsSourceUnityAxis = "Horizontal"; public KeyCode inputAileronsKeyForIncrement = (KeyCode)100; public KeyCode inputAileronsKeyForDecrement = (KeyCode)97; public float inputAileronsKeySmoothFilter = 0.05f; public float inputAileronsGlobalSmoothFilter = 1f; public float inputAileronsTrim = 0f; public float inputAileronsSensivityCoefficientSpeed = 1f; [HideInInspector] public float inputRudder_internal = 0.5f; [HideInInspector] public float inputRudder_output = 0.5f; public TAxisSource inputRudderSource = TAxisSource.keys; public float inputRudderSourceExpK = 1.25f; public string inputRudderSourceUnityAxis = "Write here the Rudder Axisname"; public KeyCode inputRudderKeyForIncrement = (KeyCode)101; public KeyCode inputRudderKeyForDecrement = (KeyCode)113; public float inputRudderKeySmoothFilter = 0.05f; public float inputRudderGlobalSmoothFilter = 1f; public float inputRudderTrim = 0f; public float inputRudderSensivityCoefficientSpeed = 1f; [HideInInspector] public float inputThrottle_internal2 = 0f; [HideInInspector] public float inputThrottle_internal = 0f; [HideInInspector] public float inputThrottle_output = 0f; public TAxisSource inputThrottleSource = TAxisSource.keys; public string inputThrottleSourceUnityAxis = "Write here the Throttle Axisname"; public float inputThrottleAfterburnerMultiplier = 2f; public TAxisSource inputThrottleAfterburnerSource = TAxisSource.keys; public string inputThrottleAfterburnerSourceUnityAxis = "Write here Throttle Afterburner Axisname"; public float inputThrottleReverseMultiplier = -1f; public TAxisSource inputThrottleReverseSource = TAxisSource.keys; public string inputThrottleReverseSourceUnityAxis = "Write here Throttle Reverse Axisname"; public float inputThrottleNitroMultiplier = 3f; public TAxisSource inputThrottleNitroSource = TAxisSource.keys; public string inputThrottleNitroSourceUnityAxis = "Write here Throttle Nitro Axisname"; public float inputThrottleNitroTime = 5f; public float inputThrottleNitroFilter = 0.1f; public int inputThrottleNitroInitialCount = 5; public int inputThrottleNitroCount = 5; public string inputThrottleNitroSoundGameObjectName = "sound_nitro"; private AudioSource inputThrottleNitroSoundAudioSource = null; public float inputThrottleSourceExpK = 1.25f; public float inputThrottleIncrementDecrementStep = 0.01f; public KeyCode inputThrottleKeyForIncrement = (KeyCode)114; public KeyCode inputThrottleKeyForDecrement = (KeyCode)116; public KeyCode inputThrottleKeyFor0p = (KeyCode)127; public KeyCode inputThrottleKeyFor10p = (KeyCode)49; public KeyCode inputThrottleKeyFor20p = (KeyCode)50; public KeyCode inputThrottleKeyFor30p = (KeyCode)51; public KeyCode inputThrottleKeyFor40p = (KeyCode)52; public KeyCode inputThrottleKeyFor50p = (KeyCode)53; public KeyCode inputThrottleKeyFor60p = (KeyCode)54; public KeyCode inputThrottleKeyFor70p = (KeyCode)55; public KeyCode inputThrottleKeyFor80p = (KeyCode)56; public KeyCode inputThrottleKeyFor90p = (KeyCode)57; public KeyCode inputThrottleKeyFor100p = (KeyCode)48; public KeyCode inputThrottleKeyForAfterburner = (KeyCode)32; public KeyCode inputThrottleKeyForReverse = (KeyCode)306; public KeyCode inputThrottleKeyForNitro = (KeyCode)9; public float inputThrottleKeySmoothFilter = 0.05f; public float inputThrottleGlobalSmoothFilter = 1f; [HideInInspector] public float kThrottle_aft = 0f; [HideInInspector] public float kThrottle_rev = 0f; [HideInInspector] public float kThrottle_ntr = 0f; [HideInInspector] public float kThrottle_ntr_multiplier = 1f; [HideInInspector] public float kThrottle_ntr_time = 0f; private float inputGears_internal = 1f; [HideInInspector] public bool inputGears_internal_enabled = true; [HideInInspector] public float inputGears_output = 1f; public TAxisSource inputGearsSource = TAxisSource.keys; public string inputGearsSourceUnityAxis = "Write here the Gears Axisname"; public float inputGearsSourceExpK = 1.25f; public KeyCode inputGearsKeyForToggle = (KeyCode)103; public float inputGearsKeySmoothFilter = 0.01f; public float inputGearsGlobalSmoothFilter = 1f; private float inputFlaps_internal = 0f; [HideInInspector] public bool inputFlaps_internal_enabled = false; [HideInInspector] public float inputFlaps_output = 0f; public TAxisSource inputFlapsSource = TAxisSource.keys; public string inputFlapsSourceUnityAxis = "Write here the Flaps Axisname"; public float inputFlapsSourceExpK = 1.25f; public KeyCode inputFlapsKeyForToggle = (KeyCode)102; public float inputFlapsKeySmoothFilter = 0.05f; public float inputFlapsGlobalSmoothFilter = 1f; [HideInInspector] public float inputBrakes_internal = 0f; [HideInInspector] public float inputBrakes_output = 0f; public TAxisSource inputBrakesSource = TAxisSource.keys; public string inputBrakesSourceUnityAxis = "Write here the Brakes Axisname"; public float inputBrakesSourceExpK = 1.25f; public KeyCode inputBrakesKeyForIncrement = (KeyCode)98; public float inputBrakesKeySmoothFilter = 0.05f; public float inputBrakesGlobalSmoothFilter = 1f; private float inputTrails_internal = 0f; [HideInInspector] public bool inputTrails_internal_enabled = true; private float inputTrails_output = 0f; public TAxisSource inputTrailsSource = TAxisSource.keys; public string inputTrailsSourceUnityAxis = "Write here the Trails Axisname"; public float inputTrailsSourceExpK = 1.25f; public KeyCode inputTrailsKeyForToggle = (KeyCode)122; public float inputTrailsKeySmoothFilter = 0.05f; public float inputTrailsGlobalSmoothFilter = 1f; private Vector3 center; private GSurface[] surfaces = null; private int surfaces_count = 0; private const int surfaces_maxcount = 100; private LabeledSurfaceDesc[] labeled_surfaces = null; private int labeled_surfaces_count = 0; private const int labeled_surfaces_maxcount = 100; private GPivot[] surfacepivots = null; private int surfacepivots_count = 0; private const int surfacepivots_maxcount = 100; private LabeledSurfacePivotDesc[] labeled_surfacepivots = null; private int labeled_surfacepivots_count = 0; private const int labeled_surfacepivots_maxcount = 100; [HideInInspector] public LabeledSurfaceMiscDesc[] labeled_surfacemisc = null; [HideInInspector] public int labeled_surfacemisc_count = 0; private const int labeled_surfacemisc_maxcount = 100; public GDrive[] surfacedrives = null; private int surfacedrives_count = 0; private const int surfacedrives_maxcount = 100; private LabeledSurfaceDriveDesc[] labeled_surfacedrives; private int labeled_surfacedrives_count = 0; private const int labeled_surfacedrives_maxcount = 100; private Vector3 addTrails_value = Vector3.zero; private GTrail[] surfacetrails = null; private int surfacetrails_count = 0; private const int surfacetrails_maxcount = 100; private LabeledSurfaceTrailDesc[] labeled_surfacetrails; private int labeled_surfacetrails_count = 0; private const int labeled_surfacetrails_maxcount = 100; private const int surfacetrails_points = 300; private int surfacetrails_interval_count = 0; private const int surfacetrails_interval_maxcount = 3; [HideInInspector] public float body_min_x = 0f; [HideInInspector] public float body_max_x = 0f; [HideInInspector] public float body_min_y = 0f; [HideInInspector] public float body_max_y = 0f; [HideInInspector] public float body_min_z = 0f; [HideInInspector] public float body_max_z = 0f; [HideInInspector] public Vector3 body_center; [HideInInspector] public float body_radius = 0f; public TSurfaceMethod kineticsSurfaceMethod = TSurfaceMethod.deltaFilteredWithPropwash; public float kineticsSurfaceDeltaFilter = 0f; private Vector3 kineticsInertiaTensor_original; private Vector3 kineticsInertiaTensor_tmp = Vector3.zero; private Vector3 kineticsInertiaTensor_lastValue = Vector3.zero; public Vector3 kineticsInertiaTensor = Vector3.zero; public Vector3 kineticsInertiaTensorScale = Vector3.one; public Vector3 kineticsMassRedistribution = Vector3.one; private float tmp_x = 0f; private float tmp_y = 0f; private float tmp_z = 0f; private float tmp_xz = 0f; private float tmp_x2 = 1f; private float tmp_y2 = 1f; private float tmp_z2 = 1f; private Vector3 tmp_v = Vector3.zero; private Vector3 tmp_v1 = Vector3.zero; private Quaternion tmp_q = Quaternion.identity; private float max_magnitude = 1f; private float max_magnitude_now = 0f; private float airdensity; private float kdrag; private float klift; private Vector3 lift; private Vector3 drag; private Vector3 lastPosition; private Vector3 neg_windspeed; private bool surfaceEnableThin = true; private bool surfaceEnablePositive = true; private bool surfaceEnableNegative = true; private bool surfaceEnableXPositive = false; private bool surfaceEnableYPositive = false; private bool surfaceEnableZPositive = false; private bool surfaceEnableXNegative = false; private bool surfaceEnableYNegative = false; private bool surfaceEnableZNegative = false; private GSurface.TSurfaceBehaviourType behaviourXPositive = GSurface.TSurfaceBehaviourType.parent_behaviour; private GSurface.TSurfaceBehaviourType behaviourYPositive = GSurface.TSurfaceBehaviourType.parent_behaviour; private GSurface.TSurfaceBehaviourType behaviourZPositive = GSurface.TSurfaceBehaviourType.parent_behaviour; private GSurface.TSurfaceBehaviourType behaviourXNegative = GSurface.TSurfaceBehaviourType.parent_behaviour; private GSurface.TSurfaceBehaviourType behaviourYNegative = GSurface.TSurfaceBehaviourType.parent_behaviour; private GSurface.TSurfaceBehaviourType behaviourZNegative = GSurface.TSurfaceBehaviourType.parent_behaviour; private bool surfaceDebug = false; private float cachedXScale = 1f; private float cachedYScale = 1f; private float cachedZScale = 1f; private float cachedXSurface = 1f; private float cachedYSurface = 1f; private float cachedZSurface = 1f; private float coefficientXDragWhenXPositiveFlow = 1f; private float coefficientYDragWhenYPositiveFlow = 1f; private float coefficientZDragWhenZPositiveFlow = 1f; private float coefficientXDragWhenXNegativeFlow = 1f; private float coefficientYDragWhenYNegativeFlow = 1f; private float coefficientZDragWhenZNegativeFlow = 1f; private float coefficientXLiftWhenYPositiveFlow = 0f; private float coefficientYLiftWhenXPositiveFlow = 0f; private float coefficientZLiftWhenXPositiveFlow = 0.1f; private float coefficientXLiftWhenYNegativeFlow = 0f; private float coefficientYLiftWhenXNegativeFlow = 0f; private float coefficientZLiftWhenXNegativeFlow = 0.1f; private float coefficientXLiftWhenZPositiveFlow = 0f; private float coefficientYLiftWhenZPositiveFlow = 0f; private float coefficientZLiftWhenYPositiveFlow = 0.1f; private float coefficientXLiftWhenZNegativeFlow = 0f; private float coefficientYLiftWhenZNegativeFlow = 0f; private float coefficientZLiftWhenYNegativeFlow = 0.1f; private Transform tmp_transform; private LineRenderer tmp_lineRenderer; private float tmp_propWashFactor; private float tmp_coefficientExponent; private Material tmp_lineRenderer_material; private Color kColorStall = new Color(1f, 1f, 0.6f, 0.25f); private Color kColorRed = new Color(0.9f, 0.2f, 0.2f, 0.25f); private Color kColorGreen = new Color(0.2f, 0.9f, 0.2f, 0.25f); private Color kColorBlue = new Color(0.2f, 0.2f, 0.9f, 0.25f); private float kineticsPropwash_internal = 0f; public float kineticsPropwashLimit = 0.25f; public float kineticsPropwashMultiplier = 1.05f; private Vector3 kineticsAngularVelocity_lastValue = Vector3.zero; public bool kineticsFiltersEnabled = true; public float kineticsDragFilter = 1f; public float kineticsDragForceByMassUnitLimit = 1000000f; public float kineticsLiftFilter = 1f; public float kineticsLiftForceByMassUnitLimit = 1000000f; public float kineticsAngularVelocityLimit = 2f; public float kineticsAngularVelocityFilter = 1f; public TGroundEffectType kineticsGroundEffect = TGroundEffectType.none; private float kineticsGroundEffectForce = 0f; public LayerMask kineticsGroundEffectLayermask = LayerMask.op_Implicit(-24); public float kineticsGroundEffectProbeMinDistance = 0.01f; public float kineticsGroundEffectProbeMaxDistance = 20f; public float kineticsGroundEffectMaxValue = 10f; public float kineticsGroundEffectCoeficient = 0.01f; public float kineticsGroundEffectCoeficientDistance = 10f; [HideInInspector] public float gaugesShaft_output = 0f; [HideInInspector] public float gaugesAltimeter_output = 0f; public bool gaugesAltimeterGenerate = true; [HideInInspector] public float gaugesVario_output = 0f; private float gaugesVario_lastValue = 0f; public bool gaugesVarioGenerate = true; [HideInInspector] public float gaugesRpm_output = 0f; private float gaugesRpm_lastValue = 0f; public bool gaugesRpmGenerate = false; [HideInInspector] public float gaugesAirspeed_output = 0f; public bool gaugesAirspeedGenerate = true; [HideInInspector] public float gaugesHeading_output = 0f; public bool gaugesHeadingGenerate = true; [HideInInspector] public float gaugesGs_output = 0f; [HideInInspector] public float gaugesHGs_output = 0f; private Vector3 gaugesGs_lastValue = Vector3.zero; public bool gaugesGsGenerate = true; private Renderer engine_renderer; private float total_engine_force = 0f; private Vector3 calcXScale_xp = new Vector3(0.5f, 0f, 0f); private Vector3 calcXScale_xn = new Vector3(-0.5f, 0f, 0f); private Vector3 calcYScale_yp = new Vector3(0f, 0.5f, 0f); private Vector3 calcYScale_yn = new Vector3(0f, -0.5f, 0f); private Vector3 calcZScale_zp = new Vector3(0f, 0f, 0.5f); private Vector3 calcZScale_zn = new Vector3(0f, 0f, -0.5f); private Random vibratorsRnd = null; private float vibratorsRndValidFor = 0f; [HideInInspector] public VibratorDesc[] vibrators = null; [HideInInspector] public int vibratorCount = 16; [HideInInspector] public int vibratorDefault_subvibratorCount = 3; [HideInInspector] public int vibrator0_subvibratorCount = 3; [HideInInspector] public int vibrator1_subvibratorCount = 3; [HideInInspector] public int vibrator2_subvibratorCount = 3; [HideInInspector] public int vibrator3_subvibratorCount = 3; private float floor_effect_add = 0f; private float floor_effect_ctr = 0f; private float total_effect_add = 0f; private float total_effect_ctr = 0f; private string ProcessLiftnDragOfElement_kname = ""; private float ProcessLiftnDragOfElement_klift; private float ProcessLiftnDragOfElement_turbulencex; private float ProcessLiftnDragOfElement_turbulencey; private float ProcessLiftnDragOfElement_turbulencez; private float ProcessLiftnDragOfElement_kturbulencex; private float ProcessLiftnDragOfElement_kturbulencey; private float ProcessLiftnDragOfElement_kturbulencez; private float prop_v = 0f; private float prop_vn = 0f; private float prop_vnd = 0f; private float prop_s = 0f; private float prop_o = 0f; private float prop_a = 0f; private float prop_a_l = 0f; private float prop_a_r = 0f; private float prop_a_b = 0f; private float engine_force_common_filtered = 0f; private float engine_force_pitch_filtered = 0f; private float engine_force_roll_filtered = 0f; private float engine_force_yaw_filtered = 0f; private float engine_force_dumper_filtered = 0f; private float overspeed_tmp_z_filtered = 0f; private float overspeed_tmp_z_filter = 0.45f; private LabeledSurfaceDriveDesc iLabeledSurfaceDriveDesc; private GDrive iGDrive; private float vibrationLastTime = 0f; public static bool isSimulationPaused = false; private bool wasPaused = false; public static bool isPhysicsPaused = false; public int simulationFirstFrames = 100; private bool simulationFirstFrames_complete = false; private bool simulationForcesActive = false; [HideInInspector] public float ignoreCrashUntil = 0f; [HideInInspector] public bool isCrashed = false; public TCrashType crashType = TCrashType.airplane; public float crashAccelerationFlippedThreshold = 0.02f; public float crashAcceleration1Threshold = 9.5f; public float crashAcceleration1HoldTime = 1f; public float crashAcceleration2Threshold = 40f; public float crashAcceleration2HoldTime = 0.1f; private float crashAcceleration1HoldTime_count = 0f; private float crashAcceleration2HoldTime_count = 0f; public bool log(string msg) { if (globalDebugNodes) { Debug.Log((object)msg); return true; } return false; } public float vibration(int vibratorid) { return vibration(vibratorid, Time.fixedDeltaTime); } public float vibration(int vibratorid, float deltaTime) { if (vibratorid >= vibratorCount) { return 0f; } if (vibrators == null) { vibrators = new VibratorDesc[vibratorCount]; } if (vibrators[vibratorid] == null) { vibrators[vibratorid] = new VibratorDesc(); switch (vibratorid) { case 0: vibrators[vibratorid].subvibratorsCount = vibrator0_subvibratorCount; break; case 1: vibrators[vibratorid].subvibratorsCount = vibrator1_subvibratorCount; break; case 2: vibrators[vibratorid].subvibratorsCount = vibrator2_subvibratorCount; break; case 3: vibrators[vibratorid].subvibratorsCount = vibrator3_subvibratorCount; break; default: vibrators[vibratorid].subvibratorsCount = vibratorDefault_subvibratorCount; break; } vibrators[vibratorid].subvibrators = new VibratorSubvibratorDesc[vibrators[vibratorid].subvibratorsCount]; for (int i = 0; i < vibrators[vibratorid].subvibratorsCount; i++) { vibrators[vibratorid].subvibrators[i] = new VibratorSubvibratorDesc(); } } if (vibratorsRnd == null || vibratorsRndValidFor <= 0f) { vibratorsRnd = new Random(Mathf.FloorToInt(Time.realtimeSinceStartup * 1000f)); vibratorsRndValidFor = (float)vibratorsRnd.NextDouble() * 60f; } else { vibratorsRndValidFor -= deltaTime; } float num = 0f; for (int j = 0; j < vibrators[vibratorid].subvibratorsCount; j++) { if (vibrators[vibratorid].subvibrators[j].remainingTime <= 0f) { vibrators[vibratorid].subvibrators[j].totalTime = (float)vibratorsRnd.NextDouble() * vibrators[vibratorid].maxTime; vibrators[vibratorid].subvibrators[j].remainingTime = vibrators[vibratorid].subvibrators[j].totalTime; vibrators[vibratorid].subvibrators[j].frequency = vibrators[vibratorid].minFrequency + (1f - Mathf.Pow((float)vibratorsRnd.NextDouble(), vibrators[vibratorid].expFrequency)) * (vibrators[vibratorid].maxFrequency - vibrators[vibratorid].minFrequency); vibrators[vibratorid].subvibrators[j].amplitude = (float)vibratorsRnd.NextDouble() * vibrators[vibratorid].maxAmplitude / Mathf.Pow(vibrators[vibratorid].subvibrators[j].frequency, vibrators[vibratorid].amplitudeToFrequencyRatio); } else { vibrators[vibratorid].subvibrators[j].remainingTime -= deltaTime; } num += Mathf.Sin(vibrators[vibratorid].subvibrators[j].remainingTime / vibrators[vibratorid].subvibrators[j].totalTime * (float)Math.PI) * vibrators[vibratorid].subvibrators[j].amplitude * Mathf.Sin(vibrators[vibratorid].subvibrators[j].remainingTime * vibrators[vibratorid].subvibrators[j].frequency); } if (num < 0f - vibrators[vibratorid].saturationAt) { num = 0f - vibrators[vibratorid].saturationAt; } if (num > vibrators[vibratorid].saturationAt) { num = vibrators[vibratorid].saturationAt; } return num; } public float calcXScale(GameObject obj) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = obj.transform.TransformPoint(calcXScale_xp) - obj.transform.TransformPoint(calcXScale_xn); return ((Vector3)(ref val)).magnitude / globalSimulationScale; } public float calcYScale(GameObject obj) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = obj.transform.TransformPoint(calcYScale_yp) - obj.transform.TransformPoint(calcYScale_yn); return ((Vector3)(ref val)).magnitude / globalSimulationScale; } public float calcZScale(GameObject obj) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = obj.transform.TransformPoint(calcZScale_zp) - obj.transform.TransformPoint(calcZScale_zn); return ((Vector3)(ref val)).magnitude / globalSimulationScale; } private bool FindIsSet(string s, string prefix, string suffix) { int length = prefix.Length; int num; if ((num = s.IndexOf(prefix)) > 0) { int num2 = s.IndexOf(suffix, num + length); if (num2 > 0) { return true; } } return false; } private bool FindIsSetIgnoreCase(string s, string prefix, string suffix) { return FindIsSet(s.ToLower(), prefix.ToLower(), suffix.ToLower()); } private bool ReplaceIsSetIgnoreCase(string s, string id) { return FindIsSetIgnoreCase(s, "_" + id + ":", "_"); } private static bool FindFloat(string s, string prefix, string suffix, out float ret_value) { int length = prefix.Length; int num; if ((num = s.IndexOf(prefix)) > 0) { int num2 = s.IndexOf(suffix, num + length); if (num2 > 0) { float.TryParse(s.Substring(num + length, num2 - num - length), out ret_value); return true; } } ret_value = 0f; return false; } private static bool FindFloatIgnoreCase(string s, string prefix, string suffix, out float ret_value) { return FindFloat(s.ToLower(), prefix.ToLower(), suffix.ToLower(), out ret_value); } public static float ReplaceFloatIgnoreCase(string s, string id, float defaultvalue) { if (FindFloatIgnoreCase(s, "_" + id + ":", "_", out var ret_value)) { if ((Object)(object)singleton != (Object)null) { singleton.log(" " + s + " " + id + " is [" + ret_value + "]"); } return ret_value; } return defaultvalue; } private static bool FindString(string s, string prefix, string suffix, out string ret_value) { int length = prefix.Length; int num; if ((num = s.IndexOf(prefix)) > 0) { int num2 = s.IndexOf(suffix, num + length); if (num2 > 0) { ret_value = s.Substring(num + length, num2 - num - length); return true; } } ret_value = ""; return false; } private static bool FindStringIgnoreCase(string s, string prefix, string suffix, out string ret_value) { return FindString(s.ToLower(), prefix.ToLower(), suffix.ToLower(), out ret_value); } public static string ReplaceStringIgnoreCase(string s, string id, string defaultvalue) { if (FindStringIgnoreCase(s, "_" + id + ":", "_", out var ret_value)) { if ((Object)(object)singleton != (Object)null) { singleton.log(" " + s + " " + id + " is [" + ret_value + "]"); } return ret_value; } return defaultvalue; } private bool FindBool(string s, string prefix, string suffix, out bool ret_value) { string ret_value2; bool result = FindString(s, prefix, suffix, out ret_value2); ret_value2 = ret_value2.ToLower(); if (ret_value2.Equals("true") || ret_value2.Equals("1") || ret_value2.Equals("enabled")) { ret_value = true; } else { ret_value = false; } return result; } private bool FindBoolIgnoreCase(string s, string prefix, string suffix, out bool ret_value) { return FindBool(s.ToLower(), prefix.ToLower(), suffix.ToLower(), out ret_value); } private bool ReplaceBoolIgnoreCase(string s, string id, bool defaultvalue) { if (FindBoolIgnoreCase(s, "_" + id + ":", "_", out var ret_value)) { log(" " + s + " " + id + " is [" + (ret_value ? "true" : "false") + "]"); return ret_value; } return defaultvalue; } public static GAircraft findGAircraft(GameObject obj, int maxdeep) { GAircraft gAircraft = (GAircraft)(object)obj.GetComponent("GAircraft"); if ((Object)(object)gAircraft != (Object)null) { return gAircraft; } if ((Object)(object)obj.transform.parent == (Object)null) { return null; } if (maxdeep <= 0) { return null; } maxdeep--; return findGAircraft(((Component)obj.transform.parent).gameObject, maxdeep); } public void SortCameras() { int num = labeled_surfacemisc_count; for (int i = 0; i < num; i++) { int num2 = -1; num = 0; for (int j = 0; j < labeled_surfacemisc_count; j++) { if (labeled_surfacemisc[j].cameraPosition) { if (num2 >= 0 && string.Compare(((Object)labeled_surfacemisc[num2].gameObject).name, ((Object)labeled_surfacemisc[j].gameObject).name, ignoreCase: true) > 0) { LabeledSurfaceMiscDesc labeledSurfaceMiscDesc = labeled_surfacemisc[num2]; labeled_surfacemisc[num2] = labeled_surfacemisc[j]; labeled_surfacemisc[j] = labeledSurfaceMiscDesc; } num2 = j; num++; } } } } public void FindNodes(GameObject e, int r) { //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_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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0585: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Expected O, but got Unknown //IL_2968: Unknown result type (might be due to invalid IL or missing references) //IL_2972: Expected O, but got Unknown //IL_458a: Unknown result type (might be due to invalid IL or missing references) //IL_4591: Expected O, but got Unknown //IL_4611: Unknown result type (might be due to invalid IL or missing references) //IL_4618: Expected O, but got Unknown //IL_45b4: Unknown result type (might be due to invalid IL or missing references) //IL_45b9: Unknown result type (might be due to invalid IL or missing references) //IL_45be: Unknown result type (might be due to invalid IL or missing references) //IL_45bf: Unknown result type (might be due to invalid IL or missing references) //IL_45c1: Unknown result type (might be due to invalid IL or missing references) //IL_45c6: Unknown result type (might be due to invalid IL or missing references) //IL_463a: Unknown result type (might be due to invalid IL or missing references) //IL_463f: Unknown result type (might be due to invalid IL or missing references) //IL_4644: Unknown result type (might be due to invalid IL or missing references) //IL_4645: Unknown result type (might be due to invalid IL or missing references) //IL_4647: Unknown result type (might be due to invalid IL or missing references) //IL_464c: Unknown result type (might be due to invalid IL or missing references) //IL_1699: Unknown result type (might be due to invalid IL or missing references) //IL_16a3: Expected O, but got Unknown //IL_4539: Unknown result type (might be due to invalid IL or missing references) //IL_4543: Expected O, but got Unknown if (r == 0) { surfaces = new GSurface[100]; surfaces_count = 0; labeled_surfaces = new LabeledSurfaceDesc[100]; labeled_surfaces_count = 0; surfacepivots = new GPivot[100]; surfacepivots_count = 0; labeled_surfacepivots = new LabeledSurfacePivotDesc[100]; labeled_surfacepivots_count = 0; surfacedrives = new GDrive[100]; surfacedrives_count = 0; labeled_surfacedrives = new LabeledSurfaceDriveDesc[100]; labeled_surfacedrives_count = 0; labeled_surfacemisc = new LabeledSurfaceMiscDesc[100]; labeled_surfacemisc_count = 0; center = ((Component)this).gameObject.GetComponent().centerOfMass; } for (int i = 0; i < e.transform.childCount; i++) { GameObject gameObject = ((Component)e.transform.GetChild(i)).gameObject; if (!gameObject.activeSelf) { continue; } GSurface gSurface = (GSurface)(object)gameObject.GetComponent("GSurface"); GPivot gPivot = (GPivot)(object)gameObject.GetComponent("GPivot"); GDrive gDrive = (GDrive)(object)gameObject.GetComponent("GDrive"); GCenter gCenter = (GCenter)(object)gameObject.GetComponent("GCenter"); if ((Object)(object)gSurface != (Object)null) { tmp_v1 = ((Component)this).gameObject.transform.InverseTransformPoint(gameObject.transform.position); if (tmp_v1.x < body_min_x) { body_min_x = tmp_v1.x; } if (tmp_v1.x > body_max_x) { body_max_x = tmp_v1.x; } if (tmp_v1.y < body_min_y) { body_min_y = tmp_v1.y; } if (tmp_v1.y > body_max_y) { body_max_y = tmp_v1.y; } if (tmp_v1.z < body_min_z) { body_min_z = tmp_v1.z; } if (tmp_v1.z > body_max_z) { body_max_z = tmp_v1.z; } if (surfaces_count < 100) { surfaces[surfaces_count] = gSurface; surfaces[surfaces_count].lastPosition = gameObject.transform.position; surfaces[surfaces_count].cachedXScale = calcXScale(gameObject); surfaces[surfaces_count].cachedYScale = calcYScale(gameObject); surfaces[surfaces_count].cachedZScale = calcZScale(gameObject); surfaces[surfaces_count].cachedXSurface = surfaces[surfaces_count].cachedYScale * surfaces[surfaces_count].cachedZScale; surfaces[surfaces_count].cachedYSurface = surfaces[surfaces_count].cachedXScale * surfaces[surfaces_count].cachedZScale; surfaces[surfaces_count].cachedZSurface = surfaces[surfaces_count].cachedXScale * surfaces[surfaces_count].cachedYScale; if ((Object)(object)gameObject.GetComponent("LineRenderer") == (Object)null) { gameObject.AddComponent(); } surfaces[surfaces_count].lineRenderer = (LineRenderer)gameObject.GetComponent("LineRenderer"); surfaces_count++; } log(((Object)gameObject).name + " has GSurface"); if (!globalRenderPhysicSurfaces) { gameObject.GetComponent().enabled = false; } } else if (((Object)gameObject).name.Contains("_surface_")) { tmp_v1 = ((Component)this).gameObject.transform.InverseTransformPoint(gameObject.transform.position); if (tmp_v1.x < body_min_x) { body_min_x = tmp_v1.x; } if (tmp_v1.x > body_max_x) { body_max_x = tmp_v1.x; } if (tmp_v1.y < body_min_y) { body_min_y = tmp_v1.y; } if (tmp_v1.y > body_max_y) { body_max_y = tmp_v1.y; } if (tmp_v1.z < body_min_z) { body_min_z = tmp_v1.z; } if (tmp_v1.z > body_max_z) { body_max_z = tmp_v1.z; } log(((Object)gameObject).name + " has Surface"); if (labeled_surfaces_count < 100) { labeled_surfaces[labeled_surfaces_count] = new LabeledSurfaceDesc(); labeled_surfaces[labeled_surfaces_count].gameObject = gameObject; labeled_surfaces[labeled_surfaces_count].lastPosition = labeled_surfaces[labeled_surfaces_count].gameObject.transform.position; labeled_surfaces[labeled_surfaces_count].cachedXScale = calcXScale(gameObject); labeled_surfaces[labeled_surfaces_count].cachedYScale = calcYScale(gameObject); labeled_surfaces[labeled_surfaces_count].cachedZScale = calcZScale(gameObject); labeled_surfaces[labeled_surfaces_count].cachedXSurface = labeled_surfaces[labeled_surfaces_count].cachedYScale * labeled_surfaces[labeled_surfaces_count].cachedZScale; labeled_surfaces[labeled_surfaces_count].cachedYSurface = labeled_surfaces[labeled_surfaces_count].cachedXScale * labeled_surfaces[labeled_surfaces_count].cachedZScale; labeled_surfaces[labeled_surfaces_count].cachedZSurface = labeled_surfaces[labeled_surfaces_count].cachedXScale * labeled_surfaces[labeled_surfaces_count].cachedYScale; if (FindString(((Object)gameObject).name, "_id:", "_", out var ret_value)) { labeled_surfaces[labeled_surfaces_count].id = ret_value; log(" " + ((Object)gameObject).name + " id is [" + ret_value + "]"); } if (((Object)gameObject).name.Contains("_nolift_")) { labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenYPositiveFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenYNegativeFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenZPositiveFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenZNegativeFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenXPositiveFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenXNegativeFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenZPositiveFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenZNegativeFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenXPositiveFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenXNegativeFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenYPositiveFlow = 0f; labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenYNegativeFlow = 0f; } if (((Object)gameObject).name.Contains("_laminarflow_") || ((Object)gameObject).name.Contains("_laminarflowx_")) { labeled_surfaces[labeled_surfaces_count].behaviourXPositive = GSurface.TSurfaceBehaviourType.laminar_analysis; labeled_surfaces[labeled_surfaces_count].behaviourXNegative = GSurface.TSurfaceBehaviourType.laminar_analysis; } if (((Object)gameObject).name.Contains("_laminarflow_") || ((Object)gameObject).name.Contains("_laminarflowy_")) { labeled_surfaces[labeled_surfaces_count].behaviourYPositive = GSurface.TSurfaceBehaviourType.laminar_analysis; labeled_surfaces[labeled_surfaces_count].behaviourYNegative = GSurface.TSurfaceBehaviourType.laminar_analysis; } if (((Object)gameObject).name.Contains("_laminarflow_") || ((Object)gameObject).name.Contains("_laminarflowz_")) { labeled_surfaces[labeled_surfaces_count].behaviourZPositive = GSurface.TSurfaceBehaviourType.laminar_analysis; labeled_surfaces[labeled_surfaces_count].behaviourZNegative = GSurface.TSurfaceBehaviourType.laminar_analysis; } if (((Object)gameObject).name.Contains("_debug_")) { labeled_surfaces[labeled_surfaces_count].surfaceDebug = true; } labeled_surfaces[labeled_surfaces_count].id = ReplaceStringIgnoreCase(((Object)gameObject).name, "id", labeled_surfaces[labeled_surfaces_count].id); labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shape", labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shape", labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shape", labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shape", labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shape", labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shape", labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapex", labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapex", labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapey", labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapey", labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapez", labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapez", labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapexpositive", labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapexnegative", labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeypositive", labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeynegative", labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapezpositive", labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeznegative", labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeXPositiveParameter", labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeXNegativeParameter", labeled_surfaces[labeled_surfaces_count].shapeXNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeYPositiveParameter", labeled_surfaces[labeled_surfaces_count].shapeYPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeYNegativeParameter", labeled_surfaces[labeled_surfaces_count].shapeYNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeZPositiveParameter", labeled_surfaces[labeled_surfaces_count].shapeZPositiveParameter); labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter = ReplaceStringIgnoreCase(((Object)gameObject).name, "shapeZNegativeParameter", labeled_surfaces[labeled_surfaces_count].shapeZNegativeParameter); labeled_surfaces[labeled_surfaces_count].shapeXPositive = GSurface.shapeTypeFromParameter(labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter, labeled_surfaces[labeled_surfaces_count].shapeXPositive); labeled_surfaces[labeled_surfaces_count].shapeXNegative = GSurface.shapeTypeFromParameter(labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter, labeled_surfaces[labeled_surfaces_count].shapeXNegative); labeled_surfaces[labeled_surfaces_count].shapeYPositive = GSurface.shapeTypeFromParameter(labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter, labeled_surfaces[labeled_surfaces_count].shapeYPositive); labeled_surfaces[labeled_surfaces_count].shapeYNegative = GSurface.shapeTypeFromParameter(labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter, labeled_surfaces[labeled_surfaces_count].shapeYNegative); labeled_surfaces[labeled_surfaces_count].shapeZPositive = GSurface.shapeTypeFromParameter(labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter, labeled_surfaces[labeled_surfaces_count].shapeZPositive); labeled_surfaces[labeled_surfaces_count].shapeZNegative = GSurface.shapeTypeFromParameter(labeled_surfaces[labeled_surfaces_count].shapeXPositiveParameter, labeled_surfaces[labeled_surfaces_count].shapeZNegative); log(" " + ((Object)gameObject).name + " shape is [x+" + GSurface.fromTSurfaceShapeType(labeled_surfaces[labeled_surfaces_count].shapeXPositive) + ", x-" + GSurface.fromTSurfaceShapeType(labeled_surfaces[labeled_surfaces_count].shapeXNegative) + ", y+" + GSurface.fromTSurfaceShapeType(labeled_surfaces[labeled_surfaces_count].shapeYPositive) + ", y-" + GSurface.fromTSurfaceShapeType(labeled_surfaces[labeled_surfaces_count].shapeYNegative) + ", z+" + GSurface.fromTSurfaceShapeType(labeled_surfaces[labeled_surfaces_count].shapeZPositive) + ", z-" + GSurface.fromTSurfaceShapeType(labeled_surfaces[labeled_surfaces_count].shapeZNegative) + "]"); labeled_surfaces[labeled_surfaces_count].surfaceEnable = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnable", labeled_surfaces[labeled_surfaces_count].surfaceEnable); labeled_surfaces[labeled_surfaces_count].surfaceEnableThin = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableThin", labeled_surfaces[labeled_surfaces_count].surfaceEnableThin); labeled_surfaces[labeled_surfaces_count].surfaceEnablePositive = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnablePositive", labeled_surfaces[labeled_surfaces_count].surfaceEnablePositive); labeled_surfaces[labeled_surfaces_count].surfaceEnableNegative = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableNegative", labeled_surfaces[labeled_surfaces_count].surfaceEnableNegative); labeled_surfaces[labeled_surfaces_count].surfaceEnableXPositive = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableXPositive", labeled_surfaces[labeled_surfaces_count].surfaceEnableXPositive); labeled_surfaces[labeled_surfaces_count].surfaceEnableYPositive = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableYPositive", labeled_surfaces[labeled_surfaces_count].surfaceEnableYPositive); labeled_surfaces[labeled_surfaces_count].surfaceEnableZPositive = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableZPositive", labeled_surfaces[labeled_surfaces_count].surfaceEnableZPositive); labeled_surfaces[labeled_surfaces_count].surfaceEnableXNegative = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableXNegative", labeled_surfaces[labeled_surfaces_count].surfaceEnableXNegative); labeled_surfaces[labeled_surfaces_count].surfaceEnableYNegative = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableYNegative", labeled_surfaces[labeled_surfaces_count].surfaceEnableYNegative); labeled_surfaces[labeled_surfaces_count].surfaceEnableZNegative = ReplaceBoolIgnoreCase(((Object)gameObject).name, "surfaceEnableZNegative", labeled_surfaces[labeled_surfaces_count].surfaceEnableZNegative); labeled_surfaces[labeled_surfaces_count].coefficientXDragWhenXPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientXDrag", labeled_surfaces[labeled_surfaces_count].coefficientXDragWhenXPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientYDragWhenYPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientYDrag", labeled_surfaces[labeled_surfaces_count].coefficientYDragWhenYPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientZDragWhenZPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientZDrag", labeled_surfaces[labeled_surfaces_count].coefficientZDragWhenZPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientXDragWhenXNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientXDrag", labeled_surfaces[labeled_surfaces_count].coefficientXDragWhenXNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientYDragWhenYNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientYDrag", labeled_surfaces[labeled_surfaces_count].coefficientYDragWhenYNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientZDragWhenZNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientZDrag", labeled_surfaces[labeled_surfaces_count].coefficientZDragWhenZNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenYPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientXLiftWhenYPositiveFlow", labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenYPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenYNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientXLiftWhenYNegativeFlow", labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenYNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenZPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientXLiftWhenZPositiveFlow", labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenZPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenZNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientXLiftWhenZNegativeFlow", labeled_surfaces[labeled_surfaces_count].coefficientXLiftWhenZNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenXPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientYLiftWhenXPositiveFlow", labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenXPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenXNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientYLiftWhenXNegativeFlow", labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenXNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenZPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientYLiftWhenZPositiveFlow", labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenZPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenZNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientYLiftWhenZNegativeFlow", labeled_surfaces[labeled_surfaces_count].coefficientYLiftWhenZNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenXPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientZLiftWhenXPositiveFlow", labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenXPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenXNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientZLiftWhenXNegativeFlow", labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenXNegativeFlow); labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenYPositiveFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientZLiftWhenYPositiveFlow", labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenYPositiveFlow); labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenYNegativeFlow = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientZLiftWhenYNegativeFlow", labeled_surfaces[labeled_surfaces_count].coefficientZLiftWhenYNegativeFlow); if ((Object)(object)gameObject.GetComponent("LineRenderer") == (Object)null) { gameObject.AddComponent(); } labeled_surfaces[labeled_surfaces_count].lineRenderer = (LineRenderer)gameObject.GetComponent("LineRenderer"); labeled_surfaces[labeled_surfaces_count].propWashFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "wash", labeled_surfaces[labeled_surfaces_count].propWashFactor); labeled_surfaces[labeled_surfaces_count].propWashFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "propWashFactor", labeled_surfaces[labeled_surfaces_count].propWashFactor); labeled_surfaces[labeled_surfaces_count].coefficientExponent = ReplaceFloatIgnoreCase(((Object)gameObject).name, "exponent", labeled_surfaces[labeled_surfaces_count].coefficientExponent); labeled_surfaces[labeled_surfaces_count].coefficientExponent = ReplaceFloatIgnoreCase(((Object)gameObject).name, "coefficientExponent", labeled_surfaces[labeled_surfaces_count].coefficientExponent); labeled_surfaces_count++; } if (((Object)gameObject).name.Contains("_hide_")) { gameObject.GetComponent().enabled = false; } else if (!globalRenderPhysicSurfaces) { gameObject.GetComponent().enabled = false; } } else if (((Object)gameObject).name.Contains("_hide_")) { gameObject.GetComponent().enabled = false; } if ((Object)(object)gPivot != (Object)null) { if (surfacepivots_count < 100) { surfacepivots[surfacepivots_count++] = gPivot; } log(((Object)gameObject).name + " has GPivot"); } else if (((Object)gameObject).name.Contains("_pivot_") || ((Object)gameObject).name.Contains("_pivotforward_") || ((Object)gameObject).name.Contains("_pivotfwd_") || ((Object)gameObject).name.Contains("_pivotup_") || ((Object)gameObject).name.Contains("_pivotright_") || ((Object)gameObject).name.Contains("_pivot:forward_") || ((Object)gameObject).name.Contains("_pivot:fwd_") || ((Object)gameObject).name.Contains("_pivot:up_") || ((Object)gameObject).name.Contains("_pivot:right_")) { log(((Object)gameObject).name + " has Pivot"); if (labeled_surfacepivots_count < 100) { labeled_surfacepivots[labeled_surfacepivots_count] = new LabeledSurfacePivotDesc(); labeled_surfacepivots[labeled_surfacepivots_count].gameObject = gameObject; if (((Object)gameObject).name.Contains("_forward_") || ((Object)gameObject).name.Contains("_fwd_") || ((Object)gameObject).name.Contains("_pivotforward_") || ((Object)gameObject).name.Contains("_pivotfwd_") || ((Object)gameObject).name.Contains("_pivot:forward_") || ((Object)gameObject).name.Contains("_pivot:fwd_")) { labeled_surfacepivots[labeled_surfacepivots_count].rotationPivotAxis = GPivot.TAxisOrientation.forward; log(" " + ((Object)gameObject).name + " axis_rotation is "); } if (((Object)gameObject).name.Contains("_up_") || ((Object)gameObject).name.Contains("_pivotup_") || ((Object)gameObject).name.Contains("_pivot:up_")) { labeled_surfacepivots[labeled_surfacepivots_count].rotationPivotAxis = GPivot.TAxisOrientation.up; log(" " + ((Object)gameObject).name + " axis_rotation is "); } if (((Object)gameObject).name.Contains("_right_") || ((Object)gameObject).name.Contains("_pivotright_") || ((Object)gameObject).name.Contains("_pivot:right_")) { labeled_surfacepivots[labeled_surfacepivots_count].rotationPivotAxis = GPivot.TAxisOrientation.right; log(" " + ((Object)gameObject).name + " axis_rotation is "); } labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "offsetfwd", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "offsetforward", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundUpOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "offsetup", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundUpOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundRightOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "offsetright", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundRightOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "fwdoffset", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "forwardoffset", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotationAroundForwardOffset", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundForwardOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundUpOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "upoffset", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundUpOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundUpOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotationAroundUpOffset", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundUpOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundRightOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rightoffset", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundRightOffset); labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundRightOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotationAroundRightOffset", labeled_surfacepivots[labeled_surfacepivots_count].rotationAroundRightOffset); labeled_surfacepivots[labeled_surfacepivots_count].ch1Source = GPivot.toTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch1SourceName = ReplaceStringIgnoreCase(((Object)gameObject).name, "axis1", GPivot.fromTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch1Source).Equals("any") ? labeled_surfacepivots[labeled_surfacepivots_count].ch1SourceName : GPivot.fromTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch1Source))); labeled_surfacepivots[labeled_surfacepivots_count].ch1SourceName = ReplaceStringIgnoreCase(((Object)gameObject).name, "ch1SourceName", labeled_surfacepivots[labeled_surfacepivots_count].ch1SourceName); labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis1min", labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMin); labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch1PivotAngleWhenMin", labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMin); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis1min", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch1PivotAngleWhenMin", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis1max", labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch1PivotAngleWhenMax", labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotTurnsPerUnit = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis1mul", labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotTurnsPerUnit); labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotTurnsPerUnit = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch1PivotTurnsPerUnit", labeled_surfacepivots[labeled_surfacepivots_count].ch1PivotTurnsPerUnit); labeled_surfacepivots[labeled_surfacepivots_count].ch2Source = GPivot.toTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch2SourceName = ReplaceStringIgnoreCase(((Object)gameObject).name, "axis2", GPivot.fromTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch2Source).Equals("any") ? labeled_surfacepivots[labeled_surfacepivots_count].ch2SourceName : GPivot.fromTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch2Source))); labeled_surfacepivots[labeled_surfacepivots_count].ch2SourceName = ReplaceStringIgnoreCase(((Object)gameObject).name, "ch2SourceName", labeled_surfacepivots[labeled_surfacepivots_count].ch2SourceName); labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis2min", labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMin); labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch2PivotAngleWhenMin", labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMin); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis2min", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch2PivotAngleWhenMin", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis2max", labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch2PivotAngleWhenMax", labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotTurnsPerUnit = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis2mul", labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotTurnsPerUnit); labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotTurnsPerUnit = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch2PivotTurnsPerUnit", labeled_surfacepivots[labeled_surfacepivots_count].ch2PivotTurnsPerUnit); labeled_surfacepivots[labeled_surfacepivots_count].ch3Source = GPivot.toTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch3SourceName = ReplaceStringIgnoreCase(((Object)gameObject).name, "axis3", GPivot.fromTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch3Source).Equals("any") ? labeled_surfacepivots[labeled_surfacepivots_count].ch3SourceName : GPivot.fromTAxisSource(labeled_surfacepivots[labeled_surfacepivots_count].ch3Source))); labeled_surfacepivots[labeled_surfacepivots_count].ch3SourceName = ReplaceStringIgnoreCase(((Object)gameObject).name, "ch3SourceName", labeled_surfacepivots[labeled_surfacepivots_count].ch3SourceName); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis3min", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMin); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch3PivotAngleWhenMin", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMin); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis3min", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch3PivotAngleWhenMin", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis3max", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch3PivotAngleWhenMax", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotAngleWhenMax); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotTurnsPerUnit = ReplaceFloatIgnoreCase(((Object)gameObject).name, "axis3mul", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotTurnsPerUnit); labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotTurnsPerUnit = ReplaceFloatIgnoreCase(((Object)gameObject).name, "ch3PivotTurnsPerUnit", labeled_surfacepivots[labeled_surfacepivots_count].ch3PivotTurnsPerUnit); labeled_surfacepivots[labeled_surfacepivots_count].limitMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "min", labeled_surfacepivots[labeled_surfacepivots_count].limitMin); labeled_surfacepivots[labeled_surfacepivots_count].limitMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "limitMin", labeled_surfacepivots[labeled_surfacepivots_count].limitMin); labeled_surfacepivots[labeled_surfacepivots_count].limitMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "max", labeled_surfacepivots[labeled_surfacepivots_count].limitMax); labeled_surfacepivots[labeled_surfacepivots_count].limitMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "limitMax", labeled_surfacepivots[labeled_surfacepivots_count].limitMax); labeled_surfacepivots_count++; } } if (((Object)gameObject).name.Contains("_enginelospeed_")) { if (labeled_surfacemisc_count < 100) { labeled_surfacemisc[labeled_surfacemisc_count] = new LabeledSurfaceMiscDesc(); labeled_surfacemisc[labeled_surfacemisc_count].gameObject = gameObject; labeled_surfacemisc[labeled_surfacemisc_count].lospeed = true; log(((Object)gameObject).name + " has LoSpeed"); labeled_surfacemisc[labeled_surfacemisc_count].pivotId = ReplaceStringIgnoreCase(((Object)gameObject).name, "pivotId", labeled_surfacemisc[labeled_surfacemisc_count].pivotId); labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rpmThreshold", labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold); labeled_surfacemisc_count++; } } else if (((Object)gameObject).name.Contains("_enginehispeed_")) { if (labeled_surfacemisc_count < 100) { labeled_surfacemisc[labeled_surfacemisc_count] = new LabeledSurfaceMiscDesc(); labeled_surfacemisc[labeled_surfacemisc_count].gameObject = gameObject; labeled_surfacemisc[labeled_surfacemisc_count].hispeed = true; log(((Object)gameObject).name + " has HiSpeed"); labeled_surfacemisc[labeled_surfacemisc_count].pivotId = ReplaceStringIgnoreCase(((Object)gameObject).name, "pivotId", labeled_surfacemisc[labeled_surfacemisc_count].pivotId); labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rpmThreshold", labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold); labeled_surfacemisc_count++; } } else if (((Object)gameObject).name.Contains("_camera_")) { if (labeled_surfacemisc_count < 100) { labeled_surfacemisc[labeled_surfacemisc_count] = new LabeledSurfaceMiscDesc(); labeled_surfacemisc[labeled_surfacemisc_count].gameObject = gameObject; labeled_surfacemisc[labeled_surfacemisc_count].cameraPosition = true; labeled_surfacemisc[labeled_surfacemisc_count].cameraCanRotate = true; log(((Object)gameObject).name + " has CameraPosition"); labeled_surfacemisc[labeled_surfacemisc_count].pivotId = ReplaceStringIgnoreCase(((Object)gameObject).name, "pivotId", labeled_surfacemisc[labeled_surfacemisc_count].pivotId); labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rpmThreshold", labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold); labeled_surfacemisc_count++; } } else if (((Object)gameObject).name.Contains("_fixedcamera_") && labeled_surfacemisc_count < 100) { labeled_surfacemisc[labeled_surfacemisc_count] = new LabeledSurfaceMiscDesc(); labeled_surfacemisc[labeled_surfacemisc_count].gameObject = gameObject; labeled_surfacemisc[labeled_surfacemisc_count].cameraPosition = true; labeled_surfacemisc[labeled_surfacemisc_count].cameraCanRotate = false; log(((Object)gameObject).name + " has CameraPosition"); labeled_surfacemisc[labeled_surfacemisc_count].pivotId = ReplaceStringIgnoreCase(((Object)gameObject).name, "pivotId", labeled_surfacemisc[labeled_surfacemisc_count].pivotId); labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rpmThreshold", labeled_surfacemisc[labeled_surfacemisc_count].rpmThreshold); labeled_surfacemisc_count++; } if ((Object)(object)gDrive != (Object)null) { if (surfacedrives_count < 100) { surfacedrives[surfacedrives_count] = gDrive; if ((Object)(object)gameObject.GetComponent("LineRenderer") == (Object)null) { gameObject.AddComponent(); } surfacedrives[surfacedrives_count].lineRenderer = (LineRenderer)gameObject.GetComponent("LineRenderer"); surfacedrives_count++; } log(((Object)gameObject).name + " has GDrive"); } else if (((Object)gameObject).name.Contains("_drive_") || ((Object)gameObject).name.Contains("_engine_")) { log(((Object)gameObject).name + " has Drive"); if (labeled_surfacedrives_count < 100) { labeled_surfacedrives[labeled_surfacedrives_count] = new LabeledSurfaceDriveDesc(); labeled_surfacedrives[labeled_surfacedrives_count].gameObject = gameObject; string text = ReplaceStringIgnoreCase(((Object)gameObject).name, "preset", ""); if (text.ToLower().Equals("attackHelicopter".ToLower())) { labeled_surfacedrives[labeled_surfacedrives_count].type = GDrive.TDriveType.rotor_basic; labeled_surfacedrives[labeled_surfacedrives_count].bladeMass = 100f; labeled_surfacedrives[labeled_surfacedrives_count].bladeLength = 5f; labeled_surfacedrives[labeled_surfacedrives_count].bladeNumber = 4; labeled_surfacedrives[labeled_surfacedrives_count].throttleMax = (labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner = 12857f); labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionFilter = 5E-05f; labeled_surfacedrives[labeled_surfacedrives_count].shaftOutputPivotId = "drive1"; } else if (text.ToLower().Equals("acrobatic".ToLower())) { labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionRatio = 23000f; labeled_surfacedrives[labeled_surfacedrives_count].throttleMax = (labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner = 1f); labeled_surfacedrives[labeled_surfacedrives_count].shaftOutputPivotId = "drive1"; } labeled_surfacedrives[labeled_surfacedrives_count].type = GDrive.toTDriveType(ReplaceStringIgnoreCase(((Object)gameObject).name, "type", GDrive.fromTDriveType(labeled_surfacedrives[labeled_surfacedrives_count].type))); switch (labeled_surfacedrives[labeled_surfacedrives_count].type) { case GDrive.TDriveType.rotor_basic: labeled_surfacedrives[labeled_surfacedrives_count].theoreticalTargetRpms = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rpms", labeled_surfacedrives[labeled_surfacedrives_count].theoreticalTargetRpms); break; case GDrive.TDriveType.forward_rotor2: case GDrive.TDriveType.up_rotor2: case GDrive.TDriveType.right_rotor2: labeled_surfacedrives[labeled_surfacedrives_count].theoreticalTargetRpms = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rpms", labeled_surfacedrives[labeled_surfacedrives_count].theoreticalTargetRpms); labeled_surfacedrives[labeled_surfacedrives_count].theoreticalEnginePower = ReplaceFloatIgnoreCase(((Object)gameObject).name, "power", labeled_surfacedrives[labeled_surfacedrives_count].theoreticalEnginePower); break; default: labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionRatio = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rpms", labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionRatio); break; } labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner = ReplaceFloatIgnoreCase(((Object)gameObject).name, "dryForce", labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner); labeled_surfacedrives[labeled_surfacedrives_count].throttleMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "aftForce", labeled_surfacedrives[labeled_surfacedrives_count].throttleMax); labeled_surfacedrives[labeled_surfacedrives_count].throttleMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "force", labeled_surfacedrives[labeled_surfacedrives_count].throttleMax); labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner = ReplaceFloatIgnoreCase(((Object)gameObject).name, "force", labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner); labeled_surfacedrives[labeled_surfacedrives_count].throttleIdle = ReplaceFloatIgnoreCase(((Object)gameObject).name, "idleForce", labeled_surfacedrives[labeled_surfacedrives_count].throttleIdle); labeled_surfacedrives[labeled_surfacedrives_count].throttleMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "dryForce", labeled_surfacedrives[labeled_surfacedrives_count].throttleMax); labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner = ReplaceFloatIgnoreCase(((Object)gameObject).name, "aftForce", labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner); labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionRatio = ReplaceFloatIgnoreCase(((Object)gameObject).name, "conversion", labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionRatio); labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "conversionFilter", labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionFilter); labeled_surfacedrives[labeled_surfacedrives_count].bladeMass = ReplaceFloatIgnoreCase(((Object)gameObject).name, "mass", labeled_surfacedrives[labeled_surfacedrives_count].bladeMass); labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWidth", labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMin); labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWidth", labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMax); labeled_surfacedrives[labeled_surfacedrives_count].powered = ReplaceBoolIgnoreCase(((Object)gameObject).name, "powered", labeled_surfacedrives[labeled_surfacedrives_count].powered); labeled_surfacedrives[labeled_surfacedrives_count].poweredFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "poweredFactor", labeled_surfacedrives[labeled_surfacedrives_count].poweredFactor); labeled_surfacedrives[labeled_surfacedrives_count].poweredFactorFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "poweredFactorFilter", labeled_surfacedrives[labeled_surfacedrives_count].poweredFactorFilter); labeled_surfacedrives[labeled_surfacedrives_count].powerControlBy = (ReplaceIsSetIgnoreCase(((Object)gameObject).name, "powerControlByPivot") ? GDrive.TDrivePowerControlBy.pivot : labeled_surfacedrives[labeled_surfacedrives_count].powerControlBy); labeled_surfacedrives[labeled_surfacedrives_count].powerControlBy = GDrive.toTDrivePowerControlBy(ReplaceStringIgnoreCase(((Object)gameObject).name, "powerControlBy", GDrive.fromTDrivePowerControlBy(labeled_surfacedrives[labeled_surfacedrives_count].powerControlBy))); labeled_surfacedrives[labeled_surfacedrives_count].powerControlByPivot = ReplaceStringIgnoreCase(((Object)gameObject).name, "powerControlByPivot", labeled_surfacedrives[labeled_surfacedrives_count].powerControlByPivot); labeled_surfacedrives[labeled_surfacedrives_count].powerCollectiveControlBy = (ReplaceIsSetIgnoreCase(((Object)gameObject).name, "powerCollectiveControlByPivot") ? GDrive.TDrivePowerControlBy.pivot : labeled_surfacedrives[labeled_surfacedrives_count].powerCollectiveControlBy); labeled_surfacedrives[labeled_surfacedrives_count].powerCollectiveControlBy = GDrive.toTDrivePowerControlBy(ReplaceStringIgnoreCase(((Object)gameObject).name, "powerCollectiveControlBy", GDrive.fromTDrivePowerControlBy(labeled_surfacedrives[labeled_surfacedrives_count].powerCollectiveControlBy))); labeled_surfacedrives[labeled_surfacedrives_count].powerCollectiveControlByPivot = ReplaceStringIgnoreCase(((Object)gameObject).name, "powerCollectiveControlByPivot", labeled_surfacedrives[labeled_surfacedrives_count].powerCollectiveControlByPivot); labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicForwardControlBy = (ReplaceIsSetIgnoreCase(((Object)gameObject).name, "powerCyclicForwardControlByPivot") ? GDrive.TDrivePowerControlBy.pivot : labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicForwardControlBy); labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicForwardControlBy = GDrive.toTDrivePowerControlBy(ReplaceStringIgnoreCase(((Object)gameObject).name, "powerCyclicForwardControlBy", GDrive.fromTDrivePowerControlBy(labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicForwardControlBy))); labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicForwardControlByPivot = ReplaceStringIgnoreCase(((Object)gameObject).name, "powerCyclicForwardControlByPivot", labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicForwardControlByPivot); labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicSideControlBy = (ReplaceIsSetIgnoreCase(((Object)gameObject).name, "powerCyclicSideControlByPivot") ? GDrive.TDrivePowerControlBy.pivot : labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicSideControlBy); labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicSideControlBy = GDrive.toTDrivePowerControlBy(ReplaceStringIgnoreCase(((Object)gameObject).name, "powerCyclicSideControlBy", GDrive.fromTDrivePowerControlBy(labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicSideControlBy))); labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicSideControlByPivot = ReplaceStringIgnoreCase(((Object)gameObject).name, "powerCyclicSideControlByPivot", labeled_surfacedrives[labeled_surfacedrives_count].powerCyclicSideControlByPivot); labeled_surfacedrives[labeled_surfacedrives_count].throttleIdle = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleIdle", labeled_surfacedrives[labeled_surfacedrives_count].throttleIdle); labeled_surfacedrives[labeled_surfacedrives_count].throttleMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleMax", labeled_surfacedrives[labeled_surfacedrives_count].throttleMax); labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleAfterburner", labeled_surfacedrives[labeled_surfacedrives_count].throttleAfterburner); labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionRatio = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleRpmConversionRatio", labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionRatio); labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleRpmConversionFilter", labeled_surfacedrives[labeled_surfacedrives_count].throttleRpmConversionFilter); labeled_surfacedrives[labeled_surfacedrives_count].theoreticalTargetRpms = ReplaceFloatIgnoreCase(((Object)gameObject).name, "theoreticalTargetRpms", labeled_surfacedrives[labeled_surfacedrives_count].theoreticalTargetRpms); labeled_surfacedrives[labeled_surfacedrives_count].theoreticalEnginePower = ReplaceFloatIgnoreCase(((Object)gameObject).name, "theoreticalEnginePower", labeled_surfacedrives[labeled_surfacedrives_count].theoreticalEnginePower); labeled_surfacedrives[labeled_surfacedrives_count].throttleBiasOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleBiasOffset", labeled_surfacedrives[labeled_surfacedrives_count].throttleBiasOffset); labeled_surfacedrives[labeled_surfacedrives_count].throttleBiasMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleBiasMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].throttleBiasMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].throttleForwardRearOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleForwardRearOffset", labeled_surfacedrives[labeled_surfacedrives_count].throttleForwardRearOffset); labeled_surfacedrives[labeled_surfacedrives_count].throttleLeftRightOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "throttleLeftRightOffset", labeled_surfacedrives[labeled_surfacedrives_count].throttleLeftRightOffset); labeled_surfacedrives[labeled_surfacedrives_count].yawForceMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "yawForceMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].yawForceMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].dumperForceMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "dumperForceMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].dumperForceMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].commonFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "commonFilter", labeled_surfacedrives[labeled_surfacedrives_count].commonFilter); labeled_surfacedrives[labeled_surfacedrives_count].pitchFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "pitchFilter", labeled_surfacedrives[labeled_surfacedrives_count].pitchFilter); labeled_surfacedrives[labeled_surfacedrives_count].rollFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rollFilter", labeled_surfacedrives[labeled_surfacedrives_count].rollFilter); labeled_surfacedrives[labeled_surfacedrives_count].yawFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "yawFilter", labeled_surfacedrives[labeled_surfacedrives_count].yawFilter); labeled_surfacedrives[labeled_surfacedrives_count].dumperFilter = ReplaceFloatIgnoreCase(((Object)gameObject).name, "dumperFilter", labeled_surfacedrives[labeled_surfacedrives_count].dumperFilter); labeled_surfacedrives[labeled_surfacedrives_count].bladeMass = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeMass", labeled_surfacedrives[labeled_surfacedrives_count].bladeMass); labeled_surfacedrives[labeled_surfacedrives_count].bladeNumber = Mathf.RoundToInt(ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeNumber", labeled_surfacedrives[labeled_surfacedrives_count].bladeNumber)); labeled_surfacedrives[labeled_surfacedrives_count].bladeLength = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeLength", labeled_surfacedrives[labeled_surfacedrives_count].bladeLength); labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWidthMin", labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMin); labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWidthMax", labeled_surfacedrives[labeled_surfacedrives_count].bladeWidthMax); labeled_surfacedrives[labeled_surfacedrives_count].bladeDepth = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeDepth", labeled_surfacedrives[labeled_surfacedrives_count].bladeDepth); labeled_surfacedrives[labeled_surfacedrives_count].bladeAngleYaw = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeAngleYaw", labeled_surfacedrives[labeled_surfacedrives_count].bladeAngleYaw); labeled_surfacedrives[labeled_surfacedrives_count].bladeAnglePitch = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeAnglePitch", labeled_surfacedrives[labeled_surfacedrives_count].bladeAnglePitch); labeled_surfacedrives[labeled_surfacedrives_count].bladeShapeCoefficient = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeShapeCoefficient", labeled_surfacedrives[labeled_surfacedrives_count].bladeShapeCoefficient); labeled_surfacedrives[labeled_surfacedrives_count].bladeWashEnabled = ReplaceBoolIgnoreCase(((Object)gameObject).name, "bladeWashEnabled", labeled_surfacedrives[labeled_surfacedrives_count].bladeWashEnabled); labeled_surfacedrives[labeled_surfacedrives_count].bladeWashRadiusNormal = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWashRadiusNormal", labeled_surfacedrives[labeled_surfacedrives_count].bladeWashRadiusNormal); labeled_surfacedrives[labeled_surfacedrives_count].bladeWashRadiusTangent = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWashRadiusTangent", labeled_surfacedrives[labeled_surfacedrives_count].bladeWashRadiusTangent); labeled_surfacedrives[labeled_surfacedrives_count].bladeWashFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWashFactor", labeled_surfacedrives[labeled_surfacedrives_count].bladeWashFactor); labeled_surfacedrives[labeled_surfacedrives_count].bladeWashSpread = ReplaceFloatIgnoreCase(((Object)gameObject).name, "bladeWashSpread", labeled_surfacedrives[labeled_surfacedrives_count].bladeWashSpread); labeled_surfacedrives[labeled_surfacedrives_count].rotorCollectiveBias = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotorCollectiveBias", labeled_surfacedrives[labeled_surfacedrives_count].rotorCollectiveBias); labeled_surfacedrives[labeled_surfacedrives_count].rotorCollectiveCoefficient = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotorCollectiveCoefficient", labeled_surfacedrives[labeled_surfacedrives_count].rotorCollectiveCoefficient); labeled_surfacedrives[labeled_surfacedrives_count].rotorCyclicForwardCoefficient = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotorCyclicForwardCoefficient", labeled_surfacedrives[labeled_surfacedrives_count].rotorCyclicForwardCoefficient); labeled_surfacedrives[labeled_surfacedrives_count].rotorCyclicSideCoefficient = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotorCyclicSideCoefficient", labeled_surfacedrives[labeled_surfacedrives_count].rotorCyclicSideCoefficient); labeled_surfacedrives[labeled_surfacedrives_count].rotorAutorotationCoefficient = ReplaceFloatIgnoreCase(((Object)gameObject).name, "rotorAutorotationCoefficient", labeled_surfacedrives[labeled_surfacedrives_count].rotorAutorotationCoefficient); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.x = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorTailOffset.x", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.x); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.y = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorTailOffset.y", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.y); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.z = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorTailOffset.z", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.z); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.x = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorTailOffsetX", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.x); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.y = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorTailOffsetY", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.y); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.z = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorTailOffsetZ", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorTailOffset.z); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorBladeForcePoint = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorBladeForcePoint", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorBladeForcePoint); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorAirdensityBias = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorAirdensityBias", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorAirdensityBias); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorAirdensityExp = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorAirdensityExp", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorAirdensityExp); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactor", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactor); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorExponent = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorExponent", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorExponent); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorAtSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorAtSpeed", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorAtSpeed); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorMin", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorMin); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorMax", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorMax); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorOffsetSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorOffsetSpeed", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorOffsetSpeed); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorOffsetValue = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorOffsetValue", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorOffsetValue); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorVibration = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorVibration", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorVibration); labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorVibratorId = Mathf.FloorToInt(ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedPitchFactorVibratorId", labeled_surfacedrives[labeled_surfacedrives_count].overspeedPitchFactorVibratorId)); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactor", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactor); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorExponent = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorExponent", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorExponent); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorAtSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorAtSpeed", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorAtSpeed); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorMin", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorMin); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorMax", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorMax); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorOffsetSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorOffsetSpeed", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorOffsetSpeed); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorOffsetValue = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorOffsetValue", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorOffsetValue); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorVibration = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorVibration", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorVibration); labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorVibratorId = Mathf.FloorToInt(ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedRollFactorVibratorId", labeled_surfacedrives[labeled_surfacedrives_count].overspeedRollFactorVibratorId)); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactor", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactor); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorExponent = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorExponent", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorExponent); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorAtSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorAtSpeed", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorAtSpeed); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorMin = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorMin", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorMin); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorMax = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorMax", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorMax); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorOffsetSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorOffsetSpeed", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorOffsetSpeed); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorOffsetValue = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorOffsetValue", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorOffsetValue); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorVibration = ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorVibration", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorVibration); labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorVibratorId = Mathf.FloorToInt(ReplaceFloatIgnoreCase(((Object)gameObject).name, "overspeedYawFactorVibratorId", labeled_surfacedrives[labeled_surfacedrives_count].overspeedYawFactorVibratorId)); labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "climbReductionWithSpeed", labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithSpeed); labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithSpeedAtSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "climbReductionWithSpeedAtSpeed", labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithSpeedAtSpeed); labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithVerticalSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "climbReductionWithVerticalSpeed", labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithVerticalSpeed); labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithVerticalSpeedAtSpeed = ReplaceFloatIgnoreCase(((Object)gameObject).name, "climbReductionWithVerticalSpeedAtSpeed", labeled_surfacedrives[labeled_surfacedrives_count].climbReductionWithVerticalSpeedAtSpeed); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorVariationMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorVariationMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorVariationMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorVelocityFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorVelocityFactor", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorVelocityFactor); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityFactor = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorProjectedVelocityFactor", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityFactor); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityMultiplier = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorProjectedVelocityMultiplier", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityMultiplier); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityForwardOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorProjectedVelocityForwardOffset", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityForwardOffset); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityRearOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorProjectedVelocityRearOffset", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityRearOffset); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityLeftOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorProjectedVelocityLeftOffset", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityLeftOffset); labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityRightOffset = ReplaceFloatIgnoreCase(((Object)gameObject).name, "basicRotorProjectedVelocityRightOffset", labeled_surfacedrives[labeled_surfacedrives_count].basicRotorProjectedVelocityRightOffset); labeled_surfacedrives[labeled_surfacedrives_count].shaftOutputPivotId = ReplaceStringIgnoreCase(((Object)gameObject).name, "pivotId", labeled_surfacedrives[labeled_surfacedrives_count].shaftOutputPivotId); if ((Object)(object)gameObject.GetComponent("LineRenderer") == (Object)null) { gameObject.AddComponent(); } labeled_surfacedrives[labeled_surfacedrives_count].lineRenderer = (LineRenderer)gameObject.GetComponent("LineRenderer"); labeled_surfacedrives_count++; } if (!globalRenderPhysicSurfaces) { gameObject.GetComponent().enabled = false; } } if ((Object)(object)gCenter != (Object)null) { Rigidbody val = (Rigidbody)((Component)this).gameObject.GetComponent("Rigidbody"); if ((Object)(object)val != (Object)null) { val.centerOfMass = (center = ((Component)this).gameObject.transform.InverseTransformPoint(((Component)gCenter).transform.position)); } log(((Object)gameObject).name + " has GCenter"); } else if (((Object)gameObject).name.Contains("_center_")) { Rigidbody val2 = (Rigidbody)((Component)this).gameObject.GetComponent("Rigidbody"); if ((Object)(object)val2 != (Object)null) { val2.centerOfMass = (center = ((Component)this).gameObject.transform.InverseTransformPoint(gameObject.transform.position)); } } if (r < 10) { FindNodes(gameObject, r + 1); } } } public void FindNodes2ndPass(GameObject e, int r) { //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Expected O, but got Unknown //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown //IL_0276: Expected O, but got Unknown //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Expected O, but got Unknown //IL_0759: 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_0761: Expected O, but got Unknown //IL_0767: Expected O, but got Unknown //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_073c: Expected O, but got Unknown //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) if (r == 0) { surfacetrails = new GTrail[100]; surfacetrails_count = 0; labeled_surfacetrails = new LabeledSurfaceTrailDesc[100]; labeled_surfacetrails_count = 0; } for (int i = 0; i < e.transform.childCount; i++) { GameObject gameObject = ((Component)e.transform.GetChild(i)).gameObject; if (!gameObject.activeSelf) { continue; } GTrail gTrail = (GTrail)(object)gameObject.GetComponent("GTrail"); if ((Object)(object)gTrail != (Object)null) { if (surfacetrails_count < 100) { surfacetrails[surfacetrails_count] = gTrail; for (int j = 0; j < surfaces_count; j++) { if (surfacetrails[surfacetrails_count].surfaceId.CompareTo(surfaces[j].id) == 0) { surfacetrails[surfacetrails_count].surfaceId_int = j; } } for (int k = 0; k < surfaces_count; k++) { if (surfacetrails[surfacetrails_count].surfaceId.CompareTo(surfaces[k].id) == 0) { surfacetrails[surfacetrails_count].surfaceId_int = k; } } if ((Object)(object)gameObject.GetComponent("LineRenderer") == (Object)null) { gameObject.AddComponent(); } surfacetrails[surfacetrails_count].lineRenderer = (LineRenderer)gameObject.GetComponent("LineRenderer"); surfacetrails[surfacetrails_count].linePoints = (Vector3[])(object)new Vector3[300]; surfacetrails[surfacetrails_count].linePointsEnabled = new bool[300]; for (int l = 0; l < 300; l++) { surfacetrails[surfacetrails_count].linePointsEnabled[l] = false; } if ((Object)(object)gameObject.GetComponent("LineRenderer") != (Object)null) { Shader val; if ((Object)(object)(val = Shader.Find(surfacetrails[surfacetrails_count].materialName)) != (Object)null) { ((Renderer)surfacetrails[surfacetrails_count].lineRenderer).material = new Material(val); } else { Material val2 = (Material)Resources.Load(surfacetrails[surfacetrails_count].materialName); Material material = val2; if ((Object)val2 != (Object)null) { ((Renderer)surfacetrails[surfacetrails_count].lineRenderer).material = material; } } ((Renderer)surfacetrails[surfacetrails_count].lineRenderer).material.mainTextureScale = new Vector2(300f, 1f); surfacetrails[surfacetrails_count].lineRenderer.SetColors(surfacetrails[surfacetrails_count].startColor, surfacetrails[surfacetrails_count].endColor); surfacetrails[surfacetrails_count].lineRenderer.SetWidth(surfacetrails[surfacetrails_count].startWidth * globalSimulationScale, surfacetrails[surfacetrails_count].endWidth * globalSimulationScale); } surfacetrails_count++; } log(((Object)gameObject).name + " has GTrail"); } else if (((Object)gameObject).name.Contains("_trail_")) { log(((Object)gameObject).name + " has Surface"); if (labeled_surfacetrails_count < 100) { labeled_surfacetrails[labeled_surfacetrails_count] = new LabeledSurfaceTrailDesc(); labeled_surfacetrails[labeled_surfacetrails_count].gameObject = gameObject; labeled_surfacetrails[labeled_surfacetrails_count].startWidth = ReplaceFloatIgnoreCase(((Object)gameObject).name, "width", labeled_surfacetrails[labeled_surfacetrails_count].startWidth); labeled_surfacetrails[labeled_surfacetrails_count].endWidth = ReplaceFloatIgnoreCase(((Object)gameObject).name, "width", labeled_surfacetrails[labeled_surfacetrails_count].endWidth); labeled_surfacetrails[labeled_surfacetrails_count].startWidth = ReplaceFloatIgnoreCase(((Object)gameObject).name, "startWidth", labeled_surfacetrails[labeled_surfacetrails_count].startWidth); labeled_surfacetrails[labeled_surfacetrails_count].endWidth = ReplaceFloatIgnoreCase(((Object)gameObject).name, "endWidth", labeled_surfacetrails[labeled_surfacetrails_count].endWidth); labeled_surfacetrails[labeled_surfacetrails_count].mode = GTrail.toTTrailMode(ReplaceStringIgnoreCase(((Object)gameObject).name, "mode", GTrail.fromTTrailMode(labeled_surfacetrails[labeled_surfacetrails_count].mode))); labeled_surfacetrails[labeled_surfacetrails_count].materialName = ReplaceStringIgnoreCase(((Object)gameObject).name, "material", labeled_surfacetrails[labeled_surfacetrails_count].materialName); labeled_surfacetrails[labeled_surfacetrails_count].materialName = ReplaceStringIgnoreCase(((Object)gameObject).name, "materialName", labeled_surfacetrails[labeled_surfacetrails_count].materialName); labeled_surfacetrails[labeled_surfacetrails_count].surfaceId = ReplaceStringIgnoreCase(((Object)gameObject).name, "surfaceId", labeled_surfacetrails[labeled_surfacetrails_count].surfaceId); for (int m = 0; m < surfaces_count; m++) { if (labeled_surfacetrails[labeled_surfacetrails_count].surfaceId.CompareTo(surfaces[m].id) == 0) { labeled_surfacetrails[labeled_surfacetrails_count].surfaceId_int = m; } } for (int n = 0; n < labeled_surfaces_count; n++) { if (labeled_surfacetrails[labeled_surfacetrails_count].surfaceId.CompareTo(labeled_surfaces[n].id) == 0) { labeled_surfacetrails[labeled_surfacetrails_count].surfaceId_int = n; } } if ((Object)(object)gameObject.GetComponent("LineRenderer") == (Object)null) { gameObject.AddComponent(); } labeled_surfacetrails[labeled_surfacetrails_count].lineRenderer = (LineRenderer)gameObject.GetComponent("LineRenderer"); labeled_surfacetrails[labeled_surfacetrails_count].linePoints = (Vector3[])(object)new Vector3[300]; labeled_surfacetrails[labeled_surfacetrails_count].linePointsEnabled = new bool[300]; for (int num = 0; num < 300; num++) { labeled_surfacetrails[labeled_surfacetrails_count].linePointsEnabled[num] = false; } if ((Object)(object)gameObject.GetComponent("LineRenderer") != (Object)null) { Shader val3; if ((Object)(object)(val3 = Shader.Find(labeled_surfacetrails[labeled_surfacetrails_count].materialName)) != (Object)null) { ((Renderer)labeled_surfacetrails[labeled_surfacetrails_count].lineRenderer).material = new Material(val3); } else { Material val4 = (Material)Resources.Load(labeled_surfacetrails[labeled_surfacetrails_count].materialName); Material material2 = val4; if ((Object)val4 != (Object)null) { ((Renderer)labeled_surfacetrails[labeled_surfacetrails_count].lineRenderer).material = material2; } } ((Renderer)labeled_surfacetrails[labeled_surfacetrails_count].lineRenderer).material.mainTextureScale = new Vector2(300f, 1f); labeled_surfacetrails[labeled_surfacetrails_count].lineRenderer.SetColors(labeled_surfacetrails[labeled_surfacetrails_count].startColor, labeled_surfacetrails[labeled_surfacetrails_count].endColor); labeled_surfacetrails[labeled_surfacetrails_count].lineRenderer.SetWidth(labeled_surfacetrails[labeled_surfacetrails_count].startWidth * globalSimulationScale, labeled_surfacetrails[labeled_surfacetrails_count].endWidth * globalSimulationScale); } labeled_surfacetrails_count++; } } if (r < 10) { FindNodes2ndPass(gameObject, r + 1); } } } public void StartKinetics() { //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_0055: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if (kineticsInertiaTensor.x == 0f && kineticsInertiaTensor.y == 0f && kineticsInertiaTensor.z == 0f) { kineticsInertiaTensor_lastValue = (kineticsInertiaTensor = (kineticsInertiaTensor_original = ((Component)this).gameObject.GetComponent().inertiaTensor)); } } public void ProcessKinetics() { //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0356: 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_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) tmp_x2 = (body_max_x - body_min_x) * (body_max_x - body_min_x); tmp_y2 = (body_max_y - body_min_y) * (body_max_y - body_min_y); tmp_z2 = (body_max_z - body_min_z) * (body_max_z - body_min_z); if (kineticsInertiaTensor.x != kineticsInertiaTensor_lastValue.x || kineticsInertiaTensor.y != kineticsInertiaTensor_lastValue.y || kineticsInertiaTensor.z != kineticsInertiaTensor_lastValue.z) { ((Vector3)(ref kineticsInertiaTensor_tmp)).Set(kineticsInertiaTensorScale.x * kineticsInertiaTensor.x * (tmp_y2 * kineticsMassRedistribution.y * kineticsMassRedistribution.y + tmp_z2 * kineticsMassRedistribution.z * kineticsMassRedistribution.z) / (tmp_y2 + tmp_z2), kineticsInertiaTensorScale.y * kineticsInertiaTensor.y * (tmp_x2 * kineticsMassRedistribution.x * kineticsMassRedistribution.x + tmp_z2 * kineticsMassRedistribution.z * kineticsMassRedistribution.z) / (tmp_x2 + tmp_z2), kineticsInertiaTensorScale.z * kineticsInertiaTensor.z * (tmp_x2 * kineticsMassRedistribution.x * kineticsMassRedistribution.x + tmp_y2 * kineticsMassRedistribution.y * kineticsMassRedistribution.y) / (tmp_x2 + tmp_y2)); ((Component)this).gameObject.GetComponent().inertiaTensor = kineticsInertiaTensor_tmp; } else { ((Vector3)(ref kineticsInertiaTensor_tmp)).Set(kineticsInertiaTensorScale.x * kineticsInertiaTensor_original.x * (tmp_y2 * kineticsMassRedistribution.y * kineticsMassRedistribution.y + tmp_z2 * kineticsMassRedistribution.z * kineticsMassRedistribution.z) / (tmp_y2 + tmp_z2), kineticsInertiaTensorScale.y * kineticsInertiaTensor_original.y * (tmp_x2 * kineticsMassRedistribution.x * kineticsMassRedistribution.x + tmp_z2 * kineticsMassRedistribution.z * kineticsMassRedistribution.z) / (tmp_x2 + tmp_z2), kineticsInertiaTensorScale.z * kineticsInertiaTensor_original.z * (tmp_x2 * kineticsMassRedistribution.x * kineticsMassRedistribution.x + tmp_y2 * kineticsMassRedistribution.y * kineticsMassRedistribution.y) / (tmp_x2 + tmp_y2)); ((Component)this).gameObject.GetComponent().inertiaTensor = (kineticsInertiaTensor_lastValue = (kineticsInertiaTensor = kineticsInertiaTensor_tmp)); } } public float ProcessInputAxisPow(float input, float pow) { float num = (input - 0.5f) * 2f; if (num < 0f) { return 0.5f - Mathf.Pow(0f - num, pow) * 0.5f; } return 0.5f + Mathf.Pow(num, pow) * 0.5f; } public float ProcessInputSensivity(float input, TSensivityChannel channel) { float num = channel switch { TSensivityChannel.elevator => Mathf.Pow(inputSensivityCoefficientSpeed * inputElevatorSensivityCoefficientSpeed, (0f - speed) * speed), TSensivityChannel.ailerons => Mathf.Pow(inputSensivityCoefficientSpeed * inputAileronsSensivityCoefficientSpeed, (0f - speed) * speed), TSensivityChannel.rudder => Mathf.Pow(inputSensivityCoefficientSpeed * inputRudderSensivityCoefficientSpeed, (0f - speed) * speed), _ => Mathf.Pow(inputSensivityCoefficientSpeed, (0f - speed) * speed), }; if (num < inputSensivityCoefficientSpeedLimit) { num = inputSensivityCoefficientSpeedLimit; } return (input - 0.5f) * inputSensivity * num + 0.5f; } public float ProcessInputAxisClamp(float input, float min, float max) { if (input < min) { return min; } if (input > max) { return max; } return input; } public void ProcessInput() { //IL_0041: 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_0051: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0138: 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_0185: 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_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: 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_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_0717: 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_08ba: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_0a80: Unknown result type (might be due to invalid IL or missing references) //IL_0a85: Unknown result type (might be due to invalid IL or missing references) //IL_0adf: Unknown result type (might be due to invalid IL or missing references) //IL_0ae4: Unknown result type (might be due to invalid IL or missing references) //IL_0b09: Unknown result type (might be due to invalid IL or missing references) //IL_0b0e: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0b6d: Unknown result type (might be due to invalid IL or missing references) //IL_0b93: Unknown result type (might be due to invalid IL or missing references) //IL_0b98: Unknown result type (might be due to invalid IL or missing references) //IL_10e3: Unknown result type (might be due to invalid IL or missing references) //IL_10e8: Unknown result type (might be due to invalid IL or missing references) //IL_1156: Unknown result type (might be due to invalid IL or missing references) //IL_115b: Unknown result type (might be due to invalid IL or missing references) //IL_1106: Unknown result type (might be due to invalid IL or missing references) //IL_110b: Unknown result type (might be due to invalid IL or missing references) //IL_1179: Unknown result type (might be due to invalid IL or missing references) //IL_117e: 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_16e7: Unknown result type (might be due to invalid IL or missing references) //IL_16ec: Unknown result type (might be due to invalid IL or missing references) //IL_11ec: Unknown result type (might be due to invalid IL or missing references) //IL_11f1: Unknown result type (might be due to invalid IL or missing references) //IL_175a: Unknown result type (might be due to invalid IL or missing references) //IL_175f: Unknown result type (might be due to invalid IL or missing references) //IL_170a: Unknown result type (might be due to invalid IL or missing references) //IL_170f: Unknown result type (might be due to invalid IL or missing references) //IL_177d: Unknown result type (might be due to invalid IL or missing references) //IL_1782: Unknown result type (might be due to invalid IL or missing references) //IL_17cd: Unknown result type (might be due to invalid IL or missing references) //IL_17d2: Unknown result type (might be due to invalid IL or missing references) //IL_1d03: Unknown result type (might be due to invalid IL or missing references) //IL_1d08: Unknown result type (might be due to invalid IL or missing references) //IL_17f0: 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_1d8a: Unknown result type (might be due to invalid IL or missing references) //IL_1d8f: Unknown result type (might be due to invalid IL or missing references) //IL_1d26: Unknown result type (might be due to invalid IL or missing references) //IL_1d2b: Unknown result type (might be due to invalid IL or missing references) //IL_1dda: Unknown result type (might be due to invalid IL or missing references) //IL_1ddf: Unknown result type (might be due to invalid IL or missing references) //IL_1d5e: Unknown result type (might be due to invalid IL or missing references) //IL_1d63: Unknown result type (might be due to invalid IL or missing references) //IL_1e3f: Unknown result type (might be due to invalid IL or missing references) //IL_1e44: Unknown result type (might be due to invalid IL or missing references) //IL_22f7: Unknown result type (might be due to invalid IL or missing references) //IL_276a: Unknown result type (might be due to invalid IL or missing references) //IL_2bdd: Unknown result type (might be due to invalid IL or missing references) //IL_300c: Unknown result type (might be due to invalid IL or missing references) if (isCrashed) { kThrottle_rev = 0f; kThrottle_aft = 0f; inputThrottle_internal = 0f; inputThrottle_output = 0f; return; } if (Input.GetKey(inputTrimKey) && Input.GetKeyDown(inputElevatorKeyForIncrement) && inputElevatorTrim + inputTrimStep <= inputTrimMax) { inputElevatorTrim += inputTrimStep; } if (Input.GetKey(inputTrimKey) && Input.GetKeyDown(inputElevatorKeyForDecrement) && inputElevatorTrim - inputTrimStep >= inputTrimMin) { inputElevatorTrim -= inputTrimStep; } if (Input.GetKey(inputTrimKey) && Input.GetKeyDown(inputAileronsKeyForIncrement) && inputAileronsTrim + inputTrimStep <= inputTrimMax) { inputAileronsTrim += inputTrimStep; } if (Input.GetKey(inputTrimKey) && Input.GetKeyDown(inputAileronsKeyForDecrement) && inputAileronsTrim - inputTrimStep >= inputTrimMin) { inputAileronsTrim -= inputTrimStep; } if (Input.GetKey(inputTrimKey) && Input.GetKeyDown(inputRudderKeyForIncrement) && inputRudderTrim + inputTrimStep <= inputTrimMax) { inputRudderTrim += inputTrimStep; } if (Input.GetKey(inputTrimKey) && Input.GetKeyDown(inputRudderKeyForDecrement) && inputRudderTrim - inputTrimStep >= inputTrimMin) { inputRudderTrim -= inputTrimStep; } if (Input.GetKeyDown(inputSensivityKeyForDecrement) && inputSensivity - inputSensivityStep >= inputSensivityMin) { inputSensivity -= inputSensivityStep; } if (Input.GetKeyDown(inputSensivityKeyForIncrement) && inputSensivity + inputSensivityStep <= inputSensivityMax) { inputSensivity += inputSensivityStep; } switch (inputThrottleAfterburnerSource) { case TAxisSource.keys: case TAxisSource.keys_exp: kThrottle_aft = (Input.GetKey(inputThrottleKeyForAfterburner) ? 1f : 0f); break; case TAxisSource.unity_axis: kThrottle_aft = Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis) * 0.5f + 0.5f; break; case TAxisSource.inv_unity_axis: kThrottle_aft = (0f - Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis)) * 0.5f + 0.5f; break; case TAxisSource.unity_axis_exp: kThrottle_aft = ProcessInputAxisPow(Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.inv_unity_axis_exp: kThrottle_aft = ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis)) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.user: kThrottle_aft = Mathf.Clamp01(kThrottle_aft); break; case TAxisSource.mix: kThrottle_aft = (Input.GetKey(inputThrottleKeyForAfterburner) ? 1f : 0f) + Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis) * 0.5f + 0.5f - 0.5f; break; case TAxisSource.mix_exp: kThrottle_aft = (Input.GetKey(inputThrottleKeyForAfterburner) ? 1f : 0f) + ProcessInputAxisPow(Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis) * 0.5f + 0.5f, inputThrottleSourceExpK) - 0.5f; break; case TAxisSource.inv_mix: kThrottle_aft = (Input.GetKey(inputThrottleKeyForAfterburner) ? 1f : 0f) - Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis) * 0.5f + 0.5f - 0.5f; break; case TAxisSource.inv_mix_exp: kThrottle_aft = (Input.GetKey(inputThrottleKeyForAfterburner) ? 1f : 0f) + ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleAfterburnerSourceUnityAxis)) * 0.5f + 0.5f, inputThrottleSourceExpK) - 0.5f; break; default: kThrottle_aft = 0f; break; } kThrottle_aft = ProcessInputAxisClamp(kThrottle_aft, 0f, 1f); switch (inputThrottleNitroSource) { case TAxisSource.keys: case TAxisSource.keys_exp: kThrottle_ntr = (Input.GetKey(inputThrottleKeyForNitro) ? 1f : 0f); break; case TAxisSource.unity_axis: kThrottle_ntr = Input.GetAxis(inputThrottleNitroSourceUnityAxis) * 0.5f + 0.5f; break; case TAxisSource.inv_unity_axis: kThrottle_ntr = (0f - Input.GetAxis(inputThrottleNitroSourceUnityAxis)) * 0.5f + 0.5f; break; case TAxisSource.unity_axis_exp: kThrottle_ntr = ProcessInputAxisPow(Input.GetAxis(inputThrottleNitroSourceUnityAxis) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.inv_unity_axis_exp: kThrottle_ntr = ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleNitroSourceUnityAxis)) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.user: kThrottle_ntr = Mathf.Clamp01(kThrottle_ntr); break; case TAxisSource.mix: kThrottle_ntr = (Input.GetKey(inputThrottleKeyForNitro) ? 1f : 0f) + Input.GetAxis(inputThrottleNitroSourceUnityAxis) * 0.5f + 0.5f - 0.5f; break; case TAxisSource.mix_exp: kThrottle_ntr = (Input.GetKey(inputThrottleKeyForNitro) ? 1f : 0f) + ProcessInputAxisPow(Input.GetAxis(inputThrottleNitroSourceUnityAxis) * 0.5f + 0.5f, inputThrottleSourceExpK) - 0.5f; break; case TAxisSource.inv_mix: kThrottle_ntr = (Input.GetKey(inputThrottleKeyForNitro) ? 1f : 0f) - Input.GetAxis(inputThrottleNitroSourceUnityAxis) * 0.5f + 0.5f - 0.5f; break; case TAxisSource.inv_mix_exp: kThrottle_ntr = (Input.GetKey(inputThrottleKeyForNitro) ? 1f : 0f) + ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleNitroSourceUnityAxis)) * 0.5f + 0.5f, inputThrottleSourceExpK) - 0.5f; break; default: kThrottle_ntr = 0f; break; } kThrottle_ntr = ProcessInputAxisClamp(kThrottle_ntr, 0f, 1f); switch (inputThrottleReverseSource) { case TAxisSource.keys: case TAxisSource.keys_exp: kThrottle_rev = (Input.GetKey(inputThrottleKeyForReverse) ? 1f : 0f); break; case TAxisSource.unity_axis: kThrottle_rev = Input.GetAxis(inputThrottleReverseSourceUnityAxis) * 0.5f + 0.5f; break; case TAxisSource.inv_unity_axis: kThrottle_rev = (0f - Input.GetAxis(inputThrottleReverseSourceUnityAxis)) * 0.5f + 0.5f; break; case TAxisSource.unity_axis_exp: kThrottle_rev = ProcessInputAxisPow(Input.GetAxis(inputThrottleReverseSourceUnityAxis) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.inv_unity_axis_exp: kThrottle_rev = ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleReverseSourceUnityAxis)) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.user: kThrottle_rev = Mathf.Clamp01(kThrottle_rev); break; case TAxisSource.mix: kThrottle_rev = (Input.GetKey(inputThrottleKeyForReverse) ? 1f : 0f) + Input.GetAxis(inputThrottleReverseSourceUnityAxis) * 0.5f + 0.5f - 0.5f; break; case TAxisSource.mix_exp: kThrottle_rev = (Input.GetKey(inputThrottleKeyForReverse) ? 1f : 0f) + ProcessInputAxisPow(Input.GetAxis(inputThrottleReverseSourceUnityAxis) * 0.5f + 0.5f, inputThrottleSourceExpK) - 0.5f; break; case TAxisSource.inv_mix: kThrottle_rev = (Input.GetKey(inputThrottleKeyForReverse) ? 1f : 0f) - Input.GetAxis(inputThrottleReverseSourceUnityAxis) * 0.5f + 0.5f - 0.5f; break; case TAxisSource.inv_mix_exp: kThrottle_rev = (Input.GetKey(inputThrottleKeyForReverse) ? 1f : 0f) + ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleReverseSourceUnityAxis)) * 0.5f + 0.5f, inputThrottleSourceExpK) - 0.5f; break; default: kThrottle_rev = 0f; break; } kThrottle_rev = ProcessInputAxisClamp(kThrottle_rev, 0f, 1f); switch (inputThrottleSource) { case TAxisSource.user: inputThrottle_internal2 = Mathf.Clamp01(inputThrottle_internal2); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.inv_mix: if ((double)Thrrotle_Up.transform.localPosition.z >= 0.1) { inputThrottle_internal2 += inputThrottleIncrementDecrementStep; if (inputThrottle_internal2 > 1f) { inputThrottle_internal2 = 1f; } } else if (!((double)Thrrotle_Up.transform.localPosition.z < 0.1)) { } if ((double)Thrrotle_Down.transform.localPosition.z <= 0.01) { inputThrottle_internal2 -= inputThrottleIncrementDecrementStep; if (inputThrottle_internal2 < 0f) { inputThrottle_internal2 = 0f; } } else if (!((double)Thrrotle_Down.transform.localPosition.z > 0.01)) { } inputThrottle_internal2 = ThrottleLever.transform.localEulerAngles.z * 0.02f; break; } switch (inputThrottleSource) { case TAxisSource.keys: case TAxisSource.keys_exp: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * inputThrottle_internal2; break; case TAxisSource.unity_axis: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * (Input.GetAxis(inputThrottleSourceUnityAxis) * 0.5f + 0.5f); break; case TAxisSource.inv_unity_axis: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * ((0f - Input.GetAxis(inputThrottleSourceUnityAxis)) * 0.5f + 0.5f); break; case TAxisSource.unity_axis_exp: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * ProcessInputAxisPow(Input.GetAxis(inputThrottleSourceUnityAxis) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.inv_unity_axis_exp: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleSourceUnityAxis)) * 0.5f + 0.5f, inputThrottleSourceExpK); break; case TAxisSource.user: inputThrottle_internal = Mathf.Clamp01(inputThrottle_internal); break; case TAxisSource.mix: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * (inputThrottle_internal2 + (Input.GetAxis(inputThrottleSourceUnityAxis) * 1f + 0.5f) - 0.5f); break; case TAxisSource.mix_exp: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * (inputThrottle_internal2 + ProcessInputAxisPow(Input.GetAxis(inputThrottleSourceUnityAxis) * 1f + 0.5f, inputThrottleSourceExpK) - 0.5f); break; case TAxisSource.inv_mix: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * (inputThrottle_internal2 + ((0f - Input.GetAxis(inputThrottleSourceUnityAxis)) * 1f + 0.5f) - 0.5f); break; case TAxisSource.inv_mix_exp: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * (inputThrottle_internal2 + ProcessInputAxisPow((0f - Input.GetAxis(inputThrottleSourceUnityAxis)) * 1f + 0.5f, inputThrottleSourceExpK) - 0.5f); break; default: inputThrottle_internal = inputThrottle_internal * (1f - inputThrottleGlobalSmoothFilter) + inputThrottleGlobalSmoothFilter * 0f; break; } inputThrottle_internal = ProcessInputAxisClamp(inputThrottle_internal, 0f, 1f); if (inputThrottleSource != TAxisSource.user && inputThrottleAfterburnerSource != TAxisSource.user) { if (kThrottle_rev > 0f) { inputThrottle_output = inputThrottle_output * (1f - inputThrottleKeySmoothFilter) + kThrottle_rev * inputThrottleReverseMultiplier * inputThrottleKeySmoothFilter; } else if (kThrottle_aft > 0f) { inputThrottle_output = inputThrottle_output * (1f - inputThrottleKeySmoothFilter) + kThrottle_aft * inputThrottleAfterburnerMultiplier * inputThrottleKeySmoothFilter; } else { inputThrottle_output = inputThrottle_output * (1f - inputThrottleKeySmoothFilter) + inputThrottle_internal * inputThrottleKeySmoothFilter; } } if (kThrottle_ntr_time > 0f) { kThrottle_ntr_time -= Time.fixedDeltaTime; kThrottle_ntr_multiplier = kThrottle_ntr_multiplier * (1f - inputThrottleNitroFilter) + inputThrottleNitroMultiplier * inputThrottleNitroFilter; } else if (kThrottle_ntr_multiplier > 1.01f) { kThrottle_ntr_multiplier = kThrottle_ntr_multiplier * (1f - inputThrottleNitroFilter) + 1f * inputThrottleNitroFilter; if (kThrottle_ntr_multiplier <= 1.01f) { kThrottle_ntr_multiplier = 1f; } } else if (kThrottle_ntr > 0.25f && inputThrottleNitroCount > 0) { kThrottle_ntr_time = inputThrottleNitroTime; inputThrottleNitroCount--; } switch (inputElevatorSource) { case TAxisSource.user: inputElevator_internal = Mathf.Clamp01(inputElevator_internal); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.mix_exp: case TAxisSource.inv_mix: case TAxisSource.inv_mix_exp: if (Stick_Up.transform.localEulerAngles.x <= 5f && Stick_Down.transform.localEulerAngles.x >= 15f) { inputElevator_internal = inputElevator_internal * (1f - inputElevatorKeySmoothFilter) + 0.5f * inputElevatorKeySmoothFilter; } else if (Stick_Up.transform.localEulerAngles.x <= 5f || StickLeverX.transform.localEulerAngles.x > 20f) { inputElevator_internal = inputElevator_internal * (1f - inputElevatorKeySmoothFilter) + 1f * inputElevatorKeySmoothFilter; } else if (Stick_Down.transform.localEulerAngles.x >= 15f || StickLeverX.transform.localEulerAngles.x < 10f) { inputElevator_internal = inputElevator_internal * (1f - inputElevatorKeySmoothFilter) + 0f * inputElevatorKeySmoothFilter; } else { inputElevator_internal = inputElevator_internal * (1f - inputElevatorKeySmoothFilter) + 0.5f * inputElevatorKeySmoothFilter; } break; } switch (inputElevatorSource) { case TAxisSource.keys: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * ProcessInputSensivity(inputElevatorTrim + inputElevator_internal, TSensivityChannel.elevator); break; case TAxisSource.keys_exp: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * ProcessInputSensivity(inputElevatorTrim + ProcessInputAxisPow(inputElevator_internal, inputElevatorSourceExpK), TSensivityChannel.elevator); break; case TAxisSource.unity_axis: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * ProcessInputSensivity(inputElevatorTrim + Input.GetAxis(inputElevatorSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.elevator); break; case TAxisSource.inv_unity_axis: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * ProcessInputSensivity(inputElevatorTrim - Input.GetAxis(inputElevatorSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.elevator); break; case TAxisSource.unity_axis_exp: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * ProcessInputSensivity(inputElevatorTrim + ProcessInputAxisPow(Input.GetAxis(inputElevatorSourceUnityAxis) * 0.5f + 0.5f, inputElevatorSourceExpK), TSensivityChannel.elevator); break; case TAxisSource.inv_unity_axis_exp: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * ProcessInputSensivity(inputElevatorTrim + ProcessInputAxisPow((0f - Input.GetAxis(inputElevatorSourceUnityAxis)) * 0.5f + 0.5f, inputElevatorSourceExpK), TSensivityChannel.elevator); break; case TAxisSource.user: inputElevator_output = Mathf.Clamp01(inputElevator_output); break; case TAxisSource.mix: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * (ProcessInputSensivity(inputElevatorTrim + inputElevator_internal, TSensivityChannel.elevator) + ProcessInputSensivity(inputElevatorTrim + Input.GetAxis(inputElevatorSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.elevator) - 0.5f); break; case TAxisSource.mix_exp: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * (ProcessInputSensivity(inputElevatorTrim + inputElevator_internal, TSensivityChannel.elevator) + ProcessInputSensivity(inputElevatorTrim + ProcessInputAxisPow(Input.GetAxis(inputElevatorSourceUnityAxis) * 0.5f + 0.5f, inputElevatorSourceExpK), TSensivityChannel.elevator) - 0.5f); break; case TAxisSource.inv_mix: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * (ProcessInputSensivity(inputElevatorTrim + inputElevator_internal, TSensivityChannel.elevator) + ProcessInputSensivity(inputElevatorTrim - Input.GetAxis(inputElevatorSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.elevator) - 0.5f); break; case TAxisSource.inv_mix_exp: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * (ProcessInputSensivity(inputElevatorTrim + inputElevator_internal, TSensivityChannel.elevator) + ProcessInputSensivity(inputElevatorTrim + ProcessInputAxisPow((0f - Input.GetAxis(inputElevatorSourceUnityAxis)) * 0.5f + 0.5f, inputElevatorSourceExpK), TSensivityChannel.elevator) - 0.5f); break; default: inputElevator_output = inputElevator_output * (1f - inputElevatorGlobalSmoothFilter) + inputElevatorGlobalSmoothFilter * ProcessInputSensivity(inputElevatorTrim + 0.5f, TSensivityChannel.elevator); break; } inputElevator_output = ProcessInputAxisClamp(inputElevator_output, 0f, 1f); switch (inputAileronsSource) { case TAxisSource.user: inputAilerons_internal = Mathf.Clamp01(inputAilerons_internal); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.mix_exp: case TAxisSource.inv_mix: case TAxisSource.inv_mix_exp: if (Stick_Left.transform.localEulerAngles.y <= 5f && Stick_Right.transform.localEulerAngles.y >= 15f) { inputAilerons_internal = inputAilerons_internal * (1f - inputAileronsKeySmoothFilter) + 0.5f * inputAileronsKeySmoothFilter; } else if (Stick_Left.transform.localEulerAngles.y <= 5f || StickLeverY.transform.localEulerAngles.y < 10f) { inputAilerons_internal = inputAilerons_internal * (1f - inputAileronsKeySmoothFilter) + 1f * inputAileronsKeySmoothFilter; } else if (Stick_Right.transform.localEulerAngles.y >= 15f || StickLeverY.transform.localEulerAngles.y > 20f) { inputAilerons_internal = inputAilerons_internal * (1f - inputAileronsKeySmoothFilter) + 0f * inputAileronsKeySmoothFilter; } else { inputAilerons_internal = inputAilerons_internal * (1f - inputAileronsKeySmoothFilter) + 0.5f * inputAileronsKeySmoothFilter; } break; } switch (inputAileronsSource) { case TAxisSource.keys: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * ProcessInputSensivity(inputAileronsTrim + inputAilerons_internal, TSensivityChannel.ailerons); break; case TAxisSource.keys_exp: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * ProcessInputSensivity(inputAileronsTrim + ProcessInputAxisPow(inputAilerons_internal, inputAileronsSourceExpK), TSensivityChannel.ailerons); break; case TAxisSource.unity_axis: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * ProcessInputSensivity(inputAileronsTrim + Input.GetAxis(inputAileronsSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.ailerons); break; case TAxisSource.inv_unity_axis: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * ProcessInputSensivity(inputAileronsTrim - Input.GetAxis(inputAileronsSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.ailerons); break; case TAxisSource.unity_axis_exp: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * ProcessInputSensivity(inputAileronsTrim + ProcessInputAxisPow(Input.GetAxis(inputAileronsSourceUnityAxis) * 0.5f + 0.5f, inputAileronsSourceExpK), TSensivityChannel.ailerons); break; case TAxisSource.inv_unity_axis_exp: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * ProcessInputSensivity(inputAileronsTrim + ProcessInputAxisPow((0f - Input.GetAxis(inputAileronsSourceUnityAxis)) * 0.5f + 0.5f, inputAileronsSourceExpK), TSensivityChannel.ailerons); break; case TAxisSource.user: inputAilerons_output = Mathf.Clamp01(inputAilerons_output); break; case TAxisSource.mix: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * (ProcessInputSensivity(inputAileronsTrim + inputAilerons_internal, TSensivityChannel.ailerons) + ProcessInputSensivity(inputAileronsTrim + Input.GetAxis(inputAileronsSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.ailerons) - 0.5f); break; case TAxisSource.mix_exp: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * (ProcessInputSensivity(inputAileronsTrim + ProcessInputAxisPow(inputAilerons_internal, inputAileronsSourceExpK), TSensivityChannel.ailerons) + ProcessInputSensivity(inputAileronsTrim + ProcessInputAxisPow(Input.GetAxis(inputAileronsSourceUnityAxis) * 0.5f + 0.5f, inputAileronsSourceExpK), TSensivityChannel.ailerons) - 0.5f); break; case TAxisSource.inv_mix: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * (ProcessInputSensivity(inputAileronsTrim + inputAilerons_internal, TSensivityChannel.ailerons) + ProcessInputSensivity(inputAileronsTrim - Input.GetAxis(inputAileronsSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.ailerons) - 0.5f); break; case TAxisSource.inv_mix_exp: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * (ProcessInputSensivity(inputAileronsTrim + ProcessInputAxisPow(inputAilerons_internal, inputAileronsSourceExpK), TSensivityChannel.ailerons) + ProcessInputSensivity(inputAileronsTrim + ProcessInputAxisPow((0f - Input.GetAxis(inputAileronsSourceUnityAxis)) * 0.5f + 0.5f, inputAileronsSourceExpK), TSensivityChannel.ailerons) - 0.5f); break; default: inputAilerons_output = inputAilerons_output * (1f - inputAileronsGlobalSmoothFilter) + inputAileronsGlobalSmoothFilter * ProcessInputSensivity(inputAileronsTrim + 0.5f, TSensivityChannel.ailerons); break; } inputAilerons_output = ProcessInputAxisClamp(inputAilerons_output, 0f, 1f); switch (inputRudderSource) { case TAxisSource.user: inputRudder_internal = Mathf.Clamp01(inputRudder_internal); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.mix_exp: case TAxisSource.inv_mix: case TAxisSource.inv_mix_exp: if (Paddle_Left.transform.localEulerAngles.y <= 1f && Paddle_Right.transform.localEulerAngles.y >= 14f) { inputRudder_internal = inputRudder_internal * (1f - inputRudderKeySmoothFilter) + RudderRot.transform.localEulerAngles.y * inputRudderKeySmoothFilter; } else if (Paddle_Left.transform.localEulerAngles.y <= 1f) { inputRudder_internal = inputRudder_internal * (1f - inputRudderKeySmoothFilter) + 1f * inputRudderKeySmoothFilter; } else if (Paddle_Right.transform.localEulerAngles.y >= 14f) { inputRudder_internal = inputRudder_internal * (1f - inputRudderKeySmoothFilter) + 0f * inputRudderKeySmoothFilter; } else { inputRudder_internal = inputRudder_internal * (1f - inputRudderKeySmoothFilter) + RudderRot.transform.localEulerAngles.y * inputRudderKeySmoothFilter; } break; } switch (inputRudderSource) { case TAxisSource.keys: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * ProcessInputSensivity(inputRudderTrim + inputRudder_internal, TSensivityChannel.rudder); break; case TAxisSource.keys_exp: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * ProcessInputSensivity(inputRudderTrim + ProcessInputAxisPow(inputRudder_internal, inputRudderSourceExpK), TSensivityChannel.rudder); break; case TAxisSource.unity_axis: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * ProcessInputSensivity(inputRudderTrim + Input.GetAxis(inputRudderSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.rudder); break; case TAxisSource.inv_unity_axis: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * ProcessInputSensivity(inputRudderTrim - Input.GetAxis(inputRudderSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.rudder); break; case TAxisSource.unity_axis_exp: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * ProcessInputSensivity(inputRudderTrim + ProcessInputAxisPow(Input.GetAxis(inputRudderSourceUnityAxis) * 0.5f + 0.5f, inputRudderSourceExpK), TSensivityChannel.rudder); break; case TAxisSource.inv_unity_axis_exp: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * ProcessInputSensivity(inputRudderTrim + ProcessInputAxisPow((0f - Input.GetAxis(inputRudderSourceUnityAxis)) * 0.5f + 0.5f, inputRudderSourceExpK), TSensivityChannel.rudder); break; case TAxisSource.user: inputRudder_output = Mathf.Clamp01(inputRudder_output); break; case TAxisSource.mix: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * (ProcessInputSensivity(inputRudderTrim + inputRudder_internal, TSensivityChannel.rudder) + ProcessInputSensivity(inputRudderTrim + Input.GetAxis(inputRudderSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.rudder) - 0.5f); break; case TAxisSource.mix_exp: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * (ProcessInputSensivity(inputRudderTrim + ProcessInputAxisPow(inputRudder_internal, inputRudderSourceExpK), TSensivityChannel.rudder) + ProcessInputSensivity(inputRudderTrim + ProcessInputAxisPow(Input.GetAxis(inputRudderSourceUnityAxis) * 0.5f + 0.5f, inputRudderSourceExpK), TSensivityChannel.rudder) - 0.5f); break; case TAxisSource.inv_mix: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * (ProcessInputSensivity(inputRudderTrim + inputRudder_internal, TSensivityChannel.rudder) + ProcessInputSensivity(inputRudderTrim - Input.GetAxis(inputRudderSourceUnityAxis) * 0.5f + 0.5f, TSensivityChannel.rudder) - 0.5f); break; case TAxisSource.inv_mix_exp: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * (ProcessInputSensivity(inputRudderTrim + ProcessInputAxisPow(inputRudder_internal, inputRudderSourceExpK), TSensivityChannel.rudder) + ProcessInputSensivity(inputRudderTrim + ProcessInputAxisPow((0f - Input.GetAxis(inputRudderSourceUnityAxis)) * 0.5f + 0.5f, inputRudderSourceExpK), TSensivityChannel.rudder) - 0.5f); break; default: inputRudder_output = inputRudder_output * (1f - inputRudderGlobalSmoothFilter) + inputRudderGlobalSmoothFilter * ProcessInputSensivity(inputRudderTrim + 0.5f, TSensivityChannel.rudder); break; } inputRudder_output = ProcessInputAxisClamp(inputRudder_output, 0f, 1f); switch (inputGearsSource) { case TAxisSource.user: inputGears_internal = Mathf.Clamp01(inputGears_internal); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.mix_exp: case TAxisSource.inv_mix: case TAxisSource.inv_mix_exp: if (Input.GetKey(inputGearsKeyForToggle)) { if (inputGears_internal > 0.9f) { inputGears_internal_enabled = false; } else if (inputGears_internal < 0.1f) { inputGears_internal_enabled = true; } } if (inputGears_internal_enabled) { inputGears_internal = inputGears_internal * (1f - inputGearsKeySmoothFilter) + 1f * inputGearsKeySmoothFilter; } else { inputGears_internal = inputGears_internal * (1f - inputGearsKeySmoothFilter) + 0f * inputGearsKeySmoothFilter; } break; } switch (inputGearsSource) { case TAxisSource.keys: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * inputGears_internal; break; case TAxisSource.keys_exp: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * ProcessInputAxisPow(inputGears_internal, inputGearsSourceExpK); break; case TAxisSource.unity_axis: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * (Input.GetAxis(inputGearsSourceUnityAxis) * 0.5f + 0.5f); break; case TAxisSource.inv_unity_axis: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * ((0f - Input.GetAxis(inputGearsSourceUnityAxis)) * 0.5f + 0.5f); break; case TAxisSource.unity_axis_exp: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * ProcessInputAxisPow(Input.GetAxis(inputGearsSourceUnityAxis) * 0.5f + 0.5f, inputGearsSourceExpK); break; case TAxisSource.inv_unity_axis_exp: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * ProcessInputAxisPow((0f - Input.GetAxis(inputGearsSourceUnityAxis)) * 0.5f + 0.5f, inputGearsSourceExpK); break; case TAxisSource.user: inputGears_output = Mathf.Clamp01(inputGears_output); break; case TAxisSource.mix: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * (inputGears_internal + Input.GetAxis(inputGearsSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.mix_exp: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * (ProcessInputAxisPow(inputGears_internal, inputGearsSourceExpK) + ProcessInputAxisPow(Input.GetAxis(inputGearsSourceUnityAxis) * 0.5f + 0.5f, inputGearsSourceExpK) - 0.5f); break; case TAxisSource.inv_mix: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * (inputGears_internal - Input.GetAxis(inputGearsSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.inv_mix_exp: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * (ProcessInputAxisPow(inputGears_internal, inputGearsSourceExpK) + ProcessInputAxisPow((0f - Input.GetAxis(inputGearsSourceUnityAxis)) * 0.5f + 0.5f, inputGearsSourceExpK) - 0.5f); break; default: inputGears_output = inputGears_output * (1f - inputGearsGlobalSmoothFilter) + inputGearsGlobalSmoothFilter * 1f; break; } inputGears_output = ProcessInputAxisClamp(inputGears_output, 0f, 1f); switch (inputFlapsSource) { case TAxisSource.user: inputFlaps_internal = Mathf.Clamp01(inputFlaps_internal); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.mix_exp: case TAxisSource.inv_mix: case TAxisSource.inv_mix_exp: if (Input.GetKey(inputFlapsKeyForToggle)) { if (inputFlaps_internal > 0.9f) { inputFlaps_internal_enabled = false; } else if (inputFlaps_internal < 0.1f) { inputFlaps_internal_enabled = true; } } if (inputFlaps_internal_enabled) { inputFlaps_internal = inputFlaps_internal * (1f - inputFlapsKeySmoothFilter) + 1f * inputFlapsKeySmoothFilter; } else { inputFlaps_internal = inputFlaps_internal * (1f - inputFlapsKeySmoothFilter) + 0f * inputFlapsKeySmoothFilter; } break; } switch (inputFlapsSource) { case TAxisSource.keys: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * inputFlaps_internal; break; case TAxisSource.keys_exp: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * ProcessInputAxisPow(inputFlaps_internal, inputFlapsSourceExpK); break; case TAxisSource.unity_axis: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * (Input.GetAxis(inputFlapsSourceUnityAxis) * 0.5f + 0.5f); break; case TAxisSource.inv_unity_axis: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * ((0f - Input.GetAxis(inputFlapsSourceUnityAxis)) * 0.5f + 0.5f); break; case TAxisSource.unity_axis_exp: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * ProcessInputAxisPow(Input.GetAxis(inputFlapsSourceUnityAxis) * 0.5f + 0.5f, inputFlapsSourceExpK); break; case TAxisSource.inv_unity_axis_exp: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * ProcessInputAxisPow((0f - Input.GetAxis(inputFlapsSourceUnityAxis)) * 0.5f + 0.5f, inputFlapsSourceExpK); break; case TAxisSource.user: inputFlaps_output = Mathf.Clamp01(inputFlaps_output); break; case TAxisSource.mix: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * (inputFlaps_internal + Input.GetAxis(inputFlapsSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.mix_exp: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * (ProcessInputAxisPow(inputFlaps_internal, inputFlapsSourceExpK) + ProcessInputAxisPow(Input.GetAxis(inputFlapsSourceUnityAxis) * 0.5f + 0.5f, inputFlapsSourceExpK) - 0.5f); break; case TAxisSource.inv_mix: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * (inputFlaps_internal - Input.GetAxis(inputFlapsSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.inv_mix_exp: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * (ProcessInputAxisPow(inputFlaps_internal, inputFlapsSourceExpK) + ProcessInputAxisPow((0f - Input.GetAxis(inputFlapsSourceUnityAxis)) * 0.5f + 0.5f, inputFlapsSourceExpK) - 0.5f); break; default: inputFlaps_output = inputFlaps_output * (1f - inputFlapsGlobalSmoothFilter) + inputFlapsGlobalSmoothFilter * 0f; break; } inputFlaps_output = ProcessInputAxisClamp(inputFlaps_output, 0f, 1f); switch (inputBrakesSource) { case TAxisSource.user: inputBrakes_internal = Mathf.Clamp01(inputBrakes_internal); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.mix_exp: case TAxisSource.inv_mix: case TAxisSource.inv_mix_exp: if (Input.GetKey(inputBrakesKeyForIncrement)) { inputBrakes_internal = inputBrakes_internal * (1f - inputBrakesKeySmoothFilter) + 1f * inputBrakesKeySmoothFilter; } else { inputBrakes_internal = inputBrakes_internal * (1f - inputBrakesKeySmoothFilter) + 0f * inputBrakesKeySmoothFilter; } break; } switch (inputBrakesSource) { case TAxisSource.keys: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * inputBrakes_internal; break; case TAxisSource.keys_exp: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * ProcessInputAxisPow(inputBrakes_internal, inputBrakesSourceExpK); break; case TAxisSource.unity_axis: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * (Input.GetAxis(inputBrakesSourceUnityAxis) * 0.5f + 0.5f); break; case TAxisSource.inv_unity_axis: inputBrakes_output = inputBrakes_output * (1f - inputElevatorGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * ((0f - Input.GetAxis(inputBrakesSourceUnityAxis)) * 0.5f + 0.5f); break; case TAxisSource.unity_axis_exp: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * ProcessInputAxisPow(Input.GetAxis(inputBrakesSourceUnityAxis) * 0.5f + 0.5f, inputBrakesSourceExpK); break; case TAxisSource.inv_unity_axis_exp: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * ProcessInputAxisPow((0f - Input.GetAxis(inputBrakesSourceUnityAxis)) * 0.5f + 0.5f, inputBrakesSourceExpK); break; case TAxisSource.user: inputBrakes_output = Mathf.Clamp01(inputBrakes_output); break; case TAxisSource.mix: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * (inputBrakes_internal + Input.GetAxis(inputBrakesSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.mix_exp: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * (ProcessInputAxisPow(inputBrakes_internal, inputBrakesSourceExpK) + ProcessInputAxisPow(Input.GetAxis(inputBrakesSourceUnityAxis) * 0.5f + 0.5f, inputBrakesSourceExpK) - 0.5f); break; case TAxisSource.inv_mix: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * (inputBrakes_internal - Input.GetAxis(inputBrakesSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.inv_mix_exp: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * (ProcessInputAxisPow(inputBrakes_internal, inputBrakesSourceExpK) + ProcessInputAxisPow((0f - Input.GetAxis(inputBrakesSourceUnityAxis)) * 0.5f + 0.5f, inputBrakesSourceExpK) - 0.5f); break; default: inputBrakes_output = inputBrakes_output * (1f - inputBrakesGlobalSmoothFilter) + inputBrakesGlobalSmoothFilter * 0f; break; } inputBrakes_output = ProcessInputAxisClamp(inputBrakes_output, 0f, 1f); switch (inputTrailsSource) { case TAxisSource.user: inputTrails_internal = Mathf.Clamp01(inputTrails_internal); break; case TAxisSource.keys: case TAxisSource.keys_exp: case TAxisSource.mix: case TAxisSource.mix_exp: case TAxisSource.inv_mix: case TAxisSource.inv_mix_exp: if (Input.GetKey(inputTrailsKeyForToggle)) { if (inputTrails_internal > 0.9f) { inputTrails_internal_enabled = false; } else if (inputTrails_internal < 0.1f) { inputTrails_internal_enabled = true; } } if (inputTrails_internal_enabled) { inputTrails_internal = inputTrails_internal * (1f - inputTrailsKeySmoothFilter) + 1f * inputTrailsKeySmoothFilter; } else { inputTrails_internal = inputTrails_internal * (1f - inputTrailsKeySmoothFilter) + 0f * inputTrailsKeySmoothFilter; } break; } switch (inputTrailsSource) { case TAxisSource.keys: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * inputTrails_internal; break; case TAxisSource.keys_exp: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * ProcessInputAxisPow(inputTrails_internal, inputTrailsSourceExpK); break; case TAxisSource.unity_axis: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * (Input.GetAxis(inputTrailsSourceUnityAxis) * 0.5f + 0.5f); break; case TAxisSource.inv_unity_axis: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * ((0f - Input.GetAxis(inputTrailsSourceUnityAxis)) * 0.5f + 0.5f); break; case TAxisSource.unity_axis_exp: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * ProcessInputAxisPow(Input.GetAxis(inputTrailsSourceUnityAxis) * 0.5f + 0.5f, inputTrailsSourceExpK); break; case TAxisSource.inv_unity_axis_exp: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * ProcessInputAxisPow((0f - Input.GetAxis(inputTrailsSourceUnityAxis)) * 0.5f + 0.5f, inputTrailsSourceExpK); break; case TAxisSource.user: inputTrails_output = Mathf.Clamp01(inputTrails_output); break; case TAxisSource.mix: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * (inputTrails_internal + Input.GetAxis(inputTrailsSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.mix_exp: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * (ProcessInputAxisPow(inputTrails_internal, inputTrailsSourceExpK) + ProcessInputAxisPow(Input.GetAxis(inputTrailsSourceUnityAxis) * 0.5f + 0.5f, inputTrailsSourceExpK) - 0.5f); break; case TAxisSource.inv_mix: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * (inputTrails_internal - Input.GetAxis(inputTrailsSourceUnityAxis) * 0.5f + 0.5f - 0.5f); break; case TAxisSource.inv_mix_exp: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * (ProcessInputAxisPow(inputTrails_internal, inputTrailsSourceExpK) + ProcessInputAxisPow((0f - Input.GetAxis(inputTrailsSourceUnityAxis)) * 0.5f + 0.5f, inputTrailsSourceExpK) - 0.5f); break; default: inputTrails_output = inputTrails_output * (1f - inputTrailsGlobalSmoothFilter) + inputTrailsGlobalSmoothFilter * 0f; break; } inputTrails_output = ProcessInputAxisClamp(inputTrails_output, 0f, 1f); } public void ProcessLiftnDragOfElement(GSurface gsurf, LabeledSurfaceDesc gsurfdesc) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_0c63: Unknown result type (might be due to invalid IL or missing references) //IL_0c7b: Unknown result type (might be due to invalid IL or missing references) //IL_0c86: Unknown result type (might be due to invalid IL or missing references) //IL_0c91: Unknown result type (might be due to invalid IL or missing references) //IL_0c9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ca1: Unknown result type (might be due to invalid IL or missing references) //IL_0ca6: 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_0aba: Unknown result type (might be due to invalid IL or missing references) //IL_0abf: Unknown result type (might be due to invalid IL or missing references) //IL_0aca: 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_0ad6: Unknown result type (might be due to invalid IL or missing references) //IL_0aed: 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_0b15: Unknown result type (might be due to invalid IL or missing references) //IL_0b26: Unknown result type (might be due to invalid IL or missing references) //IL_0b3d: Unknown result type (might be due to invalid IL or missing references) //IL_0ce1: Unknown result type (might be due to invalid IL or missing references) //IL_0ce6: 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_0cf1: Unknown result type (might be due to invalid IL or missing references) //IL_0cf6: Unknown result type (might be due to invalid IL or missing references) //IL_0e33: Unknown result type (might be due to invalid IL or missing references) //IL_0e38: Unknown result type (might be due to invalid IL or missing references) //IL_0e3e: Unknown result type (might be due to invalid IL or missing references) //IL_0e43: Unknown result type (might be due to invalid IL or missing references) //IL_0e48: Unknown result type (might be due to invalid IL or missing references) //IL_0d77: Unknown result type (might be due to invalid IL or missing references) //IL_0d7c: Unknown result type (might be due to invalid IL or missing references) //IL_0e60: Unknown result type (might be due to invalid IL or missing references) //IL_0e76: Unknown result type (might be due to invalid IL or missing references) //IL_0e7b: Unknown result type (might be due to invalid IL or missing references) //IL_0e86: Unknown result type (might be due to invalid IL or missing references) //IL_0e8b: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: 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_0fc9: Unknown result type (might be due to invalid IL or missing references) //IL_0fce: Unknown result type (might be due to invalid IL or missing references) //IL_0fd8: Unknown result type (might be due to invalid IL or missing references) //IL_0fde: Unknown result type (might be due to invalid IL or missing references) //IL_0fe3: Unknown result type (might be due to invalid IL or missing references) //IL_0fe8: Unknown result type (might be due to invalid IL or missing references) //IL_0df3: Unknown result type (might be due to invalid IL or missing references) //IL_0df8: Unknown result type (might be due to invalid IL or missing references) //IL_111a: Unknown result type (might be due to invalid IL or missing references) //IL_1120: Unknown result type (might be due to invalid IL or missing references) //IL_1125: Unknown result type (might be due to invalid IL or missing references) //IL_112f: Unknown result type (might be due to invalid IL or missing references) //IL_1135: Unknown result type (might be due to invalid IL or missing references) //IL_113a: Unknown result type (might be due to invalid IL or missing references) //IL_113f: Unknown result type (might be due to invalid IL or missing references) //IL_1479: Unknown result type (might be due to invalid IL or missing references) //IL_1484: Unknown result type (might be due to invalid IL or missing references) //IL_1489: Unknown result type (might be due to invalid IL or missing references) //IL_1466: Unknown result type (might be due to invalid IL or missing references) //IL_146b: Unknown result type (might be due to invalid IL or missing references) //IL_0f12: 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_1069: Unknown result type (might be due to invalid IL or missing references) //IL_106e: Unknown result type (might be due to invalid IL or missing references) //IL_1157: Unknown result type (might be due to invalid IL or missing references) //IL_116d: Unknown result type (might be due to invalid IL or missing references) //IL_1172: Unknown result type (might be due to invalid IL or missing references) //IL_117d: 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_14bb: Unknown result type (might be due to invalid IL or missing references) //IL_14c6: Unknown result type (might be due to invalid IL or missing references) //IL_14d7: Unknown result type (might be due to invalid IL or missing references) //IL_14e2: Unknown result type (might be due to invalid IL or missing references) //IL_14f3: Unknown result type (might be due to invalid IL or missing references) //IL_14fe: Unknown result type (might be due to invalid IL or missing references) //IL_0f8e: Unknown result type (might be due to invalid IL or missing references) //IL_0f93: Unknown result type (might be due to invalid IL or missing references) //IL_10e5: Unknown result type (might be due to invalid IL or missing references) //IL_10ea: Unknown result type (might be due to invalid IL or missing references) //IL_11bf: Unknown result type (might be due to invalid IL or missing references) //IL_11c4: Unknown result type (might be due to invalid IL or missing references) //IL_13b5: Unknown result type (might be due to invalid IL or missing references) //IL_13ba: Unknown result type (might be due to invalid IL or missing references) //IL_12aa: Unknown result type (might be due to invalid IL or missing references) //IL_12af: Unknown result type (might be due to invalid IL or missing references) //IL_1431: Unknown result type (might be due to invalid IL or missing references) //IL_1436: 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_1d41: Unknown result type (might be due to invalid IL or missing references) //IL_1d4c: Unknown result type (might be due to invalid IL or missing references) //IL_1d57: Unknown result type (might be due to invalid IL or missing references) //IL_1d62: Unknown result type (might be due to invalid IL or missing references) //IL_1d67: Unknown result type (might be due to invalid IL or missing references) //IL_1d6c: Unknown result type (might be due to invalid IL or missing references) //IL_1e24: Unknown result type (might be due to invalid IL or missing references) //IL_1e29: Unknown result type (might be due to invalid IL or missing references) //IL_1e34: Unknown result type (might be due to invalid IL or missing references) //IL_1e3f: Unknown result type (might be due to invalid IL or missing references) //IL_1e4a: Unknown result type (might be due to invalid IL or missing references) //IL_1e4f: Unknown result type (might be due to invalid IL or missing references) //IL_1e54: Unknown result type (might be due to invalid IL or missing references) //IL_1a84: Unknown result type (might be due to invalid IL or missing references) //IL_1a8a: Unknown result type (might be due to invalid IL or missing references) //IL_1a54: Unknown result type (might be due to invalid IL or missing references) //IL_1a5a: Unknown result type (might be due to invalid IL or missing references) //IL_1f0c: Unknown result type (might be due to invalid IL or missing references) //IL_1f11: 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_1f27: Unknown result type (might be due to invalid IL or missing references) //IL_1f32: Unknown result type (might be due to invalid IL or missing references) //IL_1f37: Unknown result type (might be due to invalid IL or missing references) //IL_1f3c: Unknown result type (might be due to invalid IL or missing references) //IL_1b5b: Unknown result type (might be due to invalid IL or missing references) //IL_1b61: Unknown result type (might be due to invalid IL or missing references) //IL_1b2b: Unknown result type (might be due to invalid IL or missing references) //IL_1b31: Unknown result type (might be due to invalid IL or missing references) //IL_1ff4: Unknown result type (might be due to invalid IL or missing references) //IL_1ff9: Unknown result type (might be due to invalid IL or missing references) //IL_2004: Unknown result type (might be due to invalid IL or missing references) //IL_200f: Unknown result type (might be due to invalid IL or missing references) //IL_201a: Unknown result type (might be due to invalid IL or missing references) //IL_201f: Unknown result type (might be due to invalid IL or missing references) //IL_2024: Unknown result type (might be due to invalid IL or missing references) //IL_1c32: Unknown result type (might be due to invalid IL or missing references) //IL_1c38: Unknown result type (might be due to invalid IL or missing references) //IL_1c02: Unknown result type (might be due to invalid IL or missing references) //IL_1c08: Unknown result type (might be due to invalid IL or missing references) //IL_20dc: Unknown result type (might be due to invalid IL or missing references) //IL_20e1: Unknown result type (might be due to invalid IL or missing references) //IL_20ec: Unknown result type (might be due to invalid IL or missing references) //IL_20f7: Unknown result type (might be due to invalid IL or missing references) //IL_2102: Unknown result type (might be due to invalid IL or missing references) //IL_2107: Unknown result type (might be due to invalid IL or missing references) //IL_210c: Unknown result type (might be due to invalid IL or missing references) //IL_21c4: Unknown result type (might be due to invalid IL or missing references) //IL_21c9: Unknown result type (might be due to invalid IL or missing references) //IL_21d4: Unknown result type (might be due to invalid IL or missing references) //IL_21df: Unknown result type (might be due to invalid IL or missing references) //IL_21ea: Unknown result type (might be due to invalid IL or missing references) //IL_21ef: Unknown result type (might be due to invalid IL or missing references) //IL_21f4: Unknown result type (might be due to invalid IL or missing references) //IL_227d: Unknown result type (might be due to invalid IL or missing references) //IL_22b1: Unknown result type (might be due to invalid IL or missing references) //IL_22b6: Unknown result type (might be due to invalid IL or missing references) //IL_22c1: Unknown result type (might be due to invalid IL or missing references) //IL_22cc: Unknown result type (might be due to invalid IL or missing references) //IL_22d7: Unknown result type (might be due to invalid IL or missing references) //IL_22e2: Unknown result type (might be due to invalid IL or missing references) //IL_22e7: Unknown result type (might be due to invalid IL or missing references) //IL_22ec: Unknown result type (might be due to invalid IL or missing references) //IL_22f1: Unknown result type (might be due to invalid IL or missing references) //IL_237a: Unknown result type (might be due to invalid IL or missing references) //IL_23af: Unknown result type (might be due to invalid IL or missing references) //IL_23b4: Unknown result type (might be due to invalid IL or missing references) //IL_23bf: Unknown result type (might be due to invalid IL or missing references) //IL_23ca: Unknown result type (might be due to invalid IL or missing references) //IL_23d5: Unknown result type (might be due to invalid IL or missing references) //IL_23e0: Unknown result type (might be due to invalid IL or missing references) //IL_23e5: Unknown result type (might be due to invalid IL or missing references) //IL_23ea: Unknown result type (might be due to invalid IL or missing references) //IL_23ef: Unknown result type (might be due to invalid IL or missing references) //IL_2478: Unknown result type (might be due to invalid IL or missing references) //IL_24ac: Unknown result type (might be due to invalid IL or missing references) //IL_24b1: Unknown result type (might be due to invalid IL or missing references) //IL_24bc: Unknown result type (might be due to invalid IL or missing references) //IL_24c7: Unknown result type (might be due to invalid IL or missing references) //IL_24d2: Unknown result type (might be due to invalid IL or missing references) //IL_24dd: Unknown result type (might be due to invalid IL or missing references) //IL_24e2: Unknown result type (might be due to invalid IL or missing references) //IL_24e7: Unknown result type (might be due to invalid IL or missing references) //IL_24ec: Unknown result type (might be due to invalid IL or missing references) //IL_2575: Unknown result type (might be due to invalid IL or missing references) //IL_25aa: Unknown result type (might be due to invalid IL or missing references) //IL_25af: Unknown result type (might be due to invalid IL or missing references) //IL_25ba: Unknown result type (might be due to invalid IL or missing references) //IL_25c5: Unknown result type (might be due to invalid IL or missing references) //IL_25d0: Unknown result type (might be due to invalid IL or missing references) //IL_25db: Unknown result type (might be due to invalid IL or missing references) //IL_25e0: Unknown result type (might be due to invalid IL or missing references) //IL_25e5: Unknown result type (might be due to invalid IL or missing references) //IL_25ea: Unknown result type (might be due to invalid IL or missing references) //IL_2673: Unknown result type (might be due to invalid IL or missing references) //IL_26a7: Unknown result type (might be due to invalid IL or missing references) //IL_26ac: Unknown result type (might be due to invalid IL or missing references) //IL_26b7: Unknown result type (might be due to invalid IL or missing references) //IL_26c2: Unknown result type (might be due to invalid IL or missing references) //IL_26cd: Unknown result type (might be due to invalid IL or missing references) //IL_26d8: Unknown result type (might be due to invalid IL or missing references) //IL_26dd: Unknown result type (might be due to invalid IL or missing references) //IL_26e2: Unknown result type (might be due to invalid IL or missing references) //IL_26e7: Unknown result type (might be due to invalid IL or missing references) //IL_2770: Unknown result type (might be due to invalid IL or missing references) //IL_27a5: Unknown result type (might be due to invalid IL or missing references) //IL_27aa: Unknown result type (might be due to invalid IL or missing references) //IL_27b5: Unknown result type (might be due to invalid IL or missing references) //IL_27c0: Unknown result type (might be due to invalid IL or missing references) //IL_27cb: Unknown result type (might be due to invalid IL or missing references) //IL_27d6: Unknown result type (might be due to invalid IL or missing references) //IL_27db: Unknown result type (might be due to invalid IL or missing references) //IL_27e0: Unknown result type (might be due to invalid IL or missing references) //IL_27e5: Unknown result type (might be due to invalid IL or missing references) //IL_286e: Unknown result type (might be due to invalid IL or missing references) //IL_28a2: Unknown result type (might be due to invalid IL or missing references) //IL_28a7: Unknown result type (might be due to invalid IL or missing references) //IL_28b2: Unknown result type (might be due to invalid IL or missing references) //IL_28bd: Unknown result type (might be due to invalid IL or missing references) //IL_28c8: Unknown result type (might be due to invalid IL or missing references) //IL_28d3: Unknown result type (might be due to invalid IL or missing references) //IL_28d8: Unknown result type (might be due to invalid IL or missing references) //IL_28dd: Unknown result type (might be due to invalid IL or missing references) //IL_28e2: Unknown result type (might be due to invalid IL or missing references) //IL_296b: Unknown result type (might be due to invalid IL or missing references) //IL_29a0: Unknown result type (might be due to invalid IL or missing references) //IL_29a5: Unknown result type (might be due to invalid IL or missing references) //IL_29b0: Unknown result type (might be due to invalid IL or missing references) //IL_29bb: Unknown result type (might be due to invalid IL or missing references) //IL_29c6: Unknown result type (might be due to invalid IL or missing references) //IL_29d1: Unknown result type (might be due to invalid IL or missing references) //IL_29d6: Unknown result type (might be due to invalid IL or missing references) //IL_29db: Unknown result type (might be due to invalid IL or missing references) //IL_29e0: Unknown result type (might be due to invalid IL or missing references) //IL_2a69: Unknown result type (might be due to invalid IL or missing references) //IL_2a9d: Unknown result type (might be due to invalid IL or missing references) //IL_2aa2: Unknown result type (might be due to invalid IL or missing references) //IL_2aad: Unknown result type (might be due to invalid IL or missing references) //IL_2ab8: Unknown result type (might be due to invalid IL or missing references) //IL_2ac3: Unknown result type (might be due to invalid IL or missing references) //IL_2ace: Unknown result type (might be due to invalid IL or missing references) //IL_2ad3: Unknown result type (might be due to invalid IL or missing references) //IL_2ad8: Unknown result type (might be due to invalid IL or missing references) //IL_2add: Unknown result type (might be due to invalid IL or missing references) //IL_2b66: Unknown result type (might be due to invalid IL or missing references) //IL_2b9b: Unknown result type (might be due to invalid IL or missing references) //IL_2ba0: Unknown result type (might be due to invalid IL or missing references) //IL_2bab: Unknown result type (might be due to invalid IL or missing references) //IL_2bb6: Unknown result type (might be due to invalid IL or missing references) //IL_2bc1: Unknown result type (might be due to invalid IL or missing references) //IL_2bcc: Unknown result type (might be due to invalid IL or missing references) //IL_2bd1: Unknown result type (might be due to invalid IL or missing references) //IL_2bd6: Unknown result type (might be due to invalid IL or missing references) //IL_2bdb: Unknown result type (might be due to invalid IL or missing references) //IL_2c64: Unknown result type (might be due to invalid IL or missing references) //IL_2c98: Unknown result type (might be due to invalid IL or missing references) //IL_2c9d: Unknown result type (might be due to invalid IL or missing references) //IL_2ca8: Unknown result type (might be due to invalid IL or missing references) //IL_2cb3: Unknown result type (might be due to invalid IL or missing references) //IL_2cbe: Unknown result type (might be due to invalid IL or missing references) //IL_2cc9: Unknown result type (might be due to invalid IL or missing references) //IL_2cce: Unknown result type (might be due to invalid IL or missing references) //IL_2cd3: Unknown result type (might be due to invalid IL or missing references) //IL_2cd8: Unknown result type (might be due to invalid IL or missing references) //IL_2d61: Unknown result type (might be due to invalid IL or missing references) //IL_2d96: Unknown result type (might be due to invalid IL or missing references) //IL_2d9b: Unknown result type (might be due to invalid IL or missing references) //IL_2da6: Unknown result type (might be due to invalid IL or missing references) //IL_2db1: Unknown result type (might be due to invalid IL or missing references) //IL_2dbc: Unknown result type (might be due to invalid IL or missing references) //IL_2dc7: Unknown result type (might be due to invalid IL or missing references) //IL_2dcc: Unknown result type (might be due to invalid IL or missing references) //IL_2dd1: Unknown result type (might be due to invalid IL or missing references) //IL_2dd6: Unknown result type (might be due to invalid IL or missing references) //IL_307c: Unknown result type (might be due to invalid IL or missing references) //IL_3081: Unknown result type (might be due to invalid IL or missing references) //IL_3088: Unknown result type (might be due to invalid IL or missing references) //IL_30a0: Unknown result type (might be due to invalid IL or missing references) //IL_30a6: Unknown result type (might be due to invalid IL or missing references) //IL_30b1: Unknown result type (might be due to invalid IL or missing references) //IL_30bc: Unknown result type (might be due to invalid IL or missing references) //IL_30c1: Unknown result type (might be due to invalid IL or missing references) //IL_30c6: Unknown result type (might be due to invalid IL or missing references) //IL_30cd: Unknown result type (might be due to invalid IL or missing references) //IL_30e5: Unknown result type (might be due to invalid IL or missing references) //IL_30eb: Unknown result type (might be due to invalid IL or missing references) //IL_30f6: Unknown result type (might be due to invalid IL or missing references) //IL_3101: Unknown result type (might be due to invalid IL or missing references) //IL_3106: Unknown result type (might be due to invalid IL or missing references) //IL_310b: Unknown result type (might be due to invalid IL or missing references) //IL_301a: Unknown result type (might be due to invalid IL or missing references) //IL_3031: Unknown result type (might be due to invalid IL or missing references) //IL_3037: Unknown result type (might be due to invalid IL or missing references) //IL_303d: Unknown result type (might be due to invalid IL or missing references) //IL_3042: Unknown result type (might be due to invalid IL or missing references) //IL_304d: Unknown result type (might be due to invalid IL or missing references) //IL_3057: Unknown result type (might be due to invalid IL or missing references) //IL_305c: Unknown result type (might be due to invalid IL or missing references) //IL_2eb6: Unknown result type (might be due to invalid IL or missing references) //IL_3124: Unknown result type (might be due to invalid IL or missing references) //IL_3129: Unknown result type (might be due to invalid IL or missing references) //IL_3130: Unknown result type (might be due to invalid IL or missing references) //IL_3148: Unknown result type (might be due to invalid IL or missing references) //IL_314e: Unknown result type (might be due to invalid IL or missing references) //IL_3159: Unknown result type (might be due to invalid IL or missing references) //IL_3164: Unknown result type (might be due to invalid IL or missing references) //IL_3169: Unknown result type (might be due to invalid IL or missing references) //IL_316e: Unknown result type (might be due to invalid IL or missing references) //IL_3175: Unknown result type (might be due to invalid IL or missing references) //IL_318d: Unknown result type (might be due to invalid IL or missing references) //IL_3193: Unknown result type (might be due to invalid IL or missing references) //IL_319e: Unknown result type (might be due to invalid IL or missing references) //IL_31a9: Unknown result type (might be due to invalid IL or missing references) //IL_31ae: Unknown result type (might be due to invalid IL or missing references) //IL_31b3: Unknown result type (might be due to invalid IL or missing references) //IL_2f38: Unknown result type (might be due to invalid IL or missing references) //IL_2ee6: Unknown result type (might be due to invalid IL or missing references) //IL_2eec: Unknown result type (might be due to invalid IL or missing references) //IL_2ef6: Unknown result type (might be due to invalid IL or missing references) //IL_2f0b: Unknown result type (might be due to invalid IL or missing references) //IL_2f16: Unknown result type (might be due to invalid IL or missing references) //IL_2f21: Unknown result type (might be due to invalid IL or missing references) //IL_2f26: Unknown result type (might be due to invalid IL or missing references) //IL_2f68: Unknown result type (might be due to invalid IL or missing references) //IL_2f6e: Unknown result type (might be due to invalid IL or missing references) //IL_2f78: Unknown result type (might be due to invalid IL or missing references) //IL_2f8d: Unknown result type (might be due to invalid IL or missing references) //IL_2f98: Unknown result type (might be due to invalid IL or missing references) //IL_2fa3: Unknown result type (might be due to invalid IL or missing references) //IL_2fa8: Unknown result type (might be due to invalid IL or missing references) ((Vector3)(ref drag)).Set(0f, 0f, 0f); ((Vector3)(ref lift)).Set(0f, 0f, 0f); ProcessLiftnDragOfElement_klift = 1f; ProcessLiftnDragOfElement_kname = ""; if ((Object)(object)gsurf != (Object)null) { tmp_transform = ((Component)gsurf).transform; ProcessLiftnDragOfElement_kname = ((Object)gsurf).name; if (GAircraftDropPointVelocity) { gsurf.lastPosition = tmp_transform.position; } lastPosition = gsurf.lastPosition; surfaceEnableThin = gsurf.surfaceEnableThin; surfaceEnablePositive = gsurf.surfaceEnablePositive; surfaceEnableNegative = gsurf.surfaceEnableNegative; surfaceEnableXPositive = gsurf.surfaceEnableXPositive; surfaceEnableYPositive = gsurf.surfaceEnableYPositive; surfaceEnableZPositive = gsurf.surfaceEnableZPositive; surfaceEnableXNegative = gsurf.surfaceEnableXNegative; surfaceEnableYNegative = gsurf.surfaceEnableYNegative; surfaceEnableZNegative = gsurf.surfaceEnableZNegative; behaviourXPositive = GSurface.behaviourFromTSurfaceBehaviourType(gsurf.behaviourXPositive, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourYPositive = GSurface.behaviourFromTSurfaceBehaviourType(gsurf.behaviourYPositive, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourZPositive = GSurface.behaviourFromTSurfaceBehaviourType(gsurf.behaviourZPositive, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourXNegative = GSurface.behaviourFromTSurfaceBehaviourType(gsurf.behaviourXNegative, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourYNegative = GSurface.behaviourFromTSurfaceBehaviourType(gsurf.behaviourYNegative, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourZNegative = GSurface.behaviourFromTSurfaceBehaviourType(gsurf.behaviourZNegative, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); surfaceDebug = gsurf.surfaceDebug; cachedXScale = gsurf.cachedXScale; cachedYScale = gsurf.cachedYScale; cachedZScale = gsurf.cachedZScale; cachedXSurface = gsurf.cachedXSurface; cachedYSurface = gsurf.cachedYSurface; cachedZSurface = gsurf.cachedZSurface; coefficientXDragWhenXPositiveFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurf.shapeXPositive, gsurf.shapeXPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientXDragWhenXPositiveFlow, 1f); coefficientYDragWhenYPositiveFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurf.shapeYPositive, gsurf.shapeYPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientYDragWhenYPositiveFlow, 1f); coefficientZDragWhenZPositiveFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurf.shapeZPositive, gsurf.shapeZPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientZDragWhenZPositiveFlow, 1f); coefficientXDragWhenXNegativeFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurf.shapeXNegative, gsurf.shapeXNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientXDragWhenXNegativeFlow, 1f); coefficientYDragWhenYNegativeFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurf.shapeYNegative, gsurf.shapeYNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientYDragWhenYNegativeFlow, 1f); coefficientZDragWhenZNegativeFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurf.shapeZNegative, gsurf.shapeZNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientZDragWhenZNegativeFlow, 1f); coefficientXLiftWhenYPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeYPositive, gsurf.shapeYPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientXLiftWhenYPositiveFlow, 0f); coefficientXLiftWhenYNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeYNegative, gsurf.shapeYNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientXLiftWhenYNegativeFlow, 0f); coefficientXLiftWhenZPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeZPositive, gsurf.shapeZPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientXLiftWhenZPositiveFlow, 0f); coefficientXLiftWhenZNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeZNegative, gsurf.shapeZNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientXLiftWhenZNegativeFlow, 0f); coefficientYLiftWhenXPositiveFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurf.shapeXPositive, gsurf.shapeXPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientYLiftWhenXPositiveFlow, 0f); coefficientYLiftWhenXNegativeFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurf.shapeXNegative, gsurf.shapeXNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientYLiftWhenXNegativeFlow, 0f); coefficientYLiftWhenZPositiveFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurf.shapeZPositive, gsurf.shapeZPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientYLiftWhenZPositiveFlow, 0f); coefficientYLiftWhenZNegativeFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurf.shapeZNegative, gsurf.shapeZNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientYLiftWhenZNegativeFlow, 0.1f); coefficientZLiftWhenXPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeXPositive, gsurf.shapeXPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientZLiftWhenXPositiveFlow, 0f); coefficientZLiftWhenXNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeXNegative, gsurf.shapeXNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientZLiftWhenXNegativeFlow, 0f); coefficientZLiftWhenYPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeYPositive, gsurf.shapeYPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientZLiftWhenYPositiveFlow, 0f); coefficientZLiftWhenYNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurf.shapeYNegative, gsurf.shapeYNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurf.coefficientZLiftWhenYNegativeFlow, 0f); tmp_lineRenderer = gsurf.lineRenderer; tmp_propWashFactor = gsurf.propWashFactor; tmp_coefficientExponent = gsurf.coefficientExponent; } else { if (gsurfdesc == null) { return; } tmp_transform = gsurfdesc.gameObject.transform; ProcessLiftnDragOfElement_kname = ((Object)gsurfdesc.gameObject).name; if (GAircraftDropPointVelocity) { gsurfdesc.lastPosition = tmp_transform.position; } lastPosition = gsurfdesc.lastPosition; surfaceEnableThin = gsurfdesc.surfaceEnableThin; surfaceEnablePositive = gsurfdesc.surfaceEnablePositive; surfaceEnableNegative = gsurfdesc.surfaceEnableNegative; surfaceEnableXPositive = gsurfdesc.surfaceEnableXPositive; surfaceEnableYPositive = gsurfdesc.surfaceEnableYPositive; surfaceEnableZPositive = gsurfdesc.surfaceEnableZPositive; surfaceEnableXNegative = gsurfdesc.surfaceEnableXNegative; surfaceEnableYNegative = gsurfdesc.surfaceEnableYNegative; surfaceEnableZNegative = gsurfdesc.surfaceEnableZNegative; behaviourXPositive = GSurface.behaviourFromTSurfaceBehaviourType(gsurfdesc.behaviourXPositive, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourYPositive = GSurface.behaviourFromTSurfaceBehaviourType(gsurfdesc.behaviourYPositive, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourZPositive = GSurface.behaviourFromTSurfaceBehaviourType(gsurfdesc.behaviourZPositive, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourXNegative = GSurface.behaviourFromTSurfaceBehaviourType(gsurfdesc.behaviourXNegative, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourYNegative = GSurface.behaviourFromTSurfaceBehaviourType(gsurfdesc.behaviourYNegative, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); behaviourZNegative = GSurface.behaviourFromTSurfaceBehaviourType(gsurfdesc.behaviourZNegative, globalDefaultBehaviour, GSurface.TSurfaceBehaviourType.default_behaviour); surfaceDebug = gsurfdesc.surfaceDebug; cachedXScale = gsurfdesc.cachedXScale; cachedYScale = gsurfdesc.cachedYScale; cachedZScale = gsurfdesc.cachedZScale; cachedXSurface = gsurfdesc.cachedXSurface; cachedYSurface = gsurfdesc.cachedYSurface; cachedZSurface = gsurfdesc.cachedZSurface; coefficientXDragWhenXPositiveFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurfdesc.shapeXPositive, gsurfdesc.shapeXPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientXDragWhenXPositiveFlow, 1f); coefficientYDragWhenYPositiveFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurfdesc.shapeYPositive, gsurfdesc.shapeYPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientYDragWhenYPositiveFlow, 1f); coefficientZDragWhenZPositiveFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurfdesc.shapeZPositive, gsurfdesc.shapeZPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientZDragWhenZPositiveFlow, 1f); coefficientXDragWhenXNegativeFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurfdesc.shapeXNegative, gsurfdesc.shapeXNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientXDragWhenXNegativeFlow, 1f); coefficientYDragWhenYNegativeFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurfdesc.shapeYNegative, gsurfdesc.shapeYNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientYDragWhenYNegativeFlow, 1f); coefficientZDragWhenZNegativeFlow = GSurface.dragFromTSurfaceShapeTypeV(gsurfdesc.shapeZNegative, gsurfdesc.shapeZNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientZDragWhenZNegativeFlow, 1f); coefficientXLiftWhenYPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeYPositive, gsurfdesc.shapeYPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientXLiftWhenYPositiveFlow, 0f); coefficientXLiftWhenYNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeYNegative, gsurfdesc.shapeYNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientXLiftWhenYNegativeFlow, 0f); coefficientXLiftWhenZPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeZPositive, gsurfdesc.shapeZPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientXLiftWhenZPositiveFlow, 0f); coefficientXLiftWhenZNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeZNegative, gsurfdesc.shapeZNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientXLiftWhenZNegativeFlow, 0f); coefficientYLiftWhenXPositiveFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurfdesc.shapeXPositive, gsurfdesc.shapeXPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientYLiftWhenXPositiveFlow, 0f); coefficientYLiftWhenXNegativeFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurfdesc.shapeXNegative, gsurfdesc.shapeXNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientYLiftWhenXNegativeFlow, 0f); coefficientYLiftWhenZPositiveFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurfdesc.shapeZPositive, gsurfdesc.shapeZPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientYLiftWhenZPositiveFlow, 0f); coefficientYLiftWhenZNegativeFlow = GSurface.liftFromTSurfaceShapeTypeV(gsurfdesc.shapeZNegative, gsurfdesc.shapeZNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientYLiftWhenZNegativeFlow, 0.1f); coefficientZLiftWhenXPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeXPositive, gsurfdesc.shapeXPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientZLiftWhenXPositiveFlow, 0f); coefficientZLiftWhenXNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeXNegative, gsurfdesc.shapeXNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientZLiftWhenXNegativeFlow, 0f); coefficientZLiftWhenYPositiveFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeYPositive, gsurfdesc.shapeYPositiveParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientZLiftWhenYPositiveFlow, 0f); coefficientZLiftWhenYNegativeFlow = GSurface.liftFromTSurfaceShapeTypeH(gsurfdesc.shapeYNegative, gsurfdesc.shapeYNegativeParameter, globalShapeDefaultSurface, globalShapeDefaultSurfaceParameter, gsurfdesc.coefficientZLiftWhenYNegativeFlow, 0f); tmp_lineRenderer = gsurfdesc.lineRenderer; tmp_propWashFactor = gsurfdesc.propWashFactor; tmp_coefficientExponent = gsurfdesc.coefficientExponent; } float num = kineticsPropwashLimit * globalSimulationScale; float num2 = kineticsPropwashMultiplier / num * globalSimulationScale; kineticsPropwash_internal = 0f; for (int i = 0; i < labeled_surfacedrives_count; i++) { if (labeled_surfacedrives[i].bladeWashEnabled) { tmp_v = (tmp_transform.position - labeled_surfacedrives[i].gameObject.transform.position) * globalSimulationScale; tmp_x = Vector3.Dot(tmp_v, labeled_surfacedrives[i].gameObject.transform.right); tmp_y = Vector3.Dot(tmp_v, labeled_surfacedrives[i].gameObject.transform.up); tmp_z = Vector3.Dot(tmp_v, labeled_surfacedrives[i].gameObject.transform.forward); float num3 = ((!(tmp_z > 0f)) ? Mathf.Abs(1f / (tmp_x * tmp_x * tmp_x * tmp_x + tmp_y * tmp_y + tmp_z * tmp_z * 0.1f)) : Mathf.Abs(1f / (tmp_x * tmp_x * tmp_x * tmp_x + tmp_y * tmp_y + tmp_z * tmp_z * tmp_z * tmp_z * tmp_z * tmp_z))); if (num3 > num) { num3 = num; } kineticsPropwash_internal += labeled_surfacedrives[i].bladeWashSpeed * num3 * num2 * 0.18f; } } kineticsPropwash_internal *= globalSimulationScale; lastPosition = lastPosition * (1f - kineticsSurfaceDeltaFilter * globalSimulationScale) + tmp_transform.position * kineticsSurfaceDeltaFilter * globalSimulationScale; switch (kineticsSurfaceMethod) { case TSurfaceMethod.rigidbodyGetPointVelocity: tmp_v = ((Component)this).gameObject.GetComponent().GetPointVelocity(tmp_transform.position) + neg_windspeed; if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; case TSurfaceMethod.rigidbodyGetPointVelocityWithPropwash: tmp_v = ((Component)this).gameObject.GetComponent().GetPointVelocity(tmp_transform.position) + neg_windspeed; if (kineticsPropwash_internal > 0f) { tmp_v += kineticsPropwash_internal * ((Component)this).gameObject.transform.forward * tmp_propWashFactor; } if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; case TSurfaceMethod.deltaFiltered: tmp_v = (tmp_transform.position - lastPosition) / Time.fixedDeltaTime + neg_windspeed; if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; default: tmp_v = (tmp_transform.position - lastPosition) / Time.fixedDeltaTime + neg_windspeed; if (kineticsPropwash_internal > 0f) { tmp_v += kineticsPropwash_internal * ((Component)this).gameObject.transform.forward * tmp_propWashFactor; } if (kineticsGroundEffect == TGroundEffectType.airplanesoft && distanceToGround < kineticsGroundEffectProbeMaxDistance) { ProcessLiftnDragOfElement_klift = kineticsGroundEffectCoeficient * kineticsGroundEffectCoeficientDistance / (tmp_transform.position.y - yPositionOfGround); if (ProcessLiftnDragOfElement_klift < 1f) { ProcessLiftnDragOfElement_klift = 1f; } floor_effect_add += ProcessLiftnDragOfElement_klift; floor_effect_ctr += 1f; } else if ((kineticsGroundEffect == TGroundEffectType.airplanesoft2 || kineticsGroundEffect == TGroundEffectType.helicoptersoft) && distanceToGround < kineticsGroundEffectProbeMaxDistance) { if (Mathf.Abs(kineticsGroundEffectCoeficient) < float.MinValue) { kineticsGroundEffectCoeficient = float.MinValue; } if (Mathf.Abs(kineticsGroundEffectCoeficientDistance) < float.MinValue) { kineticsGroundEffectCoeficientDistance = float.MinValue; } ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue * Mathf.Pow(kineticsGroundEffectMaxValue / kineticsGroundEffectCoeficient, (0f - (tmp_transform.position.y - yPositionOfGround)) / kineticsGroundEffectCoeficientDistance); if (ProcessLiftnDragOfElement_klift < 1f) { ProcessLiftnDragOfElement_klift = 1f; } if (ProcessLiftnDragOfElement_klift > kineticsGroundEffectMaxValue) { ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue; } floor_effect_add += ProcessLiftnDragOfElement_klift; floor_effect_ctr += 1f; } else if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; } if (GAircraftDropPointVelocity) { tmp_v = Vector3.zero; } else { tmp_v /= globalSimulationScale; } total_effect_add += ((Vector3)(ref tmp_v)).magnitude; total_effect_ctr += 1f; tmp_x = Vector3.Dot(tmp_v, tmp_transform.right); tmp_y = Vector3.Dot(tmp_v, tmp_transform.up); tmp_z = Vector3.Dot(tmp_v, tmp_transform.forward); bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; bool flag5 = false; bool flag6 = false; if (globalAnalysisLaminarEnabled) { float num4 = globalDefaultLaminarLimitAngle * (float)Math.PI / 180f; float num5 = globalDefaultTurbulentLimitAngle * (float)Math.PI / 180f; float num6 = globalDefaultStallLimitAngle * (float)Math.PI / 180f; flag = (tmp_x > 0f && GSurface.laminarFromTSurfaceBehaviourType(behaviourXPositive)) || (tmp_x < 0f && GSurface.laminarFromTSurfaceBehaviourType(behaviourXNegative)); if (flag) { if (Mathf.Abs(tmp_x) > 0f) { ProcessLiftnDragOfElement_turbulencex = Mathf.Atan(Mathf.Abs(Mathf.Sqrt(tmp_y * tmp_y + tmp_z * tmp_z) / tmp_x)); } else { ProcessLiftnDragOfElement_turbulencex = (float)Math.PI / 2f; } if (Mathf.Abs(tmp_x) > 5f && ProcessLiftnDragOfElement_turbulencex > num6) { flag4 = true; } if (ProcessLiftnDragOfElement_turbulencex < num4) { ProcessLiftnDragOfElement_turbulencex = 0f; } else if (ProcessLiftnDragOfElement_turbulencex > num5) { ProcessLiftnDragOfElement_turbulencex = 1f; } else { ProcessLiftnDragOfElement_turbulencex = (ProcessLiftnDragOfElement_turbulencex - num4) / (num5 - num4); } ProcessLiftnDragOfElement_kturbulencex = Mathf.Clamp01(1f - Mathf.Pow(ProcessLiftnDragOfElement_turbulencex, globalAnalysisLaminarStallExponent) * globalAnalysisLaminarStallMultiplier); } else { ProcessLiftnDragOfElement_kturbulencex = 1f; } flag2 = (tmp_y > 0f && GSurface.laminarFromTSurfaceBehaviourType(behaviourYPositive)) || (tmp_y < 0f && GSurface.laminarFromTSurfaceBehaviourType(behaviourYNegative)); if (flag2) { if (Mathf.Abs(tmp_y) > 0f) { ProcessLiftnDragOfElement_turbulencey = Mathf.Atan(Mathf.Abs(Mathf.Sqrt(tmp_x * tmp_x + tmp_z * tmp_z) / tmp_y)); } else { ProcessLiftnDragOfElement_turbulencey = (float)Math.PI / 2f; } if (Mathf.Abs(tmp_y) > 5f && ProcessLiftnDragOfElement_turbulencey > num6) { flag5 = true; } if (ProcessLiftnDragOfElement_turbulencey < num4) { ProcessLiftnDragOfElement_turbulencey = 0f; } else if (ProcessLiftnDragOfElement_turbulencey > num5) { ProcessLiftnDragOfElement_turbulencey = 1f; } else { ProcessLiftnDragOfElement_turbulencey = (ProcessLiftnDragOfElement_turbulencey - num4) / (num5 - num4); } ProcessLiftnDragOfElement_kturbulencey = Mathf.Clamp01(1f - Mathf.Pow(ProcessLiftnDragOfElement_turbulencey, globalAnalysisLaminarStallExponent) * globalAnalysisLaminarStallMultiplier); } else { ProcessLiftnDragOfElement_kturbulencey = 1f; } flag3 = (tmp_z > 0f && GSurface.laminarFromTSurfaceBehaviourType(behaviourZPositive)) || (tmp_z < 0f && GSurface.laminarFromTSurfaceBehaviourType(behaviourZNegative)); if (flag3) { if (Mathf.Abs(tmp_z) > 0f) { ProcessLiftnDragOfElement_turbulencez = Mathf.Atan(Mathf.Abs(Mathf.Sqrt(tmp_x * tmp_x + tmp_y * tmp_y) / tmp_z)); } else { ProcessLiftnDragOfElement_turbulencez = (float)Math.PI / 2f; } if (Mathf.Abs(tmp_z) > 5f && ProcessLiftnDragOfElement_turbulencez > num6) { flag6 = true; } if (ProcessLiftnDragOfElement_turbulencez < num4) { ProcessLiftnDragOfElement_turbulencez = 0f; } else if (ProcessLiftnDragOfElement_turbulencez > num5) { ProcessLiftnDragOfElement_turbulencez = 1f; } else { ProcessLiftnDragOfElement_turbulencez = (ProcessLiftnDragOfElement_turbulencez - num4) / (num5 - num4); } ProcessLiftnDragOfElement_kturbulencez = Mathf.Clamp01(1f - Mathf.Pow(ProcessLiftnDragOfElement_turbulencez, globalAnalysisLaminarStallExponent) * globalAnalysisLaminarStallMultiplier); } else { ProcessLiftnDragOfElement_kturbulencez = 1f; } } else { ProcessLiftnDragOfElement_kturbulencex = 1f; ProcessLiftnDragOfElement_kturbulencey = 1f; ProcessLiftnDragOfElement_kturbulencez = 1f; } if (surfaceEnableThin) { if (cachedXScale < cachedYScale && cachedXScale < cachedZScale) { if (surfaceEnablePositive) { surfaceEnableXPositive |= true; } if (surfaceEnableNegative) { surfaceEnableXNegative |= true; } if (globalRenderForceVectors) { if (ProcessLiftnDragOfElement_kturbulencex < 0.9f) { if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetColors(kColorStall, kColorStall); } } else if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetColors(kColorRed, kColorRed); } } } else if (cachedYScale < cachedXScale && cachedYScale < cachedZScale) { if (surfaceEnablePositive) { surfaceEnableYPositive |= true; } if (surfaceEnableNegative) { surfaceEnableYNegative |= true; } if (globalRenderForceVectors) { if (ProcessLiftnDragOfElement_kturbulencey < 0.9f) { if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetColors(kColorStall, kColorStall); } } else if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetColors(kColorGreen, kColorGreen); } } } else if (cachedZScale < cachedXScale && cachedZScale < cachedYScale) { if (surfaceEnablePositive) { surfaceEnableZPositive |= true; } if (surfaceEnableNegative) { surfaceEnableZNegative |= true; } if (globalRenderForceVectors) { if (ProcessLiftnDragOfElement_kturbulencez < 0.9f) { if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetColors(kColorStall, kColorStall); } } else if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetColors(kColorBlue, kColorBlue); } } } } else { if (surfaceEnablePositive) { surfaceEnableXPositive |= true; } if (surfaceEnableNegative) { surfaceEnableXNegative |= true; } if (surfaceEnablePositive) { surfaceEnableYPositive |= true; } if (surfaceEnableNegative) { surfaceEnableYNegative |= true; } if (surfaceEnablePositive) { surfaceEnableZPositive |= true; } if (surfaceEnableNegative) { surfaceEnableZNegative |= true; } } if (surfaceEnableXPositive && tmp_x > 0f) { drag = ProcessLiftnDragOfElement_kturbulencex * ((0f - tmp_x) * Mathf.Pow(Mathf.Abs(tmp_x), tmp_coefficientExponent - 1f) * tmp_transform.right * coefficientXDragWhenXPositiveFlow * cachedXSurface * kdrag); total_surfaces += cachedXSurface; if (flag4) { stalled_surfaces += cachedXSurface; } if (flag) { analysis_surfaces += cachedXSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencex * cachedXSurface; } } if (surfaceEnableXNegative && tmp_x < 0f) { drag = ProcessLiftnDragOfElement_kturbulencex * ((0f - tmp_x) * Mathf.Pow(Mathf.Abs(tmp_x), tmp_coefficientExponent - 1f) * tmp_transform.right * coefficientXDragWhenXNegativeFlow * cachedXSurface * kdrag); total_surfaces += cachedXSurface; if (flag4) { stalled_surfaces += cachedXSurface; } if (flag) { analysis_surfaces += cachedXSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencex * cachedXSurface; } } if (surfaceEnableYPositive && tmp_y > 0f) { drag = ProcessLiftnDragOfElement_kturbulencey * ((0f - tmp_y) * Mathf.Pow(Mathf.Abs(tmp_y), tmp_coefficientExponent - 1f) * tmp_transform.up * coefficientYDragWhenYPositiveFlow * cachedYSurface * kdrag); total_surfaces += cachedYSurface; if (flag5) { stalled_surfaces += cachedYSurface; } if (flag2) { analysis_surfaces += cachedYSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencey * cachedYSurface; } } if (surfaceEnableYNegative && tmp_y < 0f) { drag = ProcessLiftnDragOfElement_kturbulencey * ((0f - tmp_y) * Mathf.Pow(Mathf.Abs(tmp_y), tmp_coefficientExponent - 1f) * tmp_transform.up * coefficientYDragWhenYNegativeFlow * cachedYSurface * kdrag); total_surfaces += cachedYSurface; if (flag5) { stalled_surfaces += cachedYSurface; } if (flag2) { analysis_surfaces += cachedYSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencey * cachedYSurface; } } if (surfaceEnableZPositive && tmp_z > 0f) { drag = ProcessLiftnDragOfElement_kturbulencez * ((0f - tmp_z) * Mathf.Pow(Mathf.Abs(tmp_z), tmp_coefficientExponent - 1f) * tmp_transform.forward * coefficientZDragWhenZPositiveFlow * cachedZSurface * kdrag); total_surfaces += cachedZSurface; if (flag6) { stalled_surfaces += cachedZSurface; } if (flag3) { analysis_surfaces += cachedZSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencez * cachedZSurface; } } if (surfaceEnableZNegative && tmp_z < 0f) { drag = ProcessLiftnDragOfElement_kturbulencez * ((0f - tmp_z) * Mathf.Pow(Mathf.Abs(tmp_z), tmp_coefficientExponent - 1f) * tmp_transform.forward * coefficientZDragWhenZNegativeFlow * cachedZSurface * kdrag); total_surfaces += cachedZSurface; if (flag6) { stalled_surfaces += cachedZSurface; } if (flag3) { analysis_surfaces += cachedZSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencez * cachedZSurface; } } if (surfaceEnableXPositive && tmp_y > 0f) { lift += ProcessLiftnDragOfElement_kturbulencey * (tmp_y * Mathf.Pow(Mathf.Abs(tmp_y), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedYSurface * coefficientXLiftWhenYNegativeFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedYSurface; if (flag5) { stalled_surfaces += cachedYSurface; } if (flag2) { analysis_surfaces += cachedYSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencey * cachedYSurface; } } if (surfaceEnableXNegative && tmp_y < 0f) { lift += ProcessLiftnDragOfElement_kturbulencey * ((0f - tmp_y) * Mathf.Pow(Mathf.Abs(tmp_y), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedYSurface * coefficientXLiftWhenYPositiveFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedYSurface; if (flag5) { stalled_surfaces += cachedYSurface; } if (flag2) { analysis_surfaces += cachedYSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencey * cachedYSurface; } } if (surfaceEnableXPositive && tmp_z > 0f) { lift += ProcessLiftnDragOfElement_kturbulencez * (tmp_z * Mathf.Pow(Mathf.Abs(tmp_z), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedZSurface * coefficientXLiftWhenZNegativeFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedZSurface; if (flag6) { stalled_surfaces += cachedZSurface; } if (flag3) { analysis_surfaces += cachedZSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencez * cachedZSurface; } } if (surfaceEnableXNegative && tmp_z < 0f) { lift += ProcessLiftnDragOfElement_kturbulencez * ((0f - tmp_z) * Mathf.Pow(Mathf.Abs(tmp_z), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedZSurface * coefficientXLiftWhenZPositiveFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedZSurface; if (flag6) { stalled_surfaces += cachedZSurface; } if (flag3) { analysis_surfaces += cachedZSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencez * cachedZSurface; } } if (surfaceEnableYPositive && tmp_x > 0f) { lift += ProcessLiftnDragOfElement_kturbulencex * (tmp_x * Mathf.Pow(Mathf.Abs(tmp_x), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedXSurface * coefficientYLiftWhenXNegativeFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedXSurface; if (flag4) { stalled_surfaces += cachedXSurface; } if (flag) { analysis_surfaces += cachedXSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencex * cachedXSurface; } } if (surfaceEnableYNegative && tmp_x < 0f) { lift += ProcessLiftnDragOfElement_kturbulencex * ((0f - tmp_x) * Mathf.Pow(Mathf.Abs(tmp_x), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedXSurface * coefficientYLiftWhenXPositiveFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedXSurface; if (flag4) { stalled_surfaces += cachedXSurface; } if (flag) { analysis_surfaces += cachedXSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencex * cachedXSurface; } } if (surfaceEnableYPositive && tmp_z > 0f) { lift += ProcessLiftnDragOfElement_kturbulencez * (tmp_z * Mathf.Pow(Mathf.Abs(tmp_z), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedZSurface * coefficientYLiftWhenZNegativeFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedZSurface; if (flag6) { stalled_surfaces += cachedZSurface; } if (flag3) { analysis_surfaces += cachedZSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencez * cachedZSurface; } } if (surfaceEnableYNegative && tmp_z < 0f) { lift += ProcessLiftnDragOfElement_kturbulencez * ((0f - tmp_z) * Mathf.Pow(Mathf.Abs(tmp_z), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedZSurface * coefficientYLiftWhenZPositiveFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedZSurface; if (flag6) { stalled_surfaces += cachedZSurface; } if (flag3) { analysis_surfaces += cachedZSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencez * cachedZSurface; } } if (surfaceEnableZPositive && tmp_x > 0f) { lift += ProcessLiftnDragOfElement_kturbulencex * (tmp_x * Mathf.Pow(Mathf.Abs(tmp_x), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedXSurface * coefficientZLiftWhenXNegativeFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedXSurface; if (flag4) { stalled_surfaces += cachedXSurface; } if (flag) { analysis_surfaces += cachedXSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencex * cachedXSurface; } } if (surfaceEnableZNegative && tmp_x < 0f) { lift += ProcessLiftnDragOfElement_kturbulencex * ((0f - tmp_x) * Mathf.Pow(Mathf.Abs(tmp_x), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedXSurface * coefficientZLiftWhenXPositiveFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedXSurface; if (flag4) { stalled_surfaces += cachedXSurface; } if (flag) { analysis_surfaces += cachedXSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencex * cachedXSurface; } } if (surfaceEnableZPositive && tmp_y > 0f) { lift += ProcessLiftnDragOfElement_kturbulencey * (tmp_y * Mathf.Pow(Mathf.Abs(tmp_y), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedYSurface * coefficientZLiftWhenYNegativeFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedYSurface; if (flag5) { stalled_surfaces += cachedYSurface; } if (flag2) { analysis_surfaces += cachedYSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencey * cachedYSurface; } } if (surfaceEnableZNegative && tmp_y < 0f) { lift += ProcessLiftnDragOfElement_kturbulencey * ((0f - tmp_y) * Mathf.Pow(Mathf.Abs(tmp_y), tmp_coefficientExponent - 1f) * tmp_transform.up * cachedYSurface * coefficientZLiftWhenYPositiveFlow * klift * ProcessLiftnDragOfElement_klift); total_surfaces += cachedYSurface; if (flag5) { stalled_surfaces += cachedYSurface; } if (flag2) { analysis_surfaces += cachedYSurface; laminar_surfaces += ProcessLiftnDragOfElement_kturbulencey * cachedYSurface; } } if (((Vector3)(ref drag)).magnitude > max_magnitude_now) { max_magnitude_now = ((Vector3)(ref drag)).magnitude; } if (((Vector3)(ref lift)).magnitude > max_magnitude_now) { max_magnitude_now = ((Vector3)(ref lift)).magnitude; } if (simulationForcesActive && globalApplyForceVectors) { if (kineticsFiltersEnabled && Vector3.Magnitude(drag) > ((Component)this).gameObject.GetComponent().mass * kineticsDragForceByMassUnitLimit / globalSimulationScale) { drag = drag / Vector3.Magnitude(drag) * ((Component)this).gameObject.GetComponent().mass * kineticsDragForceByMassUnitLimit / globalSimulationScale; } if (kineticsFiltersEnabled && Vector3.Magnitude(lift) > ((Component)this).gameObject.GetComponent().mass * kineticsLiftForceByMassUnitLimit / globalSimulationScale) { lift = lift / Vector3.Magnitude(lift) * ((Component)this).gameObject.GetComponent().mass * kineticsLiftForceByMassUnitLimit / globalSimulationScale; } } if (globalRenderForceVectors && (Object)(object)tmp_lineRenderer != (Object)null) { ((Renderer)tmp_lineRenderer).material = tmp_lineRenderer_material; tmp_lineRenderer.SetVertexCount(2); tmp_lineRenderer.SetWidth(0.1f * globalSimulationScale, 0f * globalSimulationScale); tmp_lineRenderer.SetPosition(0, tmp_transform.position); tmp_lineRenderer.SetPosition(1, tmp_transform.position + (drag + lift) / max_magnitude * 3f); } if ((Object)(object)gsurf != (Object)null) { gsurf.lastPosition = tmp_transform.position; gsurf.drag = gsurf.drag * (1f - kineticsDragFilter * globalSimulationScale) + drag * kineticsDragFilter * globalSimulationScale; gsurf.lift = gsurf.lift * (1f - kineticsLiftFilter * globalSimulationScale) + lift * kineticsLiftFilter * globalSimulationScale; } else if (gsurfdesc != null) { gsurfdesc.lastPosition = tmp_transform.position; gsurfdesc.drag = gsurfdesc.drag * (1f - kineticsDragFilter * globalSimulationScale) + drag * kineticsDragFilter * globalSimulationScale; gsurfdesc.lift = gsurfdesc.lift * (1f - kineticsLiftFilter * globalSimulationScale) + lift * kineticsLiftFilter * globalSimulationScale; } if (surfaceDebug) { string text = ""; text += ((surfaceEnableXPositive && !(tmp_x <= 0f)) ? "1" : "0"); text += ((surfaceEnableXNegative && !(tmp_x >= 0f)) ? "1" : "0"); text += ((surfaceEnableYPositive && !(tmp_y <= 0f)) ? "1" : "0"); text += ((surfaceEnableYNegative && !(tmp_y >= 0f)) ? "1" : "0"); text += ((surfaceEnableZPositive && !(tmp_z <= 0f)) ? "1" : "0"); text += ((surfaceEnableZNegative && !(tmp_z >= 0f)) ? "1" : "0"); text += "-"; text += ((surfaceEnableXPositive && !(tmp_y <= 0f)) ? "1" : "0"); text += ((surfaceEnableXNegative && !(tmp_y >= 0f)) ? "1" : "0"); text += ((surfaceEnableXPositive && !(tmp_z <= 0f)) ? "1" : "0"); text += ((surfaceEnableXNegative && !(tmp_z >= 0f)) ? "1" : "0"); text += ((surfaceEnableYPositive && !(tmp_x <= 0f)) ? "1" : "0"); text += ((surfaceEnableYNegative && !(tmp_x >= 0f)) ? "1" : "0"); text += ((surfaceEnableYPositive && !(tmp_z <= 0f)) ? "1" : "0"); text += ((surfaceEnableYNegative && !(tmp_z >= 0f)) ? "1" : "0"); text += ((surfaceEnableZPositive && !(tmp_x <= 0f)) ? "1" : "0"); text += ((surfaceEnableZNegative && !(tmp_x >= 0f)) ? "1" : "0"); text += ((surfaceEnableZPositive && !(tmp_y <= 0f)) ? "1" : "0"); text += ((surfaceEnableZNegative && !(tmp_y >= 0f)) ? "1" : "0"); if (globalDebugMore) { log("surf name(" + ProcessLiftnDragOfElement_kname + ") flags(" + text + ") speed(" + tmp_x + ", " + tmp_y + ", " + tmp_z + ") turbulence(" + ProcessLiftnDragOfElement_kturbulencex + ", " + ProcessLiftnDragOfElement_kturbulencey + ", " + ProcessLiftnDragOfElement_kturbulencez + ") drag-n-lift" + ((object)(Vector3)(ref drag)).ToString() + " shape-lift" + ((object)(Vector3)(ref lift)).ToString() + ""); } } } public void ProcessLiftnDragOfElement2ndPass(GSurface gsurf, LabeledSurfaceDesc gsurfdesc) { //IL_004a: 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_0060: 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_009b: 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_00b1: 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) if (!simulationForcesActive || !globalApplyForceVectors || Input.GetKey((KeyCode)122)) { return; } if ((Object)(object)gsurf != (Object)null) { if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition((gsurf.drag + gsurf.lift) * globalSimulationScale, ((Component)gsurf).transform.position); } } else if (gsurfdesc != null && simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition((gsurfdesc.drag + gsurfdesc.lift) * globalSimulationScale, gsurfdesc.gameObject.transform.position); } } public void ProcessLiftnDrag_in_update() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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) if (kineticsFiltersEnabled) { kineticsAngularVelocity_lastValue.x = kineticsAngularVelocity_lastValue.x * (1f - kineticsAngularVelocityFilter) + ((Component)this).gameObject.GetComponent().angularVelocity.x * kineticsAngularVelocityFilter; kineticsAngularVelocity_lastValue.y = kineticsAngularVelocity_lastValue.y * (1f - kineticsAngularVelocityFilter) + ((Component)this).gameObject.GetComponent().angularVelocity.y * kineticsAngularVelocityFilter; kineticsAngularVelocity_lastValue.z = kineticsAngularVelocity_lastValue.z * (1f - kineticsAngularVelocityFilter) + ((Component)this).gameObject.GetComponent().angularVelocity.z * kineticsAngularVelocityFilter; if (((Vector3)(ref kineticsAngularVelocity_lastValue)).magnitude > kineticsAngularVelocityLimit) { kineticsAngularVelocity_lastValue *= kineticsAngularVelocityLimit / ((Vector3)(ref kineticsAngularVelocity_lastValue)).magnitude; } } } public void ProcessLiftnDrag() { //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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) neg_windspeed = -GWindBasic.windAt(((Component)this).gameObject.transform.position) - vibrationGet(); airdensity = 1.196f * Mathf.Pow(0.00055f, (((Component)this).gameObject.transform.position.y + height) / 60000f); kdrag = airdensity * 0.5f * globalDragMultiplier; klift = airdensity * 0.5f * globalLiftMultiplier; Vector3 val = ((Component)this).gameObject.transform.TransformPoint(center); Vector3 down = Vector3.down; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val + down * kineticsGroundEffectProbeMinDistance, down, ref val2, 1E+09f, LayerMask.op_Implicit(kineticsGroundEffectLayermask))) { distanceToGround = ((RaycastHit)(ref val2)).distance; yPositionOfGround = ((RaycastHit)(ref val2)).point.y; } else { distanceToGround = 1E+09f; } if (GAircraftDropPointVelocity) { speed_lastPosition = ((Component)this).gameObject.transform.position; } floor_effect_add = 0f; floor_effect_ctr = 0f; total_effect_add = 0f; total_effect_ctr = 0f; stalled_surfaces = 0f; laminar_surfaces = 0f; analysis_surfaces = 0f; total_surfaces = 0f; for (int i = 0; i < surfaces_count; i++) { ProcessLiftnDragOfElement(surfaces[i], null); } for (int j = 0; j < labeled_surfaces_count; j++) { ProcessLiftnDragOfElement(null, labeled_surfaces[j]); } for (int k = 0; k < surfaces_count; k++) { ProcessLiftnDragOfElement2ndPass(surfaces[k], null); } for (int l = 0; l < labeled_surfaces_count; l++) { ProcessLiftnDragOfElement2ndPass(null, labeled_surfaces[l]); } if (analysis_surfaces > 0f) { stall = stalled_surfaces / analysis_surfaces; } else { stall = 0f; } max_magnitude = max_magnitude * 0.999f + max_magnitude_now * 0.001f; if (max_magnitude < 0.1f) { max_magnitude = 0.1f; } } public void ProcessPivots() { //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_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_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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_028b: 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_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_120e: Unknown result type (might be due to invalid IL or missing references) //IL_2176: Unknown result type (might be due to invalid IL or missing references) if (gaugesAltimeterGenerate) { gaugesAltimeter_output = (((Component)this).gameObject.transform.position.y + height) / globalSimulationScale; } if (gaugesVarioGenerate) { gaugesVario_output = (((Component)this).gameObject.transform.position.y + height - gaugesVario_lastValue) / Time.fixedDeltaTime / globalSimulationScale; } gaugesVario_lastValue = ((Component)this).gameObject.transform.position.y + height; if (gaugesRpmGenerate) { gaugesRpm_output = (gaugesShaft_output - gaugesRpm_lastValue) / 360f / Time.fixedDeltaTime * 60f / 4f; } else if (!gaugesRpmGenerate) { gaugesRpm_output -= 100f; if (gaugesRpm_output < 0f) { gaugesRpm_output = 0f; } } gaugesRpm_lastValue = gaugesShaft_output; float num = speed * (1f - speed_filter); Vector3 val = ((Component)this).gameObject.transform.position - speed_lastPosition; speed = num + ((Vector3)(ref val)).magnitude / Time.fixedDeltaTime * speed_filter; speed_lastPosition = ((Component)this).gameObject.transform.position; if (gaugesAirspeedGenerate) { neg_windspeed = -GWindBasic.windAt(((Component)this).gameObject.transform.position) - vibrationGet(); gaugesAirspeed_output = (((Vector3)(ref rigidbodyVelocity)).magnitude + ((Vector3)(ref neg_windspeed)).magnitude) / globalSimulationScale; } if (gaugesHeadingGenerate) { gaugesHeading_output = Mathf.Atan(((Component)this).gameObject.transform.forward.x / ((Component)this).gameObject.transform.forward.z) * 180f / (float)Math.PI; } if (gaugesGsGenerate) { gaugesGs_output = Vector3.Dot(rigidbodyVelocity - gaugesGs_lastValue, ((Component)this).gameObject.transform.up) / globalSimulationScale; } if (gaugesGsGenerate) { gaugesHGs_output = Vector3.Dot(rigidbodyVelocity - gaugesGs_lastValue, ((Component)this).gameObject.transform.right) / globalSimulationScale; } gaugesGs_lastValue = rigidbodyVelocity; for (int i = 0; i < surfacepivots_count; i++) { float num2 = 0f; switch (surfacepivots[i].ch1Source) { case GPivot.TAxisSource.dummy: num2 += surfacepivots[i].ch1PivotAngleWhenMin; break; case GPivot.TAxisSource.any: { float anyPivot = GPivot.getAnyPivot(surfacepivots[i].ch1SourceName); num2 = ((!((double)Mathf.Abs(surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) < 1E-06)) ? (num2 + (surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * anyPivot)) : (num2 + (anyPivot - surfacepivots[i].ch1PivotAngleWhenMin) * 360f * surfacepivots[i].ch1PivotTurnsPerUnit)); break; } case GPivot.TAxisSource.elevator: num2 += surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * inputElevator_output; break; case GPivot.TAxisSource.ailerons: num2 += surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * inputAilerons_output; break; case GPivot.TAxisSource.rudder: num2 += surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * inputRudder_output; break; case GPivot.TAxisSource.gearsdown: num2 += surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * inputGears_output; break; case GPivot.TAxisSource.flapsdown: num2 += surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * inputFlaps_output; break; case GPivot.TAxisSource.brakes: num2 += surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * inputBrakes_output; break; case GPivot.TAxisSource.engine: num2 += gaugesShaft_output; break; case GPivot.TAxisSource.throttle: num2 += surfacepivots[i].ch1PivotAngleWhenMin + (surfacepivots[i].ch1PivotAngleWhenMax - surfacepivots[i].ch1PivotAngleWhenMin) * surfacepivots[i].ch1PivotTurnsPerUnit * inputThrottle_output; break; case GPivot.TAxisSource.altimeter: num2 += (gaugesAltimeter_output - surfacepivots[i].ch1PivotAngleWhenMin) * 360f * surfacepivots[i].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.vario: num2 += (gaugesVario_output - surfacepivots[i].ch1PivotAngleWhenMin) * 360f * surfacepivots[i].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.rpm: num2 += (gaugesRpm_output - surfacepivots[i].ch1PivotAngleWhenMin) * 360f * surfacepivots[i].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.velocity: num2 += (gaugesAirspeed_output - surfacepivots[i].ch1PivotAngleWhenMin) * 360f * surfacepivots[i].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.heading: num2 += (gaugesHeading_output - surfacepivots[i].ch1PivotAngleWhenMin) * 360f * surfacepivots[i].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.gs: num2 += (gaugesGs_output - surfacepivots[i].ch1PivotAngleWhenMin) * 360f * surfacepivots[i].ch1PivotTurnsPerUnit; break; } switch (surfacepivots[i].ch2Source) { case GPivot.TAxisSource.dummy: num2 += surfacepivots[i].ch2PivotAngleWhenMin; break; case GPivot.TAxisSource.any: { float anyPivot2 = GPivot.getAnyPivot(surfacepivots[i].ch2SourceName); num2 = ((!((double)Mathf.Abs(surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) < 1E-06)) ? (num2 + (surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * anyPivot2)) : (num2 + (anyPivot2 - surfacepivots[i].ch2PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit)); break; } case GPivot.TAxisSource.elevator: num2 += surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * inputElevator_output; break; case GPivot.TAxisSource.ailerons: num2 += surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * inputAilerons_output; break; case GPivot.TAxisSource.rudder: num2 += surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * inputRudder_output; break; case GPivot.TAxisSource.gearsdown: num2 += surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * inputGears_output; break; case GPivot.TAxisSource.flapsdown: num2 += surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * inputFlaps_output; break; case GPivot.TAxisSource.brakes: num2 += surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * inputBrakes_output; break; case GPivot.TAxisSource.engine: num2 += gaugesShaft_output; break; case GPivot.TAxisSource.throttle: num2 += surfacepivots[i].ch2PivotAngleWhenMin + (surfacepivots[i].ch2PivotAngleWhenMax - surfacepivots[i].ch2PivotAngleWhenMin) * surfacepivots[i].ch2PivotTurnsPerUnit * inputThrottle_output; break; case GPivot.TAxisSource.altimeter: num2 += (gaugesAltimeter_output - surfacepivots[i].ch2PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.vario: num2 += (gaugesVario_output - surfacepivots[i].ch2PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.rpm: num2 += (gaugesRpm_output - surfacepivots[i].ch2PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.velocity: num2 += (gaugesAirspeed_output - surfacepivots[i].ch2PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.heading: num2 += (gaugesHeading_output - surfacepivots[i].ch2PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.gs: num2 += (gaugesGs_output - surfacepivots[i].ch2PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit; break; } switch (surfacepivots[i].ch3Source) { case GPivot.TAxisSource.dummy: num2 += surfacepivots[i].ch3PivotAngleWhenMin; break; case GPivot.TAxisSource.any: { float anyPivot3 = GPivot.getAnyPivot(surfacepivots[i].ch3SourceName); num2 = ((!((double)Mathf.Abs(surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) < 1E-06)) ? (num2 + (surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * anyPivot3)) : (num2 + (anyPivot3 - surfacepivots[i].ch3PivotAngleWhenMin) * 360f * surfacepivots[i].ch3PivotTurnsPerUnit)); break; } case GPivot.TAxisSource.elevator: num2 += surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * inputElevator_output; break; case GPivot.TAxisSource.ailerons: num2 += surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * inputAilerons_output; break; case GPivot.TAxisSource.rudder: num2 += surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * inputRudder_output; break; case GPivot.TAxisSource.gearsdown: num2 += surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * inputGears_output; break; case GPivot.TAxisSource.flapsdown: num2 += surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * inputFlaps_output; break; case GPivot.TAxisSource.brakes: num2 += surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * inputBrakes_output; break; case GPivot.TAxisSource.engine: num2 += gaugesShaft_output; break; case GPivot.TAxisSource.throttle: num2 += surfacepivots[i].ch3PivotAngleWhenMin + (surfacepivots[i].ch3PivotAngleWhenMax - surfacepivots[i].ch3PivotAngleWhenMin) * surfacepivots[i].ch3PivotTurnsPerUnit * inputThrottle_output; break; case GPivot.TAxisSource.altimeter: num2 += (gaugesAltimeter_output - surfacepivots[i].ch3PivotAngleWhenMin) * 360f * surfacepivots[i].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.vario: num2 += (gaugesVario_output - surfacepivots[i].ch3PivotAngleWhenMin) * 360f * surfacepivots[i].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.rpm: num2 += (gaugesRpm_output - surfacepivots[i].ch3PivotAngleWhenMin) * 360f * surfacepivots[i].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.velocity: num2 += (gaugesAirspeed_output - surfacepivots[i].ch3PivotAngleWhenMin) * 360f * surfacepivots[i].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.heading: num2 += (gaugesHeading_output - surfacepivots[i].ch3PivotAngleWhenMin) * 360f * surfacepivots[i].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.gs: num2 += (gaugesGs_output - surfacepivots[i].ch3PivotAngleWhenMin) * 360f * surfacepivots[i].ch3PivotTurnsPerUnit; break; } if (num2 < surfacepivots[i].limitMin) { num2 = surfacepivots[i].limitMin; } if (num2 > surfacepivots[i].limitMax) { num2 = surfacepivots[i].limitMax; } GPivot.setAnyPivot(surfacepivots[i].id, num2); switch (surfacepivots[i].rotationPivotAxis) { case GPivot.TAxisOrientation.up: ((Vector3)(ref surfacepivots[i].localEulerAngles)).Set(surfacepivots[i].rotationAroundRightOffset, surfacepivots[i].rotationAroundUpOffset + num2, surfacepivots[i].rotationAroundForwardOffset); break; case GPivot.TAxisOrientation.right: ((Vector3)(ref surfacepivots[i].localEulerAngles)).Set(surfacepivots[i].rotationAroundRightOffset + num2, surfacepivots[i].rotationAroundUpOffset, surfacepivots[i].rotationAroundForwardOffset); break; case GPivot.TAxisOrientation.forward: ((Vector3)(ref surfacepivots[i].localEulerAngles)).Set(surfacepivots[i].rotationAroundRightOffset, surfacepivots[i].rotationAroundUpOffset, surfacepivots[i].rotationAroundForwardOffset + num2); break; } ((Component)surfacepivots[i]).transform.localEulerAngles = surfacepivots[i].localEulerAngles; } for (int j = 0; j < labeled_surfacepivots_count; j++) { float num3 = 0f; switch (labeled_surfacepivots[j].ch1Source) { case GPivot.TAxisSource.dummy: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin; break; case GPivot.TAxisSource.any: { float anyPivot4 = GPivot.getAnyPivot(labeled_surfacepivots[j].ch1SourceName); num3 = ((!((double)Mathf.Abs(labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) < 1E-06)) ? (num3 + (labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * anyPivot4)) : (num3 + (anyPivot4 - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch1PivotTurnsPerUnit)); break; } case GPivot.TAxisSource.elevator: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * inputElevator_output; break; case GPivot.TAxisSource.ailerons: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * inputAilerons_output; break; case GPivot.TAxisSource.rudder: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * inputRudder_output; break; case GPivot.TAxisSource.gearsdown: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * inputGears_output; break; case GPivot.TAxisSource.flapsdown: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * inputFlaps_output; break; case GPivot.TAxisSource.brakes: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * inputBrakes_output; break; case GPivot.TAxisSource.engine: num3 += gaugesShaft_output; break; case GPivot.TAxisSource.throttle: num3 += labeled_surfacepivots[j].ch1PivotAngleWhenMin + (labeled_surfacepivots[j].ch1PivotAngleWhenMax - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * labeled_surfacepivots[j].ch1PivotTurnsPerUnit * inputThrottle_output; break; case GPivot.TAxisSource.altimeter: num3 += (gaugesAltimeter_output - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.vario: num3 += (gaugesVario_output - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.rpm: num3 += (gaugesRpm_output - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.velocity: num3 += (gaugesAirspeed_output - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.heading: num3 += (gaugesHeading_output - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch1PivotTurnsPerUnit; break; case GPivot.TAxisSource.gs: num3 += (gaugesGs_output - labeled_surfacepivots[j].ch1PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch1PivotTurnsPerUnit; break; } switch (labeled_surfacepivots[j].ch2Source) { case GPivot.TAxisSource.dummy: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin; break; case GPivot.TAxisSource.any: { float anyPivot5 = GPivot.getAnyPivot(labeled_surfacepivots[j].ch2SourceName); num3 = ((!((double)Mathf.Abs(labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) < 1E-06)) ? (num3 + (labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * anyPivot5)) : (num3 + (anyPivot5 - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch2PivotTurnsPerUnit)); break; } case GPivot.TAxisSource.elevator: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * inputElevator_output; break; case GPivot.TAxisSource.ailerons: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * inputAilerons_output; break; case GPivot.TAxisSource.rudder: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * inputRudder_output; break; case GPivot.TAxisSource.gearsdown: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * inputGears_output; break; case GPivot.TAxisSource.flapsdown: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * inputFlaps_output; break; case GPivot.TAxisSource.brakes: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * inputBrakes_output; break; case GPivot.TAxisSource.engine: num3 += gaugesShaft_output; break; case GPivot.TAxisSource.throttle: num3 += labeled_surfacepivots[j].ch2PivotAngleWhenMin + (labeled_surfacepivots[j].ch2PivotAngleWhenMax - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * labeled_surfacepivots[j].ch2PivotTurnsPerUnit * inputThrottle_output; break; case GPivot.TAxisSource.altimeter: num3 += (gaugesAltimeter_output - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.vario: num3 += (gaugesVario_output - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.rpm: num3 += (gaugesRpm_output - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.velocity: num3 += (gaugesAirspeed_output - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.heading: num3 += (gaugesHeading_output - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch2PivotTurnsPerUnit; break; case GPivot.TAxisSource.gs: num3 += (gaugesGs_output - labeled_surfacepivots[j].ch2PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch2PivotTurnsPerUnit; break; } switch (labeled_surfacepivots[j].ch3Source) { case GPivot.TAxisSource.dummy: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin; break; case GPivot.TAxisSource.any: { float anyPivot6 = GPivot.getAnyPivot(labeled_surfacepivots[j].ch3SourceName); num3 = ((!((double)Mathf.Abs(labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) < 1E-06)) ? (num3 + (labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * anyPivot6)) : (num3 + (anyPivot6 - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch3PivotTurnsPerUnit)); break; } case GPivot.TAxisSource.elevator: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * inputElevator_output; break; case GPivot.TAxisSource.ailerons: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * inputAilerons_output; break; case GPivot.TAxisSource.rudder: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * inputRudder_output; break; case GPivot.TAxisSource.gearsdown: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * inputGears_output; break; case GPivot.TAxisSource.flapsdown: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * inputFlaps_output; break; case GPivot.TAxisSource.brakes: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * inputBrakes_output; break; case GPivot.TAxisSource.engine: num3 += gaugesShaft_output; break; case GPivot.TAxisSource.throttle: num3 += labeled_surfacepivots[j].ch3PivotAngleWhenMin + (labeled_surfacepivots[j].ch3PivotAngleWhenMax - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * labeled_surfacepivots[j].ch3PivotTurnsPerUnit * inputThrottle_output; break; case GPivot.TAxisSource.altimeter: num3 += (gaugesAltimeter_output - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.vario: num3 += (gaugesVario_output - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.rpm: num3 += (gaugesRpm_output - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.velocity: num3 += (gaugesAirspeed_output - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.heading: num3 += (gaugesHeading_output - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch3PivotTurnsPerUnit; break; case GPivot.TAxisSource.gs: num3 += (gaugesGs_output - labeled_surfacepivots[j].ch3PivotAngleWhenMin) * 360f * labeled_surfacepivots[j].ch3PivotTurnsPerUnit; break; } if (num3 < labeled_surfacepivots[j].limitMin) { num3 = labeled_surfacepivots[j].limitMin; } if (num3 > labeled_surfacepivots[j].limitMax) { num3 = labeled_surfacepivots[j].limitMax; } GPivot.setAnyPivot(labeled_surfacepivots[j].id, num3); switch (labeled_surfacepivots[j].rotationPivotAxis) { case GPivot.TAxisOrientation.up: ((Vector3)(ref labeled_surfacepivots[j].localEulerAngles)).Set(labeled_surfacepivots[j].rotationAroundRightOffset, labeled_surfacepivots[j].rotationAroundUpOffset + num3, labeled_surfacepivots[j].rotationAroundForwardOffset); break; case GPivot.TAxisOrientation.right: ((Vector3)(ref labeled_surfacepivots[j].localEulerAngles)).Set(labeled_surfacepivots[j].rotationAroundRightOffset + num3, labeled_surfacepivots[j].rotationAroundUpOffset, labeled_surfacepivots[j].rotationAroundForwardOffset); break; case GPivot.TAxisOrientation.forward: ((Vector3)(ref labeled_surfacepivots[j].localEulerAngles)).Set(labeled_surfacepivots[j].rotationAroundRightOffset, labeled_surfacepivots[j].rotationAroundUpOffset, labeled_surfacepivots[j].rotationAroundForwardOffset + num3); break; } labeled_surfacepivots[j].gameObject.transform.localEulerAngles = labeled_surfacepivots[j].localEulerAngles; } } public void SetDrives(float engine_throttle) { kThrottle_ntr_multiplier = 1f; kThrottle_ntr_time = 0f; for (int i = 0; i < surfacedrives_count; i++) { surfacedrives[i].drive_shaft = 0f; surfacedrives[i].drive_rpm = engine_throttle * surfacedrives[i].throttleRpmConversionRatio; } for (int j = 0; j < labeled_surfacedrives_count; j++) { labeled_surfacedrives[j].drive_shaft = 0f; labeled_surfacedrives[j].drive_rpm = engine_throttle * labeled_surfacedrives[j].throttleRpmConversionRatio; } } public void ProcessDrives() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00ef: 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_00ff: 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_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_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_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_1971: Unknown result type (might be due to invalid IL or missing references) //IL_197e: 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_198d: Unknown result type (might be due to invalid IL or missing references) //IL_1993: Unknown result type (might be due to invalid IL or missing references) //IL_1998: Unknown result type (might be due to invalid IL or missing references) //IL_199d: Unknown result type (might be due to invalid IL or missing references) //IL_1cfd: Unknown result type (might be due to invalid IL or missing references) //IL_1d15: Unknown result type (might be due to invalid IL or missing references) //IL_1d20: Unknown result type (might be due to invalid IL or missing references) //IL_1d2b: Unknown result type (might be due to invalid IL or missing references) //IL_1d36: Unknown result type (might be due to invalid IL or missing references) //IL_1d3b: Unknown result type (might be due to invalid IL or missing references) //IL_1d40: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_19b5: Unknown result type (might be due to invalid IL or missing references) //IL_19cb: Unknown result type (might be due to invalid IL or missing references) //IL_19d0: Unknown result type (might be due to invalid IL or missing references) //IL_19db: Unknown result type (might be due to invalid IL or missing references) //IL_19e0: Unknown result type (might be due to invalid IL or missing references) //IL_19e5: Unknown result type (might be due to invalid IL or missing references) //IL_1d7b: Unknown result type (might be due to invalid IL or missing references) //IL_1d80: Unknown result type (might be due to invalid IL or missing references) //IL_1d86: Unknown result type (might be due to invalid IL or missing references) //IL_1d8b: Unknown result type (might be due to invalid IL or missing references) //IL_1d90: Unknown result type (might be due to invalid IL or missing references) //IL_1ecd: Unknown result type (might be due to invalid IL or missing references) //IL_1ed2: Unknown result type (might be due to invalid IL or missing references) //IL_1ed8: Unknown result type (might be due to invalid IL or missing references) //IL_1edd: Unknown result type (might be due to invalid IL or missing references) //IL_1ee2: Unknown result type (might be due to invalid IL or missing references) //IL_205d: Unknown result type (might be due to invalid IL or missing references) //IL_206b: Unknown result type (might be due to invalid IL or missing references) //IL_2070: Unknown result type (might be due to invalid IL or missing references) //IL_207a: Unknown result type (might be due to invalid IL or missing references) //IL_2080: Unknown result type (might be due to invalid IL or missing references) //IL_2085: Unknown result type (might be due to invalid IL or missing references) //IL_208a: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_1efa: Unknown result type (might be due to invalid IL or missing references) //IL_1f10: Unknown result type (might be due to invalid IL or missing references) //IL_1f15: Unknown result type (might be due to invalid IL or missing references) //IL_1f20: Unknown result type (might be due to invalid IL or missing references) //IL_1f25: Unknown result type (might be due to invalid IL or missing references) //IL_1f2a: Unknown result type (might be due to invalid IL or missing references) //IL_4913: Unknown result type (might be due to invalid IL or missing references) //IL_4921: Unknown result type (might be due to invalid IL or missing references) //IL_4926: Unknown result type (might be due to invalid IL or missing references) //IL_4930: Unknown result type (might be due to invalid IL or missing references) //IL_4936: Unknown result type (might be due to invalid IL or missing references) //IL_493b: Unknown result type (might be due to invalid IL or missing references) //IL_4940: 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_0556: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0538: 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_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_1a1d: Unknown result type (might be due to invalid IL or missing references) //IL_1a22: Unknown result type (might be due to invalid IL or missing references) //IL_1e11: Unknown result type (might be due to invalid IL or missing references) //IL_1e16: Unknown result type (might be due to invalid IL or missing references) //IL_210b: Unknown result type (might be due to invalid IL or missing references) //IL_2110: Unknown result type (might be due to invalid IL or missing references) //IL_4958: Unknown result type (might be due to invalid IL or missing references) //IL_496e: Unknown result type (might be due to invalid IL or missing references) //IL_4973: Unknown result type (might be due to invalid IL or missing references) //IL_497e: Unknown result type (might be due to invalid IL or missing references) //IL_4983: Unknown result type (might be due to invalid IL or missing references) //IL_4988: Unknown result type (might be due to invalid IL or missing references) //IL_1e8d: Unknown result type (might be due to invalid IL or missing references) //IL_1e92: Unknown result type (might be due to invalid IL or missing references) //IL_1fac: Unknown result type (might be due to invalid IL or missing references) //IL_1fb1: Unknown result type (might be due to invalid IL or missing references) //IL_2187: 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_21de: Unknown result type (might be due to invalid IL or missing references) //IL_21e9: Unknown result type (might be due to invalid IL or missing references) //IL_21ee: Unknown result type (might be due to invalid IL or missing references) //IL_21cb: Unknown result type (might be due to invalid IL or missing references) //IL_21d0: Unknown result type (might be due to invalid IL or missing references) //IL_2028: Unknown result type (might be due to invalid IL or missing references) //IL_202d: Unknown result type (might be due to invalid IL or missing references) //IL_49c0: Unknown result type (might be due to invalid IL or missing references) //IL_49c5: Unknown result type (might be due to invalid IL or missing references) //IL_1c13: Unknown result type (might be due to invalid IL or missing references) //IL_1c18: 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_1c8f: Unknown result type (might be due to invalid IL or missing references) //IL_1c94: Unknown result type (might be due to invalid IL or missing references) //IL_4bb6: Unknown result type (might be due to invalid IL or missing references) //IL_4bbb: Unknown result type (might be due to invalid IL or missing references) //IL_4aab: Unknown result type (might be due to invalid IL or missing references) //IL_4ab0: Unknown result type (might be due to invalid IL or missing references) //IL_4c32: Unknown result type (might be due to invalid IL or missing references) //IL_4c37: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_0a7f: Unknown result type (might be due to invalid IL or missing references) //IL_0a85: Unknown result type (might be due to invalid IL or missing references) //IL_0a8a: Unknown result type (might be due to invalid IL or missing references) //IL_0a9a: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: Unknown result type (might be due to invalid IL or missing references) //IL_0e95: Unknown result type (might be due to invalid IL or missing references) //IL_099b: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08d4: Unknown result type (might be due to invalid IL or missing references) //IL_1129: Unknown result type (might be due to invalid IL or missing references) //IL_112e: Unknown result type (might be due to invalid IL or missing references) //IL_24a1: Unknown result type (might be due to invalid IL or missing references) //IL_24a6: Unknown result type (might be due to invalid IL or missing references) //IL_3a8b: Unknown result type (might be due to invalid IL or missing references) //IL_3a91: Unknown result type (might be due to invalid IL or missing references) //IL_3a96: Unknown result type (might be due to invalid IL or missing references) //IL_3aa6: Unknown result type (might be due to invalid IL or missing references) //IL_3e5c: Unknown result type (might be due to invalid IL or missing references) //IL_3e61: Unknown result type (might be due to invalid IL or missing references) //IL_1153: Unknown result type (might be due to invalid IL or missing references) //IL_1158: Unknown result type (might be due to invalid IL or missing references) //IL_2652: Unknown result type (might be due to invalid IL or missing references) //IL_2657: Unknown result type (might be due to invalid IL or missing references) //IL_257c: Unknown result type (might be due to invalid IL or missing references) //IL_2581: Unknown result type (might be due to invalid IL or missing references) //IL_280a: Unknown result type (might be due to invalid IL or missing references) //IL_2822: Unknown result type (might be due to invalid IL or missing references) //IL_2833: Unknown result type (might be due to invalid IL or missing references) //IL_284b: Unknown result type (might be due to invalid IL or missing references) //IL_285c: Unknown result type (might be due to invalid IL or missing references) //IL_2874: Unknown result type (might be due to invalid IL or missing references) //IL_2a32: Unknown result type (might be due to invalid IL or missing references) //IL_2a37: Unknown result type (might be due to invalid IL or missing references) //IL_2a56: Unknown result type (might be due to invalid IL or missing references) //IL_2a6e: 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_2a92: Unknown result type (might be due to invalid IL or missing references) //IL_2a9e: Unknown result type (might be due to invalid IL or missing references) //IL_2ab6: Unknown result type (might be due to invalid IL or missing references) //IL_27a3: Unknown result type (might be due to invalid IL or missing references) //IL_27a8: Unknown result type (might be due to invalid IL or missing references) //IL_1371: Unknown result type (might be due to invalid IL or missing references) //IL_1395: Unknown result type (might be due to invalid IL or missing references) //IL_13a0: Unknown result type (might be due to invalid IL or missing references) //IL_13b7: Unknown result type (might be due to invalid IL or missing references) //IL_13ce: Unknown result type (might be due to invalid IL or missing references) //IL_13e0: Unknown result type (might be due to invalid IL or missing references) //IL_13ea: Unknown result type (might be due to invalid IL or missing references) //IL_13ef: Unknown result type (might be due to invalid IL or missing references) //IL_17a1: Unknown result type (might be due to invalid IL or missing references) //IL_17b3: Unknown result type (might be due to invalid IL or missing references) //IL_17be: 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_42d7: Unknown result type (might be due to invalid IL or missing references) //IL_42fb: Unknown result type (might be due to invalid IL or missing references) //IL_4306: Unknown result type (might be due to invalid IL or missing references) //IL_431e: Unknown result type (might be due to invalid IL or missing references) //IL_4336: Unknown result type (might be due to invalid IL or missing references) //IL_4349: Unknown result type (might be due to invalid IL or missing references) //IL_4353: Unknown result type (might be due to invalid IL or missing references) //IL_4358: Unknown result type (might be due to invalid IL or missing references) //IL_4723: Unknown result type (might be due to invalid IL or missing references) //IL_4736: Unknown result type (might be due to invalid IL or missing references) //IL_4741: Unknown result type (might be due to invalid IL or missing references) //IL_4759: Unknown result type (might be due to invalid IL or missing references) //IL_143b: 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_146a: Unknown result type (might be due to invalid IL or missing references) //IL_1481: Unknown result type (might be due to invalid IL or missing references) //IL_1498: Unknown result type (might be due to invalid IL or missing references) //IL_14aa: 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_14b9: Unknown result type (might be due to invalid IL or missing references) //IL_1926: Unknown result type (might be due to invalid IL or missing references) //IL_1938: Unknown result type (might be due to invalid IL or missing references) //IL_1943: Unknown result type (might be due to invalid IL or missing references) //IL_195a: Unknown result type (might be due to invalid IL or missing references) //IL_18ea: Unknown result type (might be due to invalid IL or missing references) //IL_18ef: Unknown result type (might be due to invalid IL or missing references) //IL_43a5: Unknown result type (might be due to invalid IL or missing references) //IL_43c9: Unknown result type (might be due to invalid IL or missing references) //IL_43d4: Unknown result type (might be due to invalid IL or missing references) //IL_43ec: Unknown result type (might be due to invalid IL or missing references) //IL_4404: Unknown result type (might be due to invalid IL or missing references) //IL_4417: Unknown result type (might be due to invalid IL or missing references) //IL_4421: Unknown result type (might be due to invalid IL or missing references) //IL_4426: Unknown result type (might be due to invalid IL or missing references) //IL_48c6: Unknown result type (might be due to invalid IL or missing references) //IL_48d9: Unknown result type (might be due to invalid IL or missing references) //IL_48e4: Unknown result type (might be due to invalid IL or missing references) //IL_48fc: Unknown result type (might be due to invalid IL or missing references) //IL_4887: Unknown result type (might be due to invalid IL or missing references) //IL_488c: Unknown result type (might be due to invalid IL or missing references) //IL_1505: Unknown result type (might be due to invalid IL or missing references) //IL_1529: 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_154b: Unknown result type (might be due to invalid IL or missing references) //IL_1562: Unknown result type (might be due to invalid IL or missing references) //IL_1574: Unknown result type (might be due to invalid IL or missing references) //IL_157e: Unknown result type (might be due to invalid IL or missing references) //IL_1583: Unknown result type (might be due to invalid IL or missing references) //IL_188e: Unknown result type (might be due to invalid IL or missing references) //IL_18b3: Unknown result type (might be due to invalid IL or missing references) //IL_18c5: Unknown result type (might be due to invalid IL or missing references) //IL_18cb: Unknown result type (might be due to invalid IL or missing references) //IL_18d0: Unknown result type (might be due to invalid IL or missing references) //IL_2f44: Unknown result type (might be due to invalid IL or missing references) //IL_2f49: Unknown result type (might be due to invalid IL or missing references) //IL_2f4e: Unknown result type (might be due to invalid IL or missing references) //IL_4473: Unknown result type (might be due to invalid IL or missing references) //IL_4497: Unknown result type (might be due to invalid IL or missing references) //IL_44a2: Unknown result type (might be due to invalid IL or missing references) //IL_44ba: Unknown result type (might be due to invalid IL or missing references) //IL_44d2: Unknown result type (might be due to invalid IL or missing references) //IL_44e5: Unknown result type (might be due to invalid IL or missing references) //IL_44ef: Unknown result type (might be due to invalid IL or missing references) //IL_44f4: Unknown result type (might be due to invalid IL or missing references) //IL_481d: Unknown result type (might be due to invalid IL or missing references) //IL_4849: Unknown result type (might be due to invalid IL or missing references) //IL_4861: Unknown result type (might be due to invalid IL or missing references) //IL_4867: Unknown result type (might be due to invalid IL or missing references) //IL_486c: Unknown result type (might be due to invalid IL or missing references) //IL_16c2: Unknown result type (might be due to invalid IL or missing references) //IL_16cf: Unknown result type (might be due to invalid IL or missing references) //IL_16e1: Unknown result type (might be due to invalid IL or missing references) //IL_16f8: Unknown result type (might be due to invalid IL or missing references) //IL_1710: Unknown result type (might be due to invalid IL or missing references) //IL_1715: Unknown result type (might be due to invalid IL or missing references) //IL_171a: Unknown result type (might be due to invalid IL or missing references) //IL_171f: Unknown result type (might be due to invalid IL or missing references) //IL_173a: Unknown result type (might be due to invalid IL or missing references) //IL_1740: Unknown result type (might be due to invalid IL or missing references) //IL_1745: Unknown result type (might be due to invalid IL or missing references) //IL_1769: Unknown result type (might be due to invalid IL or missing references) //IL_176e: Unknown result type (might be due to invalid IL or missing references) //IL_15cf: Unknown result type (might be due to invalid IL or missing references) //IL_15f3: Unknown result type (might be due to invalid IL or missing references) //IL_15fe: Unknown result type (might be due to invalid IL or missing references) //IL_1615: 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_163e: Unknown result type (might be due to invalid IL or missing references) //IL_1648: Unknown result type (might be due to invalid IL or missing references) //IL_164d: Unknown result type (might be due to invalid IL or missing references) //IL_463d: Unknown result type (might be due to invalid IL or missing references) //IL_464b: Unknown result type (might be due to invalid IL or missing references) //IL_465e: Unknown result type (might be due to invalid IL or missing references) //IL_4676: Unknown result type (might be due to invalid IL or missing references) //IL_468f: Unknown result type (might be due to invalid IL or missing references) //IL_4694: Unknown result type (might be due to invalid IL or missing references) //IL_4699: Unknown result type (might be due to invalid IL or missing references) //IL_469e: Unknown result type (might be due to invalid IL or missing references) //IL_46b9: Unknown result type (might be due to invalid IL or missing references) //IL_46bf: Unknown result type (might be due to invalid IL or missing references) //IL_46c4: Unknown result type (might be due to invalid IL or missing references) //IL_46ea: Unknown result type (might be due to invalid IL or missing references) //IL_46ef: Unknown result type (might be due to invalid IL or missing references) //IL_4541: Unknown result type (might be due to invalid IL or missing references) //IL_4565: Unknown result type (might be due to invalid IL or missing references) //IL_4570: Unknown result type (might be due to invalid IL or missing references) //IL_4588: Unknown result type (might be due to invalid IL or missing references) //IL_45a0: Unknown result type (might be due to invalid IL or missing references) //IL_45b3: Unknown result type (might be due to invalid IL or missing references) //IL_45bd: Unknown result type (might be due to invalid IL or missing references) //IL_45c2: Unknown result type (might be due to invalid IL or missing references) //IL_35ee: Unknown result type (might be due to invalid IL or missing references) //IL_35f3: Unknown result type (might be due to invalid IL or missing references) //IL_35fa: Unknown result type (might be due to invalid IL or missing references) //IL_3612: Unknown result type (might be due to invalid IL or missing references) //IL_362a: Unknown result type (might be due to invalid IL or missing references) //IL_363d: Unknown result type (might be due to invalid IL or missing references) //IL_3650: Unknown result type (might be due to invalid IL or missing references) //IL_3655: Unknown result type (might be due to invalid IL or missing references) //IL_368c: Unknown result type (might be due to invalid IL or missing references) //IL_3691: Unknown result type (might be due to invalid IL or missing references) //IL_3698: Unknown result type (might be due to invalid IL or missing references) //IL_36b0: Unknown result type (might be due to invalid IL or missing references) //IL_36c8: Unknown result type (might be due to invalid IL or missing references) //IL_36db: Unknown result type (might be due to invalid IL or missing references) //IL_36ee: Unknown result type (might be due to invalid IL or missing references) //IL_36f3: Unknown result type (might be due to invalid IL or missing references) //IL_372a: Unknown result type (might be due to invalid IL or missing references) //IL_372f: Unknown result type (might be due to invalid IL or missing references) //IL_3736: Unknown result type (might be due to invalid IL or missing references) //IL_374e: Unknown result type (might be due to invalid IL or missing references) //IL_3766: Unknown result type (might be due to invalid IL or missing references) //IL_3779: Unknown result type (might be due to invalid IL or missing references) //IL_378c: Unknown result type (might be due to invalid IL or missing references) //IL_3791: Unknown result type (might be due to invalid IL or missing references) //IL_37c8: Unknown result type (might be due to invalid IL or missing references) //IL_37cd: Unknown result type (might be due to invalid IL or missing references) //IL_37d4: Unknown result type (might be due to invalid IL or missing references) //IL_37ec: Unknown result type (might be due to invalid IL or missing references) //IL_3804: Unknown result type (might be due to invalid IL or missing references) //IL_3817: Unknown result type (might be due to invalid IL or missing references) //IL_382a: Unknown result type (might be due to invalid IL or missing references) //IL_382f: Unknown result type (might be due to invalid IL or missing references) //IL_38be: Unknown result type (might be due to invalid IL or missing references) //IL_38c5: Unknown result type (might be due to invalid IL or missing references) //IL_3867: Unknown result type (might be due to invalid IL or missing references) //IL_386c: Unknown result type (might be due to invalid IL or missing references) //IL_3877: Unknown result type (might be due to invalid IL or missing references) //IL_3898: Unknown result type (might be due to invalid IL or missing references) //IL_389d: Unknown result type (might be due to invalid IL or missing references) //IL_38fe: Unknown result type (might be due to invalid IL or missing references) //IL_390e: Unknown result type (might be due to invalid IL or missing references) //IL_3915: Unknown result type (might be due to invalid IL or missing references) //IL_391c: Unknown result type (might be due to invalid IL or missing references) //IL_392c: Unknown result type (might be due to invalid IL or missing references) //IL_3933: Unknown result type (might be due to invalid IL or missing references) //IL_393a: Unknown result type (might be due to invalid IL or missing references) //IL_393f: Unknown result type (might be due to invalid IL or missing references) //IL_3944: Unknown result type (might be due to invalid IL or missing references) float num = 0f; total_engine_force = 0f; neg_windspeed = GWindBasic.windAt(((Component)this).gameObject.transform.position) + vibrationGet(); kineticsGroundEffectForce = 0f; for (int i = 0; i < surfacedrives_count; i++) { tmp_transform = ((Component)surfacedrives[i]).transform; surfacedrives[i].lastPosition = surfacedrives[i].lastPosition * (1f - kineticsSurfaceDeltaFilter * globalSimulationScale) + tmp_transform.position * kineticsSurfaceDeltaFilter * globalSimulationScale; switch (kineticsSurfaceMethod) { case TSurfaceMethod.rigidbodyGetPointVelocity: tmp_v = ((Component)this).gameObject.GetComponent().GetPointVelocity(tmp_transform.position) - neg_windspeed; if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; case TSurfaceMethod.rigidbodyGetPointVelocityWithPropwash: tmp_v = ((Component)this).gameObject.GetComponent().GetPointVelocity(tmp_transform.position) - neg_windspeed; if (kineticsPropwash_internal > 0f) { tmp_v += kineticsPropwash_internal * ((Component)this).gameObject.transform.forward * tmp_propWashFactor; } if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; case TSurfaceMethod.deltaFiltered: tmp_v = (tmp_transform.position - surfacedrives[i].lastPosition) / Time.fixedDeltaTime - neg_windspeed; if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; default: tmp_v = (tmp_transform.position - surfacedrives[i].lastPosition) / Time.fixedDeltaTime - neg_windspeed; if (kineticsPropwash_internal > 0f) { tmp_v += kineticsPropwash_internal * ((Component)this).gameObject.transform.forward * tmp_propWashFactor; } if (kineticsGroundEffect == TGroundEffectType.airplanesoft && distanceToGround < kineticsGroundEffectProbeMaxDistance) { ProcessLiftnDragOfElement_klift = kineticsGroundEffectCoeficient * kineticsGroundEffectCoeficientDistance / (tmp_transform.position.y - yPositionOfGround); if (ProcessLiftnDragOfElement_klift < 1f) { ProcessLiftnDragOfElement_klift = 1f; } floor_effect_add += ProcessLiftnDragOfElement_klift; floor_effect_ctr += 1f; } else if ((kineticsGroundEffect == TGroundEffectType.airplanesoft2 || kineticsGroundEffect == TGroundEffectType.helicoptersoft) && distanceToGround < kineticsGroundEffectProbeMaxDistance) { if (Mathf.Abs(kineticsGroundEffectCoeficient) < float.MinValue) { kineticsGroundEffectCoeficient = float.MinValue; } if (Mathf.Abs(kineticsGroundEffectCoeficientDistance) < float.MinValue) { kineticsGroundEffectCoeficientDistance = float.MinValue; } ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue * Mathf.Pow(kineticsGroundEffectMaxValue / kineticsGroundEffectCoeficient, (0f - (tmp_transform.position.y - yPositionOfGround)) / kineticsGroundEffectCoeficientDistance); if (ProcessLiftnDragOfElement_klift < 1f) { ProcessLiftnDragOfElement_klift = 1f; } if (ProcessLiftnDragOfElement_klift > kineticsGroundEffectMaxValue) { ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue; } floor_effect_add += ProcessLiftnDragOfElement_klift; floor_effect_ctr += 1f; } else if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; } if (GAircraftDropPointVelocity) { tmp_v = Vector3.zero; } else { tmp_v /= globalSimulationScale; } float num2; switch (surfacedrives[i].powerControlBy) { default: { GDrive.TDriveType type = surfacedrives[i].type; num2 = ((type == GDrive.TDriveType.tailrotor || type == GDrive.TDriveType.right_rotor2) ? inputRudder_output : inputThrottle_output); break; } case GDrive.TDrivePowerControlBy.throttle: num2 = inputThrottle_output; break; case GDrive.TDrivePowerControlBy.pivot: num2 = GPivot.getAnyPivot(surfacedrives[i].powerControlByPivot); break; case GDrive.TDrivePowerControlBy.elevator: num2 = inputElevator_output; break; case GDrive.TDrivePowerControlBy.ailerons: num2 = inputAilerons_output; break; case GDrive.TDrivePowerControlBy.rudder: num2 = inputRudder_output; break; } float num3 = surfacedrives[i].powerCyclicForwardControlBy switch { GDrive.TDrivePowerControlBy.throttle => inputThrottle_output, GDrive.TDrivePowerControlBy.pivot => GPivot.getAnyPivot(surfacedrives[i].powerCyclicForwardControlByPivot), GDrive.TDrivePowerControlBy.elevator => inputElevator_output, GDrive.TDrivePowerControlBy.ailerons => inputAilerons_output, GDrive.TDrivePowerControlBy.rudder => inputRudder_output, _ => inputElevator_output, }; float num4 = surfacedrives[i].powerCyclicSideControlBy switch { GDrive.TDrivePowerControlBy.throttle => inputThrottle_output, GDrive.TDrivePowerControlBy.pivot => GPivot.getAnyPivot(surfacedrives[i].powerCyclicSideControlByPivot), GDrive.TDrivePowerControlBy.elevator => inputElevator_output, GDrive.TDrivePowerControlBy.ailerons => inputAilerons_output, GDrive.TDrivePowerControlBy.rudder => inputRudder_output, _ => inputAilerons_output, }; switch (surfacedrives[i].type) { case GDrive.TDriveType.rotor: case GDrive.TDriveType.tailrotor: surfacedrives[i].drive_rpm = (1f - surfacedrives[i].throttleRpmConversionFilter) * surfacedrives[i].drive_rpm + surfacedrives[i].throttleRpmConversionFilter * surfacedrives[i].throttleMax * surfacedrives[i].throttleRpmConversionRatio; if (globalRenderForceVectors && (Object)(object)surfacedrives[i].lineRenderer != (Object)null) { surfacedrives[i].lineRenderer.SetColors(Color.blue, Color.yellow); } break; default: if (num2 <= 1f) { surfacedrives[i].drive_rpm = (1f - surfacedrives[i].throttleRpmConversionFilter) * surfacedrives[i].drive_rpm + surfacedrives[i].throttleRpmConversionFilter * (surfacedrives[i].throttleIdle + (surfacedrives[i].throttleMax - surfacedrives[i].throttleIdle) * num2) * surfacedrives[i].throttleRpmConversionRatio * kThrottle_ntr_multiplier; if (globalRenderForceVectors && (Object)(object)surfacedrives[i].lineRenderer != (Object)null) { surfacedrives[i].lineRenderer.SetColors(Color.blue, Color.red); } } else { surfacedrives[i].drive_rpm = (1f - surfacedrives[i].throttleRpmConversionFilter) * surfacedrives[i].drive_rpm + surfacedrives[i].throttleRpmConversionFilter * (surfacedrives[i].throttleMax + (surfacedrives[i].throttleAfterburner - surfacedrives[i].throttleMax) * (num2 - 1f)) * surfacedrives[i].throttleRpmConversionRatio * kThrottle_ntr_multiplier; if (globalRenderForceVectors && (Object)(object)surfacedrives[i].lineRenderer != (Object)null) { surfacedrives[i].lineRenderer.SetColors(Color.blue, Color.yellow); } } break; case GDrive.TDriveType.rotor_basic: case GDrive.TDriveType.forward_rotor2: case GDrive.TDriveType.up_rotor2: case GDrive.TDriveType.right_rotor2: break; } switch (surfacedrives[i].type) { default: surfacedrives[i].drive_output = surfacedrives[i].drive_rpm; break; case GDrive.TDriveType.propeller: prop_v = surfacedrives[i].drive_rpm * surfacedrives[i].bladeLength * ((float)Math.PI / 60f); prop_a = (float)Math.PI / 2f - surfacedrives[i].bladeAngleYaw * ((float)Math.PI / 180f); prop_vn = prop_v * Mathf.Cos(prop_a); prop_vnd = Vector3.Dot(rigidbodyVelocity + neg_windspeed, ((Component)this).gameObject.transform.forward); if (prop_vn > prop_vnd) { prop_vnd = prop_vn - prop_vnd; } else { prop_vnd = prop_vn; } prop_s = 0.5f * surfacedrives[i].bladeLength * (surfacedrives[i].bladeWidthMin + surfacedrives[i].bladeWidthMax); prop_o = Mathf.Cos(surfacedrives[i].bladeAnglePitch * ((float)Math.PI / 180f)) * prop_s * surfacedrives[i].bladeShapeCoefficient * kdrag * (float)surfacedrives[i].bladeNumber; surfacedrives[i].drive_output = prop_o * prop_vnd * prop_vnd; surfacedrives[i].bladeWashSpeed = prop_vnd; break; case GDrive.TDriveType.rotor: log("rotor control: engine_throttle = " + num2 + "; engine_forward_throttle = " + num3 + "; engine_side_throttle = " + num4 + ";"); prop_v = surfacedrives[i].drive_rpm * surfacedrives[i].bladeLength * ((float)Math.PI / 60f); prop_a = (float)Math.PI / 2f - surfacedrives[i].bladeAngleYaw * ((num2 - 0.5f + surfacedrives[i].rotorCollectiveBias) * surfacedrives[i].rotorCollectiveCoefficient + (num3 - 0.5f) * surfacedrives[i].rotorCyclicForwardCoefficient) * ((float)Math.PI / 180f); prop_a_b = (float)Math.PI / 2f - surfacedrives[i].bladeAngleYaw * ((num2 - 0.5f + surfacedrives[i].rotorCollectiveBias) * surfacedrives[i].rotorCollectiveCoefficient - (num3 - 0.5f) * surfacedrives[i].rotorCyclicForwardCoefficient) * ((float)Math.PI / 180f); prop_a_l = (float)Math.PI / 2f - surfacedrives[i].bladeAngleYaw * ((num2 - 0.5f + surfacedrives[i].rotorCollectiveBias) * surfacedrives[i].rotorCollectiveCoefficient + (num4 - 0.5f) * surfacedrives[i].rotorCyclicSideCoefficient) * ((float)Math.PI / 180f); prop_a_r = (float)Math.PI / 2f - surfacedrives[i].bladeAngleYaw * ((num2 - 0.5f + surfacedrives[i].rotorCollectiveBias) * surfacedrives[i].rotorCollectiveCoefficient - (num4 - 0.5f) * surfacedrives[i].rotorCyclicSideCoefficient) * ((float)Math.PI / 180f); prop_vn = prop_v * Mathf.Cos((prop_a + prop_a_l + prop_a_r + prop_a_b) / 4f); prop_vnd = prop_vn; prop_s = 0.5f * surfacedrives[i].bladeLength * (surfacedrives[i].bladeWidthMin + surfacedrives[i].bladeWidthMax); prop_o = Mathf.Cos(surfacedrives[i].bladeAnglePitch * ((float)Math.PI / 180f)) * prop_s * surfacedrives[i].bladeShapeCoefficient * kdrag * (float)surfacedrives[i].bladeNumber; surfacedrives[i].drive_output = prop_o * prop_vnd * Mathf.Abs(prop_vnd); kineticsGroundEffectForce += prop_vn / (((Component)surfacedrives[i]).gameObject.transform.position.y - yPositionOfGround); surfacedrives[i].drive_rpm = (1f - surfacedrives[i].throttleRpmConversionFilter) * surfacedrives[i].drive_rpm + surfacedrives[i].throttleRpmConversionFilter * (surfacedrives[i].throttleMax * surfacedrives[i].throttleRpmConversionRatio - surfacedrives[i].rotorAutorotationCoefficient * surfacedrives[i].drive_output * Mathf.Cos((prop_a + prop_a_l + prop_a_r + prop_a_b) / 4f)); surfacedrives[i].bladeWashSpeed = 0f; break; case GDrive.TDriveType.tailrotor: prop_v = surfacedrives[i].drive_rpm * surfacedrives[i].bladeLength * ((float)Math.PI / 60f); prop_a = (float)Math.PI / 2f - surfacedrives[i].bladeAngleYaw * (0.5f - num2) * ((float)Math.PI / 180f); prop_vn = prop_v * Mathf.Cos(prop_a); prop_vnd = prop_vn; prop_s = 0.5f * surfacedrives[i].bladeLength * (surfacedrives[i].bladeWidthMin + surfacedrives[i].bladeWidthMax); prop_o = Mathf.Cos(surfacedrives[i].bladeAnglePitch * ((float)Math.PI / 180f)) * prop_s * surfacedrives[i].bladeShapeCoefficient * kdrag * (float)surfacedrives[i].bladeNumber; surfacedrives[i].drive_output = prop_o * prop_vnd * Mathf.Abs(prop_vnd); surfacedrives[i].bladeWashSpeed = 0f; break; case GDrive.TDriveType.sin: case GDrive.TDriveType.cos: surfacedrives[i].drive_output = 0f; surfacedrives[i].bladeWashSpeed = 0f; break; case GDrive.TDriveType.rotor_basic: case GDrive.TDriveType.forward_rotor2: case GDrive.TDriveType.up_rotor2: case GDrive.TDriveType.right_rotor2: break; } surfacedrives[i].drive_shaft += surfacedrives[i].drive_rpm / 60f * Time.fixedDeltaTime; if (surfacedrives[i].drive_shaft > 3600000f) { surfacedrives[i].drive_shaft -= 3600000f; } if (!(EngineSwitch.transform.localEulerAngles.x > 45f) && EngineSwitch.transform.localEulerAngles.x < 45f) { surfacedrives[i].drive_rpm = surfacedrives[i].drive_rpm * 0.5f; surfacedrives[i].drive_shaft = surfacedrives[i].drive_shaft * 0.5f; } if (isCrashed) { surfacedrives[i].drive_rpm = 0f; surfacedrives[i].drive_shaft = 0f; } if (surfacedrives[i].shaftOutputPivotId.Length > 0) { switch (surfacedrives[i].type) { default: GPivot.setAnyPivot(surfacedrives[i].shaftOutputPivotId, surfacedrives[i].drive_shaft); GPivot.setAnyPivot(surfacedrives[i].shaftOutputPivotId + ".rpm", surfacedrives[i].drive_rpm); break; case GDrive.TDriveType.cos: GPivot.setAnyPivot(surfacedrives[i].shaftOutputPivotId, Mathf.Cos(surfacedrives[i].drive_shaft)); break; case GDrive.TDriveType.sin: GPivot.setAnyPivot(surfacedrives[i].shaftOutputPivotId, Mathf.Sin(surfacedrives[i].drive_shaft)); break; } } total_engine_force += surfacedrives[i].drive_output; if (isCrashed) { total_engine_force = 0f; } switch (surfacedrives[i].type) { case GDrive.TDriveType.rotor: prop_vnd = prop_v * Mathf.Cos(prop_a); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(((Component)surfacedrives[i]).gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, ((Component)surfacedrives[i]).gameObject.transform.position + ((Component)surfacedrives[i]).gameObject.transform.forward * surfacedrives[i].bladeLength * 0.5f); } prop_vnd = prop_v * Mathf.Cos(prop_a_b); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(((Component)surfacedrives[i]).gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, ((Component)surfacedrives[i]).gameObject.transform.position - ((Component)surfacedrives[i]).gameObject.transform.forward * surfacedrives[i].bladeLength * 0.5f); } prop_vnd = prop_v * Mathf.Cos(prop_a_l); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(((Component)surfacedrives[i]).gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, ((Component)surfacedrives[i]).gameObject.transform.position - ((Component)surfacedrives[i]).gameObject.transform.right * surfacedrives[i].bladeLength * 0.5f); } prop_vnd = prop_v * Mathf.Cos(prop_a_r); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(((Component)surfacedrives[i]).gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, ((Component)surfacedrives[i]).gameObject.transform.position + ((Component)surfacedrives[i]).gameObject.transform.right * surfacedrives[i].bladeLength * 0.5f); } surfacedrives[i].rotorGyroscopicCoefficient = surfacedrives[i].bladeMass * (float)surfacedrives[i].bladeNumber / (surfacedrives[i].bladeMass * (float)surfacedrives[i].bladeNumber + ((Component)this).gameObject.GetComponent().mass); tmp_q = Quaternion.FromToRotation(((Component)surfacedrives[i]).gameObject.transform.up, surfacedrives[i].rotorGyroscopicLastUp * surfacedrives[i].rotorGyroscopicCoefficient + ((Component)surfacedrives[i]).gameObject.transform.up * (1f - surfacedrives[i].rotorGyroscopicCoefficient)); ((Component)this).gameObject.transform.rotation = ((Component)this).gameObject.transform.rotation * tmp_q; surfacedrives[i].rotorGyroscopicLastUp = ((Component)surfacedrives[i]).gameObject.transform.up; break; case GDrive.TDriveType.tailrotor: if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(((Component)surfacedrives[i]).gameObject.transform.right * surfacedrives[i].drive_output * globalSimulationScale, ((Component)surfacedrives[i]).gameObject.transform.position); } break; case GDrive.TDriveType.rotor_basic: case GDrive.TDriveType.forward_rotor2: case GDrive.TDriveType.up_rotor2: case GDrive.TDriveType.right_rotor2: break; default: if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(((Component)surfacedrives[i]).gameObject.transform.forward * surfacedrives[i].drive_output * globalSimulationScale, ((Component)surfacedrives[i]).gameObject.transform.position); } break; } if (globalRenderForceVectors && (Object)(object)surfacedrives[i].lineRenderer != (Object)null) { ((Renderer)surfacedrives[i].lineRenderer).material = tmp_lineRenderer_material; surfacedrives[i].lineRenderer.SetVertexCount(2); surfacedrives[i].lineRenderer.SetWidth(0.5f * globalSimulationScale, 0f * globalSimulationScale); surfacedrives[i].lineRenderer.SetPosition(0, ((Component)surfacedrives[i]).transform.position); surfacedrives[i].lineRenderer.SetPosition(1, ((Component)surfacedrives[i]).transform.position - ((Component)surfacedrives[i]).transform.forward * num); } surfacedrives[i].lastPosition = tmp_transform.position; } for (int j = 0; j < labeled_surfacedrives_count; j++) { tmp_transform = labeled_surfacedrives[j].gameObject.transform; labeled_surfacedrives[j].lastPosition = labeled_surfacedrives[j].lastPosition * (1f - kineticsSurfaceDeltaFilter * globalSimulationScale) + tmp_transform.position * kineticsSurfaceDeltaFilter * globalSimulationScale; switch (kineticsSurfaceMethod) { case TSurfaceMethod.rigidbodyGetPointVelocity: tmp_v = ((Component)this).gameObject.GetComponent().GetPointVelocity(tmp_transform.position) - neg_windspeed; if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; case TSurfaceMethod.rigidbodyGetPointVelocityWithPropwash: tmp_v = ((Component)this).gameObject.GetComponent().GetPointVelocity(tmp_transform.position) - neg_windspeed; if (kineticsPropwash_internal > 0f) { tmp_v += kineticsPropwash_internal * ((Component)this).gameObject.transform.forward * tmp_propWashFactor; } if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; case TSurfaceMethod.deltaFiltered: tmp_v = (tmp_transform.position - labeled_surfacedrives[j].lastPosition) / Time.fixedDeltaTime - neg_windspeed; if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; default: tmp_v = (tmp_transform.position - labeled_surfacedrives[j].lastPosition) / Time.fixedDeltaTime - neg_windspeed; if (kineticsPropwash_internal > 0f) { tmp_v += kineticsPropwash_internal * ((Component)this).gameObject.transform.forward * tmp_propWashFactor; } if (kineticsGroundEffect == TGroundEffectType.airplanesoft && distanceToGround < kineticsGroundEffectProbeMaxDistance) { ProcessLiftnDragOfElement_klift = kineticsGroundEffectCoeficient * kineticsGroundEffectCoeficientDistance / (tmp_transform.position.y - yPositionOfGround); if (ProcessLiftnDragOfElement_klift < 1f) { ProcessLiftnDragOfElement_klift = 1f; } floor_effect_add += ProcessLiftnDragOfElement_klift; floor_effect_ctr += 1f; } else if ((kineticsGroundEffect == TGroundEffectType.airplanesoft2 || kineticsGroundEffect == TGroundEffectType.helicoptersoft) && distanceToGround < kineticsGroundEffectProbeMaxDistance) { if (Mathf.Abs(kineticsGroundEffectCoeficient) < float.MinValue) { kineticsGroundEffectCoeficient = float.MinValue; } if (Mathf.Abs(kineticsGroundEffectCoeficientDistance) < float.MinValue) { kineticsGroundEffectCoeficientDistance = float.MinValue; } ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue * Mathf.Pow(kineticsGroundEffectMaxValue / kineticsGroundEffectCoeficient, (0f - (tmp_transform.position.y - yPositionOfGround)) / kineticsGroundEffectCoeficientDistance); if (ProcessLiftnDragOfElement_klift < 1f) { ProcessLiftnDragOfElement_klift = 1f; } if (ProcessLiftnDragOfElement_klift > kineticsGroundEffectMaxValue) { ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue; } floor_effect_add += ProcessLiftnDragOfElement_klift; floor_effect_ctr += 1f; } else if (kineticsGroundEffect == TGroundEffectType.airplane && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= Mathf.Sqrt(tmp_v.x * tmp_v.x + tmp_v.z * tmp_v.z) * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } else if (kineticsGroundEffect == TGroundEffectType.helicopter && distanceToGround < kineticsGroundEffectProbeMaxDistance) { tmp_v.y -= kineticsGroundEffectForce * kineticsGroundEffectMaxValue / Mathf.Pow(1f / kineticsGroundEffectCoeficient, (tmp_transform.position.y - yPositionOfGround) / kineticsGroundEffectCoeficientDistance); } break; } if (GAircraftDropPointVelocity) { tmp_v = Vector3.zero; } else { tmp_v /= globalSimulationScale; } float num5; switch (labeled_surfacedrives[j].powerControlBy) { default: { GDrive.TDriveType type2 = labeled_surfacedrives[j].type; num5 = ((type2 == GDrive.TDriveType.tailrotor || type2 == GDrive.TDriveType.right_rotor2) ? inputRudder_output : inputThrottle_output); break; } case GDrive.TDrivePowerControlBy.throttle: num5 = inputThrottle_output; break; case GDrive.TDrivePowerControlBy.pivot: num5 = GPivot.getAnyPivot(labeled_surfacedrives[j].powerControlByPivot); break; case GDrive.TDrivePowerControlBy.elevator: num5 = inputElevator_output; break; case GDrive.TDrivePowerControlBy.ailerons: num5 = inputAilerons_output; break; case GDrive.TDrivePowerControlBy.rudder: num5 = inputRudder_output; break; } float num6 = labeled_surfacedrives[j].powerCyclicForwardControlBy switch { GDrive.TDrivePowerControlBy.throttle => inputThrottle_output, GDrive.TDrivePowerControlBy.pivot => GPivot.getAnyPivot(labeled_surfacedrives[j].powerCyclicForwardControlByPivot), GDrive.TDrivePowerControlBy.elevator => inputElevator_output, GDrive.TDrivePowerControlBy.ailerons => inputAilerons_output, GDrive.TDrivePowerControlBy.rudder => inputRudder_output, _ => inputElevator_output, }; float num7 = labeled_surfacedrives[j].powerCyclicSideControlBy switch { GDrive.TDrivePowerControlBy.throttle => inputThrottle_output, GDrive.TDrivePowerControlBy.pivot => GPivot.getAnyPivot(labeled_surfacedrives[j].powerCyclicSideControlByPivot), GDrive.TDrivePowerControlBy.elevator => inputElevator_output, GDrive.TDrivePowerControlBy.ailerons => inputAilerons_output, GDrive.TDrivePowerControlBy.rudder => inputRudder_output, _ => inputAilerons_output, }; switch (labeled_surfacedrives[j].type) { case GDrive.TDriveType.rotor: case GDrive.TDriveType.tailrotor: labeled_surfacedrives[j].drive_rpm = (1f - labeled_surfacedrives[j].throttleRpmConversionFilter) * labeled_surfacedrives[j].drive_rpm + labeled_surfacedrives[j].throttleRpmConversionFilter * labeled_surfacedrives[j].throttleMax * labeled_surfacedrives[j].throttleRpmConversionRatio; if (globalRenderForceVectors && (Object)(object)labeled_surfacedrives[j].lineRenderer != (Object)null) { labeled_surfacedrives[j].lineRenderer.SetColors(Color.blue, Color.yellow); } break; default: if (num5 <= 1f) { labeled_surfacedrives[j].drive_rpm = (1f - labeled_surfacedrives[j].throttleRpmConversionFilter) * labeled_surfacedrives[j].drive_rpm + labeled_surfacedrives[j].throttleRpmConversionFilter * (labeled_surfacedrives[j].throttleIdle + (labeled_surfacedrives[j].throttleMax - labeled_surfacedrives[j].throttleIdle) * num5) * labeled_surfacedrives[j].throttleRpmConversionRatio * kThrottle_ntr_multiplier; if (globalRenderForceVectors && (Object)(object)labeled_surfacedrives[j].lineRenderer != (Object)null) { labeled_surfacedrives[j].lineRenderer.SetColors(Color.blue, Color.red); } } else { labeled_surfacedrives[j].drive_rpm = (1f - labeled_surfacedrives[j].throttleRpmConversionFilter) * labeled_surfacedrives[j].drive_rpm + labeled_surfacedrives[j].throttleRpmConversionFilter * (labeled_surfacedrives[j].throttleMax + (labeled_surfacedrives[j].throttleAfterburner - labeled_surfacedrives[j].throttleMax) * (num5 - 1f)) * labeled_surfacedrives[j].throttleRpmConversionRatio * kThrottle_ntr_multiplier; if (globalRenderForceVectors && (Object)(object)labeled_surfacedrives[j].lineRenderer != (Object)null) { labeled_surfacedrives[j].lineRenderer.SetColors(Color.blue, Color.yellow); } } break; case GDrive.TDriveType.rotor_basic: { if (simulationFirstFrames_complete && labeled_surfacedrives[j].powered) { labeled_surfacedrives[j].poweredFactor = labeled_surfacedrives[j].poweredFactor * (1f - labeled_surfacedrives[j].poweredFactorFilter) + 1f * labeled_surfacedrives[j].poweredFactorFilter; } else { labeled_surfacedrives[j].poweredFactor = labeled_surfacedrives[j].poweredFactor * (1f - labeled_surfacedrives[j].poweredFactorFilter) + 0f * labeled_surfacedrives[j].poweredFactorFilter; } ProcessLiftnDragOfElement_klift = 1f; if (kineticsGroundEffect == TGroundEffectType.helicoptersoft && distanceToGround < kineticsGroundEffectProbeMaxDistance) { if (Mathf.Abs(kineticsGroundEffectCoeficient) < float.MinValue) { kineticsGroundEffectCoeficient = float.MinValue; } if (Mathf.Abs(kineticsGroundEffectCoeficientDistance) < float.MinValue) { kineticsGroundEffectCoeficientDistance = float.MinValue; } ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue * Mathf.Pow(kineticsGroundEffectMaxValue / kineticsGroundEffectCoeficient, (0f - (tmp_transform.position.y - yPositionOfGround)) / kineticsGroundEffectCoeficientDistance); if (ProcessLiftnDragOfElement_klift < 1f) { ProcessLiftnDragOfElement_klift = 1f; } if (ProcessLiftnDragOfElement_klift > kineticsGroundEffectMaxValue) { ProcessLiftnDragOfElement_klift = kineticsGroundEffectMaxValue; } } tmp_x = Vector3.Dot(tmp_v, labeled_surfacedrives[j].gameObject.transform.right); tmp_y = Vector3.Dot(tmp_v, labeled_surfacedrives[j].gameObject.transform.up); tmp_z = Vector3.Dot(tmp_v, labeled_surfacedrives[j].gameObject.transform.forward); tmp_xz = Mathf.Sqrt(tmp_x * tmp_x + tmp_z * tmp_z); float num8 = 1f * labeled_surfacedrives[j].poweredFactor; float num9 = Mathf.Pow(labeled_surfacedrives[j].basicRotorVelocityFactor, (0f - labeled_surfacedrives[j].basicRotorProjectedVelocityFactor) / tmp_xz) * labeled_surfacedrives[j].basicRotorProjectedVelocityMultiplier; float num10 = (100f - num9) / 105f; float num11 = num9 / 6f; float num12 = (labeled_surfacedrives[j].basicRotorProjectedVelocityForwardOffset + num11) * num8; float num13 = (labeled_surfacedrives[j].basicRotorProjectedVelocityRearOffset + num11) * num8; float num14 = (labeled_surfacedrives[j].basicRotorProjectedVelocityLeftOffset + num11) * num8; float num15 = (labeled_surfacedrives[j].basicRotorProjectedVelocityRightOffset + num11) * num8; float num16 = -(float)Math.PI * labeled_surfacedrives[j].dumperForceMultiplier * labeled_surfacedrives[j].bladeLength * labeled_surfacedrives[j].bladeLength * kdrag * tmp_y * Mathf.Abs(tmp_y) * num8; if (tmp_v.y < 0f) { num16 *= ProcessLiftnDragOfElement_klift; } float mass = ((Component)this).gameObject.GetComponent().mass; float throttleBiasOffset = labeled_surfacedrives[j].throttleBiasOffset; float throttleBiasMultiplier = labeled_surfacedrives[j].throttleBiasMultiplier; float throttleForwardRearOffset = labeled_surfacedrives[j].throttleForwardRearOffset; float throttleLeftRightOffset = labeled_surfacedrives[j].throttleLeftRightOffset; Vector3 gravity = Physics.gravity; float num17 = mass * ((Vector3)(ref gravity)).magnitude * throttleBiasMultiplier; float yawForceMultiplier = labeled_surfacedrives[j].yawForceMultiplier; float num18 = Vector3.Dot(Vector3.up, labeled_surfacedrives[j].gameObject.transform.up); float num19 = Vector3.Dot(Vector3.up, labeled_surfacedrives[j].gameObject.transform.forward); float num20 = Vector3.Dot(Vector3.up, labeled_surfacedrives[j].gameObject.transform.right); float num21 = labeled_surfacedrives[j].overspeedRollFactorVibration * vibration(labeled_surfacedrives[j].overspeedRollFactorVibratorId); float num22 = labeled_surfacedrives[j].overspeedYawFactorVibration * vibration(labeled_surfacedrives[j].overspeedYawFactorVibratorId); float num23 = labeled_surfacedrives[j].overspeedPitchFactorVibration * vibration(labeled_surfacedrives[j].overspeedPitchFactorVibratorId); if (labeled_surfacedrives[j].overspeedPitchFactorAtSpeed <= 0.1f) { labeled_surfacedrives[j].overspeedPitchFactorAtSpeed = 0.1f; } float num24 = mass * (labeled_surfacedrives[j].overspeedRollFactorMultiplier + num21) * num18 * num18 * num18 * num8; if (labeled_surfacedrives[j].overspeedRollFactorAtSpeed <= 0.1f) { labeled_surfacedrives[j].overspeedRollFactorAtSpeed = 0.1f; } float num25 = mass * (labeled_surfacedrives[j].overspeedYawFactorMultiplier + num22) * num8; if (labeled_surfacedrives[j].overspeedYawFactorAtSpeed <= 0.1f) { labeled_surfacedrives[j].overspeedYawFactorAtSpeed = 0.1f; } float num26 = mass * (labeled_surfacedrives[j].overspeedPitchFactorMultiplier + num23); overspeed_tmp_z_filtered = overspeed_tmp_z_filtered * (1f - overspeed_tmp_z_filter) + tmp_z * overspeed_tmp_z_filter; if (GAircraftDropPointVelocity) { overspeed_tmp_z_filtered = 0f; } float num27 = Mathf.Max(labeled_surfacedrives[j].overspeedPitchFactorMin, Mathf.Min(labeled_surfacedrives[j].overspeedPitchFactorMax, Mathf.Abs(Mathf.Pow(labeled_surfacedrives[j].overspeedPitchFactorExponent, Mathf.Max(0f, Mathf.Abs(overspeed_tmp_z_filtered) + labeled_surfacedrives[j].overspeedPitchFactorOffsetSpeed) / labeled_surfacedrives[j].overspeedPitchFactorAtSpeed) - 1f))) + labeled_surfacedrives[j].overspeedPitchFactorOffsetValue; float num28 = Mathf.Max(labeled_surfacedrives[j].overspeedYawFactorMin, Mathf.Min(labeled_surfacedrives[j].overspeedYawFactorMax, Mathf.Abs(Mathf.Pow(labeled_surfacedrives[j].overspeedYawFactorExponent, Mathf.Max(0f, Mathf.Abs(overspeed_tmp_z_filtered) + labeled_surfacedrives[j].overspeedYawFactorOffsetSpeed) / labeled_surfacedrives[j].overspeedYawFactorAtSpeed) - 1f))) + labeled_surfacedrives[j].overspeedYawFactorOffsetValue; float num29 = Mathf.Max(labeled_surfacedrives[j].overspeedRollFactorMin, Mathf.Min(labeled_surfacedrives[j].overspeedRollFactorMax, Mathf.Abs(Mathf.Pow(labeled_surfacedrives[j].overspeedRollFactorExponent, Mathf.Max(0f, Mathf.Abs(overspeed_tmp_z_filtered) + labeled_surfacedrives[j].overspeedRollFactorOffsetSpeed) / labeled_surfacedrives[j].overspeedRollFactorAtSpeed) - 1f))) + labeled_surfacedrives[j].overspeedRollFactorOffsetValue; float num30 = (inputRudder_output - 0.5f) * yawForceMultiplier + num25 * num28; float num31 = (((!(tmp_y > 0f) || !(inputThrottle_output + throttleBiasOffset > 0f)) && (!(tmp_y < 0f) || !(inputThrottle_output + throttleBiasOffset < 0f))) ? ((inputThrottle_output + throttleBiasOffset) * num17 * Mathf.Min(0.005f, Mathf.Pow(labeled_surfacedrives[j].climbReductionWithSpeed, Mathf.Abs(tmp_xz) / labeled_surfacedrives[j].climbReductionWithSpeedAtSpeed) * Mathf.Pow(labeled_surfacedrives[j].climbReductionWithVerticalSpeed, (0f - Mathf.Abs(tmp_y)) / labeled_surfacedrives[j].climbReductionWithVerticalSpeedAtSpeed))) : ((inputThrottle_output + throttleBiasOffset) * num17 * Mathf.Min(0.005f, Mathf.Pow(labeled_surfacedrives[j].climbReductionWithSpeed, Mathf.Abs(tmp_xz) / labeled_surfacedrives[j].climbReductionWithSpeedAtSpeed) * Mathf.Pow(labeled_surfacedrives[j].climbReductionWithVerticalSpeed, Mathf.Abs(tmp_y) / labeled_surfacedrives[j].climbReductionWithVerticalSpeedAtSpeed)))); float z = ((Component)this).gameObject.transform.InverseTransformDirection(((Component)this).gameObject.GetComponent().angularVelocity).z; float num32 = (num6 - 0.5f) * 20f * 55.5f * (20f * Mathf.Min(0.1f, Mathf.Pow(labeled_surfacedrives[j].climbReductionWithSpeed, Mathf.Abs(tmp_xz) / labeled_surfacedrives[j].climbReductionWithSpeedAtSpeed))) + num26 * num27; num32 -= num19 * ((Component)this).gameObject.GetComponent().mass * Mathf.Min(0.1f, labeled_surfacedrives[j].pitchReductionWithMassFactor); float num33 = num20 * mass * Mathf.Min(0.1f, labeled_surfacedrives[j].rollReductionWithMassFactor); num33 *= Mathf.Pow(labeled_surfacedrives[j].rollReductionWithSpeed, Mathf.Pow(Mathf.Abs(tmp_xz), labeled_surfacedrives[j].rollReductionWithSpeedSmooth) / Mathf.Pow(labeled_surfacedrives[j].rollReductionWithSpeedAtSpeed, labeled_surfacedrives[j].rollReductionWithSpeedSmooth)); num33 += (num7 - 0.5f) * 100f * 1.9f * (20f * Mathf.Min(0.1f, Mathf.Pow(labeled_surfacedrives[j].climbReductionWithSpeed, Mathf.Abs(tmp_xz) / labeled_surfacedrives[j].climbReductionWithSpeedAtSpeed))) + num24 * num29 * Mathf.Sign(labeled_surfacedrives[j].overspeedRollFactor); if (z > 0f) { if (num33 < 0f) { num33 += mass * (Mathf.Pow(labeled_surfacedrives[j].rollReductionWithRollSpeed + 1f, Mathf.Pow(Mathf.Abs(z), labeled_surfacedrives[j].rollReductionWithRollSpeedSmooth) / Mathf.Pow(labeled_surfacedrives[j].rollReductionWithRollSpeedAtSpeed, labeled_surfacedrives[j].rollReductionWithRollSpeedSmooth)) - 1f); } } else if (num33 > 0f) { num33 -= mass * (Mathf.Pow(labeled_surfacedrives[j].rollReductionWithRollSpeed + 1f, Mathf.Pow(Mathf.Abs(z), labeled_surfacedrives[j].rollReductionWithRollSpeedSmooth) / Mathf.Pow(labeled_surfacedrives[j].rollReductionWithRollSpeedAtSpeed, labeled_surfacedrives[j].rollReductionWithRollSpeedSmooth)) - 1f); } if (num33 > 0.1f * mass) { num33 = 0.1f * mass; } if (num33 < -0.1f * mass) { num33 = -0.1f * mass; } float commonFilter = labeled_surfacedrives[j].commonFilter; float pitchFilter = labeled_surfacedrives[j].pitchFilter; float rollFilter = labeled_surfacedrives[j].rollFilter; float yawFilter = labeled_surfacedrives[j].yawFilter; float dumperFilter = labeled_surfacedrives[j].dumperFilter; engine_force_common_filtered = engine_force_common_filtered * (1f - commonFilter) + num31 * commonFilter; engine_force_pitch_filtered = engine_force_pitch_filtered * (1f - pitchFilter) + num32 * pitchFilter; engine_force_roll_filtered = engine_force_roll_filtered * (1f - rollFilter) + num33 * rollFilter; engine_force_yaw_filtered = engine_force_yaw_filtered * (1f - yawFilter) + num30 * yawFilter; engine_force_dumper_filtered = engine_force_dumper_filtered * (1f - dumperFilter) + num16 * dumperFilter; if (engine_force_common_filtered < 0f && engine_force_common_filtered >= 0f) { engine_force_common_filtered = 0f; } if (engine_force_pitch_filtered < 0f && engine_force_pitch_filtered >= 0f) { engine_force_pitch_filtered = 0f; } if (engine_force_roll_filtered < 0f && engine_force_roll_filtered >= 0f) { engine_force_roll_filtered = 0f; } if (engine_force_yaw_filtered < 0f && engine_force_yaw_filtered >= 0f) { engine_force_yaw_filtered = 0f; } if (engine_force_dumper_filtered < 0f && engine_force_dumper_filtered >= 0f) { engine_force_dumper_filtered = 0f; } float num34 = 100f * mass; float num35 = 150f * mass; float num36 = ((!(throttleForwardRearOffset > 0f)) ? (engine_force_dumper_filtered + (engine_force_common_filtered + engine_force_pitch_filtered) * num12) : (engine_force_dumper_filtered + ((1f + throttleForwardRearOffset) * engine_force_common_filtered + engine_force_pitch_filtered) * num12)); float num37 = ((!(throttleForwardRearOffset < 0f)) ? (engine_force_dumper_filtered + (engine_force_common_filtered - engine_force_pitch_filtered) * num13) : (engine_force_dumper_filtered + ((1f - throttleForwardRearOffset) * engine_force_common_filtered - engine_force_pitch_filtered) * num13)); float num38 = ((!(throttleLeftRightOffset < 0f)) ? (engine_force_dumper_filtered + (engine_force_common_filtered + engine_force_roll_filtered) * num14) : (engine_force_dumper_filtered + ((1f + throttleLeftRightOffset) * engine_force_common_filtered + engine_force_roll_filtered) * num14)); float num39 = ((!(throttleLeftRightOffset < 0f)) ? (engine_force_dumper_filtered + (engine_force_common_filtered - engine_force_roll_filtered) * num15) : (engine_force_dumper_filtered + ((1f - throttleLeftRightOffset) * engine_force_common_filtered - engine_force_roll_filtered) * num15)); if (num36 < 0f - num34) { num36 = 0f - num34; } else if (num36 > num34) { num36 = num34; } if (num37 < 0f - num34) { num37 = 0f - num34; } else if (num37 > num34) { num37 = num34; } if (num38 < 0f - num35) { num38 = 0f - num35; } else if (num38 > num35) { num38 = num35; } if (num39 < 0f - num35) { num39 = 0f - num35; } else if (num39 > num35) { num39 = num35; } float num40 = Mathf.Pow(airdensity / labeled_surfacedrives[j].basicRotorAirdensityBias, labeled_surfacedrives[j].basicRotorAirdensityExp); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(num40 * labeled_surfacedrives[j].gameObject.transform.up * num36, labeled_surfacedrives[j].gameObject.transform.position + labeled_surfacedrives[j].gameObject.transform.forward * labeled_surfacedrives[j].basicRotorBladeForcePoint * labeled_surfacedrives[j].bladeLength); } if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(num40 * labeled_surfacedrives[j].gameObject.transform.up * num37, labeled_surfacedrives[j].gameObject.transform.position - labeled_surfacedrives[j].gameObject.transform.forward * labeled_surfacedrives[j].basicRotorBladeForcePoint * labeled_surfacedrives[j].bladeLength); } if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(num40 * labeled_surfacedrives[j].gameObject.transform.up * num38, labeled_surfacedrives[j].gameObject.transform.position - labeled_surfacedrives[j].gameObject.transform.right * labeled_surfacedrives[j].basicRotorBladeForcePoint * labeled_surfacedrives[j].bladeLength); } if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(num40 * labeled_surfacedrives[j].gameObject.transform.up * num39, labeled_surfacedrives[j].gameObject.transform.position + labeled_surfacedrives[j].gameObject.transform.right * labeled_surfacedrives[j].basicRotorBladeForcePoint * labeled_surfacedrives[j].bladeLength); } if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition((0f - num40) * labeled_surfacedrives[j].gameObject.transform.right * engine_force_yaw_filtered, labeled_surfacedrives[j].gameObject.transform.TransformPoint(labeled_surfacedrives[j].basicRotorTailOffset)); } ((Component)this).gameObject.GetComponent().angularVelocity = ((Component)this).gameObject.GetComponent().angularVelocity * num10; if (Mathf.Abs(num28) > 0.1f || Mathf.Abs(num27) > 0.1f) { Rigidbody component = ((Component)this).gameObject.GetComponent(); component.velocity += ((Component)this).gameObject.transform.right * num28 * num22 + ((Component)this).gameObject.transform.up * num27 * num23; } labeled_surfacedrives[j].drive_rpm = num8 * labeled_surfacedrives[j].theoreticalTargetRpms * (1f + labeled_surfacedrives[j].basicRotorVariationMultiplier * tmp_y / (labeled_surfacedrives[j].overspeedYawFactorAtSpeed + labeled_surfacedrives[j].overspeedRollFactorAtSpeed + labeled_surfacedrives[j].overspeedPitchFactorAtSpeed)); break; } case GDrive.TDriveType.forward_rotor2: case GDrive.TDriveType.up_rotor2: case GDrive.TDriveType.right_rotor2: break; } switch (labeled_surfacedrives[j].type) { default: labeled_surfacedrives[j].drive_output = labeled_surfacedrives[j].drive_rpm; break; case GDrive.TDriveType.propeller: prop_v = labeled_surfacedrives[j].drive_rpm * labeled_surfacedrives[j].bladeLength * ((float)Math.PI / 60f); prop_a = (float)Math.PI / 2f - labeled_surfacedrives[j].bladeAngleYaw * ((float)Math.PI / 180f); prop_vn = prop_v * Mathf.Cos(prop_a); prop_vnd = Vector3.Dot(rigidbodyVelocity + neg_windspeed, ((Component)this).gameObject.transform.forward); if (prop_vn > prop_vnd) { prop_vnd = prop_vn - prop_vnd; } else { prop_vnd = prop_vn; } prop_s = 0.5f * labeled_surfacedrives[j].bladeLength * (labeled_surfacedrives[j].bladeWidthMin + labeled_surfacedrives[j].bladeWidthMax); prop_o = Mathf.Cos(labeled_surfacedrives[j].bladeAnglePitch * ((float)Math.PI / 180f)) * prop_s * labeled_surfacedrives[j].bladeShapeCoefficient * kdrag * (float)labeled_surfacedrives[j].bladeNumber; labeled_surfacedrives[j].drive_output = prop_o * prop_vnd * prop_vnd; labeled_surfacedrives[j].bladeWashSpeed = prop_vnd; break; case GDrive.TDriveType.rotor: prop_v = labeled_surfacedrives[j].drive_rpm * labeled_surfacedrives[j].bladeLength * ((float)Math.PI / 60f); prop_a = (float)Math.PI / 2f - labeled_surfacedrives[j].bladeAngleYaw * ((num5 - 0.5f + labeled_surfacedrives[j].rotorCollectiveBias) * labeled_surfacedrives[j].rotorCollectiveCoefficient + (num6 - 0.5f) * labeled_surfacedrives[j].rotorCyclicForwardCoefficient) * ((float)Math.PI / 180f); prop_a_b = (float)Math.PI / 2f - labeled_surfacedrives[j].bladeAngleYaw * ((num5 - 0.5f + labeled_surfacedrives[j].rotorCollectiveBias) * labeled_surfacedrives[j].rotorCollectiveCoefficient - (num6 - 0.5f) * labeled_surfacedrives[j].rotorCyclicForwardCoefficient) * ((float)Math.PI / 180f); prop_a_l = (float)Math.PI / 2f - labeled_surfacedrives[j].bladeAngleYaw * ((num5 - 0.5f + labeled_surfacedrives[j].rotorCollectiveBias) * labeled_surfacedrives[j].rotorCollectiveCoefficient + (num7 - 0.5f) * labeled_surfacedrives[j].rotorCyclicSideCoefficient) * ((float)Math.PI / 180f); prop_a_r = (float)Math.PI / 2f - labeled_surfacedrives[j].bladeAngleYaw * ((num5 - 0.5f + labeled_surfacedrives[j].rotorCollectiveBias) * labeled_surfacedrives[j].rotorCollectiveCoefficient - (num7 - 0.5f) * labeled_surfacedrives[j].rotorCyclicSideCoefficient) * ((float)Math.PI / 180f); prop_vn = prop_v * Mathf.Cos((prop_a + prop_a_l + prop_a_r + prop_a_b) / 4f); prop_vnd = prop_vn; prop_s = 0.5f * labeled_surfacedrives[j].bladeLength * (labeled_surfacedrives[j].bladeWidthMin + labeled_surfacedrives[j].bladeWidthMax); prop_o = Mathf.Cos(labeled_surfacedrives[j].bladeAnglePitch * ((float)Math.PI / 180f)) * prop_s * labeled_surfacedrives[j].bladeShapeCoefficient * kdrag * (float)labeled_surfacedrives[j].bladeNumber; labeled_surfacedrives[j].drive_output = prop_o * prop_vnd * Mathf.Abs(prop_vnd); kineticsGroundEffectForce += prop_vn / (labeled_surfacedrives[j].gameObject.transform.position.y - yPositionOfGround); labeled_surfacedrives[j].drive_rpm = (1f - labeled_surfacedrives[j].throttleRpmConversionFilter) * labeled_surfacedrives[j].drive_rpm + labeled_surfacedrives[j].throttleRpmConversionFilter * (labeled_surfacedrives[j].throttleMax * labeled_surfacedrives[j].throttleRpmConversionRatio - labeled_surfacedrives[j].rotorAutorotationCoefficient * labeled_surfacedrives[j].drive_output * Mathf.Cos((prop_a + prop_a_l + prop_a_r + prop_a_b) / 4f)); labeled_surfacedrives[j].bladeWashSpeed = 0f; break; case GDrive.TDriveType.tailrotor: prop_v = labeled_surfacedrives[j].drive_rpm * labeled_surfacedrives[j].bladeLength * ((float)Math.PI / 60f); prop_a = (float)Math.PI / 2f - labeled_surfacedrives[j].bladeAngleYaw * (0.5f - num5) * ((float)Math.PI / 180f); prop_vn = prop_v * Mathf.Cos(prop_a); prop_vnd = prop_vn; prop_s = 0.5f * labeled_surfacedrives[j].bladeLength * (labeled_surfacedrives[j].bladeWidthMin + labeled_surfacedrives[j].bladeWidthMax); prop_o = Mathf.Cos(labeled_surfacedrives[j].bladeAnglePitch * ((float)Math.PI / 180f)) * prop_s * labeled_surfacedrives[j].bladeShapeCoefficient * kdrag * (float)labeled_surfacedrives[j].bladeNumber; labeled_surfacedrives[j].drive_output = prop_o * prop_vnd * Mathf.Abs(prop_vnd); labeled_surfacedrives[j].bladeWashSpeed = 0f; break; case GDrive.TDriveType.sin: case GDrive.TDriveType.cos: labeled_surfacedrives[j].drive_output = 0f; labeled_surfacedrives[j].bladeWashSpeed = 0f; break; case GDrive.TDriveType.rotor_basic: case GDrive.TDriveType.forward_rotor2: case GDrive.TDriveType.up_rotor2: case GDrive.TDriveType.right_rotor2: break; } labeled_surfacedrives[j].drive_shaft += labeled_surfacedrives[j].drive_rpm / 60f * Time.fixedDeltaTime; if (labeled_surfacedrives[j].drive_shaft > 3600000f) { labeled_surfacedrives[j].drive_shaft -= 3600000f; } if (isCrashed) { labeled_surfacedrives[j].drive_rpm = 0f; labeled_surfacedrives[j].drive_shaft = 0f; } if (labeled_surfacedrives[j].shaftOutputPivotId.Length > 0) { switch (labeled_surfacedrives[j].type) { default: GPivot.setAnyPivot(labeled_surfacedrives[j].shaftOutputPivotId, labeled_surfacedrives[j].drive_shaft); GPivot.setAnyPivot(labeled_surfacedrives[j].shaftOutputPivotId + ".rpm", labeled_surfacedrives[j].drive_rpm); break; case GDrive.TDriveType.cos: GPivot.setAnyPivot(labeled_surfacedrives[j].shaftOutputPivotId, Mathf.Cos(labeled_surfacedrives[j].drive_shaft)); break; case GDrive.TDriveType.sin: GPivot.setAnyPivot(labeled_surfacedrives[j].shaftOutputPivotId, Mathf.Sin(labeled_surfacedrives[j].drive_shaft)); break; } } total_engine_force += labeled_surfacedrives[j].drive_output; if (isCrashed) { total_engine_force = 0f; } switch (labeled_surfacedrives[j].type) { case GDrive.TDriveType.rotor: prop_vnd = prop_v * Mathf.Cos(prop_a); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(labeled_surfacedrives[j].gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, labeled_surfacedrives[j].gameObject.transform.position + labeled_surfacedrives[j].gameObject.transform.forward * labeled_surfacedrives[j].bladeLength * 0.5f); } prop_vnd = prop_v * Mathf.Cos(prop_a_b); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(labeled_surfacedrives[j].gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, labeled_surfacedrives[j].gameObject.transform.position - labeled_surfacedrives[j].gameObject.transform.forward * labeled_surfacedrives[j].bladeLength * 0.5f); } prop_vnd = prop_v * Mathf.Cos(prop_a_l); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(labeled_surfacedrives[j].gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, labeled_surfacedrives[j].gameObject.transform.position - labeled_surfacedrives[j].gameObject.transform.right * labeled_surfacedrives[j].bladeLength * 0.5f); } prop_vnd = prop_v * Mathf.Cos(prop_a_r); if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(labeled_surfacedrives[j].gameObject.transform.up * (0.25f * prop_o * prop_vnd * Mathf.Abs(prop_vnd)) * globalSimulationScale, labeled_surfacedrives[j].gameObject.transform.position + labeled_surfacedrives[j].gameObject.transform.right * labeled_surfacedrives[j].bladeLength * 0.5f); } labeled_surfacedrives[j].rotorGyroscopicCoefficient = labeled_surfacedrives[j].bladeMass * (float)labeled_surfacedrives[j].bladeNumber / (labeled_surfacedrives[j].bladeMass * (float)labeled_surfacedrives[j].bladeNumber + ((Component)this).gameObject.GetComponent().mass); tmp_q = Quaternion.FromToRotation(labeled_surfacedrives[j].gameObject.transform.up, labeled_surfacedrives[j].rotorGyroscopicLastUp * labeled_surfacedrives[j].rotorGyroscopicCoefficient + labeled_surfacedrives[j].gameObject.transform.up * (1f - labeled_surfacedrives[j].rotorGyroscopicCoefficient)); ((Component)this).gameObject.transform.rotation = ((Component)this).gameObject.transform.rotation * tmp_q; labeled_surfacedrives[j].rotorGyroscopicLastUp = labeled_surfacedrives[j].gameObject.transform.up; break; case GDrive.TDriveType.tailrotor: if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(labeled_surfacedrives[j].gameObject.transform.right * labeled_surfacedrives[j].drive_output * globalSimulationScale, labeled_surfacedrives[j].gameObject.transform.position); } break; case GDrive.TDriveType.rotor_basic: case GDrive.TDriveType.forward_rotor2: case GDrive.TDriveType.up_rotor2: case GDrive.TDriveType.right_rotor2: break; default: if (simulationForcesActive) { ((Component)this).gameObject.GetComponent().AddForceAtPosition(labeled_surfacedrives[j].gameObject.transform.forward * labeled_surfacedrives[j].drive_output * globalSimulationScale, labeled_surfacedrives[j].gameObject.transform.position); } break; } if (globalRenderForceVectors && (Object)(object)labeled_surfacedrives[j].lineRenderer != (Object)null) { ((Renderer)labeled_surfacedrives[j].lineRenderer).material = tmp_lineRenderer_material; labeled_surfacedrives[j].lineRenderer.SetVertexCount(2); labeled_surfacedrives[j].lineRenderer.SetWidth(0.5f * globalSimulationScale, 0f * globalSimulationScale); labeled_surfacedrives[j].lineRenderer.SetPosition(0, labeled_surfacedrives[j].gameObject.transform.position); labeled_surfacedrives[j].lineRenderer.SetPosition(1, labeled_surfacedrives[j].gameObject.transform.position - labeled_surfacedrives[j].gameObject.transform.forward * num); } labeled_surfacedrives[j].lastPosition = tmp_transform.position; } for (int k = 0; k < labeled_surfacemisc_count; k++) { float num41 = inputThrottle_output; engine_renderer = labeled_surfacemisc[k].gameObject.GetComponent(); if (labeled_surfacemisc[k].lospeed) { if ((Object)(object)engine_renderer != (Object)null) { if (GPivot.getAnyPivot(labeled_surfacemisc[k].pivotId + ".rpm") >= labeled_surfacemisc[k].rpmThreshold) { engine_renderer.enabled = false; } else { engine_renderer.enabled = true; } } } else if (labeled_surfacemisc[k].hispeed && (Object)(object)engine_renderer != (Object)null) { if (GPivot.getAnyPivot(labeled_surfacemisc[k].pivotId + ".rpm") >= labeled_surfacemisc[k].rpmThreshold) { engine_renderer.enabled = true; } else { engine_renderer.enabled = false; } } } } public bool addTrails(Vector3 delta) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) addTrails_value += delta; return true; } private void ProcessTrails() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_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_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: 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_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_0661: Unknown result type (might be due to invalid IL or missing references) //IL_0666: 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_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_070e: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_029a: 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_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_07b6: Unknown result type (might be due to invalid IL or missing references) //IL_07bc: 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_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_07e6: Unknown result type (might be due to invalid IL or missing references) //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0804: 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_044a: 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_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045e: 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_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_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_096a: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Unknown result type (might be due to invalid IL or missing references) //IL_097a: 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_0a2d: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040a: 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_0414: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_0859: 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_08ba: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_0934: Unknown result type (might be due to invalid IL or missing references) //IL_0939: Unknown result type (might be due to invalid IL or missing references) bool flag = false; bool flag2 = false; if (--surfacetrails_interval_count <= 0) { surfacetrails_interval_count = 3; flag2 = true; } neg_windspeed = GWindBasic.windAt(((Component)this).gameObject.transform.position) * Time.fixedDeltaTime; for (int i = 0; i < surfacetrails_count; i++) { tmp_transform = ((Component)surfacetrails[i]).gameObject.transform; if (flag2) { surfacetrails[i].linePoint++; if (surfacetrails[i].linePoint >= 300) { surfacetrails[i].linePoint = 0; } } switch (surfacetrails[i].mode) { case GTrail.TTrailMode.throttle: flag = inputThrottle_output > 0.1f && ((Component)this).gameObject.transform.position.y + height < surfacetrails[i].heightThreshold; break; case GTrail.TTrailMode.standard: flag = inputTrails_output > 0.1f && ((Component)this).gameObject.transform.position.y + height < surfacetrails[i].heightThreshold; break; } if (!surfacetrails[i].trailEnabled) { flag = false; } if (flag) { ref Vector3 reference = ref surfacetrails[i].linePoints[surfacetrails[i].linePoint]; reference = tmp_transform.position; surfacetrails[i].linePointsEnabled[surfacetrails[i].linePoint] = true; } else { ref Vector3 reference2 = ref surfacetrails[i].linePoints[surfacetrails[i].linePoint]; reference2 = Vector3.zero; surfacetrails[i].linePointsEnabled[surfacetrails[i].linePoint] = false; } tmp_lineRenderer = surfacetrails[i].lineRenderer; int num = 0; int num2 = surfacetrails[i].linePoint; int num3 = num2 - 1; for (int j = 0; j < 300; j++) { if (!surfacetrails[i].linePointsEnabled[num2]) { if (num > 0) { break; } num3 = num2 - 1; } else { num++; ref Vector3 reference3 = ref surfacetrails[i].linePoints[num2]; reference3 += neg_windspeed + ((num2 != surfacetrails[i].linePoint) ? addTrails_value : Vector3.zero); if (j > 0) { tmp_v1 = Vector3.zero; for (int k = 0; k < labeled_surfacedrives_count; k++) { if (labeled_surfacedrives[k].bladeWashEnabled) { tmp_v = surfacetrails[i].linePoints[num2] - labeled_surfacedrives[k].gameObject.transform.position; if (((Vector3)(ref tmp_v)).magnitude < labeled_surfacedrives[k].bladeWashRadiusTangent * globalSimulationScale) { kineticsPropwash_internal = labeled_surfacedrives[k].bladeWashSpeed * globalSimulationScale; ref Vector3 reference4 = ref surfacetrails[i].linePoints[num2]; reference4 -= kineticsPropwash_internal * Time.fixedDeltaTime * (labeled_surfacedrives[k].bladeWashRadiusTangent - ((Vector3)(ref tmp_v)).magnitude) * (labeled_surfacedrives[k].bladeWashRadiusTangent - ((Vector3)(ref tmp_v)).magnitude) / labeled_surfacedrives[k].bladeWashRadiusTangent / labeled_surfacedrives[k].bladeWashRadiusTangent * ((Component)this).gameObject.transform.forward; } } } ref Vector3 reference5 = ref surfacetrails[i].linePoints[num2]; reference5 -= tmp_v1 * Time.fixedDeltaTime; } } num2--; if (num2 < 0) { num2 = 299; } } if (num >= 2) { if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetVertexCount(num - 1); } num2 = num3; if (num2 < 0) { num2 = 299; } for (int l = 0; l < num - 1; l++) { if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetPosition(l, surfacetrails[i].linePoints[num2]); } num2--; if (num2 < 0) { num2 = 299; } } } else if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetVertexCount(0); } } for (int m = 0; m < labeled_surfacetrails_count; m++) { tmp_transform = labeled_surfacetrails[m].gameObject.transform; if (flag2) { labeled_surfacetrails[m].linePoint++; if (labeled_surfacetrails[m].linePoint >= 300) { labeled_surfacetrails[m].linePoint = 0; } } switch (labeled_surfacetrails[m].mode) { case GTrail.TTrailMode.throttle: flag = inputThrottle_output > 0.1f && ((Component)this).gameObject.transform.position.y + height < labeled_surfacetrails[m].heightThreshold; break; case GTrail.TTrailMode.standard: flag = inputTrails_output > 0.1f && ((Component)this).gameObject.transform.position.y + height < labeled_surfacetrails[m].heightThreshold; break; } if (flag) { ref Vector3 reference6 = ref labeled_surfacetrails[m].linePoints[labeled_surfacetrails[m].linePoint]; reference6 = tmp_transform.position; labeled_surfacetrails[m].linePointsEnabled[labeled_surfacetrails[m].linePoint] = true; } else { ref Vector3 reference7 = ref labeled_surfacetrails[m].linePoints[labeled_surfacetrails[m].linePoint]; reference7 = Vector3.zero; labeled_surfacetrails[m].linePointsEnabled[labeled_surfacetrails[m].linePoint] = false; } tmp_lineRenderer = labeled_surfacetrails[m].lineRenderer; int num4 = 0; int num5 = labeled_surfacetrails[m].linePoint; int num6 = num5 - 1; for (int n = 0; n < 300; n++) { if (!labeled_surfacetrails[m].linePointsEnabled[num5]) { if (num4 > 0) { break; } num6 = num5 - 1; } else { num4++; ref Vector3 reference8 = ref labeled_surfacetrails[m].linePoints[num5]; reference8 += neg_windspeed + ((num5 != labeled_surfacetrails[m].linePoint) ? addTrails_value : Vector3.zero); if (n > 0) { tmp_v1 = Vector3.zero; for (int num7 = 0; num7 < labeled_surfacedrives_count; num7++) { if (labeled_surfacedrives[num7].bladeWashEnabled) { tmp_v = labeled_surfacetrails[m].linePoints[num5] - labeled_surfacedrives[num7].gameObject.transform.position; if (((Vector3)(ref tmp_v)).magnitude < labeled_surfacedrives[num7].bladeWashRadiusTangent * globalSimulationScale) { kineticsPropwash_internal = labeled_surfacedrives[num7].bladeWashSpeed * globalSimulationScale; ref Vector3 reference9 = ref labeled_surfacetrails[m].linePoints[num5]; reference9 -= kineticsPropwash_internal * Time.fixedDeltaTime * (labeled_surfacedrives[num7].bladeWashRadiusTangent - ((Vector3)(ref tmp_v)).magnitude) * (labeled_surfacedrives[num7].bladeWashRadiusTangent - ((Vector3)(ref tmp_v)).magnitude) / labeled_surfacedrives[num7].bladeWashRadiusTangent / labeled_surfacedrives[num7].bladeWashRadiusTangent * ((Component)this).gameObject.transform.forward; } } } ref Vector3 reference10 = ref labeled_surfacetrails[m].linePoints[num5]; reference10 -= tmp_v1 * Time.fixedDeltaTime; } } num5--; if (num5 < 0) { num5 = 299; } } if (num4 >= 2) { if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetVertexCount(num4 - 1); } num5 = num6; if (num5 < 0) { num5 = 299; } for (int num8 = 0; num8 < num4 - 1; num8++) { if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetPosition(num8, labeled_surfacetrails[m].linePoints[num5]); } num5--; if (num5 < 0) { num5 = 299; } } } else if ((Object)(object)tmp_lineRenderer != (Object)null) { tmp_lineRenderer.SetVertexCount(0); } } addTrails_value = Vector3.zero; } private void Start() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown if ((Object)(object)((Component)this).gameObject.GetComponent() == (Object)null) { Debug.LogError((object)"GAircraft needs to be attached to a RigidBody!"); return; } if ((Object)(object)singleton == (Object)null) { singleton = this; } if ((Object)(object)GameObject.Find(inputThrottleNitroSoundGameObjectName) != (Object)null && (Object)(object)GameObject.Find(inputThrottleNitroSoundGameObjectName).GetComponent("AudioSource") != (Object)null) { inputThrottleNitroSoundAudioSource = (AudioSource)GameObject.Find(inputThrottleNitroSoundGameObjectName).GetComponent("AudioSource"); } tmp_lineRenderer_material = new Material(Shader.Find("Particles/Additive")); center = ((Component)this).gameObject.GetComponent().centerOfMass; speed_lastPosition = ((Component)this).gameObject.transform.position; body_min_x = 1E+09f; body_max_x = -1E+09f; body_min_y = 1E+09f; body_max_y = -1E+09f; body_min_z = 1E+09f; body_max_z = -1E+09f; log("GAircraft: looking for the airplane parts..."); FindNodes(((Component)this).gameObject, 0); SortCameras(); if (surfaces_count + labeled_surfaces_count < 1) { body_min_x = 0f; body_max_x = 0f; body_min_y = 0f; body_max_y = 0f; body_min_z = 0f; body_max_z = 0f; } if (Mathf.Abs(body_max_x - body_min_x) < 0.0001f) { body_max_x = body_min_x + 0.0001f; } if (Mathf.Abs(body_max_y - body_min_y) < 0.0001f) { body_max_y = body_min_y + 0.0001f; } if (Mathf.Abs(body_max_z - body_min_z) < 0.0001f) { body_max_z = body_min_z + 0.0001f; } ((Vector3)(ref body_center)).Set((body_min_x + body_max_x) / 2f, (body_min_x + body_max_x) / 2f, (body_min_x + body_max_x) / 2f); body_radius = 0f; if ((body_max_x - body_min_x) / 2f > body_radius) { body_radius = (body_max_x - body_min_x) / 2f; } if ((body_max_y - body_min_y) / 2f > body_radius) { body_radius = (body_max_y - body_min_y) / 2f; } if ((body_max_z - body_min_z) / 2f > body_radius) { body_radius = (body_max_z - body_min_z) / 2f; } FindNodes2ndPass(((Component)this).gameObject, 0); log("GAircraft: found " + (surfaces_count + labeled_surfaces_count) + " surfaces, " + (surfacepivots_count + labeled_surfacepivots_count) + " pivots and " + (surfacedrives_count + labeled_surfacedrives_count) + " drives."); StartKinetics(); } private bool checkPausedStatus() { if (wasPaused) { if (!isPhysicsPaused && (Object)(object)((Component)this).GetComponent() != (Object)null) { ((Component)this).GetComponent().isKinematic = false; wasPaused = false; } } else { if (isPhysicsPaused && (Object)(object)((Component)this).GetComponent() != (Object)null) { ((Component)this).GetComponent().isKinematic = true; wasPaused = true; ignoreCrashUntil = Time.realtimeSinceStartup; } if (isPhysicsPaused && (Object)(object)((Component)this).GetComponent() != (Object)null) { ((Component)this).GetComponent().isKinematic = true; } } if (wasPaused) { return true; } if (isSimulationPaused) { ignoreCrashUntil = Time.realtimeSinceStartup; } if (isPhysicsPaused) { ignoreCrashUntil = Time.realtimeSinceStartup; } return isSimulationPaused; } 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_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 (EngineSwitch.transform.localEulerAngles.x < 45f) { gaugesRpmGenerate = false; gaugesRpm_output -= 10000f; gaugesRpm_lastValue -= 10000f; if (gaugesRpm_output < 0f) { gaugesRpm_output = 0f; } if (gaugesRpm_lastValue < 0f) { gaugesRpm_lastValue = 0f; } } else if (EngineSwitch.transform.localEulerAngles.x > 45f) { gaugesRpmGenerate = true; } if (!checkPausedStatus()) { ProcessLiftnDrag_in_update(); } } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_020c: 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) if (EngineSwitch.transform.localEulerAngles.x < 45f) { gaugesRpmGenerate = false; gaugesRpm_output *= 0.5f; gaugesRpm_lastValue *= 0.5f; if (gaugesRpm_output < 0f) { gaugesRpm_output = 0f; } if (gaugesRpm_lastValue < 0f) { gaugesRpm_lastValue = 0f; } } else if (EngineSwitch.transform.localEulerAngles.x > 45f) { gaugesRpmGenerate = true; } if (checkPausedStatus()) { if ((Object)(object)inputThrottleNitroSoundAudioSource != (Object)null) { inputThrottleNitroSoundAudioSource.volume = 0f; } return; } if ((Object)(object)inputThrottleNitroSoundAudioSource != (Object)null) { inputThrottleNitroSoundAudioSource.volume = kThrottle_ntr_multiplier - 1f; } if (simulationFirstFrames > 0) { simulationFirstFrames--; GAircraftDropPointVelocity = true; } else { simulationFirstFrames_complete = true; } if ((Object)(object)((Component)this).gameObject.GetComponent() != (Object)null) { if (GAircraftDropPointVelocity) { rigidbodyVelocity = Vector3.zero; } else { rigidbodyVelocity = ((Component)this).gameObject.GetComponent().velocity; } if (GAircraftDropPointVelocity) { rigidbodyVelocity_lastValue = Vector3.zero; } simulationForcesActive = simulationFirstFrames_complete && (!isCrashed || crashType != TCrashType.helicopter); ProcessKinetics(); ProcessInput(); ProcessDrives(); ProcessLiftnDrag(); ProcessPivots(); ProcessTrails(); checkBreakOnFixedUpdate(); GAircraftDropPointVelocity = false; rigidbodyVelocity_lastValue = rigidbodyVelocity; } } public Vector3 vibrationGet() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) float realtimeSinceStartup = Time.realtimeSinceStartup; if (realtimeSinceStartup > vibrationLastTime + Time.fixedDeltaTime) { if (vibrationTime > 0f) { vibrationTime -= realtimeSinceStartup - vibrationLastTime; vibrationAmplitude = vibrationAmplitudePeak * (vibrationTime / vibrationDuration) * Mathf.Cos(vibrationTime / vibrationDuration * vibrationFrequency); } else { vibrationAmplitude = 0f; } vibrationLastTime = realtimeSinceStartup; } return vibrationAmplitude * vibrationDirection; } public bool vibrationSet(Vector3 vibrationDirection, float vibrationAmplitude, float vibrationDuration, float vibrationFrequency) { //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) this.vibrationDirection = vibrationDirection; this.vibrationAmplitude = vibrationAmplitude; vibrationAmplitudePeak = vibrationAmplitude; vibrationTime = vibrationDuration; this.vibrationDuration = vibrationDuration; this.vibrationFrequency = vibrationFrequency; return true; } public bool placeAt(Vector3 position, Vector3 eulerAngles, bool applySpeed, float newSpeed, bool applyThrottle, float startThrottle) { //IL_000c: 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_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_009e: Unknown result type (might be due to invalid IL or missing references) ((Component)this).gameObject.transform.position = position; GAircraftDropPointVelocity = true; ((Component)this).gameObject.transform.rotation = Quaternion.Euler(eulerAngles); if (applySpeed) { if (((Component)this).gameObject.GetComponent().isKinematic) { ((Component)this).gameObject.GetComponent().isKinematic = false; } ((Component)this).gameObject.GetComponent().velocity = ((Component)this).gameObject.transform.forward * newSpeed; ((Component)this).gameObject.GetComponent().angularVelocity = new Vector3(0f, 0f, 0f); } if (applyThrottle) { inputThrottle_internal2 = startThrottle; inputThrottle_internal = startThrottle; SetDrives(startThrottle); } return true; } public bool placeAt(GameObject reference, bool applySpeed, float newSpeed, bool applyThrottle, float startThrottle) { //IL_0008: 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) return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed, newSpeed, applyThrottle, startThrottle); } public bool placeAt(Vector3 position, Vector3 eulerAngles, bool applySpeed, float newSpeed) { //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) return placeAt(position, eulerAngles, applySpeed, newSpeed, applyThrottle: false, 0f); } public bool placeAt(GameObject reference, bool applySpeed, float newSpeed) { //IL_0008: 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) return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed, newSpeed, applyThrottle: false, 0f); } public bool placeAt(Vector3 position, Vector3 eulerAngles, bool applySpeed, float newSpeed, bool applyThrottle) { //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) return placeAt(position, eulerAngles, applySpeed, newSpeed, applyThrottle, 0f); } public bool placeAt(GameObject reference, bool applySpeed, float newSpeed, bool applyThrottle) { //IL_0008: 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) return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed, newSpeed, applyThrottle, 0f); } public bool placeAt(Vector3 position, Vector3 eulerAngles, bool applySpeed, bool applyThrottle, float startThrottle) { //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) return placeAt(position, eulerAngles, applySpeed, 0f, applyThrottle, startThrottle); } public bool placeAt(GameObject reference, bool applySpeed, bool applyThrottle, float startThrottle) { //IL_0008: 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) return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed, 0f, applyThrottle, startThrottle); } public bool placeAt(Vector3 position, Vector3 eulerAngles, float newSpeed, float startThrottle) { //IL_007f: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (startThrottle >= 0f && startThrottle <= 1f) { if (Mathf.Abs(newSpeed) > 0.01f) { return placeAt(position, eulerAngles, applySpeed: true, newSpeed, applyThrottle: true, startThrottle); } return placeAt(position, eulerAngles, applySpeed: false, newSpeed, applyThrottle: true, startThrottle); } if (Mathf.Abs(newSpeed) > 0.01f) { return placeAt(position, eulerAngles, applySpeed: true, newSpeed, applyThrottle: false, 0f); } return placeAt(position, eulerAngles, applySpeed: false, newSpeed, applyThrottle: false, 0f); } public bool placeAt(GameObject reference, float newSpeed, float startThrottle) { //IL_00bd: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (startThrottle >= 0f && startThrottle <= 1f) { if (Mathf.Abs(newSpeed) > 0.01f) { return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed: true, newSpeed, applyThrottle: true, startThrottle); } return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed: false, newSpeed, applyThrottle: true, startThrottle); } if (Mathf.Abs(newSpeed) > 0.01f) { return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed: true, newSpeed, applyThrottle: false, 0f); } return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed: false, newSpeed, applyThrottle: false, 0f); } public bool placeAt(Vector3 position, Vector3 eulerAngles, float newSpeed) { //IL_002b: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (Mathf.Abs(newSpeed) > 0.01f) { return placeAt(position, eulerAngles, applySpeed: true, newSpeed, applyThrottle: false, 0f); } return placeAt(position, eulerAngles, applySpeed: false, newSpeed, applyThrottle: false, 0f); } public bool placeAt(GameObject reference, float newSpeed) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (Mathf.Abs(newSpeed) > 0.01f) { return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed: true, newSpeed, applyThrottle: false, 0f); } return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed: false, newSpeed, applyThrottle: false, 0f); } public bool placeAt(Vector3 position, Vector3 eulerAngles) { //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) return placeAt(position, eulerAngles, applySpeed: false, 0f, applyThrottle: false, 0f); } public bool placeAt(GameObject reference) { //IL_0008: 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) return placeAt(reference.transform.position, reference.transform.eulerAngles, applySpeed: false, 0f, applyThrottle: false, 0f); } private void checkBreakOnFixedUpdate() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (crashType == TCrashType.none || !(Time.realtimeSinceStartup > ignoreCrashUntil)) { return; } Vector3 val = rigidbodyVelocity - rigidbodyVelocity_lastValue; float magnitude = ((Vector3)(ref val)).magnitude; if (!isCrashed) { crashAcceleration1HoldTime_count += Time.fixedTime; crashAcceleration2HoldTime_count += Time.fixedTime; } else { crashAcceleration1HoldTime_count = 0f; crashAcceleration2HoldTime_count = 0f; } if (magnitude > crashAcceleration1Threshold) { if (crashAcceleration1HoldTime_count > crashAcceleration1HoldTime) { isCrashed = true; } } else { crashAcceleration1HoldTime_count = 0f; } if (magnitude > crashAcceleration2Threshold) { if (crashAcceleration2HoldTime_count > crashAcceleration2HoldTime) { isCrashed = true; } } else { crashAcceleration2HoldTime_count = 0f; } if (magnitude < crashAccelerationFlippedThreshold && ((Component)this).transform.up.y < 0f) { isCrashed = true; } } public void ignore_check_simulation_broken() { ignoreCrashUntil = Time.realtimeSinceStartup + 1f; } } public class GAircraftController : MonoBehaviour { public enum TAircraftControllerType { bypass, helicopter_autolevel, airplane_autolevel, airplane_goto, airplaned_goto, airplane2_goto, airplaned, airplane_fast_autolevel, basic_touch_control, airplanep_goto } private GAircraft aircraft = null; public TAircraftControllerType type = TAircraftControllerType.bypass; private GameObject target = null; public string targetGameObject = "Write here yours GameObject target"; public float pitchLimit = 25f; public float pitchMultiplier = 2f; public float yawLimit = 55f; public float yawMultiplier = 1.5f; public float rollLimit = 45f; public float rollMultiplier = 1.5f; private float auto_ailerons = 0f; private float auto_ailerons_filtered = 0f; private float auto_ailerons_filter_coeficient = 0.01f; private float auto_elevator = 0f; private float auto_elevator_filtered = 0f; private float auto_elevator_filter_coeficient = 0.01f; private float auto_rudder = 0f; private float auto_rudder_filtered = 0f; private float auto_rudder_filter_coeficient = 0.01f; private float auto_rudder_target = 0f; private float auto_throttle = 0f; private float auto_throttle_filtered = 0f; private float auto_throttle_filter_coeficient = 0.01f; private float auto_throttle_target = 0f; private void Start() { aircraft = (GAircraft)(object)((Component)this).gameObject.GetComponent("GAircraft"); if ((Object)(object)GameObject.Find(targetGameObject) != (Object)null) { target = GameObject.Find(targetGameObject); } } private void FixedUpdate() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_1620: Unknown result type (might be due to invalid IL or missing references) //IL_1625: Unknown result type (might be due to invalid IL or missing references) //IL_1644: Unknown result type (might be due to invalid IL or missing references) //IL_1649: Unknown result type (might be due to invalid IL or missing references) //IL_17a8: Unknown result type (might be due to invalid IL or missing references) //IL_17ad: Unknown result type (might be due to invalid IL or missing references) //IL_17ba: Unknown result type (might be due to invalid IL or missing references) //IL_17bf: Unknown result type (might be due to invalid IL or missing references) //IL_1b10: Unknown result type (might be due to invalid IL or missing references) //IL_1b15: Unknown result type (might be due to invalid IL or missing references) //IL_1b34: Unknown result type (might be due to invalid IL or missing references) //IL_1b39: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_09c5: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09dc: Unknown result type (might be due to invalid IL or missing references) //IL_09e9: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Unknown result type (might be due to invalid IL or missing references) //IL_0a05: Unknown result type (might be due to invalid IL or missing references) //IL_0a07: Unknown result type (might be due to invalid IL or missing references) //IL_123d: Unknown result type (might be due to invalid IL or missing references) //IL_1242: Unknown result type (might be due to invalid IL or missing references) //IL_124f: Unknown result type (might be due to invalid IL or missing references) //IL_1254: Unknown result type (might be due to invalid IL or missing references) //IL_1261: Unknown result type (might be due to invalid IL or missing references) //IL_1271: Unknown result type (might be due to invalid IL or missing references) //IL_1276: Unknown result type (might be due to invalid IL or missing references) //IL_127b: Unknown result type (might be due to invalid IL or missing references) //IL_127d: Unknown result type (might be due to invalid IL or missing references) //IL_127f: Unknown result type (might be due to invalid IL or missing references) //IL_1809: 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_17dd: Unknown result type (might be due to invalid IL or missing references) //IL_17ed: Unknown result type (might be due to invalid IL or missing references) //IL_17f2: Unknown result type (might be due to invalid IL or missing references) //IL_17f7: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: 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_0575: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Unknown result type (might be due to invalid IL or missing references) //IL_0a6e: Unknown result type (might be due to invalid IL or missing references) //IL_0a5e: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Unknown result type (might be due to invalid IL or missing references) //IL_12e4: Unknown result type (might be due to invalid IL or missing references) //IL_12e6: Unknown result type (might be due to invalid IL or missing references) //IL_12d6: Unknown result type (might be due to invalid IL or missing references) //IL_12d8: Unknown result type (might be due to invalid IL or missing references) //IL_1815: Unknown result type (might be due to invalid IL or missing references) //IL_1817: Unknown result type (might be due to invalid IL or missing references) //IL_0a78: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Unknown result type (might be due to invalid IL or missing references) //IL_12f0: Unknown result type (might be due to invalid IL or missing references) //IL_12f2: Unknown result type (might be due to invalid IL or missing references) //IL_187c: 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_186e: Unknown result type (might be due to invalid IL or missing references) //IL_1870: Unknown result type (might be due to invalid IL or missing references) //IL_0a99: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0a8b: Unknown result type (might be due to invalid IL or missing references) //IL_0a8d: Unknown result type (might be due to invalid IL or missing references) //IL_1311: Unknown result type (might be due to invalid IL or missing references) //IL_1313: Unknown result type (might be due to invalid IL or missing references) //IL_1303: Unknown result type (might be due to invalid IL or missing references) //IL_1305: Unknown result type (might be due to invalid IL or missing references) //IL_1888: Unknown result type (might be due to invalid IL or missing references) //IL_188a: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0ab0: Unknown result type (might be due to invalid IL or missing references) //IL_0ab5: Unknown result type (might be due to invalid IL or missing references) //IL_0ac2: Unknown result type (might be due to invalid IL or missing references) //IL_0ac7: Unknown result type (might be due to invalid IL or missing references) //IL_1328: Unknown result type (might be due to invalid IL or missing references) //IL_132d: Unknown result type (might be due to invalid IL or missing references) //IL_1344: Unknown result type (might be due to invalid IL or missing references) //IL_1349: Unknown result type (might be due to invalid IL or missing references) //IL_1368: Unknown result type (might be due to invalid IL or missing references) //IL_136d: Unknown result type (might be due to invalid IL or missing references) //IL_18a9: Unknown result type (might be due to invalid IL or missing references) //IL_18ab: Unknown result type (might be due to invalid IL or missing references) //IL_189b: Unknown result type (might be due to invalid IL or missing references) //IL_189d: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: 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_0ae6: Unknown result type (might be due to invalid IL or missing references) //IL_0aeb: Unknown result type (might be due to invalid IL or missing references) //IL_18c0: Unknown result type (might be due to invalid IL or missing references) //IL_18c5: 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_0b4c: Unknown result type (might be due to invalid IL or missing references) //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b1a: 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_0316: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_0d04: Unknown result type (might be due to invalid IL or missing references) //IL_0d09: Unknown result type (might be due to invalid IL or missing references) //IL_0e17: Unknown result type (might be due to invalid IL or missing references) //IL_0e1c: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; float num = 0f; float num2 = 0f; switch (type) { default: GPivot.setAnyPivot("cailerons", aircraft.inputAilerons_output); GPivot.setAnyPivot("celevator", aircraft.inputElevator_output); GPivot.setAnyPivot("crudder", aircraft.inputRudder_output); GPivot.setAnyPivot("cthrottle", aircraft.inputThrottle_output); break; case TAircraftControllerType.helicopter_autolevel: { float num6 = 0.01f; float num7 = 0.4f; float num8 = 0.4f; float num9 = 0.1f; float num10 = 0.4f; float num11 = 0.2f; float num12 = 0.01f; float num13 = 0.2f; float num14 = 0.01f; float num15 = 0.2f; val = ((Component)this).gameObject.transform.eulerAngles; if (val.x > 180f) { val.x -= 360f; } if (val.y > 180f) { val.y -= 360f; } if (val.z > 180f) { val.z -= 360f; } if (auto_rudder_target < val.y - 180f) { auto_rudder_target += 360f; } if (auto_rudder_target > val.y + 180f) { auto_rudder_target -= 360f; } auto_rudder_target = auto_rudder_target * (1f - num9) + val.y * num9; auto_throttle_target = auto_throttle_target * (1f - num6) + ((Component)this).gameObject.transform.position.y * num6; auto_ailerons = 0.5f + val.z * num14; if (auto_ailerons < 0f) { auto_ailerons = 0f; } if (auto_ailerons > 1f) { auto_ailerons = 1f; } auto_elevator = 0.5f + val.x * num12; if (auto_elevator < 0f) { auto_elevator = 0f; } if (auto_elevator > 1f) { auto_elevator = 1f; } auto_rudder = 0.5f + (auto_rudder_target - val.y) * num10; if (auto_rudder < 0f) { auto_rudder = 0f; } if (auto_rudder > 1f) { auto_rudder = 1f; } auto_throttle = (auto_throttle_target - ((Component)this).gameObject.transform.position.y) * num8; if (auto_throttle < 0.2f) { auto_throttle = 0.2f; } if (auto_throttle > 0.8f) { auto_throttle = 0.8f; } GPivot.setAnyPivot("cailerons", auto_ailerons * num15 + aircraft.inputAilerons_output * (1f - num15)); GPivot.setAnyPivot("celevator", auto_elevator * num13 + aircraft.inputElevator_output * (1f - num13)); GPivot.setAnyPivot("crudder", auto_rudder * num11 + aircraft.inputRudder_output * (1f - num11)); GPivot.setAnyPivot("cthrottle", auto_throttle * num7 + aircraft.inputThrottle_output * (1f - num7)); aircraft.inputAilerons_internal = auto_ailerons * num15 + aircraft.inputAilerons_output * (1f - num15); aircraft.inputElevator_internal = auto_elevator * num13 + aircraft.inputElevator_output * (1f - num13); aircraft.inputRudder_internal = auto_rudder * num11 + aircraft.inputRudder_output * (1f - num11); aircraft.inputThrottle_output = auto_throttle * num7 + (aircraft.inputThrottle_output + aircraft.inputThrottle_internal + aircraft.kThrottle_aft) * (1f - num7); break; } case TAircraftControllerType.airplane_autolevel: { float num6 = 0.01f; float num7 = 0.4f; float num8 = 0.4f; float num9 = 0.01f; float num10 = 0.1f; float num11 = 0f; float num12 = 0.1f; float num13 = 0.7f; float num14 = 0.01f; float num15 = 0.2f; val = ((Component)this).gameObject.transform.eulerAngles; Vector3 velocity = ((Component)this).gameObject.GetComponent().velocity; if (((Vector3)(ref velocity)).magnitude > 0f) { Vector3 velocity2 = ((Component)this).gameObject.GetComponent().velocity; if (velocity2.y > 0f) { velocity2.y = 0f; val.x = 0f - Vector3.Angle(velocity2, ((Component)this).gameObject.GetComponent().velocity); } else { velocity2.y = 0f; val.x = Vector3.Angle(velocity2, ((Component)this).gameObject.GetComponent().velocity); } } if (val.x > 180f) { val.x -= 360f; } if (val.y > 180f) { val.y -= 360f; } if (val.z > 180f) { val.z -= 360f; } if (auto_rudder_target < val.y - 180f) { auto_rudder_target += 360f; } if (auto_rudder_target > val.y + 180f) { auto_rudder_target -= 360f; } auto_rudder_target = auto_rudder_target * (1f - num9) + val.y * num9; auto_throttle_target = auto_throttle_target * (1f - num6) + ((Component)this).gameObject.transform.position.y * num6; auto_ailerons = 0.5f + val.z * num14; if (auto_ailerons < 0f) { auto_ailerons = 0f; } if (auto_ailerons > 1f) { auto_ailerons = 1f; } auto_elevator = 0.65f + val.x * num12; if (auto_elevator < 0f) { auto_elevator = 0f; } if (auto_elevator > 1f) { auto_elevator = 1f; } auto_rudder = 0.5f + (auto_rudder_target - val.y) * num10; if (auto_rudder < 0f) { auto_rudder = 0f; } if (auto_rudder > 1f) { auto_rudder = 1f; } auto_throttle = (auto_throttle_target - ((Component)this).gameObject.transform.position.y) * num8; if (auto_throttle < 0.2f) { auto_throttle = 0.2f; } if (auto_throttle > 0.8f) { auto_throttle = 0.8f; } auto_ailerons_filtered = auto_ailerons_filtered * (1f - auto_ailerons_filter_coeficient) + auto_ailerons * auto_ailerons_filter_coeficient; auto_elevator_filtered = auto_elevator_filtered * (1f - auto_elevator_filter_coeficient) + auto_elevator * auto_elevator_filter_coeficient; auto_rudder_filtered = auto_rudder_filtered * (1f - auto_rudder_filter_coeficient) + auto_rudder * auto_rudder_filter_coeficient; auto_throttle_filtered = auto_throttle_filtered * (1f - auto_throttle_filter_coeficient) + auto_throttle * auto_throttle_filter_coeficient; GPivot.setAnyPivot("cailerons", auto_ailerons_filtered * num15 + aircraft.inputAilerons_output * (1f - num15)); GPivot.setAnyPivot("celevator", auto_elevator_filtered * num13 + aircraft.inputElevator_output * (1f - num13)); GPivot.setAnyPivot("crudder", auto_rudder_filtered * num11 + aircraft.inputRudder_output * (1f - num11)); GPivot.setAnyPivot("cthrottle", auto_throttle_filtered * num7 + aircraft.inputThrottle_output * (1f - num7)); break; } case TAircraftControllerType.airplane_goto: case TAircraftControllerType.airplaned_goto: case TAircraftControllerType.airplanep_goto: { if ((Object)(object)target == (Object)null) { break; } float num6 = 0.01f; float num7 = 0.4f; float num8 = 0.4f; float num9 = 0.01f; float num10 = 0.1f; float num11 = 0f; float num12 = 0.1f; float num13 = 0.7f; float num14 = 0.01f * (rollLimit / 45f); float num15 = 0.2f; Vector3 forward = ((Component)this).gameObject.transform.forward; Vector3 right = ((Component)this).gameObject.transform.right; Vector3 val2 = target.transform.position - ((Component)this).gameObject.transform.position; Vector3 val3 = val2; float num16 = yawLimit; float num17 = yawMultiplier; float num18 = pitchLimit; float num19 = pitchMultiplier; forward.y = 0f; right.y = 0f; val2.y = 0f; num2 = ((!(val3.y > 0f)) ? (0f - Vector3.Angle(val2, val3)) : Vector3.Angle(val2, val3)); num = ((!(Vector3.Dot(val2, right) > 0f)) ? (0f - Vector3.Angle(forward, val2)) : Vector3.Angle(forward, val2)); val = ((Component)this).gameObject.transform.eulerAngles; Vector3 velocity3 = ((Component)this).gameObject.GetComponent().velocity; if (((Vector3)(ref velocity3)).magnitude > 0f) { Vector3 velocity4 = ((Component)this).gameObject.GetComponent().velocity; if (velocity4.y > 0f) { velocity4.y = 0f; val.x = 0f - Vector3.Angle(velocity4, ((Component)this).gameObject.GetComponent().velocity); } else { velocity4.y = 0f; val.x = Vector3.Angle(velocity4, ((Component)this).gameObject.GetComponent().velocity); } } if (num2 > num18) { val.x += num18 * num19; } else if (num2 < 0f - num18) { val.x -= num18 * num19; } else { val.x += num2 * num19; } if (val.x > 180f) { val.x -= 360f; } if (val.y > 180f) { val.y -= 360f; } if (val.z > 180f) { val.z -= 360f; } if (num > num16) { val.z += num16 * num17; } else if (num < 0f - num16) { val.z -= num16 * num17; } else { val.z += num * num17; } if (auto_rudder_target < val.y - 180f) { auto_rudder_target += 360f; } if (auto_rudder_target > val.y + 180f) { auto_rudder_target -= 360f; } auto_rudder_target = auto_rudder_target * (1f - num9) + val.y * num9; auto_throttle_target = auto_throttle_target * (1f - num6) + ((Component)this).gameObject.transform.position.y * num6; auto_ailerons = 0.5f + val.z * num14; if (auto_ailerons < 0f) { auto_ailerons = 0f; } if (auto_ailerons > 1f) { auto_ailerons = 1f; } auto_elevator = 0.65f + val.x * num12; if (auto_elevator < 0f) { auto_elevator = 0f; } if (auto_elevator > 1f) { auto_elevator = 1f; } auto_rudder = 0.5f + (auto_rudder_target - val.y) * num10; if (auto_rudder < 0f) { auto_rudder = 0f; } if (auto_rudder > 1f) { auto_rudder = 1f; } auto_throttle = (auto_throttle_target - ((Component)this).gameObject.transform.position.y) * num8; if (auto_throttle < 0.2f) { auto_throttle = 0.2f; } if (auto_throttle > 0.8f) { auto_throttle = 0.8f; } auto_ailerons_filtered = auto_ailerons_filtered * (1f - auto_ailerons_filter_coeficient) + auto_ailerons * auto_ailerons_filter_coeficient; auto_elevator_filtered = auto_elevator_filtered * (1f - auto_elevator_filter_coeficient) + auto_elevator * auto_elevator_filter_coeficient; auto_rudder_filtered = auto_rudder_filtered * (1f - auto_rudder_filter_coeficient) + auto_rudder * auto_rudder_filter_coeficient; auto_throttle_filtered = auto_throttle_filtered * (1f - auto_throttle_filter_coeficient) + auto_throttle * auto_throttle_filter_coeficient; switch (type) { case TAircraftControllerType.airplane_goto: GPivot.setAnyPivot("cailerons", auto_ailerons_filtered * num15 + aircraft.inputAilerons_output * (1f - num15)); GPivot.setAnyPivot("celevator", auto_elevator_filtered * num13 + aircraft.inputElevator_output * (1f - num13)); GPivot.setAnyPivot("crudder", auto_rudder_filtered * num11 + aircraft.inputRudder_output * (1f - num11)); GPivot.setAnyPivot("cthrottle", 1f); aircraft.inputThrottle_output = 1f; if (aircraft.speed > 100f) { aircraft.inputGears_internal_enabled = false; } else { aircraft.inputGears_internal_enabled = true; } if (aircraft.speed > 100f) { aircraft.inputFlaps_internal_enabled = false; } else { aircraft.inputFlaps_internal_enabled = true; } break; case TAircraftControllerType.airplanep_goto: GPivot.setAnyPivot("cailerons", auto_ailerons_filtered * num15 + aircraft.inputAilerons_output * (1f - num15)); GPivot.setAnyPivot("celevator", auto_elevator_filtered * num13 + aircraft.inputElevator_output * (1f - num13)); GPivot.setAnyPivot("crudder", auto_rudder_filtered * num11 + aircraft.inputRudder_output * (1f - num11)); GPivot.setAnyPivot("cthrottle", 1f); aircraft.inputThrottle_output = 1f; aircraft.inputAilerons_output = GPivot.getAnyPivot("cailerons"); aircraft.inputElevator_output = GPivot.getAnyPivot("celevator"); aircraft.inputRudder_output = GPivot.getAnyPivot("crudder"); if (aircraft.speed > 100f) { aircraft.inputGears_internal_enabled = false; } else { aircraft.inputGears_internal_enabled = true; } if (aircraft.speed > 100f) { aircraft.inputFlaps_internal_enabled = false; } else { aircraft.inputFlaps_internal_enabled = true; } break; case TAircraftControllerType.airplaned_goto: if (aircraft.speed > 100f) { aircraft.inputGears_internal_enabled = false; } else { aircraft.inputGears_internal_enabled = true; } if (aircraft.speed > 100f) { aircraft.inputFlaps_internal_enabled = false; } else { aircraft.inputFlaps_internal_enabled = true; } break; } break; } case TAircraftControllerType.airplane2_goto: if (!((Object)(object)target == (Object)null)) { float num6 = 0.01f; float num7 = 0.4f; float num8 = 0.4f; float num9 = 0.01f; float num10 = 0.1f; float num11 = 0f; float num12 = 0.1f; float num13 = 0.7f; float num14 = 0.01f; float num15 = 0.2f; Vector3 forward = ((Component)this).gameObject.transform.forward; Vector3 right = ((Component)this).gameObject.transform.right; Vector3 val2 = target.transform.position - ((Component)this).gameObject.transform.position; Vector3 val3 = val2; float num16 = yawLimit; float num17 = yawMultiplier; float num18 = pitchLimit; float num19 = pitchMultiplier; forward.y = 0f; right.y = 0f; val2.y = 0f; num2 = ((!(val3.y > 0f)) ? (0f - Vector3.Angle(val2, val3)) : Vector3.Angle(val2, val3)); num = ((!(Vector3.Dot(val2, right) > 0f)) ? (0f - Vector3.Angle(forward, val2)) : Vector3.Angle(forward, val2)); val = ((Component)this).gameObject.transform.eulerAngles; float num5 = 0.5f; float num3 = 0f; float num4 = 0f; num3 = (Input.mousePosition.x - (float)Screen.width / 2f) / (float)Screen.width; num4 = (Input.mousePosition.y - (float)Screen.height / 2f) / (float)Screen.height; num3 *= 1.5f; num4 *= 1.5f; if (num3 > 0.12f) { num3 = 0.12f; } if (num3 < -0.12f) { num3 = -0.12f; } if (num4 > 0.3f) { num4 = 0.3f; } if (num4 < -0.3f) { num4 = -0.3f; } float num20 = 15f; float num21 = 0.5f; float num22 = val.z + num3 * 140f * 3f; if (num22 > 180f) { num22 -= 360f; } if (num22 > num20) { num22 = num20; } if (num22 < 0f - num20) { num22 = 0f - num20; } auto_ailerons = num22 / num20 * 0.5f * num21 + 0.5f; auto_ailerons_filtered = auto_ailerons_filtered * (1f - auto_ailerons_filter_coeficient) + auto_ailerons * auto_ailerons_filter_coeficient; aircraft.inputAilerons_internal = aircraft.inputAilerons_internal * (1f - num5) + auto_ailerons_filtered * num5; Debug.Log((object)(aircraft.inputAilerons_internal + " // " + auto_ailerons + " // " + num22 + " // " + val.z)); num20 = 45f; num21 = 1.5f; float num23 = val.x + num4 * 140f * 2f; if (num23 > 180f) { num23 -= 360f; } if (num23 > num20) { num23 = num20; } if (num23 < 0f - num20) { num23 = 0f - num20; } auto_elevator = num23 / num20 * 0.5f * num21 + 0.75f; auto_elevator_filtered = auto_elevator_filtered * (1f - auto_elevator_filter_coeficient) + auto_elevator * auto_elevator_filter_coeficient; aircraft.inputElevator_internal = aircraft.inputElevator_internal * (1f - num5) + auto_elevator_filtered * num5; aircraft.inputRudder_internal = aircraft.inputRudder_internal * (1f - num5) + (num3 * 1.2f + 0.5f) * num5; } break; case TAircraftControllerType.airplaned: { float num3 = (Input.mousePosition.x - (float)Screen.width / 2f) / (float)Screen.width; float num4 = (Input.mousePosition.y - (float)Screen.height / 2f) / (float)Screen.height; num3 *= 2f; num4 *= 2f; if (num3 > 0.15f) { num3 = 0.15f; } if (num3 < -0.15f) { num3 = -0.15f; } if (num4 > 0.5f) { num4 = 0.5f; } if (num4 < -0.5f) { num4 = -0.5f; } float num5 = 0.5f; aircraft.inputElevator_internal = aircraft.inputElevator_internal * (1f - num5) + (num4 * 1f + 0.5f) * num5; aircraft.inputAilerons_internal = aircraft.inputAilerons_internal * (1f - num5) + (num3 * 1f + 0.5f) * num5; aircraft.inputThrottle_output = ((!Input.GetMouseButton(0)) ? 0f : 1f); break; } case TAircraftControllerType.airplane_fast_autolevel: { float num6 = 0.01f; float num7 = 0.4f; float num8 = 0.4f; float num9 = 0.01f; float num10 = 0.1f; float num11 = 0f; float num12 = 0.1f; float num13 = 0.7f; float num14 = 0.01f; float num15 = 0.2f; Vector3 forward = ((Component)this).gameObject.transform.forward; Vector3 right = ((Component)this).gameObject.transform.right; Vector3 val2 = ((!((Object)(object)target != (Object)null)) ? (-((Component)this).gameObject.transform.position) : (target.transform.position - ((Component)this).gameObject.transform.position)); Vector3 val3 = val2; float num16 = yawLimit; float num17 = yawMultiplier; float num18 = pitchLimit; float num19 = pitchMultiplier; forward.y = 0f; right.y = 0f; val2.y = 0f; num2 = ((!(val3.y > 0f)) ? (0f - Vector3.Angle(val2, val3)) : Vector3.Angle(val2, val3)); num = ((!(Vector3.Dot(val2, right) > 0f)) ? (0f - Vector3.Angle(forward, val2)) : Vector3.Angle(forward, val2)); val = ((Component)this).gameObject.transform.eulerAngles; float num5 = 0.5f; float num3 = 0f; float num4 = 0f; float num20 = 15f; float num21 = 0.5f; float num22 = val.z + num3 * 140f * 3f; if (num22 > 180f) { num22 -= 360f; } if (num22 > num20) { num22 = num20; } if (num22 < 0f - num20) { num22 = 0f - num20; } auto_ailerons = num22 / num20 * 0.5f * num21 + 0.5f; auto_ailerons_filtered = auto_ailerons_filtered * (1f - auto_ailerons_filter_coeficient) + auto_ailerons * auto_ailerons_filter_coeficient; aircraft.inputAilerons_internal = aircraft.inputAilerons_internal * (1f - num5) + auto_ailerons_filtered * num5; Debug.Log((object)(aircraft.inputAilerons_internal + " // " + auto_ailerons + " // " + num22 + " // " + val.z)); num20 = 45f; num21 = 1.5f; float num23 = val.x + num4 * 140f * 2f; if (num23 > 180f) { num23 -= 360f; } if (num23 > num20) { num23 = num20; } if (num23 < 0f - num20) { num23 = 0f - num20; } auto_elevator = num23 / num20 * 0.5f * num21 + 0.75f; auto_elevator_filtered = auto_elevator_filtered * (1f - auto_elevator_filter_coeficient) + auto_elevator * auto_elevator_filter_coeficient; aircraft.inputElevator_internal = aircraft.inputElevator_internal * (1f - num5) + auto_elevator_filtered * num5; aircraft.inputRudder_internal = aircraft.inputRudder_internal * (1f - num5) + (num3 * 1.2f + 0.5f) * num5; break; } case TAircraftControllerType.basic_touch_control: { float num3 = (Input.mousePosition.x - (float)Screen.width / 2f) / (float)Screen.width; float num4 = (Input.mousePosition.y - (float)Screen.height / 2f) / (float)Screen.height; num3 *= 2f; num4 *= 4f; if (num3 > 0.5f) { num3 = 0.5f; } if (num3 < -0.5f) { num3 = -0.5f; } if (num4 > 0.5f) { num4 = 0.5f; } if (num4 < -0.5f) { num4 = -0.5f; } float num5 = 0.5f; aircraft.inputElevator_output = aircraft.inputElevator_output * (1f - num5) + (num4 * 1f + 0.5f) * num5; aircraft.inputAilerons_output = aircraft.inputAilerons_output * (1f - num5) + (num3 * 1f + 0.5f) * num5; aircraft.inputThrottle_output = ((!Input.GetMouseButton(0)) ? 0f : 1f); break; } } if ((Object)(object)((Component)aircraft).GetComponent("GSCameraAux") != (Object)null) { GSCameraAux gSCameraAux = (GSCameraAux)(object)((Component)aircraft).GetComponent("GSCameraAux"); if ((Object)(object)gSCameraAux.autopilotmeter != (Object)null) { gSCameraAux.autopilotmeter.text = "AUTOPILOT / AUTOLEVEL / this module is still in alpha state, use with caution!: (" + num + ", " + num2 + ") " + ((object)(Vector3)(ref val)).ToString() + " -- " + auto_ailerons + ", " + auto_elevator + "; " + auto_rudder_target + " == " + val.y; } } } } public class GCenter : MonoBehaviour { } public class GDrive : MonoBehaviour { public enum TDriveType { basic, propeller, rotor, tailrotor, turbofan, sin, cos, rotor_basic, forward_rotor2, up_rotor2, right_rotor2 } public enum TDrivePowerControlBy { defaultvalue, throttle, pivot, elevator, ailerons, rudder } [HideInInspector] public Vector3 lastPosition = Vector3.zero; public TDriveType type = TDriveType.basic; [HideInInspector] public float drive_rpm = 0f; [HideInInspector] public float drive_shaft = 0f; [HideInInspector] public float drive_output = 0f; public bool powered = true; public float poweredFactor = 0f; public float poweredFactorFilter = 0.005f; public TDrivePowerControlBy powerControlBy = TDrivePowerControlBy.defaultvalue; public string powerControlByPivot = ""; public TDrivePowerControlBy powerCollectiveControlBy = TDrivePowerControlBy.defaultvalue; public string powerCollectiveControlByPivot = ""; public TDrivePowerControlBy powerCyclicForwardControlBy = TDrivePowerControlBy.defaultvalue; public string powerCyclicForwardControlByPivot = ""; public TDrivePowerControlBy powerCyclicSideControlBy = TDrivePowerControlBy.defaultvalue; public string powerCyclicSideControlByPivot = ""; public float throttleIdle = 0f; public float throttleMax = 1f; public float throttleAfterburner = 1.4f; public float throttleRpmConversionRatio = 1f; public float throttleRpmConversionFilter = 0.005f; public float theoreticalEnginePower = 1000f; public float theoreticalTargetRpms = 700f; public float throttleBiasOffset = 0.05f; public float throttleBiasMultiplier = 1.1f; public float throttleForwardRearOffset = -1.1f; public float throttleLeftRightOffset = 0f; public float yawForceMultiplier = 50000f; public float dumperForceMultiplier = 1f; public float commonFilter = 0.9f; public float pitchFilter = 0.1f; public float rollFilter = 0.1f; public float yawFilter = 0.1f; public float dumperFilter = 0.1f; public int bladeNumber = 3; public float bladeMass = 1f; public float bladeLength = 0.5f; public float bladeWidthMin = 0.05f; public float bladeWidthMax = 0.15f; public float bladeDepth = 0.05f; public float bladeAngleYaw = 20f; public float bladeAnglePitch = 1f; public float bladeShapeCoefficient = 0.9f; public bool bladeWashEnabled = true; [HideInInspector] public float bladeWashSpeed = 0f; public float bladeWashRadiusNormal = 3f; public float bladeWashRadiusTangent = 20f; public float bladeWashFactor = 0.25f; public float bladeWashSpread = 30f; [HideInInspector] public Vector3 rotorGyroscopicLastUp = Vector3.up; [HideInInspector] public float rotorGyroscopicCoefficient = 0.5f; public float rotorCollectiveBias = 0.5f; public float rotorCollectiveCoefficient = 1f; public float rotorCyclicForwardCoefficient = 0.5f; public float rotorCyclicSideCoefficient = 0.5f; public float rotorAutorotationCoefficient = 0.5f; public Vector3 basicRotorTailOffset = new Vector3(0f, -1.2f, -12f); public float basicRotorBladeForcePoint = 0.1f; public float basicRotorAirdensityBias = 1.201194f; public float basicRotorAirdensityExp = 3.3f; public float overspeedPitchFactor = 45f; public float overspeedPitchFactorExponent = 2f; public float overspeedPitchFactorAtSpeed = 350f; public float overspeedPitchFactorMin = 0.1f; public float overspeedPitchFactorMax = 20f; public float overspeedPitchFactorOffsetSpeed = -85f; public float overspeedPitchFactorOffsetValue = -0.1f; public float overspeedPitchFactorMultiplier = 1f; public float overspeedPitchFactorVibration = 1f; public int overspeedPitchFactorVibratorId = 3; public float overspeedRollFactor = 45f; public float overspeedRollFactorExponent = 3f; public float overspeedRollFactorAtSpeed = 575f; public float overspeedRollFactorMin = 0.1f; public float overspeedRollFactorMax = 100f; public float overspeedRollFactorOffsetSpeed = -65f; public float overspeedRollFactorOffsetValue = -0.1f; public float overspeedRollFactorMultiplier = 1f; public float overspeedRollFactorVibration = 1f; public int overspeedRollFactorVibratorId = 4; public float overspeedYawFactor = 8000000f; public float overspeedYawFactorExponent = 100f; public float overspeedYawFactorAtSpeed = 700f; public float overspeedYawFactorMin = 1f; public float overspeedYawFactorMax = 1000000f; public float overspeedYawFactorOffsetSpeed = 0f; public float overspeedYawFactorOffsetValue = -1f; public float overspeedYawFactorMultiplier = 1f; public float overspeedYawFactorVibration = 1f; public int overspeedYawFactorVibratorId = 5; public float climbReductionWithSpeed = 0.15f; public float climbReductionWithSpeedAtSpeed = 50f; public float climbReductionWithVerticalSpeed = 0.1f; public float climbReductionWithVerticalSpeedAtSpeed = 5.5f; public float rollReductionWithRollSpeed = 0.1f; public float rollReductionWithRollSpeedAtSpeed = 1.75f; public float rollReductionWithMassFactor = 0.1f; public float basicRotorVariationMultiplier = 1f; public float basicRotorVelocityFactor = 10f; public float basicRotorProjectedVelocityFactor = 100f; public float basicRotorProjectedVelocityMultiplier = 10f; public float basicRotorProjectedVelocityForwardOffset = 205.5f; public float basicRotorProjectedVelocityRearOffset = 205.5f; public float basicRotorProjectedVelocityLeftOffset = 290f; public float basicRotorProjectedVelocityRightOffset = 290f; public string shaftOutputPivotId = "engine"; [HideInInspector] public LineRenderer lineRenderer = null; public static TDriveType toTDriveType(string s) { if ("basic".Equals(s)) { return TDriveType.basic; } if ("propeller".Equals(s)) { return TDriveType.propeller; } if ("rotor".Equals(s)) { return TDriveType.rotor; } if ("tailrotor".Equals(s)) { return TDriveType.tailrotor; } if ("turbofan".Equals(s)) { return TDriveType.turbofan; } if ("sin".Equals(s)) { return TDriveType.sin; } if ("cos".Equals(s)) { return TDriveType.cos; } if ("rotor_basic".Equals(s)) { return TDriveType.rotor_basic; } if ("basicrotor".Equals(s)) { return TDriveType.rotor_basic; } if ("forward_rotor2".Equals(s)) { return TDriveType.forward_rotor2; } if ("propeller2".Equals(s)) { return TDriveType.forward_rotor2; } if ("up_rotor2".Equals(s)) { return TDriveType.up_rotor2; } if ("rotor2".Equals(s)) { return TDriveType.up_rotor2; } if ("right_rotor2".Equals(s)) { return TDriveType.right_rotor2; } if ("tailrotor2".Equals(s)) { return TDriveType.right_rotor2; } return TDriveType.basic; } public static string fromTDriveType(TDriveType s) { return s switch { TDriveType.basic => "basic", TDriveType.propeller => "propeller", TDriveType.rotor => "rotor", TDriveType.tailrotor => "tailrotor", TDriveType.turbofan => "turbofan", TDriveType.sin => "sin", TDriveType.cos => "cos", TDriveType.rotor_basic => "rotor_basic", TDriveType.forward_rotor2 => "forward_rotor2", TDriveType.up_rotor2 => "up_rotor2", TDriveType.right_rotor2 => "right_rotor2", _ => "basic", }; } public static TDrivePowerControlBy toTDrivePowerControlBy(string s) { if ("defaultvalue".Equals(s)) { return TDrivePowerControlBy.defaultvalue; } if ("default".Equals(s)) { return TDrivePowerControlBy.defaultvalue; } if ("throttle".Equals(s)) { return TDrivePowerControlBy.throttle; } if ("pivot".Equals(s)) { return TDrivePowerControlBy.pivot; } if ("elevator".Equals(s)) { return TDrivePowerControlBy.elevator; } if ("ailerons".Equals(s)) { return TDrivePowerControlBy.ailerons; } if ("rudder".Equals(s)) { return TDrivePowerControlBy.rudder; } return TDrivePowerControlBy.defaultvalue; } public static string fromTDrivePowerControlBy(TDrivePowerControlBy s) { return s switch { TDrivePowerControlBy.defaultvalue => "defaultvalue", TDrivePowerControlBy.throttle => "throttle", TDrivePowerControlBy.pivot => "pivot", TDrivePowerControlBy.elevator => "elevator", TDrivePowerControlBy.ailerons => "ailerons", TDrivePowerControlBy.rudder => "rudder", _ => "throttle", }; } } [RequireComponent(typeof(WheelCollider))] public class GLandingGear : MonoBehaviour { public enum GLandingGearRotatingAxis { none, right, up, forward } private GAircraft gAircraft = null; private WheelCollider wheelcollider = null; private float brakeForce_filtered = 0f; private float brakeForce_unfiltered = 0f; public float brakeForce_filter = 0.25f; public float brakeForce = 1000f; public float brakeForceHighSpeed = 1000f; public float brakeForceHighSpeedThreshold = 999f; public float brakeForceHighSpeedExponent = 0f; public bool enabledParkAutoBrake = true; public float parkAutoBrakeSpeedThreshold = 2f; public bool parkAutoBrakeSpeedThresholdForce = true; public float parkAutoBrakeForce = 25f; public float brakeResidualForce = 1f; public float brakeBrokenForce = 100000f; public float frictionExponentBaseCoefficient = 2f; public float frictionExponentDivisorCoefficient = 30f; private float forwardFrictionExtremumValue = 20000f; private float forwardFrictionAsymptoteValue = 10000f; private float sidewaysFrictionExtremumValue = 20000f; private float sidewaysFrictionAsymptoteValue = 10000f; private WheelFrictionCurve forwardFriction; private WheelFrictionCurve sidewaysFriction; public GameObject visibleWheelRotating = null; public GLandingGearRotatingAxis visibleWheelRotatingAxis = GLandingGearRotatingAxis.none; public float visibleWheelRotatingRpmMultiplier = 1f; public GameObject visibleWheelSuspension = null; public bool enableTorque = false; public string torqueUsePivot = "throttle"; public float torqueUsePivotMultiplier = 10f; private Vector3 visibleWheelInitialPositionRelative = Vector3.zero; private WheelHit hit; private Vector3 hitPosition = Vector3.zero; private bool FindGAircraft(GameObject obj, int maxdeep) { GAircraft gAircraft = (GAircraft)(object)obj.GetComponent("GAircraft"); if ((Object)(object)gAircraft != (Object)null) { this.gAircraft = gAircraft; } if ((Object)(object)gAircraft != (Object)null) { return true; } if ((Object)(object)obj.transform.parent == (Object)null) { return false; } if (maxdeep <= 0) { return false; } maxdeep--; return FindGAircraft(((Component)obj.transform.parent).gameObject, maxdeep); } private void Start() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //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_0068: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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) if (!FindGAircraft(((Component)this).gameObject, 29)) { gAircraft = null; } wheelcollider = (WheelCollider)((Component)this).gameObject.GetComponent("WheelCollider"); if ((Object)(object)wheelcollider != (Object)null) { WheelFrictionCurve val = wheelcollider.forwardFriction; forwardFrictionExtremumValue = ((WheelFrictionCurve)(ref val)).extremumValue; WheelFrictionCurve val2 = wheelcollider.forwardFriction; forwardFrictionAsymptoteValue = ((WheelFrictionCurve)(ref val2)).asymptoteValue; forwardFriction = wheelcollider.forwardFriction; WheelFrictionCurve val3 = wheelcollider.sidewaysFriction; sidewaysFrictionExtremumValue = ((WheelFrictionCurve)(ref val3)).extremumValue; WheelFrictionCurve val4 = wheelcollider.sidewaysFriction; sidewaysFrictionAsymptoteValue = ((WheelFrictionCurve)(ref val4)).asymptoteValue; sidewaysFriction = wheelcollider.sidewaysFriction; } if ((Object)(object)visibleWheelSuspension != (Object)null) { visibleWheelInitialPositionRelative = visibleWheelSuspension.transform.localPosition; } } private void FixedUpdate() { //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0354: 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_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0267: 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_04d0: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)wheelcollider != (Object)null)) { return; } if ((Object)(object)gAircraft != (Object)null) { if (gAircraft.isCrashed) { brakeForce_unfiltered = Mathf.Abs(brakeBrokenForce); } else if (parkAutoBrakeSpeedThresholdForce && enabledParkAutoBrake && gAircraft.speed < parkAutoBrakeSpeedThreshold) { brakeForce_unfiltered = Mathf.Abs(parkAutoBrakeForce); } else if (Mathf.Abs(gAircraft.inputBrakes_output) > 0.1f) { if (gAircraft.speed > brakeForceHighSpeedThreshold) { brakeForce_unfiltered = Mathf.Abs(brakeForceHighSpeed * Mathf.Pow(gAircraft.speed, brakeForceHighSpeedExponent)) * gAircraft.inputBrakes_output; } else { brakeForce_unfiltered = Mathf.Abs(brakeForce) * gAircraft.inputBrakes_output; } } else if (enabledParkAutoBrake && gAircraft.speed < parkAutoBrakeSpeedThreshold) { brakeForce_unfiltered = Mathf.Abs(parkAutoBrakeForce); } else { brakeForce_unfiltered = brakeResidualForce; } brakeForce_filtered = brakeForce_filtered * (1f - brakeForce_filter) + brakeForce_unfiltered * brakeForce_filter; wheelcollider.brakeTorque = brakeForce_filtered; float num = gAircraft.speed; if (gAircraft.isCrashed) { num = 10f; } ((WheelFrictionCurve)(ref forwardFriction)).extremumValue = forwardFrictionExtremumValue * Mathf.Pow(frictionExponentBaseCoefficient, (0f - num) / frictionExponentDivisorCoefficient); ((WheelFrictionCurve)(ref forwardFriction)).asymptoteValue = forwardFrictionAsymptoteValue * Mathf.Pow(frictionExponentBaseCoefficient, (0f - num) / frictionExponentDivisorCoefficient); ((WheelFrictionCurve)(ref sidewaysFriction)).extremumValue = sidewaysFrictionExtremumValue * Mathf.Pow(frictionExponentBaseCoefficient, (0f - num) / frictionExponentDivisorCoefficient); ((WheelFrictionCurve)(ref sidewaysFriction)).asymptoteValue = sidewaysFrictionAsymptoteValue * Mathf.Pow(frictionExponentBaseCoefficient, (0f - num) / frictionExponentDivisorCoefficient); wheelcollider.forwardFriction = forwardFriction; wheelcollider.sidewaysFriction = sidewaysFriction; if (enableTorque) { string text = torqueUsePivot; float motorTorque = ((text == null || !(text == "throttle")) ? (GPivot.getAnyPivot(torqueUsePivot) * torqueUsePivotMultiplier) : (gAircraft.inputThrottle_output * torqueUsePivotMultiplier)); wheelcollider.motorTorque = motorTorque; } } if ((Object)(object)visibleWheelSuspension != (Object)null) { if (wheelcollider.GetGroundHit(ref hit)) { hitPosition.x = ((WheelHit)(ref hit)).point.x; hitPosition.y = ((WheelHit)(ref hit)).point.y; hitPosition.z = ((WheelHit)(ref hit)).point.z; } else { hitPosition = ((Component)wheelcollider).transform.position - ((Component)wheelcollider).transform.up * (wheelcollider.suspensionDistance + wheelcollider.radius); } visibleWheelSuspension.transform.position = hitPosition; hitPosition = visibleWheelSuspension.transform.localPosition; hitPosition.x = visibleWheelInitialPositionRelative.x; hitPosition.z = visibleWheelInitialPositionRelative.z; visibleWheelSuspension.transform.localPosition = hitPosition; } if ((Object)(object)visibleWheelRotating != (Object)null) { switch (visibleWheelRotatingAxis) { case GLandingGearRotatingAxis.forward: visibleWheelRotating.transform.RotateAroundLocal(Vector3.forward, wheelcollider.rpm / 60f / (float)Math.PI / 4f); break; case GLandingGearRotatingAxis.right: visibleWheelRotating.transform.RotateAroundLocal(Vector3.right, wheelcollider.rpm / 60f / (float)Math.PI / 4f); break; case GLandingGearRotatingAxis.up: visibleWheelRotating.transform.RotateAroundLocal(Vector3.up, wheelcollider.rpm / 60f / (float)Math.PI / 4f); break; } } } } public class GPivot : MonoBehaviour { public enum TAxisOrientation { forward, right, up } public enum TAxisSource { none, dummy, any, elevator, ailerons, rudder, gearsdown, flapsdown, brakes, engine, throttle, altimeter, vario, rpm, velocity, heading, gs } public string id = ""; public TAxisOrientation rotationPivotAxis = TAxisOrientation.right; public float rotationAroundForwardOffset = 0f; public float rotationAroundRightOffset = 0f; public float rotationAroundUpOffset = 0f; public TAxisSource ch1Source = TAxisSource.none; public string ch1SourceName = "none"; public float ch1PivotAngleWhenMin = 0f; public float ch1PivotAngleWhenMax = 0f; public float ch1PivotTurnsPerUnit = 1f; public TAxisSource ch2Source = TAxisSource.none; public string ch2SourceName = "none"; public float ch2PivotAngleWhenMin = 0f; public float ch2PivotAngleWhenMax = 0f; public float ch2PivotTurnsPerUnit = 1f; public TAxisSource ch3Source = TAxisSource.none; public string ch3SourceName = "none"; public float ch3PivotAngleWhenMin = 0f; public float ch3PivotAngleWhenMax = 0f; public float ch3PivotTurnsPerUnit = 1f; [HideInInspector] public Vector3 localEulerAngles = Vector3.zero; public float limitMin = -1E+09f; public float limitMax = 1E+09f; private static Dictionary anyPivots = null; public static TAxisSource toTAxisSource(string s) { if ("none".Equals(s)) { return TAxisSource.none; } if ("dummy".Equals(s)) { return TAxisSource.dummy; } if ("elevator".Equals(s)) { return TAxisSource.elevator; } if ("elevators".Equals(s)) { return TAxisSource.elevator; } if ("aileron".Equals(s)) { return TAxisSource.ailerons; } if ("ailerons".Equals(s)) { return TAxisSource.ailerons; } if ("rudder".Equals(s)) { return TAxisSource.rudder; } if ("gears".Equals(s)) { return TAxisSource.gearsdown; } if ("gearsdown".Equals(s)) { return TAxisSource.gearsdown; } if ("flaps".Equals(s)) { return TAxisSource.flapsdown; } if ("flapsdown".Equals(s)) { return TAxisSource.flapsdown; } if ("brakes".Equals(s)) { return TAxisSource.brakes; } if ("engine".Equals(s)) { return TAxisSource.engine; } if ("throttle".Equals(s)) { return TAxisSource.throttle; } if ("altimeter".Equals(s)) { return TAxisSource.altimeter; } if ("vario".Equals(s)) { return TAxisSource.vario; } if ("rpm".Equals(s)) { return TAxisSource.rpm; } if ("velocity".Equals(s)) { return TAxisSource.velocity; } if ("heading".Equals(s)) { return TAxisSource.heading; } if ("gs".Equals(s)) { return TAxisSource.gs; } if (anyPivots == null) { anyPivots = new Dictionary(); } return TAxisSource.any; } public static string fromTAxisSource(TAxisSource s) { return s switch { TAxisSource.none => "none", TAxisSource.dummy => "dummy", TAxisSource.elevator => "elevator", TAxisSource.ailerons => "ailerons", TAxisSource.rudder => "rudder", TAxisSource.gearsdown => "gearsdown", TAxisSource.flapsdown => "flapsdown", TAxisSource.brakes => "brakes", TAxisSource.engine => "engine", TAxisSource.throttle => "throttle", TAxisSource.altimeter => "altimeter", TAxisSource.vario => "vario", TAxisSource.rpm => "rpm", TAxisSource.velocity => "velocity", TAxisSource.heading => "heading", TAxisSource.gs => "gs", _ => "any", }; } public static float toTAxisValue(string s, GAircraft sm, string default_axis) { if ("".Equals(default_axis)) { return 0f; } if ("".Equals(s)) { return toTAxisValue(default_axis, sm, default_axis); } if ("none".Equals(s)) { return 0f; } if ("dummy".Equals(s)) { return 0f; } if ("elevator".Equals(s)) { return sm.inputElevator_output; } if ("elevators".Equals(s)) { return sm.inputElevator_output; } if ("aileron".Equals(s)) { return sm.inputAilerons_output; } if ("ailerons".Equals(s)) { return sm.inputAilerons_output; } if ("rudder".Equals(s)) { return sm.inputRudder_output; } if ("gears".Equals(s)) { return sm.inputGears_output; } if ("gearsdown".Equals(s)) { return sm.inputGears_output; } if ("flaps".Equals(s)) { return sm.inputFlaps_output; } if ("flapsdown".Equals(s)) { return sm.inputFlaps_output; } if ("brakes".Equals(s)) { return sm.inputBrakes_output; } if ("engine".Equals(s)) { return sm.inputThrottle_output; } if ("throttle".Equals(s)) { return sm.inputThrottle_output; } if ("altimeter".Equals(s)) { return sm.gaugesAltimeter_output; } if ("vario".Equals(s)) { return sm.gaugesVario_output; } if ("rpm".Equals(s)) { return sm.gaugesRpm_output; } if ("velocity".Equals(s)) { return sm.gaugesAirspeed_output; } if ("airspeed".Equals(s)) { return sm.gaugesAirspeed_output; } if ("heading".Equals(s)) { return sm.gaugesHeading_output; } if ("gs".Equals(s)) { return sm.gaugesGs_output; } return getAnyPivot(s); } public static bool setAnyPivot(string pivotName, float pivotValue) { if (anyPivots == null) { anyPivots = new Dictionary(); } if (anyPivots.ContainsKey(pivotName)) { anyPivots[pivotName] = pivotValue; } else { anyPivots.Add(pivotName, pivotValue); } return true; } public static bool delAnyPivot(string pivotName) { if (anyPivots == null) { anyPivots = new Dictionary(); } if (!anyPivots.ContainsKey(pivotName)) { return false; } anyPivots.Remove(pivotName); return true; } public static float getAnyPivot(string pivotName) { if (anyPivots == null) { anyPivots = new Dictionary(); } if (anyPivots.ContainsKey(pivotName)) { return anyPivots[pivotName]; } return 0f; } } public class GSurface : MonoBehaviour { public enum TSurfaceShapeType { default_shape, custom_shape, parent_shape, plane, sphere, halfsphere, cone, cube, rhombus, cylinder, long_cylinder, short_cylinder, streamline, half_streamline, naca_profile, tsagib_profile, npleq_profile, npleqh_profile, nplec_profile, nplech_profile, parsec_profile, rosner_profile, biconvex, wedge, cambered_plate, vandevooren, newman, joukovsky, helmboldkeune, horten, unknown } public enum TSurfaceBehaviourType { default_behaviour, parent_behaviour, non_laminar_analysis, laminar_analysis } public string id = ""; [HideInInspector] public Vector3 lastPosition = new Vector3(0f, 0f, 0f); [HideInInspector] public Vector3 drag = new Vector3(0f, 0f, 0f); [HideInInspector] public Vector3 lift = new Vector3(0f, 0f, 0f); public bool surfaceEnable = true; public bool surfaceEnableThin = true; public bool surfaceEnablePositive = true; public bool surfaceEnableNegative = true; public bool surfaceEnableXPositive = false; public bool surfaceEnableYPositive = false; public bool surfaceEnableZPositive = false; public bool surfaceEnableXNegative = false; public bool surfaceEnableYNegative = false; public bool surfaceEnableZNegative = false; public TSurfaceShapeType shapeXPositive = TSurfaceShapeType.default_shape; public string shapeXPositiveParameter = ""; public TSurfaceShapeType shapeYPositive = TSurfaceShapeType.default_shape; public string shapeYPositiveParameter = ""; public TSurfaceShapeType shapeZPositive = TSurfaceShapeType.default_shape; public string shapeZPositiveParameter = ""; public TSurfaceShapeType shapeXNegative = TSurfaceShapeType.default_shape; public string shapeXNegativeParameter = ""; public TSurfaceShapeType shapeYNegative = TSurfaceShapeType.default_shape; public string shapeYNegativeParameter = ""; public TSurfaceShapeType shapeZNegative = TSurfaceShapeType.default_shape; public string shapeZNegativeParameter = ""; public TSurfaceBehaviourType behaviourXPositive = TSurfaceBehaviourType.parent_behaviour; public TSurfaceBehaviourType behaviourYPositive = TSurfaceBehaviourType.parent_behaviour; public TSurfaceBehaviourType behaviourZPositive = TSurfaceBehaviourType.parent_behaviour; public TSurfaceBehaviourType behaviourXNegative = TSurfaceBehaviourType.parent_behaviour; public TSurfaceBehaviourType behaviourYNegative = TSurfaceBehaviourType.parent_behaviour; public TSurfaceBehaviourType behaviourZNegative = TSurfaceBehaviourType.parent_behaviour; public bool surfaceDebug = false; [HideInInspector] public float cachedXScale = 1f; [HideInInspector] public float cachedYScale = 1f; [HideInInspector] public float cachedZScale = 1f; [HideInInspector] public float cachedXSurface = 1f; [HideInInspector] public float cachedYSurface = 1f; [HideInInspector] public float cachedZSurface = 1f; public float coefficientXDragWhenXPositiveFlow = 1f; public float coefficientYDragWhenYPositiveFlow = 1f; public float coefficientZDragWhenZPositiveFlow = 1f; public float coefficientXDragWhenXNegativeFlow = 1f; public float coefficientYDragWhenYNegativeFlow = 1f; public float coefficientZDragWhenZNegativeFlow = 1f; public float coefficientXLiftWhenYPositiveFlow = 0f; public float coefficientXLiftWhenYNegativeFlow = 0f; public float coefficientXLiftWhenZPositiveFlow = 0f; public float coefficientXLiftWhenZNegativeFlow = 0f; public float coefficientYLiftWhenXPositiveFlow = 0f; public float coefficientYLiftWhenXNegativeFlow = 0f; public float coefficientYLiftWhenZPositiveFlow = 0f; public float coefficientYLiftWhenZNegativeFlow = 0.1f; public float coefficientZLiftWhenXPositiveFlow = 0f; public float coefficientZLiftWhenXNegativeFlow = 0f; public float coefficientZLiftWhenYPositiveFlow = 0f; public float coefficientZLiftWhenYNegativeFlow = 0f; [HideInInspector] public LineRenderer lineRenderer = null; public float propWashFactor = 1f; public float coefficientExponent = 2f; public static float dragFromTSurfaceShapeTypeH(TSurfaceShapeType shape, string shape_parameter, TSurfaceShapeType parent_shape, string parent_shape_parameter, float custom_value, float default_value) { if (shape == TSurfaceShapeType.parent_shape) { shape = parent_shape; } switch (shape) { case TSurfaceShapeType.custom_shape: return custom_value; case TSurfaceShapeType.plane: return 0.01f; case TSurfaceShapeType.halfsphere: case TSurfaceShapeType.cambered_plate: return 0.42f; case TSurfaceShapeType.sphere: return 0.47f; case TSurfaceShapeType.cone: return 0.5f; case TSurfaceShapeType.cube: return 1.05f; case TSurfaceShapeType.rhombus: case TSurfaceShapeType.wedge: return 0.8f; case TSurfaceShapeType.long_cylinder: return 0.82f; case TSurfaceShapeType.short_cylinder: return 1.15f; case TSurfaceShapeType.cylinder: return 0.99f; case TSurfaceShapeType.half_streamline: case TSurfaceShapeType.tsagib_profile: case TSurfaceShapeType.parsec_profile: case TSurfaceShapeType.rosner_profile: return 0.09f; case TSurfaceShapeType.streamline: case TSurfaceShapeType.naca_profile: case TSurfaceShapeType.npleq_profile: case TSurfaceShapeType.npleqh_profile: case TSurfaceShapeType.nplec_profile: case TSurfaceShapeType.nplech_profile: case TSurfaceShapeType.biconvex: case TSurfaceShapeType.vandevooren: case TSurfaceShapeType.newman: case TSurfaceShapeType.joukovsky: case TSurfaceShapeType.horten: return 0.04f; case TSurfaceShapeType.helmboldkeune: return 0.08f; default: return default_value; } } public static float dragFromTSurfaceShapeTypeV(TSurfaceShapeType shape, string shape_parameter, TSurfaceShapeType parent_shape, string parent_shape_parameter, float custom_value, float default_value) { if (shape == TSurfaceShapeType.parent_shape) { shape = parent_shape; } switch (shape) { case TSurfaceShapeType.custom_shape: return custom_value; case TSurfaceShapeType.plane: case TSurfaceShapeType.cambered_plate: return 1.15f; case TSurfaceShapeType.halfsphere: return 0.74f; case TSurfaceShapeType.sphere: case TSurfaceShapeType.cone: case TSurfaceShapeType.cylinder: case TSurfaceShapeType.long_cylinder: case TSurfaceShapeType.short_cylinder: return 0.47f; case TSurfaceShapeType.cube: return 1.05f; case TSurfaceShapeType.rhombus: case TSurfaceShapeType.wedge: return 0.8f; case TSurfaceShapeType.half_streamline: case TSurfaceShapeType.tsagib_profile: case TSurfaceShapeType.parsec_profile: case TSurfaceShapeType.rosner_profile: return 1.15f; case TSurfaceShapeType.streamline: case TSurfaceShapeType.naca_profile: case TSurfaceShapeType.npleq_profile: case TSurfaceShapeType.npleqh_profile: case TSurfaceShapeType.nplec_profile: case TSurfaceShapeType.nplech_profile: case TSurfaceShapeType.biconvex: case TSurfaceShapeType.vandevooren: case TSurfaceShapeType.newman: case TSurfaceShapeType.joukovsky: case TSurfaceShapeType.horten: return 1.15f; case TSurfaceShapeType.helmboldkeune: return 1.15f; default: return default_value; } } public static float liftFromTSurfaceShapeTypeH(TSurfaceShapeType shape, string shape_parameter, TSurfaceShapeType parent_shape, string parent_shape_parameter, float custom_value, float default_value) { if (shape == TSurfaceShapeType.parent_shape) { shape = parent_shape; } switch (shape) { case TSurfaceShapeType.custom_shape: return custom_value; case TSurfaceShapeType.plane: case TSurfaceShapeType.sphere: case TSurfaceShapeType.halfsphere: case TSurfaceShapeType.cone: case TSurfaceShapeType.cube: case TSurfaceShapeType.rhombus: case TSurfaceShapeType.cylinder: case TSurfaceShapeType.long_cylinder: case TSurfaceShapeType.short_cylinder: case TSurfaceShapeType.streamline: case TSurfaceShapeType.naca_profile: case TSurfaceShapeType.npleq_profile: case TSurfaceShapeType.npleqh_profile: case TSurfaceShapeType.nplec_profile: case TSurfaceShapeType.nplech_profile: case TSurfaceShapeType.biconvex: case TSurfaceShapeType.wedge: case TSurfaceShapeType.cambered_plate: case TSurfaceShapeType.vandevooren: case TSurfaceShapeType.newman: case TSurfaceShapeType.joukovsky: case TSurfaceShapeType.helmboldkeune: case TSurfaceShapeType.horten: return 0f; case TSurfaceShapeType.half_streamline: case TSurfaceShapeType.tsagib_profile: case TSurfaceShapeType.parsec_profile: case TSurfaceShapeType.rosner_profile: return 0.08f; default: return default_value; } } public static float liftFromTSurfaceShapeTypeV(TSurfaceShapeType shape, string shape_parameter, TSurfaceShapeType parent_shape, string parent_shape_parameter, float custom_value, float default_value) { if (shape == TSurfaceShapeType.parent_shape) { shape = parent_shape; } switch (shape) { case TSurfaceShapeType.custom_shape: return custom_value; case TSurfaceShapeType.plane: case TSurfaceShapeType.sphere: case TSurfaceShapeType.halfsphere: case TSurfaceShapeType.cone: case TSurfaceShapeType.cube: case TSurfaceShapeType.rhombus: case TSurfaceShapeType.cylinder: case TSurfaceShapeType.long_cylinder: case TSurfaceShapeType.short_cylinder: case TSurfaceShapeType.streamline: case TSurfaceShapeType.half_streamline: case TSurfaceShapeType.naca_profile: case TSurfaceShapeType.tsagib_profile: case TSurfaceShapeType.npleq_profile: case TSurfaceShapeType.npleqh_profile: case TSurfaceShapeType.nplec_profile: case TSurfaceShapeType.nplech_profile: case TSurfaceShapeType.parsec_profile: case TSurfaceShapeType.rosner_profile: case TSurfaceShapeType.biconvex: case TSurfaceShapeType.wedge: case TSurfaceShapeType.cambered_plate: case TSurfaceShapeType.vandevooren: case TSurfaceShapeType.newman: case TSurfaceShapeType.joukovsky: case TSurfaceShapeType.helmboldkeune: case TSurfaceShapeType.horten: return 0f; default: return default_value; } } public static TSurfaceBehaviourType behaviourFromTSurfaceBehaviourType(TSurfaceBehaviourType behaviour, TSurfaceBehaviourType parent_behaviour, TSurfaceBehaviourType default_behaviour) { return behaviour switch { TSurfaceBehaviourType.parent_behaviour => parent_behaviour, TSurfaceBehaviourType.default_behaviour => default_behaviour, _ => behaviour, }; } public static bool laminarFromTSurfaceBehaviourType(TSurfaceBehaviourType behaviour) { return behaviour switch { TSurfaceBehaviourType.laminar_analysis => true, _ => false, }; } public static TSurfaceShapeType shapeTypeFromParameterReturnEndPosition(string parameter, TSurfaceShapeType previous_shape, out int endPosition) { string text = ""; if (parameter.Contains(text = "default_shape")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.default_shape; } if (parameter.Contains(text = "default")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.default_shape; } if (parameter.Contains(text = "custom_shape")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.custom_shape; } if (parameter.Contains(text = "custom")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.custom_shape; } if (parameter.Contains(text = "parent_shape")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.parent_shape; } if (parameter.Contains(text = "parent")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.parent_shape; } if (parameter.Contains(text = "plane")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.plane; } if (parameter.Contains(text = "halfsphere")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.halfsphere; } if (parameter.Contains(text = "sphere")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.sphere; } if (parameter.Contains(text = "cone")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.cone; } if (parameter.Contains(text = "cube")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.cube; } if (parameter.Contains(text = "rhombus")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.rhombus; } if (parameter.Contains(text = "long_cylinder")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.long_cylinder; } if (parameter.Contains(text = "longcylinder")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.long_cylinder; } if (parameter.Contains(text = "short_cylinder")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.short_cylinder; } if (parameter.Contains(text = "shortcylinder")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.short_cylinder; } if (parameter.Contains(text = "cylinder")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.cylinder; } if (parameter.Contains(text = "half_streamline")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.half_streamline; } if (parameter.Contains(text = "halfstreamline")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.half_streamline; } if (parameter.Contains(text = "streamline")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.streamline; } if (parameter.Contains(text = "naca_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.naca_profile; } if (parameter.Contains(text = "nacaprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.naca_profile; } if (parameter.Contains(text = "naca")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.naca_profile; } if (parameter.Contains(text = "tsagib_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.tsagib_profile; } if (parameter.Contains(text = "tsagibprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.tsagib_profile; } if (parameter.Contains(text = "tsagib")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.tsagib_profile; } if (parameter.Contains(text = "npleq_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.npleq_profile; } if (parameter.Contains(text = "npleqprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.npleq_profile; } if (parameter.Contains(text = "npleq")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.npleq_profile; } if (parameter.Contains(text = "npleqh_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.npleqh_profile; } if (parameter.Contains(text = "npleqhprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.npleqh_profile; } if (parameter.Contains(text = "npleqh")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.npleqh_profile; } if (parameter.Contains(text = "nplec_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.nplec_profile; } if (parameter.Contains(text = "nplecprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.nplec_profile; } if (parameter.Contains(text = "nplec")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.nplec_profile; } if (parameter.Contains(text = "nplech_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.nplech_profile; } if (parameter.Contains(text = "nplechprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.nplech_profile; } if (parameter.Contains(text = "nplech")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.nplech_profile; } if (parameter.Contains(text = "parsec_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.parsec_profile; } if (parameter.Contains(text = "parsecprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.parsec_profile; } if (parameter.Contains(text = "parsec")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.parsec_profile; } if (parameter.Contains(text = "rosner_profile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.rosner_profile; } if (parameter.Contains(text = "rosnerprofile")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.rosner_profile; } if (parameter.Contains(text = "rosner")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.rosner_profile; } if (parameter.Contains(text = "biconvex")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.biconvex; } if (parameter.Contains(text = "wedge")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.wedge; } if (parameter.Contains(text = "cambered_plate")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.cambered_plate; } if (parameter.Contains(text = "camberedplate")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.cambered_plate; } if (parameter.Contains(text = "vandevooren")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.vandevooren; } if (parameter.Contains(text = "newman")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.newman; } if (parameter.Contains(text = "joukovsky")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.joukovsky; } if (parameter.Contains(text = "helmboldkeune")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.helmboldkeune; } if (parameter.Contains(text = "horten")) { endPosition = parameter.IndexOf(text) + text.Length; return TSurfaceShapeType.horten; } endPosition = 0; return previous_shape; } public static TSurfaceShapeType shapeTypeFromParameter(string parameter, TSurfaceShapeType previous_shape) { int endPosition; return shapeTypeFromParameterReturnEndPosition(parameter, previous_shape, out endPosition); } public static TSurfaceShapeType toTSurfaceShapeType(string s) { return shapeTypeFromParameter(s, TSurfaceShapeType.unknown); } public static string fromTSurfaceShapeType(TSurfaceShapeType s) { return s switch { TSurfaceShapeType.default_shape => "default", TSurfaceShapeType.custom_shape => "custom", TSurfaceShapeType.parent_shape => "parent", TSurfaceShapeType.plane => "plane", TSurfaceShapeType.halfsphere => "halfsphere", TSurfaceShapeType.sphere => "sphere", TSurfaceShapeType.cone => "cone", TSurfaceShapeType.cube => "cube", TSurfaceShapeType.rhombus => "rhombus", TSurfaceShapeType.long_cylinder => "long_cylinder", TSurfaceShapeType.short_cylinder => "short_cylinder", TSurfaceShapeType.cylinder => "cylinder", TSurfaceShapeType.half_streamline => "half_streamline", TSurfaceShapeType.streamline => "streamline", TSurfaceShapeType.naca_profile => "naca_profile", TSurfaceShapeType.tsagib_profile => "tsagib_profile", TSurfaceShapeType.npleq_profile => "npleq_profile", TSurfaceShapeType.npleqh_profile => "npleqh_profile", TSurfaceShapeType.nplec_profile => "nplec_profile", TSurfaceShapeType.nplech_profile => "nplech_profile", TSurfaceShapeType.parsec_profile => "parsec_profile", TSurfaceShapeType.rosner_profile => "rosner_profile", TSurfaceShapeType.biconvex => "biconvex", TSurfaceShapeType.wedge => "wedge", TSurfaceShapeType.cambered_plate => "cambered_plate", TSurfaceShapeType.vandevooren => "vandevooren", TSurfaceShapeType.newman => "newman", TSurfaceShapeType.joukovsky => "joukovsky", TSurfaceShapeType.helmboldkeune => "helmboldkeune", TSurfaceShapeType.horten => "horten", _ => "unknown", }; } } public class GTrail : MonoBehaviour { public enum TTrailMode { standard, throttle } public bool trailEnabled = true; [HideInInspector] public int surfaceId_int = -1; public TTrailMode mode = TTrailMode.standard; public string surfaceId = ""; public float startWidth = 0f; public float endWidth = 0.05f; public Color startColor = Color.grey; public Color endColor = Color.clear; public string materialName = "Particles/Additive"; public float forceThreshold = 100f; public float speedThreshold = 150f; public float heightThreshold = 80000f; [HideInInspector] public LineRenderer lineRenderer = null; [HideInInspector] public Vector3[] linePoints = null; [HideInInspector] public bool[] linePointsEnabled = null; [HideInInspector] public int linePoint = 0; public static TTrailMode toTTrailMode(string s) { if ("standard".Equals(s)) { return TTrailMode.standard; } if ("throttle".Equals(s)) { return TTrailMode.throttle; } return TTrailMode.standard; } public static string fromTTrailMode(TTrailMode m) { return m switch { TTrailMode.standard => "standard", TTrailMode.throttle => "throttle", _ => "standard", }; } } public class GWindBasic : MonoBehaviour, GWindInterface { public static GWindInterface windManager = null; public float biasSpeed = 1f; public float gust1Speed = 2f; public float gust1TimesPerSecond = 0.1f; public float gust2Speed = 2f; public float gust2TimesPerSecond = 0.03f; private float gust_t = 0f; private static Vector3 globalWindSpeed; private static Vector3 blowSource = Vector3.zero; private static float blowPeak = 0f; private static float blowAmmount = 0f; private static float blowDuration = 0f; private static float blowTime = 1f; private static float blowLastTime = 0f; private static float blowFrequency = 1f; private static float blowDistanceExponent = 1.5f; private float calcWindForce() { return biasSpeed + Mathf.Sin(gust_t * gust1TimesPerSecond) * (gust1Speed - biasSpeed) / 2f + (gust1Speed - biasSpeed) / 2f + Mathf.Sin(gust_t * gust2TimesPerSecond) * (gust2Speed - biasSpeed) / 2f + (gust2Speed - biasSpeed) / 2f; } private void Start() { //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_001c: Unknown result type (might be due to invalid IL or missing references) globalWindSpeed = ((Component)this).gameObject.transform.forward * calcWindForce(); windManager = this; } private void FixedUpdate() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) gust_t += Time.fixedDeltaTime; globalWindSpeed = ((Component)this).gameObject.transform.forward * calcWindForce(); } public Vector3 windAtImplementation(Vector3 position) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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) return globalWindSpeed; } public static Vector3 windAt(Vector3 position) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d7: Unknown result type (might be due to invalid IL or missing references) float realtimeSinceStartup = Time.realtimeSinceStartup; if (realtimeSinceStartup > blowLastTime + Time.fixedDeltaTime) { if (blowDuration > 0f) { blowDuration -= realtimeSinceStartup - blowLastTime; blowAmmount = blowPeak * (blowDuration / blowTime) * Mathf.Cos(blowDuration / blowTime * blowFrequency); } else { blowAmmount = 0f; } blowLastTime = realtimeSinceStartup; } Vector3 val = position - blowSource; val = blowAmmount * val / Mathf.Pow(((Vector3)(ref val)).magnitude, blowDistanceExponent); if (windManager != null) { return windManager.windAtImplementation(position) + val; } return val; } public static bool blowSet(Vector3 blowSource, float blowAmmount, float blowDuration, float blowFrequency, float blowDistanceExponent) { //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) GWindBasic.blowSource = blowSource; blowPeak = (GWindBasic.blowAmmount = blowAmmount); blowTime = (GWindBasic.blowDuration = blowDuration); GWindBasic.blowFrequency = blowFrequency; GWindBasic.blowDistanceExponent = blowDistanceExponent; return true; } } public interface GWindInterface { Vector3 windAtImplementation(Vector3 position); } namespace JerryComponent { public class RudderControlAndVortex : MonoBehaviour { public HingeJoint thr; public GameObject Switch; public 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) if (Switch.transform.localEulerAngles.x > 45f) { JointLimits limits = thr.limits; ((JointLimits)(ref limits)).min = 0f; ((JointLimits)(ref limits)).max = 44f; thr.limits = limits; } if (Switch.transform.localEulerAngles.x < 45f) { JointLimits limits2 = thr.limits; ((JointLimits)(ref limits2)).min = -6f; ((JointLimits)(ref limits2)).max = -2f; thr.limits = limits2; } } } public class Cannonrotate : MonoBehaviour { public Rigidbody hWheel; public Rigidbody vWheel; public GameObject hMount; public GameObject vMount; public GameObject RotLock; public float speedV = 0.1f; public float speedH = 0.1f; public HingeJoint jointH; public HingeJoint jointV; public GameObject podTrigger; private void Start() { } private void Update() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: 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_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)vWheel).transform.InverseTransformVector(vWheel.angularVelocity); Vector3 val2 = ((Component)hWheel).transform.InverseTransformVector(hWheel.angularVelocity); if (podTrigger.transform.localEulerAngles.y < 45f) { jointV.useSpring = true; } else if (podTrigger.transform.localEulerAngles.y >= 45f) { jointV.useSpring = false; } if (val.x >= 1f || val.x <= -1f) { if (vMount.transform.localEulerAngles.x > 90f) { vMount.transform.localEulerAngles = new Vector3(90f, 0f, 0f); vMount.transform.Rotate(0f * Time.deltaTime, 0f, 0f); } if (vMount.transform.localEulerAngles.x < 0f) { vMount.transform.localEulerAngles = new Vector3(0f, 0f, 0f); vMount.transform.Rotate(0f * Time.deltaTime, 0f, 0f); } else { vMount.transform.Rotate(new Vector3(val.x * speedV * Time.deltaTime, 0f, 0f)); } } if (vMount.transform.localEulerAngles.x >= 85f) { hMount.transform.Rotate(0f, 0f, 0f); jointH.useSpring = true; if (hMount.transform.localRotation.x > 1f) { RotLock.SetActive(false); } else if (hMount.transform.localRotation.x < -1f) { RotLock.SetActive(false); } else { RotLock.SetActive(true); } } if (vMount.transform.localEulerAngles.x < 85f) { jointH.useSpring = false; RotLock.SetActive(false); if (val2.z >= 1f || val2.z <= -1f) { hMount.transform.Rotate(new Vector3(0f, val2.z * speedH * Time.deltaTime, 0f)); } } } } public class FireRope : MonoBehaviour { public ClosedBoltWeapon 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 AIM54Missile : MonoBehaviour { public AIM54guide2 guide; public SosigLink link; public GameObject enemy; public Rigidbody rocket; public GameObject roc; public GameObject explosion; public GameObject explode; public GameObject mark; public GameObject ownmark; public GameObject subrocket; public GameObject mainrocket; public float countdown = 27f; public float m_speed = 10f; public float acc = 25f; public float m_rotspeed = 25f; private void Start() { subrocket.SetActive(true); mainrocket.SetActive(false); } private void Update() { //IL_0120: 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_02ed: 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_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0306: 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_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_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_034d: 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_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: 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_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: 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_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_027e: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: 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_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0777: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_073c: 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_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_059f: 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_0558: 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_0568: Unknown result type (might be due to invalid IL or missing references) //IL_07bd: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07ea: Unknown result type (might be due to invalid IL or missing references) //IL_0680: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_0600: Unknown result type (might be due to invalid IL or missing references) mark = GameObject.Find("AIM54Mark"); guide = GameObject.Find("F14DRadar").GetComponent(); if ((Object)(object)guide != (Object)null) { if ((Object)(object)guide.sosigLink != (Object)null) { link = guide.sosigLink; } if ((Object)(object)guide.enemy1 != (Object)null) { enemy = guide.enemy1; } } if ((Object)(object)mark == (Object)null || (Object)(object)roc == (Object)null || ((Object)(object)rocket == (Object)null && (Object)(object)enemy == (Object)null) || (Object)(object)link == (Object)null || (Object)(object)guide == (Object)null) { } if (countdown > 25f) { rocket.AddRelativeForce(new Vector3(0f, 0f, 100f), (ForceMode)1); ownmark.SetActive(false); } if (countdown < 25f && (Object)(object)mark == (Object)null) { rocket.AddRelativeForce(new Vector3(0f, 0f, 200f), (ForceMode)0); ownmark.SetActive(false); } if (countdown < 24f && (Object)(object)link != (Object)null && (Object)(object)enemy == (Object)null) { Vector3 val = ((Component)link).transform.position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(((Component)this).transform.forward, normalized) / m_rotspeed; if (num > 0.01f || num < -0.01f) { Transform transform = ((Component)this).transform; Vector3 val2 = Vector3.Slerp(((Component)this).transform.forward, normalized, Time.deltaTime / num); transform.forward = ((Vector3)(ref val2)).normalized; } else { m_speed += acc * Time.deltaTime; Transform transform2 = ((Component)this).transform; Vector3 val3 = Vector3.Slerp(((Component)this).transform.forward, normalized, 1f); transform2.forward = ((Vector3)(ref val3)).normalized; } Transform transform3 = ((Component)this).transform; transform3.position += ((Component)this).transform.forward * m_speed * Time.deltaTime; } if (countdown < 24f && (Object)(object)enemy != (Object)null) { Vector3 val4 = enemy.transform.position - ((Component)this).transform.position; Vector3 normalized2 = ((Vector3)(ref val4)).normalized; float num2 = Vector3.Angle(((Component)this).transform.forward, normalized2) / m_rotspeed; if (num2 > 0.01f || num2 < -0.01f) { Transform transform4 = ((Component)this).transform; Vector3 val5 = Vector3.Slerp(((Component)this).transform.forward, normalized2, Time.deltaTime / num2); transform4.forward = ((Vector3)(ref val5)).normalized; } else { m_speed += acc * Time.deltaTime; Transform transform5 = ((Component)this).transform; Vector3 val6 = Vector3.Slerp(((Component)this).transform.forward, normalized2, 1f); transform5.forward = ((Vector3)(ref val6)).normalized; } Transform transform6 = ((Component)this).transform; transform6.position += ((Component)this).transform.forward * m_speed * Time.deltaTime; } if (countdown < 24f && (Object)(object)link == (Object)null && (Object)(object)mark == (Object)null && !ownmark.activeInHierarchy && (Object)(object)enemy == (Object)null) { rocket.AddRelativeForce(new Vector3(0f, 0f, 200f), (ForceMode)0); } if (countdown < 25f && (Object)(object)mark != (Object)null) { if (ownmark.activeInHierarchy) { Vector3 val7 = ownmark.transform.position - ((Component)this).transform.position; Vector3 normalized3 = ((Vector3)(ref val7)).normalized; float num3 = Vector3.Angle(((Component)this).transform.forward, normalized3) / m_rotspeed; if (num3 > 0.01f || num3 < -0.01f) { Transform transform7 = ((Component)this).transform; Vector3 val8 = Vector3.Slerp(((Component)this).transform.forward, normalized3, Time.deltaTime / num3); transform7.forward = ((Vector3)(ref val8)).normalized; } else { m_speed += acc * Time.deltaTime; Transform transform8 = ((Component)this).transform; Vector3 val9 = Vector3.Slerp(((Component)this).transform.forward, normalized3, 1f); transform8.forward = ((Vector3)(ref val9)).normalized; } Transform transform9 = ((Component)this).transform; transform9.position += ((Component)this).transform.forward * m_speed * Time.deltaTime; } if (mark.activeInHierarchy) { ownmark.SetActive(true); if ((Object)(object)link != (Object)null && (Object)(object)enemy != (Object)null) { ownmark.transform.position = ((Component)link).transform.position; } if ((Object)(object)enemy != (Object)null) { ownmark.transform.position = enemy.transform.position; } Object.Destroy((Object)(object)roc); } if (!mark.activeInHierarchy && !ownmark.activeInHierarchy) { rocket.AddRelativeForce(new Vector3(0f, 0f, 200f), (ForceMode)0); } } if ((Object)(object)mark != (Object)null) { if (countdown <= 0f) { countdown = 0f; } if ((Object)(object)link != (Object)null && (Vector3.Distance(((Component)this).transform.position, ((Component)link).gameObject.transform.position) < 2.5f || countdown < 5f)) { Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } if ((Object)(object)enemy != (Object)null && (Vector3.Distance(((Component)this).transform.position, enemy.gameObject.transform.position) < 2.5f || countdown < 5f)) { Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } countdown -= 1f * Time.deltaTime; if (countdown <= 5f) { subrocket.SetActive(false); mainrocket.SetActive(true); } } public void OnCollisionEnter(Collision collision) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class AirBrake : MonoBehaviour { public Rigidbody rb; public GameObject hook; public GameObject airbrake; public GameObject gearlever; public Collider HookTrig; public GLandingGear WL; public GLandingGear WR; public GLandingGear WM; public GameObject handbrake; public GameObject gearpost; public FVRInteractiveObject throttle; private void Start() { } private void FixedUpdate() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_02fb: 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_0284: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) rb.drag = 0.00075f * airbrake.transform.localEulerAngles.x; if (throttle.IsHeld) { if (throttle.m_hand.Input.TouchpadAxes.y > -0.5f && handbrake.transform.localEulerAngles.x > 45f) { WL.brakeResidualForce = 0f; WR.brakeResidualForce = 0f; } else if (throttle.m_hand.Input.TouchpadAxes.y <= -0.5f || handbrake.transform.localEulerAngles.x <= 45f) { WL.brakeResidualForce = 5000f; WR.brakeResidualForce = 5000f; } } else if (!throttle.IsHeld) { if (handbrake.transform.localEulerAngles.x > 45f) { WL.brakeResidualForce = 0f; WR.brakeResidualForce = 0f; } else if (handbrake.transform.localEulerAngles.x <= 45f) { WL.brakeResidualForce = 5000f; WR.brakeResidualForce = 5000f; } } if (hook.transform.localEulerAngles.x < 25f) { HookTrig.enabled = false; } if (hook.transform.localEulerAngles.x >= 25f) { HookTrig.enabled = true; } if (gearpost.transform.localEulerAngles.y > 40f) { ((Behaviour)WL).enabled = false; ((Behaviour)WR).enabled = false; ((Behaviour)WM).enabled = false; WL.visibleWheelSuspension.gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); WR.visibleWheelSuspension.gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); WM.visibleWheelSuspension.gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); } else if (gearpost.transform.localEulerAngles.y < 40f) { ((Behaviour)WL).enabled = true; ((Behaviour)WR).enabled = true; ((Behaviour)WM).enabled = true; } } } 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 bool is_inseat = false; private GravityMode StoredGravityMode1; public bool stored = false; public GameObject ejectblock; public Transform parent; public int prevslottype; public bool spawned = true; [NonSerialized] private FVRQuickBeltSlot[] slots; public bool ShouldP = true; public override void SimpleInteraction(FVRViveHand hand) { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00bf: 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_013f: 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) { if (currentSeat.ContainsKey(hand)) { currentSeat[hand].RemoveHand(); } currentSeat.Add(hand, this); if (!stored) { StoredGravityMode1 = GM.Options.SimulationOptions.PlayerGravityMode; stored = true; } GM.Options.SimulationOptions.PlayerGravityMode = (GravityMode)3; this.hand = hand; hand.MovementManager.TeleportToPoint(SitPos.transform.position, false, SitPos.transform.localEulerAngles); } else if ((Object)(object)hand == (Object)(object)this.hand) { RemoveHand(); if (stored) { GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; stored = false; } 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_024a: 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_0222: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)hand != (Object)null)) { return; } if ((Object)(object)GM.CurrentMovementManager != (Object)null && ShouldP) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent(((Component)parent).transform); ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.SetParent(((Component)parent).transform); ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.SetParent(((Component)parent).transform); } if ((Object)(object)GM.CurrentPlayerBody != (Object)null && GM.CurrentSceneSettings.DoesUseHealthBar && GM.CurrentPlayerBody.HealthBar.activeInHierarchy) { GM.CurrentPlayerBody.HealthBar.SetActive(false); } GM.CurrentSceneSettings.AreQuickbeltSlotsEnabled = true; if (spawned) { prevslottype = GM.Options.QuickbeltOptions.QuickbeltPreset; slots = ((Component)GM.CurrentPlayerBody.Torso).GetComponentsInChildren(); if (slots.Length >= 1) { for (int num = slots.Length - 1; num >= 0; num--) { Object.Destroy((Object)(object)slots[num]); } } ((Component)GM.CurrentPlayerBody.Torso).gameObject.SetActive(false); spawned = false; } ((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.IsDead()) { ejectblock.transform.localEulerAngles = new Vector3(90f, 0f, 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_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_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_018f: Unknown result type (might be due to invalid IL or missing references) GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; if (currentSeat.ContainsKey(hand)) { currentSeat.Remove(hand); } hand = null; if ((Object)(object)GM.CurrentMovementManager != (Object)null && ShouldP) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((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); } if ((Object)(object)GM.CurrentPlayerBody != (Object)null && GM.CurrentSceneSettings.DoesUseHealthBar && !GM.CurrentPlayerBody.HealthBar.activeInHierarchy) { GM.CurrentPlayerBody.HealthBar.SetActive(true); } GM.CurrentSceneSettings.AreQuickbeltSlotsEnabled = true; if (!spawned) { ((Component)GM.CurrentPlayerBody.Torso).gameObject.SetActive(true); GM.CurrentPlayerBody.ConfigureQuickbelt(prevslottype); spawned = true; } if (isplayerrotated) { ((Component)_playerMovement).transform.eulerAngles = new Vector3(0f, ((Component)_playerMovement).transform.eulerAngles.y, 0f); isplayerrotated = false; } } public void OnDestroy() { //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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; is_inseat = false; ((Component)_playerMovement).transform.eulerAngles = new Vector3(0f, ((Component)_playerMovement).transform.eulerAngles.y, 0f); } } public class Ejection : MonoBehaviour { public Transform nose2; public GameObject gearlever; public GameObject seatobj1; public GameObject seatobj2; public KillAfter stick; public KillAfter throttle; public KillAfter towtrig; public KillAfter fuelingprobe; public GameObject jester; public GameObject canopybreak; public GameObject seat1ejt; public GameObject seat2ejt; public KillAfter killplane; public KillAfter killcanopy; public KillAfter killseat1; public KillAfter killseat2; public float canopyforce = 100f; public float seat1force = 75f; public float seat2force = 75f; public GameObject speedneedle; public Rigidbody parachuterb1; public Rigidbody parachuterb2; public GameObject ejectionhandle; public GameObject ejectionseat1; public GameObject ejectionseat2; public GameObject ejectionseatGeo1; public GameObject ejectionseatGeo2; public GameObject seatphys1; public GameObject seatphys2; public GameObject parachut1; public GameObject parachut2; public bool wearecrashing = false; public GameObject jestershout; public bool isejected = false; public GameObject vspeedneedle; public GameObject canopy; public bool seatsflied = false; public bool canopyflied = false; public Transform nose; public LayerMask lm; public float dangerrange = 10f; public float fuzetime = 10f; public bool rbadded = false; public bool rbadded1 = false; public bool rbadded2 = false; public bool rbadded3 = false; public bool rbadded4 = false; private void Start() { } private void FixedUpdate() { //IL_0483: 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_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0403: 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_041c: 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_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b2: 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_0446: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_022a: 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_0239: Unknown result type (might be due to invalid IL or missing references) if (wearecrashing) { ((Behaviour)killplane).enabled = true; ((Behaviour)stick).enabled = true; ((Behaviour)throttle).enabled = true; ((Behaviour)towtrig).enabled = true; ((Behaviour)fuelingprobe).enabled = true; jestershout.SetActive(true); if (!rbadded) { Rigidbody val = canopy.AddComponent(); if ((Object)(object)val == (Object)null) { } if ((Object)(object)val != (Object)null) { val.AddRelativeForce(new Vector3(0f, canopyforce, 0.05f * speedneedle.transform.localEulerAngles.y), (ForceMode)1); canopybreak.SetActive(true); } rbadded = true; } canopyflied = true; ((Behaviour)killcanopy).enabled = true; if (canopyflied = true && fuzetime >= 0f) { fuzetime -= 2f * Time.deltaTime; } if (fuzetime < 9f) { if (!rbadded1) { Rigidbody val2 = ejectionseat1.AddComponent(); if ((Object)(object)val2 == (Object)null) { } if ((Object)(object)val2 != (Object)null) { val2.AddRelativeForce(new Vector3(0f, seat1force, 0.05f * speedneedle.transform.localEulerAngles.y), (ForceMode)1); seat1ejt.SetActive(true); } rbadded1 = true; } ((Behaviour)killseat1).enabled = true; } if (fuzetime < 8f) { if (!rbadded2) { Rigidbody val3 = ejectionseat2.AddComponent(); if ((Object)(object)val3 == (Object)null) { } if ((Object)(object)val3 != (Object)null) { val3.AddRelativeForce(new Vector3(0f, seat2force, 0.05f * speedneedle.transform.localEulerAngles.y), (ForceMode)1); seat2ejt.SetActive(true); } rbadded2 = true; } ((Behaviour)killseat2).enabled = true; } if (fuzetime < 5f && !rbadded3) { ejectionseatGeo1.AddComponent(); rbadded3 = true; parachut1.SetActive(true); seatphys1.SetActive(true); seatobj1.SetActive(true); FixedJoint val4 = ejectionseat1.AddComponent(); ((Joint)val4).connectedBody = parachuterb1; } if (fuzetime < 4f && !rbadded4) { ejectionseatGeo2.AddComponent(); rbadded4 = true; parachut2.SetActive(true); seatphys2.SetActive(true); seatobj2.SetActive(true); FixedJoint val5 = ejectionseat2.AddComponent(); ((Joint)val5).connectedBody = parachuterb2; } } if (jester.activeInHierarchy) { RaycastHit val6 = default(RaycastHit); if (vspeedneedle.transform.localEulerAngles.y > 45f && vspeedneedle.transform.localEulerAngles.y < 171f && Physics.Raycast(nose.position, nose.forward, ref val6, dangerrange, LayerMask.op_Implicit(lm))) { wearecrashing = true; } if (gearlever.transform.localEulerAngles.x > 30f && Physics.Raycast(nose.position, nose.forward, ref val6, dangerrange, LayerMask.op_Implicit(lm)) && Physics.Raycast(nose2.position, -nose.up, ref val6, 0.4f * dangerrange, LayerMask.op_Implicit(lm))) { wearecrashing = true; } } if (ejectionhandle.transform.localEulerAngles.x > 45f) { wearecrashing = true; } } } public class F14BCS : MonoBehaviour { public AIM54guide radar; public LanternPod pod; public RadarRot RR; public AR15HandleSightFlipper wingfold; public AR15HandleSightFlipper nosekneel; public GameObject esL; public GameObject esR; public GameObject esM; public Rigidbody PlaneRig; public AR15HandleSightFlipper enginestop; public AR15HandleSightFlipper enginestartL; public Collider escolL; public Collider escolR; public AR15HandleSightFlipper enginestartR; public AR15HandleSightFlipper chocks; public GameObject screen; public AudioSource chocksout; public AudioSource chockson; public GameObject airconL; public GameObject airconR; public GameObject airdis; public GameObject jesteryes; public bool isLeftOn = false; public bool isRightOn = false; public bool csEnd = false; public GameObject jester; public AudioSource engineloopL; public AudioSource engineloopR; public float enginelooprefL; public float enginelooprefR; public float enginelooprefvolL; public float enginelooprefvolR; public AudioSource Airloop; public float airloopref; public float airlooprefvol; public Collider throttlecol; public GameObject throttle; private KeywordRecognizer keyword; private Dictionary dic = new Dictionary(); public FVRObject airsupplyTrig; public FVRObject wheelchockonTrig; public FVRObject wheelchockoffTrig; public bool connectAir; public bool chockOn; public bool chockOff; public RotateOverTime L; public RotateOverTime R; public GameObject LG; public GameObject RG; public void Start() { //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown esM.SetActive(true); esL.SetActive(false); esR.SetActive(false); ((Behaviour)RR).enabled = false; ((Behaviour)radar).enabled = false; ((Behaviour)pod).enabled = false; isLeftOn = false; isRightOn = false; ((Behaviour)enginestartR).enabled = false; ((Behaviour)enginestartL).enabled = false; escolL.enabled = false; escolR.enabled = false; dic.Add("Chief, Connect Air Supply.", ConnectAir); dic.Add("Chief, Remove Wheel Chocks.", WheelChocksOut); dic.Add("Chief, Place Wheel Chocks.", WheelChocksOn); 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 ConnectAir() { //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) Object.Instantiate(((AnvilAsset)airsupplyTrig).GetGameObject(), ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); } public void WheelChocksOut() { //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) Object.Instantiate(((AnvilAsset)wheelchockoffTrig).GetGameObject(), ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); } public void WheelChocksOn() { //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) Object.Instantiate(((AnvilAsset)wheelchockonTrig).GetGameObject(), ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); } private void FixedUpdate() { //IL_0065: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Unknown result type (might be due to invalid IL or missing references) L.angularVelocity.z = enginelooprefL * -5000f; R.angularVelocity.z = enginelooprefR * -5000f; LG.transform.localEulerAngles = new Vector3(0f, 0f, 250f * (1f - engineloopL.volume)); RG.transform.localEulerAngles = new Vector3(0f, 0f, 250f * (1f - engineloopR.volume)); if ((Object)(object)GameObject.Find("F14BConnectAirTrig(Clone)") != (Object)null && !connectAir) { Vector3 velocity = PlaneRig.velocity; if (((Vector3)(ref velocity)).magnitude < 1f) { csEnd = false; airconL.SetActive(true); isLeftOn = true; ((Behaviour)enginestartL).enabled = true; escolL.enabled = true; } connectAir = true; } else if ((Object)(object)GameObject.Find("F14BConnectAirTrig(Clone)") == (Object)null) { connectAir = false; } if ((Object)(object)GameObject.Find("F14BWheelChockOnTrig(Clone)") != (Object)null && !chockOn) { Vector3 velocity2 = PlaneRig.velocity; if (((Vector3)(ref velocity2)).magnitude < 1f) { chockson.Play(); chocks.m_isLargeAperture = true; } chockOn = true; } else if ((Object)(object)GameObject.Find("F14BWheelChockOnTrig(Clone)") == (Object)null) { chockOn = false; } if ((Object)(object)GameObject.Find("F14BWheelChockOffTrig(Clone)") != (Object)null && !chockOff) { Vector3 velocity3 = PlaneRig.velocity; if (((Vector3)(ref velocity3)).magnitude < 1f) { chocksout.Play(); chocks.m_isLargeAperture = false; } chockOff = true; } else if ((Object)(object)GameObject.Find("F14BWheelChockOffTrig(Clone)") == (Object)null) { chockOff = false; } if (!csEnd) { if (isLeftOn) { Airloop.pitch = Mathf.SmoothDamp(Airloop.pitch, 1f, ref airloopref, 3f); Airloop.volume = Mathf.SmoothDamp(Airloop.volume, 0.75f, ref airlooprefvol, 3f); if (!enginestartL.m_isLargeAperture) { esM.SetActive(false); esL.SetActive(true); esR.SetActive(false); engineloopL.pitch = Mathf.SmoothDamp(engineloopL.pitch, 1f, ref enginelooprefL, 10f); engineloopL.volume = Mathf.SmoothDamp(engineloopL.volume, 1f, ref enginelooprefvolL, 10f); } } if (engineloopL.volume > 0.9f) { screen.SetActive(true); enginestartL.m_isLargeAperture = true; ((Behaviour)enginestartL).enabled = false; escolL.enabled = false; if (jester.activeInHierarchy) { jesteryes.SetActive(true); } airconR.SetActive(true); ((Behaviour)enginestartR).enabled = true; escolR.enabled = true; if (!isRightOn) { isRightOn = true; esM.SetActive(true); esL.SetActive(false); esR.SetActive(false); } } if (isRightOn && !enginestartR.m_isLargeAperture) { esM.SetActive(false); esL.SetActive(false); esR.SetActive(true); engineloopR.pitch = Mathf.SmoothDamp(engineloopR.pitch, 1f, ref enginelooprefR, 10f); engineloopR.volume = Mathf.SmoothDamp(engineloopR.volume, 1f, ref enginelooprefvolR, 10f); } if (engineloopR.volume > 0.9f) { enginestartR.m_isLargeAperture = true; ((Behaviour)enginestartR).enabled = false; escolR.enabled = false; csEnd = true; airdis.SetActive(true); Airloop.pitch = Mathf.SmoothDamp(Airloop.pitch, 0.25f, ref airloopref, 3f); Airloop.volume = Mathf.SmoothDamp(Airloop.volume, 0f, ref airlooprefvol, 3f); } } if (((Component)enginestop.Flipsight).transform.localEulerAngles.x > 45f) { airconL.SetActive(false); airconR.SetActive(false); airdis.SetActive(false); jesteryes.SetActive(false); ((Behaviour)enginestartL).enabled = false; ((Behaviour)enginestartR).enabled = false; escolR.enabled = false; escolL.enabled = false; isLeftOn = false; isRightOn = false; csEnd = true; } if (((Component)enginestop.Flipsight).transform.localEulerAngles.x < 45f) { csEnd = false; } if (csEnd) { engineloopL.pitch = Mathf.SmoothDamp(engineloopL.pitch, 0.25f, ref enginelooprefL, 10f); engineloopL.volume = Mathf.SmoothDamp(engineloopL.volume, 0f, ref enginelooprefvolL, 10f); engineloopR.pitch = Mathf.SmoothDamp(engineloopR.pitch, 0.25f, ref enginelooprefR, 10f); engineloopR.volume = Mathf.SmoothDamp(engineloopR.volume, 0f, ref enginelooprefvolR, 10f); Airloop.pitch = Mathf.SmoothDamp(Airloop.pitch, 0.25f, ref airloopref, 3f); Airloop.volume = Mathf.SmoothDamp(Airloop.volume, 0f, ref airlooprefvol, 3f); } if (engineloopL.volume > 0.9f && engineloopR.volume > 0.9f) { ((Behaviour)radar).enabled = true; ((Behaviour)pod).enabled = true; ((Behaviour)RR).enabled = true; esM.SetActive(true); esL.SetActive(false); esR.SetActive(false); ((Behaviour)enginestartL).enabled = false; ((Behaviour)enginestartR).enabled = false; throttlecol.enabled = true; } if (engineloopR.volume < 0.9f) { ((Behaviour)radar).enabled = false; ((Behaviour)pod).enabled = false; ((Behaviour)RR).enabled = false; throttlecol.enabled = false; throttle.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (engineloopL.volume < 0.9f) { nosekneel.m_isLargeAperture = true; wingfold.m_isLargeAperture = true; screen.SetActive(false); } } } } public class IndicatorsOfEngine : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { 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 TriggerMarker : MonoBehaviour { public GameObject marker; public Transform markerholder; public GameObject markerswitch; public GameObject dots; public GameObject penref1; public GameObject penref2; public GameObject pengeoonpaper1; public GameObject pengeoonpaper2; public GameObject parentfordots1; public GameObject parentfordots2; 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_0405: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: 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_027a: 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_0325: 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_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0368: 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_02f9: Unknown result type (might be due to invalid IL or missing references) if (markerswitch.transform.localEulerAngles.x > 45f) { marker.transform.SetParent(((Component)GM.CurrentMovementManager.RightHand).transform); marker.transform.localEulerAngles = new Vector3(0f, 0f, 0f); marker.transform.localPosition = new Vector3(0f, 0f, 0f); penref1.transform.position = ((Component)GM.CurrentMovementManager.RightHand).transform.position; penref2.transform.position = ((Component)GM.CurrentMovementManager.RightHand).transform.position; penref1.transform.localPosition = new Vector3(Mathf.Clamp(penref1.transform.localPosition.x, -0.25f, 0.25f), Mathf.Clamp(penref1.transform.localPosition.y, -0.25f, 0.25f), 0f); penref2.transform.localPosition = new Vector3(Mathf.Clamp(penref2.transform.localPosition.x, -0.25f, 0.25f), Mathf.Clamp(penref2.transform.localPosition.y, -0.25f, 0.25f), 0f); if (GM.CurrentMovementManager.Hands[1].Input.TriggerPressed) { if (Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref1.transform.position) < 0.05f) { marker.SetActive(false); pengeoonpaper1.SetActive(true); if (GM.CurrentMovementManager.Hands[1].Input.TriggerFloat > 0.75f) { Object.Instantiate(dots, penref1.transform.position, penref1.transform.rotation, parentfordots1.transform); } } else if (Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref2.transform.position) < 0.05f) { marker.SetActive(false); pengeoonpaper2.SetActive(true); if (GM.CurrentMovementManager.Hands[1].Input.TriggerFloat > 0.75f) { Object.Instantiate(dots, penref2.transform.position, penref2.transform.rotation, parentfordots2.transform); } } else if (Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref1.transform.position) > 0.05f && Vector3.Distance(((Component)GM.CurrentMovementManager.RightHand).transform.position, penref2.transform.position) > 0.05f) { marker.SetActive(true); pengeoonpaper1.SetActive(false); pengeoonpaper2.SetActive(false); } } else { marker.SetActive(true); pengeoonpaper1.SetActive(false); pengeoonpaper2.SetActive(false); } } else { marker.transform.SetParent(markerholder); marker.transform.localPosition = new Vector3(0f, 0f, 0f); marker.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class AIM54guide : MonoBehaviour { public GameObject capturevoice; public GameObject nocandovoice; public GameObject rogervoice; private KeywordRecognizer keyword; private Dictionary dic = new Dictionary(); public GameObject mark; public GameObject autogear; public Derringer drL; public Derringer drR; public bool L = false; public bool R = true; public GameObject reticle; public SosigLink sosigLink; private float nextFireTime = 0f; private float coolDownTime = 3f; private bool lockon = false; private bool fire = false; public float EngageRange = 15f; public float EngageAngle = 45f; public GameObject FireArm; public LayerMask LatchingMask; public LayerMask BlockingMask; public float PrecisionAngle = 5f; public void Lockon() { lockon = true; } public void FireMissile() { fire = true; } private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown mark.transform.localPosition = new Vector3(0f, 0f, 0f); dic.Add("Jester,Lock him.", Lockon); dic.Add("Jester,Lock target.", Lockon); dic.Add("Jester,Fire.", FireMissile); dic.Add("Jester,Shoot him.", FireMissile); dic.Add("Jester,Launch Missile.", FireMissile); 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](); } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) if (autogear.transform.localEulerAngles.x < 45f) { mark.transform.localPosition = new Vector3(0f, 0f, 0f); mark.SetActive(false); reticle.SetActive(false); } if (!(autogear.transform.localEulerAngles.x > 45f)) { return; } sosigLink = FindTarget(); if ((Object)(object)sosigLink == (Object)null) { mark.transform.localPosition = new Vector3(0f, 0f, 0f); mark.SetActive(false); reticle.SetActive(false); capturevoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else { if (!((Object)(object)sosigLink != (Object)null)) { return; } mark.SetActive(true); mark.transform.position = ((Component)sosigLink).transform.position; reticle.SetActive(true); capturevoice.transform.localEulerAngles = new Vector3(90f, 0f, 0f); if (!lockon) { if (fire) { fire = false; nocandovoice.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } } else { if (!lockon) { return; } rogervoice.transform.localEulerAngles = new Vector3(90f, 0f, 0f); if (fire && nextFireTime <= Time.time) { if (L && !R) { nocandovoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rogervoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); drL.FireBarrel(0); L = false; R = true; fire = false; lockon = false; } if (!L && R) { nocandovoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rogervoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); drR.FireBarrel(0); L = true; R = false; fire = false; lockon = false; } nextFireTime = Time.time + coolDownTime; } } } } 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(FireArm.transform.position, FireArm.transform.position + 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 - FireArm.transform.position; float num3 = Vector3.Angle(val, FireArm.transform.forward); Sosig s = component.S; SosigLink val2 = ((!(num3 <= PrecisionAngle)) ? s.Links[1] : s.Links[0]); if (num3 < num2 && !Physics.Linecast(FireArm.transform.position, ((Component)val2).transform.position, LayerMask.op_Implicit(BlockingMask), (QueryTriggerInteraction)1)) { result = val2; num2 = num3; } } } return result; } private void OnDestroy() { ((PhraseRecognizer)keyword).Stop(); } } public class AIM54guide2 : MonoBehaviour { public GameObject capturevoice; public GameObject nocandovoice; public GameObject rogervoice; private KeywordRecognizer keyword; private Dictionary dic = new Dictionary(); public GameObject mark; public GameObject autogear; public Derringer drL; public Derringer drR; public bool L = false; public bool R = true; public GameObject reticle; public SosigLink sosigLink; private float nextFireTime = 0f; private float coolDownTime = 3f; private bool lockon = false; private bool fire = false; public AR15HandleSightFlipper jester; public GameObject quadlantirn; public GameObject quadRadar; public GameObject enemy1; public GameObject radarM1; public GameObject Mark1; public GameObject Marker1; public AR15HandleSightFlipper Mtrigger1; public LineRenderer LR; public LineRenderer LR2; public string enemyname; public List datalink = new List(); public AR15HandleSightFlipper MissileTrig; public AudioSource button; public string enemyAirCraft1; public GameObject enemyAirCraftPrefab; public float cd = 5f; public float cd2 = 7.5f; public float EngageRange = 15f; public float EngageAngle = 45f; public GameObject FireArm; public LayerMask LatchingMask; public LayerMask BlockingMask; public float PrecisionAngle = 5f; public void Lockon() { lockon = true; } public void FireMissile() { fire = true; } private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown mark.transform.localPosition = new Vector3(0f, 0f, 0f); dic.Add("Jester,Lock him.", Lockon); dic.Add("Jester,Lock target.", Lockon); dic.Add("Jester,Fire.", FireMissile); dic.Add("Jester,Shoot him.", FireMissile); dic.Add("Jester,Launch Missile.", FireMissile); 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](); } private void FixedUpdate() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_08be: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_0932: 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_026d: 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_018e: 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_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_0975: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: 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_0301: 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_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0359: 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) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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_01e3: 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_0527: Unknown result type (might be due to invalid IL or missing references) //IL_054a: 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_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0580: 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_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_074c: 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_05a3: 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_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_040a: 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_0a04: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_044c: 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_0a8c: Unknown result type (might be due to invalid IL or missing references) //IL_0ab0: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_046f: 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_0649: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) if (!MissileTrig.m_isLargeAperture) { button.Play(); MissileTrig.m_isLargeAperture = true; if (lockon) { fire = true; } } if (autogear.transform.localEulerAngles.x < 45f) { mark.transform.localPosition = new Vector3(0f, 0f, 0f); mark.SetActive(false); reticle.SetActive(false); } if (!(autogear.transform.localEulerAngles.x > 45f)) { return; } if (!jester.m_isLargeAperture) { for (int i = 0; i < datalink.Count; i++) { if ((Object)(object)datalink[i] != (Object)null) { datalink.Remove(datalink[i]); } } quadlantirn.SetActive(false); quadRadar.SetActive(true); cd -= Time.deltaTime; cd2 -= Time.deltaTime; if ((Object)(object)GameObject.Find(enemyAirCraft1) == (Object)null && cd <= 0f && ((Component)this).gameObject.transform.position.y > 220f) { Object.Instantiate(enemyAirCraftPrefab, new Vector3(((Component)this).gameObject.transform.position.x, 200f, ((Component)this).gameObject.transform.position.z), ((Component)this).transform.rotation); cd = 5f; } if ((Object)(object)enemy1 == (Object)null) { Mtrigger1.m_isLargeAperture = true; enemy1 = FindEnemy(); radarM1.transform.localPosition = new Vector3(0f, 0f, 0f); Mark1.transform.localPosition = new Vector3(0f, 0f, 0f); Marker1.transform.localPosition = new Vector3(0f, 0f, 0f); Mark1.SetActive(false); Marker1.SetActive(false); } if ((Object)(object)enemy1 != (Object)null) { radarM1.transform.position = enemy1.transform.position; Mark1.transform.localPosition = new Vector3(radarM1.transform.localPosition.x * 0.00075f, radarM1.transform.localPosition.z * 0.00025f, 0f); Marker1.transform.localPosition = new Vector3(radarM1.transform.localPosition.x * 0.00075f, radarM1.transform.localPosition.z * 0.00025f, 0f); if (Mark1.transform.localPosition.x < -0.25f || Mark1.transform.localPosition.x > 0.25f || Mark1.transform.localPosition.y < 0f || Mark1.transform.localPosition.y > 0.5f) { Mark1.SetActive(false); Marker1.SetActive(false); } else if (Mark1.transform.localPosition.x >= -0.25f && Mark1.transform.localPosition.x <= 0.25f && Mark1.transform.localPosition.y >= 0f && Mark1.transform.localPosition.y <= 0.5f) { Mark1.SetActive(true); Marker1.SetActive(true); } } if (!Mtrigger1.m_isLargeAperture) { reticle.SetActive(true); mark.SetActive(true); mark.transform.position = enemy1.transform.position; lockon = true; LR.SetPosition(1, Mark1.transform.localPosition); LR2.SetPosition(1, Marker1.transform.localPosition); if (Mark1.transform.localPosition.x < -0.25f || Mark1.transform.localPosition.x > 0.25f || Mark1.transform.localPosition.y < 0f || Mark1.transform.localPosition.y > 0.5f) { ((Renderer)LR).enabled = false; ((Renderer)LR2).enabled = false; } else if (Mark1.transform.localPosition.x >= -0.25f && Mark1.transform.localPosition.x <= 0.25f && Mark1.transform.localPosition.y >= 0f && Mark1.transform.localPosition.y <= 0.5f) { ((Renderer)LR).enabled = true; ((Renderer)LR2).enabled = true; } } if (Mtrigger1.m_isLargeAperture) { reticle.SetActive(false); mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lockon = false; LR.SetPosition(1, new Vector3(0f, 0f, 0f)); LR2.SetPosition(1, new Vector3(0f, 0f, 0f)); ((Renderer)LR).enabled = false; ((Renderer)LR2).enabled = false; } if (fire && nextFireTime <= Time.time) { if (L && !R) { drL.FireBarrel(0); L = false; R = true; fire = false; lockon = false; } if (!L && R) { drR.FireBarrel(0); L = true; R = false; fire = false; lockon = false; } nextFireTime = Time.time + coolDownTime; } } if (!jester.m_isLargeAperture) { return; } Mark1.SetActive(false); Marker1.SetActive(false); sosigLink = FindTarget(); if ((Object)(object)sosigLink == (Object)null) { mark.transform.localPosition = new Vector3(0f, 0f, 0f); mark.SetActive(false); reticle.SetActive(false); capturevoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else { if (!((Object)(object)sosigLink != (Object)null)) { return; } mark.SetActive(true); mark.transform.position = ((Component)sosigLink).transform.position; reticle.SetActive(true); capturevoice.transform.localEulerAngles = new Vector3(90f, 0f, 0f); if (!lockon) { if (fire) { fire = false; nocandovoice.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } } else { if (!lockon) { return; } rogervoice.transform.localEulerAngles = new Vector3(90f, 0f, 0f); if (fire && nextFireTime <= Time.time) { if (L && !R) { nocandovoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rogervoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); drL.FireBarrel(0); L = false; R = true; fire = false; lockon = false; } if (!L && R) { nocandovoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rogervoice.transform.localEulerAngles = new Vector3(0f, 0f, 0f); drR.FireBarrel(0); L = true; R = false; fire = false; lockon = false; } nextFireTime = Time.time + coolDownTime; } } } } 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(FireArm.transform.position, FireArm.transform.position + 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 - FireArm.transform.position; float num3 = Vector3.Angle(val, FireArm.transform.forward); Sosig s = component.S; SosigLink val2 = ((!(num3 <= PrecisionAngle)) ? s.Links[1] : s.Links[0]); if (num3 < num2 && !Physics.Linecast(FireArm.transform.position, ((Component)val2).transform.position, LayerMask.op_Implicit(BlockingMask), (QueryTriggerInteraction)1)) { result = val2; num2 = num3; } } } return result; } private GameObject FindEnemy() { //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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: 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_01c0: 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(FireArm.transform.position, FireArm.transform.position + 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); } } GameObject result = null; float num2 = EngageAngle; for (int j = 0; j < list.Count; j++) { string name = ((Object)((Component)list[j]).gameObject).name; if (!datalink.Contains(((Component)list[j]).gameObject) && name != null && name == enemyname) { Vector3 val = ((Component)list[j]).transform.position - FireArm.transform.position; float num3 = Vector3.Angle(val, FireArm.transform.forward); GameObject val2 = ((!(num3 <= PrecisionAngle)) ? ((Component)list[j]).gameObject : ((Component)list[j]).gameObject); if (num3 < num2 && !Physics.Linecast(FireArm.transform.position, val2.transform.position, LayerMask.op_Implicit(BlockingMask), (QueryTriggerInteraction)1)) { result = val2; datalink.Add(val2); num2 = num3; } } } return result; } private void OnDestroy() { ((PhraseRecognizer)keyword).Stop(); } } public class AIM54sensor : MonoBehaviour { public AIM54Missile missile; public SosigLink link; public GameObject enemy; public string enemyname; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == enemyname) { enemy = ((Component)other).gameObject; } if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { link = ((Component)other).gameObject.GetComponent(); } } private void Start() { } private void FixedUpdate() { if ((Object)(object)link != (Object)null) { missile.link = link; } if ((Object)(object)enemy != (Object)null) { missile.enemy = enemy; } if ((Object)(object)link == (Object)null && !((Object)(object)enemy == (Object)null)) { } } } public class LanternPod : MonoBehaviour { public GameObject targ; public GameObject screenswitch; public GameObject mark; public float m_rotspeed = 100f; public GameObject podcam; public GameObject lookAT2; public GameObject podneck; public FVRFireArmChamber chamber; public GameObject gbuGEO; private void Start() { } private void FixedUpdate() { //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) //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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) if (mark.activeInHierarchy) { screenswitch.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } if (!mark.activeInHierarchy) { screenswitch.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (chamber.IsFull) { gbuGEO.SetActive(true); } if (!chamber.IsFull) { gbuGEO.SetActive(false); } AxisLookAt(podcam.transform, targ.transform.position, Vector3.forward); podneck.transform.localEulerAngles = new Vector3(0f, podcam.transform.localEulerAngles.y, 0f); Vector3 val = mark.transform.position - lookAT2.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(lookAT2.transform.forward, normalized) / m_rotspeed; if (num > 0.01f || num < -0.01f) { Transform transform = lookAT2.transform; Vector3 val2 = Vector3.Slerp(lookAT2.transform.forward, normalized, Time.deltaTime / num); transform.forward = ((Vector3)(ref val2)).normalized; } else { Transform transform2 = lookAT2.transform; Vector3 val3 = Vector3.Slerp(lookAT2.transform.forward, normalized, 1f); transform2.forward = ((Vector3)(ref val3)).normalized; } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } } public class Lookat2 : MonoBehaviour { public GameObject mark; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public LAPD2019Laser laser; public float distanceNearest = 0f; public Transform player; private Vector3 velocity; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void FixedUpdate() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 2500f) { laser.TurnOff(); mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)nearestAI != (Object)null) { laser.TurnOn(); mark.SetActive(true); mark.transform.position = Vector3.SmoothDamp(mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.1f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI == null) { return; } for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null) { currentAI.Remove(currentAI[i]); } } nearestAI = GetNearestGameObject(player, currentAI); } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } public Transform GetNearestGameObject(Transform player, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; i++) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).transform; } } } return val; } } public class Lookatsinglelock : MonoBehaviour { public GameObject mark; public SosigLink currentAI; public GameObject lookAtObj; public GameObject laser; public float distanceNearest = 0f; public Transform player; private Vector3 velocity; private void OnTriggerStay(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI = ((Component)other).gameObject.GetComponent(); } } private void FixedUpdate() { //IL_0045: 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_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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_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_010b: 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) if ((Object)(object)currentAI == (Object)null) { laser.SetActive(false); mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)currentAI != (Object)null) { laser.SetActive(true); mark.SetActive(true); mark.transform.position = Vector3.SmoothDamp(mark.transform.position, ((Component)currentAI).transform.position, ref velocity, 0.1f); AxisLookAt(lookAtObj.transform, ((Component)currentAI).transform.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)currentAI).transform.position); } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } } } public class FVRCleanupDelete : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class FlapsAndWingSweep : MonoBehaviour { public float wingsweepangle; public GameObject wingSweep; public GameObject speed; public ManipulateObject wingL; public ManipulateObject wingR; public ManipulateObject wingL2; public ManipulateObject wingR2; public AR15HandleSightFlipper gearpostswitch; public AR15HandleSightFlipper flapslever; public GameObject wingLG; public GameObject wingRG; private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) if (wingLG.transform.localEulerAngles.y > 1f && wingRG.transform.localEulerAngles.y > 1f) { flapslever.m_isLargeAperture = true; } wingsweepangle = wingSweep.transform.localEulerAngles.x; if ((double)wingsweepangle >= 84.5) { } if ((double)wingsweepangle < 84.5) { } if (speed.transform.localEulerAngles.y > 140f && wingsweepangle > 83f) { gearpostswitch.m_isLargeAperture = true; ((Behaviour)wingL2).enabled = false; ((Behaviour)wingR2).enabled = false; ((Behaviour)wingL).enabled = true; ((Behaviour)wingR).enabled = true; wingsweepangle = 85f; } if (speed.transform.localEulerAngles.y < 140f) { ((Behaviour)wingL).enabled = false; ((Behaviour)wingR).enabled = false; ((Behaviour)wingL2).enabled = true; ((Behaviour)wingR2).enabled = true; if (wingsweepangle > 85f) { wingsweepangle = 85f; } if (wingsweepangle < 5f) { wingsweepangle = 5f; } } } } } namespace Cityrobo { public class ForceArea : MonoBehaviour { [Tooltip("Force per physics frame in Newtons. I'm assuming the player weights 75kg for the launch force calculation.")] public float Force = 500f; [Tooltip("Blue arrow dictates force direction.")] public Transform ForceVector; private Collider _trigger; private const float PLAYERWEIGHT = 75f; private Collider Trigger { get { if ((Object)(object)_trigger == (Object)null) { _trigger = ((Component)this).GetComponent(); return _trigger; } return _trigger; } } public void OnTriggerStay(Collider other) { //IL_001f: 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) if ((Object)(object)other.attachedRigidbody != (Object)null) { other.attachedRigidbody.AddForce(ForceVector.forward * Force); } } public void FixedUpdate() { CheckPlayer(); } private void CheckPlayer() { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) Vector3 point = default(Vector3); ((Vector3)(ref point))..ctor(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody).transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); if (GM.CurrentMovementManager.IsSmoothLoco() && IsInsideCollider(Trigger, point)) { BlastPlayer(); } } private bool IsInsideCollider(Collider c, Vector3 point) { //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) return c.ClosestPoint(point) == point; } private void BlastPlayer() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) float num = Time.deltaTime * Force / 75f; GM.CurrentMovementManager.Blast(ForceVector.forward, num, false); } } public class HeatDamageArea : MonoBehaviour { [Tooltip("Thermal Damage per frame. A Flipzo lighter does 50 damage every tick.")] public float ThermalDamage = 50f; public void OnTriggerStay(Collider other) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) IFVRDamageable component = ((Component)other).GetComponent(); if (component == null && (Object)(object)other.attachedRigidbody != (Object)null) { component = ((Component)other.attachedRigidbody).GetComponent(); } if (component != null) { IFVRDamageable obj = component; Damage val = new Damage(); val.Class = (DamageClass)2; val.Dam_Thermal = ThermalDamage; val.Dam_TotalEnergetic = ThermalDamage; val.point = ((Component)other).transform.TransformPoint(other.attachedRigidbody.centerOfMass); Vector3 val2 = ((Component)other).transform.TransformPoint(other.attachedRigidbody.centerOfMass) - ((Component)this).transform.position; val.hitNormal = ((Vector3)(ref val2)).normalized; Vector3 val3 = ((Component)this).transform.position - ((Component)other).transform.TransformPoint(other.attachedRigidbody.centerOfMass); val.strikeDir = ((Vector3)(ref val3)).normalized; obj.Damage(val); } FVRIgnitable component2 = ((Component)other).GetComponent(); if ((Object)(object)component2 == (Object)null && (Object)(object)other.attachedRigidbody != (Object)null) { ((Component)other.attachedRigidbody).GetComponent(); } if ((Object)(object)component2 != (Object)null) { FXM.Ignite(component2, ThermalDamage / 500f); } } } } namespace JerryComponent { public class DrawDecal : MonoBehaviour { private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "MarkeTail") { Object.Destroy((Object)(object)this); } } private void Start() { } private void Update() { } } public class DrawingTool : MonoBehaviour { public GameObject penref; public GameObject decal; private void OnTriggerStay(Collider other) { //IL_0032: 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_0058: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)other).gameObject).name == "MarkerTip") { penref.transform.position = ((Component)other).gameObject.transform.position; Object.Instantiate(decal, penref.transform.position, ((Component)this).transform.rotation, ((Component)this).transform); } } private void Start() { } private void FixedUpdate() { } } public class ParentPlayer : MonoBehaviour { private void Start() { } private void FixedUpdate() { //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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GM.CurrentMovementManager != (Object)null) { if (Vector3.Distance(((Component)GM.CurrentMovementManager.Head).gameObject.transform.position, ((Component)this).transform.position) <= 2f) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent(((Component)this).transform); ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.SetParent(((Component)this).transform); ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.SetParent(((Component)this).transform); } if (Vector3.Distance(((Component)GM.CurrentMovementManager.Head).gameObject.transform.position, ((Component)this).transform.position) > 2f) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((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); } } } private void OnDestroy() { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((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); } } public class ParentPlayerheli : MonoBehaviour { public GameObject player; private void Start() { } private void Update() { //IL_0041: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { } player = ((Component)GM.CurrentPlayerBody).gameObject; if ((Object)(object)player != (Object)null) { if (Vector3.Distance(player.transform.position, ((Component)this).transform.position) <= 10f) { player.transform.SetParent(((Component)this).transform); } if (Vector3.Distance(player.transform.position, ((Component)this).transform.position) > 10f) { player.transform.SetParent((Transform)null); } } } } public class RadarRot : MonoBehaviour { public GameObject Xref; public GameObject Yref; public float X = 3f; public float Y = 2f; public bool up = true; private void Start() { } private void FixedUpdate() { //IL_00e7: 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) if (up) { X += 3f * Time.deltaTime; } else if (!up) { X -= 3f * Time.deltaTime; } if (X > 5f) { X = 5f; up = false; } else if (X < 1f) { Y += 1f; X = 1f; up = true; } if (Y > 4f) { Y = 0f; } Xref.transform.localPosition = new Vector3(0f, 0f, X); Yref.transform.localPosition = new Vector3(0f, 0f, Y); } } public class RealStickAndThrottle : MonoBehaviour { public GameObject speed; public GameObject speedmove; public GameObject throttle; public GameObject joystickX; public GameObject joystickY; public GameObject objecttofollowRightHand; public GameObject objecttofollowLeftHand; public FVRInteractiveObject throttleobj; public FVRInteractiveObject stickobj; private FVRViveHand left; private FVRViveHand right; private float throttlemove; private float stickXmove; private float stickYmove; private GameObject player; private GameObject anotherplayer; public GameObject throttlespace; public GameObject stickspace; private void Start() { } private void FixedUpdate() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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_0382: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)anotherplayer == (Object)null) { } if ((Object)(object)left == (Object)null || (Object)(object)right == (Object)null) { } if (throttleobj.m_isHeld) { left = throttleobj.m_hand; player = ((Component)left.Head).gameObject; ((Component)left).gameObject.transform.parent = throttlespace.transform; throttlemove = ((Component)left).gameObject.transform.localPosition.z; if (throttlemove > 0.2f) { throttlemove = 0.2f; } if (throttlemove < 0f) { throttlemove = 0f; } throttle.transform.localEulerAngles = new Vector3(0f, 0f, throttlemove * 225f); } if (!throttleobj.m_isHeld && (((Object)(object)left != (Object)null) & ((Object)(object)player != (Object)null))) { ((Component)left).gameObject.transform.parent = player.transform; player = null; } if (stickobj.m_isHeld) { right = stickobj.m_hand; ((Component)right).gameObject.transform.parent = stickspace.transform; anotherplayer = ((Component)right.Head).gameObject; stickXmove = ((Component)right).gameObject.transform.localPosition.z; if (stickXmove > 0.3f) { stickXmove = 0.3f; } if (stickXmove < 0f) { stickXmove = 0f; } joystickX.transform.localEulerAngles = new Vector3(stickXmove * 100f, 0f, 0f); stickYmove = ((Component)right).gameObject.transform.localPosition.x; if (stickYmove > 0.09f) { stickYmove = 0.09f; } if (stickYmove < 0f) { stickYmove = 0f; } joystickY.transform.localEulerAngles = new Vector3(0f, stickYmove * 333f, 0f); } if (!stickobj.m_isHeld && (Object)(object)right != (Object)null && (Object)(object)anotherplayer != (Object)null) { ((Component)right).gameObject.transform.parent = anotherplayer.transform; anotherplayer = null; joystickX.transform.localEulerAngles = new Vector3(15f, 0f, 0f); joystickY.transform.localEulerAngles = new Vector3(0f, 15f, 0f); } } } public class WheelSteerAndLaunch : MonoBehaviour { public FVRInteractiveObject throttle; public GameObject frontgear; public GameObject rudL; public GameObject rudR; public WheelCollider wM; public WheelCollider wl; public WheelCollider wr; public GameObject thrstick; public float maxangle = 60f; private float currentvel = 0f; public bool Left = false; public bool Right = false; private void Start() { } private void Update() { //IL_0124: 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_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)throttle.m_hand != (Object)null) { if (throttle.m_hand.Input.TouchpadAxes.x > 0.5f) { Left = false; Right = true; } if (throttle.m_hand.Input.TouchpadAxes.x < -0.5f) { Left = true; Right = false; } if (throttle.m_hand.Input.TouchpadAxes.x >= -0.5f && throttle.m_hand.Input.TouchpadAxes.x <= 0.5f) { Left = false; Right = false; } } else if ((Object)(object)throttle.m_hand == (Object)null) { Left = false; Right = false; } frontgear.transform.localEulerAngles = new Vector3(0f, 0f, wM.steerAngle); if (Left && !Right) { WheelCollider obj = wM; obj.steerAngle -= 25f * Time.deltaTime; } if (!Left && Right) { WheelCollider obj2 = wM; obj2.steerAngle += 25f * Time.deltaTime; } if (!Left && !Right) { wM.steerAngle = Mathf.SmoothDamp(wM.steerAngle, 0f, ref currentvel, 1f); } if (wM.steerAngle > maxangle) { wM.steerAngle = maxangle; } if (wM.steerAngle < 0f - maxangle) { wM.steerAngle = 0f - maxangle; } wl.motorTorque = 10f * thrstick.transform.localEulerAngles.z; wr.motorTorque = 10f * thrstick.transform.localEulerAngles.z; } } public class AngleWarning : MonoBehaviour { public GameObject warning; public AudioSource audioS; public GameObject obj; public float angularspeed; public GameObject gear; private void Start() { } private void Update() { //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_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_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) angularspeed = obj.transform.localEulerAngles.x; if (gear.transform.localEulerAngles.x > 20f) { if (angularspeed > 22.5f) { warning.SetActive(true); audioS.pitch = angularspeed / 22.5f; } else if (angularspeed < 22.5f) { warning.SetActive(false); audioS.pitch = 1f; } } else if (gear.transform.localEulerAngles.x < 20f) { warning.SetActive(false); audioS.pitch = 1f; } } } public class RandomSpeech : MonoBehaviour { public GameObject speech; public GameObject rot; public bool speeched = false; public bool reverse = 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_00a0: 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_0056: 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) if (rot.transform.localEulerAngles.x > 45f) { if (reverse) { speeched = false; } else if (!speeched) { Object.Instantiate(speech, ((Component)this).transform.position, ((Component)this).transform.rotation); speeched = true; } } else if (reverse) { if (!speeched) { Object.Instantiate(speech, ((Component)this).transform.position, ((Component)this).transform.rotation); speeched = true; } } else { speeched = false; } } } public class FPVDrone : MonoBehaviour, IFVRDamageable { public FVRObject explosion; public GAircraft GA; public FPVDroneHMD HMD; public FVRPhysicalObject Main; public LayerMask mask; public Transform campos; public ConstantForce force; public bool triggered = false; public FixedJoint FJ; public GameObject Rigidfuze; public float _damageReceived; public float _damageRequired; public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000f: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) if ((int)dam.Class == 1) { Vector3 val = dam.point + dam.hitNormal * Random.Range(0.002f, 0.008f); _damageReceived += dam.Dam_Blunt; if (_damageReceived >= _damageRequired) { Object.Instantiate(((AnvilAsset)explosion).GetGameObject(), ((Component)Main).transform.position, ((Component)Main).transform.rotation); Object.Destroy((Object)(object)((Component)Main).gameObject); Object.Destroy((Object)(object)Rigidfuze.gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void Update() { //IL_013b: 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_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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)HMD == (Object)null) { triggered = false; } else if ((Object)(object)HMD != (Object)null) { if ((Object)(object)Main.m_quickbeltSlot != (Object)null || (Object)(object)((FVRInteractiveObject)Main).m_hand != (Object)null || HMD.flip.transform.localEulerAngles.x < 45f) { triggered = false; } else if ((Object)(object)Main.m_quickbeltSlot == (Object)null && (Object)(object)((FVRInteractiveObject)Main).m_hand == (Object)null && HMD.flip.transform.localEulerAngles.x > 45f) { triggered = true; if ((Object)(object)FJ != (Object)null) { ((Joint)FJ).breakForce = 100f; } } } if ((Object)(object)FJ == (Object)null) { Object.Instantiate(((AnvilAsset)explosion).GetGameObject(), ((Component)Main).transform.position, ((Component)Main).transform.rotation); Object.Destroy((Object)(object)((Component)Main).gameObject); Object.Destroy((Object)(object)Rigidfuze.gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class FPVDroneHMD : MonoBehaviour { public GameObject flip; public FPVDrone Drone; public GameObject cam; public GameObject screen; public float throttleval; public GameObject levelHome; public GameObject levelblub; public GameObject levelRot; public FVRPhysicalObject Main; public bool locked = false; public GameObject levertohold; public float objToHeadDistance = 0.1f; public Rigidbody rigid; private void OnTriggerStay(Collider other) { //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) if ((Object)(object)Drone == (Object)null && flip.transform.localEulerAngles.x > 45f && ((Object)((Component)other).gameObject).name == "FPV(Clone)" && (Object)(object)((Component)other).gameObject.GetComponentInChildren() != (Object)null && (Object)(object)((Component)other).gameObject.GetComponentInChildren().Main.m_quickbeltSlot == (Object)null) { Drone = ((Component)other).gameObject.GetComponentInChildren(); } } private void Update() { //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_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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_071c: 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_0775: Unknown result type (might be due to invalid IL or missing references) //IL_07a3: Unknown result type (might be due to invalid IL or missing references) //IL_07c7: 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_0262: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_0644: 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_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: 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_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_034b: 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_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_0372: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0403: 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_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_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_048e: 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_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: 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_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)Main).m_hand != (Object)null && levertohold.transform.localEulerAngles.x > 45f) { locked = false; rigid.useGravity = true; rigid.isKinematic = false; } else if ((Object)(object)((FVRInteractiveObject)Main).m_hand == (Object)null && levertohold.transform.localEulerAngles.x < 45f && Vector3.Distance(((Component)Main).gameObject.transform.position, GM.CurrentPlayerBody.Head.position) < objToHeadDistance) { locked = true; rigid.useGravity = false; rigid.isKinematic = true; } if (locked) { ((Component)Main).gameObject.transform.position = GM.CurrentPlayerBody.Head.position; ((Component)Main).gameObject.transform.eulerAngles = GM.CurrentPlayerBody.Head.eulerAngles; } if ((Object)(object)Drone != (Object)null && flip.transform.localEulerAngles.x > 45f) { Drone.HMD = this; cam.transform.position = Drone.campos.position; cam.transform.eulerAngles = Drone.campos.eulerAngles; screen.SetActive(true); if (!((Object)(object)GM.CurrentMovementManager != (Object)null)) { return; } Drone.GA.ThrottleLever.transform.localEulerAngles = new Vector3(0f, 0f, GM.CurrentMovementManager.Hands[0].Input.TriggerFloat * 40f); if (GM.CurrentMovementManager.Hands[1].Input.TriggerPressed) { levelblub.transform.position = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.position; levelRot.transform.eulerAngles = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.eulerAngles; if (levelblub.transform.localPosition.x < 0f) { levelblub.transform.localPosition = new Vector3(0f, levelblub.transform.localPosition.y, levelblub.transform.localPosition.z); } else if (levelblub.transform.localPosition.x > 30f) { levelblub.transform.localPosition = new Vector3(30f, levelblub.transform.localPosition.y, levelblub.transform.localPosition.z); } if (levelblub.transform.localPosition.z < 0f) { levelblub.transform.localPosition = new Vector3(levelblub.transform.localPosition.x, levelblub.transform.localPosition.y, 0f); } else if (levelblub.transform.localPosition.z > 30f) { levelblub.transform.localPosition = new Vector3(levelblub.transform.localPosition.x, levelblub.transform.localPosition.y, 30f); } Drone.GA.StickLeverX.transform.localEulerAngles = new Vector3(30f - levelblub.transform.localPosition.z, 0f, 0f); Drone.GA.StickLeverY.transform.localEulerAngles = new Vector3(0f, 30f - levelblub.transform.localPosition.x, 0f); Drone.force.relativeTorque = new Vector3(0f, levelRot.transform.localEulerAngles.y - 45f, 0f); } else if (!GM.CurrentMovementManager.Hands[1].Input.TriggerPressed) { levelblub.transform.localPosition = new Vector3(15f, 0f, 15f); levelHome.transform.position = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.position; levelHome.transform.eulerAngles = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.eulerAngles; Drone.GA.StickLeverX.transform.localEulerAngles = new Vector3(15f, 0f, 0f); Drone.GA.StickLeverY.transform.localEulerAngles = new Vector3(0f, 15f, 0f); Drone.force.relativeTorque = new Vector3(0f, 0f, 0f); } } else if ((Object)(object)Drone != (Object)null && flip.transform.localEulerAngles.x < 45f) { Drone.HMD = this; cam.transform.position = Drone.campos.position; cam.transform.eulerAngles = Drone.campos.eulerAngles; levelblub.transform.localPosition = new Vector3(15f, 0f, 15f); levelHome.transform.position = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.position; levelHome.transform.eulerAngles = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.eulerAngles; Drone.GA.StickLeverX.transform.localEulerAngles = new Vector3(15f, 0f, 0f); Drone.GA.StickLeverY.transform.localEulerAngles = new Vector3(0f, 15f, 0f); Drone.force.relativeTorque = new Vector3(0f, 0f, 0f); } else if ((Object)(object)Drone == (Object)null || flip.transform.localEulerAngles.x < 45f) { cam.transform.position = ((Component)this).gameObject.transform.position; cam.transform.eulerAngles = ((Component)this).gameObject.transform.eulerAngles; screen.SetActive(false); } } } 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 AutoAdjustHeight : MonoBehaviour { public GameObject headpos; public GameObject headposref; public GameObject seatheight; public SpaceJetPack sjp; private void Start() { } private void Update() { //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00d2: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) if (sjp.is_inseat) { 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) * Time.deltaTime, seatheight.transform.localPosition.y + (headposref.transform.localPosition.y - headpos.transform.localPosition.y) * Time.deltaTime, seatheight.transform.localPosition.z + (headposref.transform.localPosition.z - headpos.transform.localPosition.z) * Time.deltaTime); } else { headpos.transform.localPosition = new Vector3(0f, 0f, 0f); seatheight.transform.localPosition = new Vector3(0f, 0f, 0f); } } } public class AutoAdjustHeight2 : MonoBehaviour { public GameObject headpos; public GameObject headposref; public GameObject seatheight; public AircraftSeat acs; public float lasttime = 5f; private void Start() { } private void FixedUpdate() { //IL_019c: 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_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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0116: 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_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_0148: 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_015e: 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) * Time.deltaTime, seatheight.transform.localPosition.y + (headposref.transform.localPosition.y - headpos.transform.localPosition.y) * Time.deltaTime, seatheight.transform.localPosition.z + (headposref.transform.localPosition.z - headpos.transform.localPosition.z) * Time.deltaTime); } } else { lasttime = 5f; headpos.transform.localPosition = new Vector3(0f, 0f, 0f); seatheight.transform.localPosition = new Vector3(0f, 0f, 0f); } } } public class JoyStickJetSuit : FVRInteractiveObject { public float num1 = 0f; public float num2 = 0f; public float num3 = 0f; public Transform Joystick; public Transform JoystickBase; public override void UpdateInteraction(FVRViveHand hand) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_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_0068: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_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_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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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) ((FVRInteractiveObject)this).UpdateInteraction(hand); Vector3 val = Vector3.Slerp(hand.Input.FilteredForward, hand.Input.FilteredUp, 0.5f); Vector3 val2 = Vector3.Slerp(hand.Input.FilteredForward, -hand.Input.FilteredUp, 0.5f); Vector3 val3 = Vector3.ProjectOnPlane(val, JoystickBase.right); Vector3 val4 = Vector3.ProjectOnPlane(val, JoystickBase.forward); Vector3 val5 = Vector3.ProjectOnPlane(val2, JoystickBase.up); num1 = Mathf.Atan2(Vector3.Dot(JoystickBase.right, Vector3.Cross(JoystickBase.up, val3)), Vector3.Dot(JoystickBase.up, val3)) * 57.29578f; num2 = Mathf.Atan2(Vector3.Dot(JoystickBase.forward, Vector3.Cross(JoystickBase.up, val4)), Vector3.Dot(JoystickBase.up, val4)) * 57.29578f; num3 = Mathf.Atan2(Vector3.Dot(JoystickBase.up, Vector3.Cross(JoystickBase.forward, val5)), Vector3.Dot(JoystickBase.forward, val5)) * 57.29578f; num1 = Mathf.Clamp(num1, -30f, 30f) / 30f; num2 = Mathf.Clamp(num2, -30f, 30f) / 30f; num3 = Mathf.Clamp(num3, -30f, 30f) / 30f; if (Mathf.Abs(num1) <= 0.2f) { num1 = 0f; } if (Mathf.Abs(num2) <= 0.2f) { num2 = 0f; } if (Mathf.Abs(num3) <= 0.2f) { num3 = 0f; } num1 = num1 * num1 * Mathf.Sign(num1); num2 = num2 * num2 * Mathf.Sign(num2); num3 = num3 * num3 * Mathf.Sign(num3); Joystick.localEulerAngles = new Vector3(num1 * 30f, num3 * 30f, num2 * 30f); } public override void EndInteraction(FVRViveHand hand) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).EndInteraction(hand); Joystick.localEulerAngles = new Vector3(0f, 0f, 0f); num1 = 0f; num2 = 0f; num3 = 0f; } } public class RealStickWithZ : MonoBehaviour { public GameObject joystickZ; public GameObject joystickX; public GameObject joystickY; public FVRInteractiveObject stickobj; private FVRViveHand right; private GameObject rightHand = null; private float stickXmove; private float stickYmove; private GameObject player; public GameObject stickspace; public Vector3 velx = Vector3.zero; public Vector3 vely = Vector3.zero; private void Start() { } private void Update() { //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_0354: 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) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_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_018e: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rightHand == (Object)null || (Object)(object)right == (Object)null || (Object)(object)player == (Object)null) { } if (stickobj.m_isHeld) { right = stickobj.m_hand; rightHand = ((Component)right).gameObject; if ((Object)(object)right != (Object)null || (Object)(object)rightHand != (Object)null) { player = ((Component)right.Head).gameObject; rightHand.transform.parent = stickspace.transform; } if (rightHand.transform.localEulerAngles.y <= 45f && rightHand.transform.localEulerAngles.y >= 5f) { joystickZ.transform.localEulerAngles = new Vector3(0f, rightHand.transform.localEulerAngles.y, 0f); } if (joystickZ.transform.localEulerAngles.y > 45f) { joystickZ.transform.localEulerAngles = new Vector3(0f, 45f, 0f); } if (joystickZ.transform.localEulerAngles.y < 5f) { joystickZ.transform.localEulerAngles = new Vector3(0f, 5f, 0f); } stickXmove = rightHand.transform.localPosition.z; if (stickXmove > 0.3f) { stickXmove = 0.3f; } if (stickXmove < 0f) { stickXmove = 0f; } joystickX.transform.localEulerAngles = new Vector3(stickXmove * 100f, 0f, 0f); stickYmove = rightHand.transform.localPosition.x; if (stickYmove > 0.3f) { stickYmove = 0.3f; } if (stickYmove < 0f) { stickYmove = 0f; } joystickY.transform.localEulerAngles = new Vector3(0f, stickYmove * 100f, 0f); } if (!stickobj.m_isHeld) { if ((Object)(object)right != (Object)null || (Object)(object)rightHand != (Object)null) { rightHand.transform.parent = player.transform; right = null; rightHand = null; player = null; } joystickX.transform.localEulerAngles = new Vector3(15f, 0f, 0f); joystickY.transform.localEulerAngles = new Vector3(0f, 15f, 0f); joystickZ.transform.localEulerAngles = new Vector3(0f, 25f, 0f); } } } public class RoboArmReloading : MonoBehaviour { public GameObject Target; public GameObject HoldPoint; public FVRQuickBeltSlot gunslot; public FVRQuickBeltSlot magslot; public GameObject restpos; public Vector3 vel = Vector3.zero; public Vector3 velrot = Vector3.zero; public bool spawned = false; public GameObject magclone; private void Start() { } private void Update() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_0099: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_0403: 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_0433: 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_0452: 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_02c1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gunslot.CurObject == (Object)null || (Object)(object)magslot.CurObject == (Object)null) { Target.transform.position = Vector3.SmoothDamp(Target.transform.position, restpos.transform.position, ref vel, 1f); Target.transform.rotation = Quaternion.Slerp(Target.transform.rotation, restpos.gameObject.transform.rotation, Time.time); } else if ((Object)(object)gunslot.CurObject != (Object)null && (Object)(object)magslot.CurObject != (Object)null && (Object)(object)((Component)gunslot.CurObject).gameObject.GetComponent() != (Object)null && (Object)(object)((Component)magslot.CurObject).gameObject.GetComponent() != (Object)null) { FVRFireArm component = ((Component)gunslot.CurObject).gameObject.GetComponent(); FVRFireArmMagazine component2 = ((Component)magslot.CurObject).gameObject.GetComponent(); if (component.UsesMagazines && component.MagazineType == component2.MagazineType) { if ((Object)(object)component.Magazine == (Object)null || component.Magazine.m_numRounds == 0) { if (Vector3.Distance(Target.transform.position, ((Component)component2).gameObject.transform.position) > 0.05f && (Object)(object)magclone == (Object)null) { Target.transform.position = Vector3.SmoothDamp(Target.transform.position, ((Component)component2).gameObject.transform.position, ref vel, 1f); Target.transform.rotation = Quaternion.Slerp(Target.transform.rotation, ((Component)component2).gameObject.transform.rotation, Time.time); } else if (Vector3.Distance(Target.transform.position, ((Component)component2).gameObject.transform.position) < 0.05f && (Object)(object)magclone == (Object)null && !spawned) { magclone = Object.Instantiate(((AnvilAsset)((FVRPhysicalObject)component2).ObjectWrapper).GetGameObject(), HoldPoint.transform.position, HoldPoint.transform.rotation); spawned = true; } if ((Object)(object)magclone != (Object)null) { magclone.transform.position = HoldPoint.transform.position; magclone.transform.eulerAngles = HoldPoint.transform.eulerAngles; Target.transform.position = Vector3.SmoothDamp(Target.transform.position, ((Component)component).gameObject.transform.position, ref vel, 1f); Target.transform.rotation = Quaternion.Slerp(Target.transform.rotation, ((Component)component).gameObject.transform.rotation, Time.time); } } else if ((Object)(object)component.Magazine != (Object)null && component.Magazine.m_numRounds > 0) { magclone = null; spawned = false; Target.transform.position = Vector3.SmoothDamp(Target.transform.position, restpos.transform.position, ref vel, 1f); Target.transform.rotation = Quaternion.Slerp(Target.transform.rotation, restpos.gameObject.transform.rotation, Time.time); } } } if (!((Object)(object)magclone == (Object)null)) { } } } public class RobotGunRack : MonoBehaviour { public FVRQuickBeltSlot slot; public GameObject target; public GameObject restpos; public Vector3 vel = Vector3.zero; public Vector3 velrot = Vector3.zero; 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_018e: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0117: 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) if ((Object)(object)slot.CurObject != (Object)null) { ((Component)slot.PoseOverride).transform.localEulerAngles = new Vector3(90f + ((FVRInteractiveObject)slot.CurObject).PoseOverride.localEulerAngles.x, 0f, 180f); if (!((Object)(object)((FVRInteractiveObject)slot.CurObject).m_hand == (Object)null) && (Object)(object)((FVRInteractiveObject)slot.CurObject).m_hand != (Object)null) { target.transform.position = Vector3.SmoothDamp(target.transform.position, ((FVRInteractiveObject)slot.CurObject).QBPoseOverride.position, ref vel, 0.01f); target.transform.rotation = Quaternion.Slerp(target.transform.rotation, ((Component)((FVRInteractiveObject)slot.CurObject).m_hand).gameObject.transform.rotation, Time.time * 0.01f); } } else if ((Object)(object)slot.CurObject == (Object)null) { ((Component)slot.PoseOverride).transform.localEulerAngles = new Vector3(0f, 0f, 0f); target.transform.position = Vector3.SmoothDamp(target.transform.position, restpos.gameObject.transform.position, ref vel, 0.5f); target.transform.rotation = Quaternion.Slerp(target.transform.rotation, restpos.gameObject.transform.rotation, Time.time * 0.5f); } } } public class SpaceJetPack : FVRInteractiveObject { public GameObject audioS; public GameObject audioS2; public GameObject seatTrigger; public JoyStickJetSuit jsjs; public GameObject moveforL; public GameObject moverearL; public Rigidbody main; public FVRPhysicalObject body; private GravityMode StoredGravityMode1; public bool stored = false; public bool is_inseat = false; 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 GameObject gripl; public GameObject gripr; public CoreControlMode cmm; public AXButtonSnapTurnMode snapt; public MovementMode mm; public override void SimpleInteraction(FVRViveHand hand) { //IL_0075: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_011c: 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) ((FVRInteractiveObject)this).SimpleInteraction(hand); if (hand.IsThisTheRightHand) { hand = hand.OtherHand; } if ((Object)(object)this.hand == (Object)null) { if (currentSeat.ContainsKey(hand)) { currentSeat[hand].RemoveHand(); } currentSeat.Add(hand, this); this.hand = hand; hand.MovementManager.TeleportToPoint(SitPos.transform.position, false, SitPos.transform.localEulerAngles); if (!stored) { StoredGravityMode1 = GM.Options.SimulationOptions.PlayerGravityMode; mm = GM.Options.MovementOptions.CurrentMovementMode; GM.Options.MovementOptions.CurrentMovementMode = (MovementMode)4; snapt = GM.Options.MovementOptions.AXButtonSnapTurnState; GM.Options.MovementOptions.AXButtonSnapTurnState = (AXButtonSnapTurnMode)0; cmm = GM.Options.ControlOptions.CCM; GM.Options.ControlOptions.CCM = (CoreControlMode)0; Debug.Log((object)"Gravity settings saved"); stored = true; } GM.Options.SimulationOptions.PlayerGravityMode = (GravityMode)3; } else if ((Object)(object)hand == (Object)(object)this.hand) { RemoveHand(); is_inseat = false; if (stored) { GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; Debug.Log((object)"Gravity settings restored1"); stored = false; } if ((Object)(object)EjectPos != (Object)null) { ((Component)hand.MovementManager).transform.position = EjectPos.transform.position; } } } private void Awake() { _playerMovement = Object.FindObjectOfType(); } public void Update() { //IL_00a7: 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_043b: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_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_04ec: 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_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0473: 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_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_0218: 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_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) if (!is_inseat) { body.UsesGravity = true; main.useGravity = true; } else if (is_inseat) { body.UsesGravity = false; main.useGravity = false; ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent(SitPos.transform); main.AddRelativeTorque(new Vector3(30f * jsjs.num3, -30f * jsjs.num1, 30f * jsjs.num2)); if ((Object)(object)((FVRInteractiveObject)jsjs).m_hand != (Object)null) { if (((FVRInteractiveObject)jsjs).m_hand.Input.TriggerPressed) { main.AddRelativeForce(new Vector3(0f, 0f, 500f), (ForceMode)0); audioS2.SetActive(true); } else { audioS2.SetActive(false); } } if (((FVRInteractiveObject)jsjs).m_isHeld) { if (((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.x > 0.5f) { main.AddRelativeForce(new Vector3(250f, 0f, 0f), (ForceMode)0); audioS.SetActive(true); } else if (((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.x < -0.5f) { main.AddRelativeForce(new Vector3(-250f, 0f, 0f), (ForceMode)0); audioS.SetActive(true); } if (((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.y > 0.5f) { main.AddRelativeForce(new Vector3(0f, 0f, 250f), (ForceMode)0); audioS.SetActive(true); } else if (((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.y < -0.5f) { main.AddRelativeForce(new Vector3(0f, 0f, -250f), (ForceMode)0); audioS.SetActive(true); } if (((FVRInteractiveObject)jsjs).m_hand.Input.BYButtonPressed) { main.AddRelativeForce(new Vector3(0f, 250f, 0f), (ForceMode)0); audioS.SetActive(true); } if (((FVRInteractiveObject)jsjs).m_hand.Input.AXButtonPressed) { main.AddRelativeForce(new Vector3(0f, -250f, 0f), (ForceMode)0); audioS.SetActive(true); } if (!((FVRInteractiveObject)jsjs).m_hand.Input.BYButtonPressed && !((FVRInteractiveObject)jsjs).m_hand.Input.AXButtonPressed && ((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.y < 0.5f && ((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.y > -0.5f && ((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.x > -0.5f && ((FVRInteractiveObject)jsjs).m_hand.Input.TouchpadAxes.x < 0.5f) { audioS.SetActive(false); } } else if (!((FVRInteractiveObject)jsjs).m_isHeld) { audioS.SetActive(false); } } if (!((Object)(object)hand != (Object)null)) { return; } if (Vector3.Distance(((Component)hand.MovementManager).transform.position, ((Component)this).transform.position) > 25f) { is_inseat = false; if (stored) { GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; Debug.Log((object)"Gravity settings restored2"); stored = false; } RemoveHand(); } ((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) { RemoveHand(); is_inseat = false; if (stored) { GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; Debug.Log((object)"Gravity settings restored3"); stored = false; } } if (((Component)hand.MovementManager).transform.position.y < GM.CurrentSceneSettings.CatchHeight || GM.IsDead()) { RemoveHand(); is_inseat = false; if (stored) { GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; Debug.Log((object)"Gravity settings restored4"); stored = false; } } } 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); is_inseat = true; } public void RemoveHand() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if (currentSeat.ContainsKey(hand)) { currentSeat.Remove(hand); } hand = null; if (isplayerrotated) { GM.Options.MovementOptions.CurrentMovementMode = mm; GM.Options.MovementOptions.AXButtonSnapTurnState = snapt; GM.Options.ControlOptions.CCM = cmm; ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)_playerMovement).transform.eulerAngles = new Vector3(0f, ((Component)_playerMovement).transform.eulerAngles.y, 0f); ((Component)GM.CurrentPlayerBody).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentPlayerBody).gameObject.transform.eulerAngles.y, 0f); isplayerrotated = false; } } private void OnDestroy() { //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_0034: 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) RemoveHand(); ((Component)_playerMovement).transform.eulerAngles = new Vector3(0f, ((Component)_playerMovement).transform.eulerAngles.y, 0f); is_inseat = false; GM.Options.SimulationOptions.PlayerGravityMode = StoredGravityMode1; Debug.Log((object)"Gravity settings restored5"); Object.Destroy((Object)(object)gripl); Object.Destroy((Object)(object)gripr); } } public class HeadRotate : MonoBehaviour { public GameObject rotGEO; public GameObject forward; public GameObject headGEO; public bool activate = true; private void Start() { } 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_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) //IL_004d: 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) if (activate) { headGEO.transform.eulerAngles = new Vector3(rotGEO.transform.eulerAngles.x, rotGEO.transform.eulerAngles.y, 0f); } else if (!activate) { headGEO.transform.eulerAngles = forward.transform.eulerAngles; } } } } public class CameraAircraft : MonoBehaviour { public static CameraAircraft current; public bool isActive = true; public bool cursorStartLocked = false; public bool turbulence = true; public float pitchFactor = 1f; public float rollFactor = 1f; public float yawFactor = 1f; public float thrust = 1f; public float lift = 1f; public AudioSource audioSource; public AudioClip audioClip; public float audioPitch = 1f; public float boostFactor = 1f; public float brakeFactor = 1f; private float boost = 1f; private float brake = 1f; private float lastThrust; private bool lastTurbulence = false; private void Awake() { if ((Object)(object)audioSource == (Object)null) { ((Component)audioSource).GetComponent(); } } private void Start() { if (cursorStartLocked) { Cursor.lockState = (CursorLockMode)1; } else { Cursor.lockState = (CursorLockMode)0; } } private void OnEnable() { current = this; lastThrust = thrust; lastTurbulence = turbulence; } private void Update() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 if (!isActive) { return; } if (Input.GetKeyDown((KeyCode)9)) { if ((int)Cursor.lockState != 1) { Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } else { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } if ((Object)(object)audioSource != (Object)null && (Object)(object)audioClip != (Object)null) { audioSource.PlayOneShot(audioClip); } } if (Input.GetKeyDown((KeyCode)121) && (Object)(object)audioSource != (Object)null) { audioSource.mute = !audioSource.mute; if ((Object)(object)audioClip != (Object)null) { audioSource.PlayOneShot(audioClip); } } } private void FixedUpdate() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Invalid comparison between Unknown and I4 if (!isActive) { return; } if (Input.GetKey((KeyCode)116) || Input.GetMouseButtonDown(2)) { ((Component)this).transform.localRotation = Quaternion.identity; } if (Input.GetKey((KeyCode)32) || Input.GetMouseButtonDown(1)) { ((Component)this).transform.localEulerAngles = new Vector3(0f, ((Component)this).transform.localEulerAngles.y, 0f); } if (Input.GetKey((KeyCode)304)) { boost = 2f; } else { boost = 1f; } if (Input.GetKey((KeyCode)306)) { brake = 0.25f; } else { brake = 1f; } if (Input.GetKeyDown((KeyCode)308)) { if (thrust != 0f) { lastThrust = thrust; thrust = 0f; lastTurbulence = turbulence; turbulence = false; } else { thrust = lastThrust; turbulence = lastTurbulence; } } if (Input.GetKeyDown((KeyCode)44)) { thrust -= 1f; } if (Input.GetKeyDown((KeyCode)46)) { thrust += 1f; } if ((Object)(object)audioSource != (Object)null) { audioSource.pitch = audioPitch + ((boost != 1f) ? 0.5f : 0f) + ((brake != 1f) ? (-0.5f * audioPitch) : 0f); } ((Component)this).transform.Translate(Vector3.forward * Time.fixedDeltaTime * (thrust * 5f) * boost * boostFactor * brake * brakeFactor); ((Component)this).transform.Translate((float)((Input.GetKey((KeyCode)114) ? 1 : 0) - (Input.GetKey((KeyCode)102) ? 1 : 0)) * Vector3.up * Time.fixedDeltaTime * (lift * 5f) * boost * boostFactor * brake * brakeFactor); if ((int)Cursor.lockState == 1) { ((Component)this).transform.Rotate(Input.GetAxis("Mouse Y") * Time.fixedDeltaTime * (pitchFactor * 100f) * boost * brake * 2f, 0f, (0f - Input.GetAxis("Mouse X")) * Time.fixedDeltaTime * (rollFactor * 100f) * boost * brake / 2f, (Space)1); } ((Component)this).transform.Rotate(((float)((Input.GetKey((KeyCode)119) ? 1 : 0) - (Input.GetKey((KeyCode)115) ? 1 : 0)) + ((!turbulence) ? 0f : Random.Range(-0.05f, 0.05f))) * Time.fixedDeltaTime * (pitchFactor * 100f) * boost * brake, ((float)((Input.GetKey((KeyCode)101) ? 1 : 0) - (Input.GetKey((KeyCode)113) ? 1 : 0)) + ((!turbulence) ? 0f : Random.Range(-0.1f, 0.1f))) * Time.fixedDeltaTime * (yawFactor * 100f) * boost * brake, ((float)((Input.GetKey((KeyCode)97) ? 1 : 0) - (Input.GetKey((KeyCode)100) ? 1 : 0)) + ((!turbulence) ? 0f : Random.Range(-0.125f, 0.125f))) * Time.fixedDeltaTime * (rollFactor * 100f) * boost * brake, (Space)1); } } public class HudAdvancedScript : MonoBehaviour { public static HudAdvancedScript current; [Header("Aircraft HUD")] public bool isActive = false; [Tooltip("Link your Aircraft Transform here!")] public Transform aircraft; [Tooltip("If your Aircraft have a RigidBody, link it here!")] public Rigidbody aircraftRB; [Space] public string activeMsg = "HUD Activated"; public DisplayMsg consoleMsg; public RectTransform hudPanel; [Space(5f)] [Header("Roll")] public bool useRoll = true; public float rollAmplitude = 1f; public float rollOffSet = 0f; [Range(0f, 1f)] public float rollFilterFactor = 0.25f; public RectTransform horizonRoll; public Text horizonRollTxt; [Space(5f)] [Header("Pitch")] public bool usePitch = true; public float pitchAmplitude = 1f; public float pitchOffSet = 0f; public float pitchXOffSet = 0f; public float pitchYOffSet = 0f; [Range(0f, 1f)] public float pitchFilterFactor = 0.125f; public RectTransform horizonPitch; public Text horizonPitchTxt; [Space(5f)] [Header("Heading")] public bool useHeading = true; public float headingAmplitude = 1f; public float headingOffSet = 0f; [Range(0f, 1f)] public float headingFilterFactor = 0.1f; public RectTransform compassHSI; public Text headingTxt; public CompassBar compassBar; [Space(5f)] [Header("Altitude")] public bool useAltitude = true; public float altitudeAmplitude = 1f; public float altitudeOffSet = 0f; [Range(0f, 1f)] public float altitudeFilterFactor = 0.5f; public Text altitudeTxt; [Space(5f)] [Header("Speed")] public bool useSpeed = true; public float speedAmplitude = 1f; public float speedOffSet = 0f; [Range(0f, 1f)] public float speedFilterFactor = 0.25f; public Text speedTxt; [Space(5f)] [Header("Vertical Velocity")] public bool useVV = true; public float vvAmplitude = 1f; public float vvOffSet = 0f; [Range(0f, 1f)] public float vvFilterFactor = 0.1f; public NeedleIndicator vvNeedle; public ArrowIndicator vvArrow; public bool roundVV = true; public bool showDecimalVV = true; public float roundFactorVV = 0.1f; public Text verticalSpeedTxt; [Space(5f)] [Header("Horizontal Velocity")] public bool useHV = true; public float hvAmplitude = 1f; public float hvOffSet = 0f; [Range(0f, 1f)] public float hvFilterFactor = 0.1f; public NeedleIndicator hvNeedle; public ArrowIndicator hvArrow; public bool roundHV = true; public bool showDecimalHV = true; public float roundFactorHV = 0.1f; public Text horizontalSpeedTxt; [Space(5f)] [Header("G-Force")] public bool useGForce = true; public float gForceAmplitude = 1f; public float gForceOffSet = 0f; [Range(0f, 1f)] public float gForceFilterFactor = 0.25f; public Text gForceTxt; public Text maxGForceTxt; public Text minGForceTxt; [Space(5f)] [Header("AOA, AOS and GlidePath")] public bool useAlphaBeta = true; public float alphaAmplitude = 1f; public float alphaOffSet = 0f; [Range(0f, 1f)] public float alphaFilterFactor = 0.25f; public NeedleIndicator alphaNeedle; public ArrowIndicator alphaArrow; public Text alphaTxt; [Space] public float betaAmplitude = 1f; public float betaOffSet = 0f; [Range(0f, 1f)] public float betaFilterFactor = 0.25f; public NeedleIndicator betaNeedle; public ArrowIndicator betaArrow; public Text betaTxt; [Space] public bool useGlidePath = true; [Range(0f, 1f)] public float glidePathFilterFactor = 0.1f; public float glideXDeltaClamp = 600f; public float glideYDeltaClamp = 700f; public RectTransform glidePath; [Space(10f)] [Header("Flight Variables - ReadOnly!")] public float speed; public float altitude; public float pitch; public float roll; public float heading; public float gForce; public float maxGForce; public float minGForce; public float alpha; public float beta; public float vv; public float hv; public Vector3 carGForce; private Vector3 currentPosition; private Vector3 lastPosition; private Vector3 relativeSpeed; private Vector3 absoluteSpeed; private Vector3 lastSpeed; private Vector3 relativeAccel; private Vector3 angularSpeed; private Quaternion currentRotation; private Quaternion lastRotation; private Quaternion deltaTemp; private float angleTemp = 0f; private Vector3 axisTemp = Vector3.zero; private int waitInit = 6; private float VectorAngle(Vector2 from, Vector2 to) { //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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.Cross(Vector2.op_Implicit(from), Vector2.op_Implicit(to)); float num = Vector2.Angle(from, to); return (!(val.z > 0f)) ? num : (0f - num); } private void Awake() { if ((Object)(object)aircraft == (Object)null && (Object)(object)aircraftRB == (Object)null) { aircraft = ((Component)Camera.main).transform; } if ((Object)(object)aircraft == (Object)null && (Object)(object)aircraftRB != (Object)null) { aircraft = ((Component)aircraftRB).transform; } } private void OnEnable() { if ((Object)(object)aircraft == (Object)null && (Object)(object)aircraftRB == (Object)null) { aircraft = ((Component)Camera.main).transform; } ResetHud(); } public void ResetHud() { current = this; if ((Object)(object)aircraft == (Object)null && (Object)(object)aircraftRB != (Object)null) { aircraft = ((Component)aircraftRB).transform; } waitInit = 6; maxGForce = 1f; minGForce = 1f; if (useGForce) { if ((Object)(object)maxGForceTxt != (Object)null) { maxGForceTxt.text = "0.0"; } if ((Object)(object)minGForceTxt != (Object)null) { minGForceTxt.text = "0.0"; } } isActive = true; if ((Object)(object)consoleMsg != (Object)null) { DisplayMsg.current = consoleMsg; } if (activeMsg != "") { DisplayMsg.show(activeMsg, 5f); } } public void toogleHud() { SndPlayer.playClick(); ((Component)hudPanel).gameObject.SetActive(!((Component)hudPanel).gameObject.activeSelf); if (!((Component)hudPanel).gameObject.activeSelf) { isActive = false; current = null; DisplayMsg.show("Hud Disabled", 5f); } else if (!isActive) { ResetHud(); } } private void FixedUpdate() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027a: 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_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_00fb: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_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_0181: 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_0195: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: 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_0246: 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_0257: 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_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: 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_03ff: 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_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0573: 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_05cd: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Unknown result type (might be due to invalid IL or missing references) //IL_0a3d: Unknown result type (might be due to invalid IL or missing references) //IL_0a42: Unknown result type (might be due to invalid IL or missing references) //IL_0b97: Unknown result type (might be due to invalid IL or missing references) //IL_0b9c: Unknown result type (might be due to invalid IL or missing references) //IL_0be2: 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_0c2b: Unknown result type (might be due to invalid IL or missing references) //IL_0c74: Unknown result type (might be due to invalid IL or missing references) //IL_0c7f: Unknown result type (might be due to invalid IL or missing references) if (!isActive || !((Component)hudPanel).gameObject.activeSelf) { return; } if ((Object)(object)aircraft == (Object)null) { isActive = false; return; } lastPosition = currentPosition; lastSpeed = relativeSpeed; lastRotation = currentRotation; if ((Object)(object)aircraft != (Object)null && (Object)(object)aircraftRB == (Object)null) { currentPosition = ((Component)aircraft).transform.position; absoluteSpeed = (currentPosition - lastPosition) / Time.fixedDeltaTime; relativeSpeed = ((Component)aircraft).transform.InverseTransformDirection((currentPosition - lastPosition) / Time.fixedDeltaTime); relativeAccel = (relativeSpeed - lastSpeed) / Time.fixedDeltaTime; currentRotation = ((Component)aircraft).transform.rotation; deltaTemp = currentRotation * Quaternion.Inverse(lastRotation); angleTemp = 0f; axisTemp = Vector3.zero; ((Quaternion)(ref deltaTemp)).ToAngleAxis(ref angleTemp, ref axisTemp); angularSpeed = aircraft.InverseTransformDirection(angleTemp * axisTemp) * ((float)Math.PI / 180f) / Time.fixedDeltaTime; } else if ((Object)(object)aircraft != (Object)null && (Object)(object)aircraftRB != (Object)null) { currentPosition = ((Component)aircraftRB).transform.position; absoluteSpeed = (currentPosition - lastPosition) / Time.fixedDeltaTime; relativeSpeed = ((Component)aircraftRB).transform.InverseTransformDirection(aircraftRB.velocity); relativeAccel = (relativeSpeed - lastSpeed) / Time.fixedDeltaTime; angularSpeed = aircraftRB.angularVelocity; } else { currentPosition = Vector3.zero; relativeSpeed = Vector3.zero; relativeAccel = Vector3.zero; angularSpeed = Vector3.zero; lastPosition = currentPosition; lastSpeed = relativeSpeed; lastRotation = currentRotation; } if (waitInit > 0) { waitInit--; return; } if (useHeading) { heading = Mathf.LerpAngle(heading, aircraft.eulerAngles.y + headingOffSet, headingFilterFactor) % 360f; if ((Object)(object)compassHSI != (Object)null) { ((Transform)compassHSI).localRotation = Quaternion.Euler(0f, 0f, headingAmplitude * heading); } if ((Object)(object)compassBar != (Object)null) { compassBar.setValue(heading); } if ((Object)(object)headingTxt != (Object)null) { if (heading < 0f) { headingTxt.text = (heading + 360f).ToString("000"); } else { headingTxt.text = heading.ToString("000"); } } } if (useRoll) { float num = roll; Quaternion rotation = aircraft.rotation; roll = Mathf.LerpAngle(num, ((Quaternion)(ref rotation)).eulerAngles.z + rollOffSet, rollFilterFactor) % 360f; if ((Object)(object)horizonRoll != (Object)null) { ((Transform)horizonRoll).localRotation = Quaternion.Euler(0f, 0f, rollAmplitude * roll); } if ((Object)(object)horizonRollTxt != (Object)null) { if (roll > 180f) { horizonRollTxt.text = (roll - 360f).ToString("00"); } else if (roll < -180f) { horizonRollTxt.text = (roll + 360f).ToString("00"); } else { horizonRollTxt.text = roll.ToString("00"); } } } if (usePitch) { pitch = Mathf.LerpAngle(pitch, 0f - aircraft.eulerAngles.x + pitchOffSet, pitchFilterFactor); if ((Object)(object)horizonPitch != (Object)null) { ((Transform)horizonPitch).localPosition = new Vector3((0f - pitchAmplitude) * pitch * Mathf.Sin(((Component)horizonPitch).transform.localEulerAngles.z * ((float)Math.PI / 180f)) + pitchXOffSet, pitchAmplitude * pitch * Mathf.Cos(((Component)horizonPitch).transform.localEulerAngles.z * ((float)Math.PI / 180f)) + pitchYOffSet, 0f); } if ((Object)(object)horizonPitchTxt != (Object)null) { horizonPitchTxt.text = pitch.ToString("0"); } } if (useAltitude) { altitude = Mathf.Lerp(altitude, altitudeOffSet + altitudeAmplitude * currentPosition.y, speedFilterFactor); if ((Object)(object)altitudeTxt != (Object)null) { altitudeTxt.text = altitude.ToString("0").PadLeft(5); } } if (useSpeed) { speed = Mathf.Lerp(speed, speedOffSet + speedAmplitude * relativeSpeed.z, speedFilterFactor); if ((Object)(object)speedTxt != (Object)null) { speedTxt.text = speed.ToString("0").PadLeft(5); } } if (useVV) { vv = Mathf.Lerp(vv, vvOffSet + vvAmplitude * absoluteSpeed.y, vvFilterFactor); if ((Object)(object)vvNeedle != (Object)null) { vvNeedle.setValue(vv); } if ((Object)(object)vvArrow != (Object)null) { vvArrow.setValue(vv); } if ((Object)(object)verticalSpeedTxt != (Object)null) { if (roundVV) { if (showDecimalVV) { verticalSpeedTxt.text = (Math.Round(vv / roundFactorVV, MidpointRounding.AwayFromZero) * (double)roundFactorVV).ToString("0.0").PadLeft(4); } else { verticalSpeedTxt.text = (Math.Round(vv / roundFactorVV, MidpointRounding.AwayFromZero) * (double)roundFactorVV).ToString("0").PadLeft(3); } } else if (showDecimalVV) { verticalSpeedTxt.text = vv.ToString("0.0").PadLeft(4); } else { verticalSpeedTxt.text = vv.ToString("0").PadLeft(3); } } } if (useHV) { hv = Mathf.Lerp(hv, hvOffSet + hvAmplitude * relativeSpeed.x, hvFilterFactor); if ((Object)(object)hvNeedle != (Object)null) { hvNeedle.setValue(hv); } if ((Object)(object)hvArrow != (Object)null) { hvArrow.setValue(hv); } if ((Object)(object)horizontalSpeedTxt != (Object)null) { if (roundHV) { if (showDecimalHV) { horizontalSpeedTxt.text = (Math.Round(hv / roundFactorHV, MidpointRounding.AwayFromZero) * (double)roundFactorHV).ToString("0.0").PadLeft(4); } else { horizontalSpeedTxt.text = (Math.Round(hv / roundFactorHV, MidpointRounding.AwayFromZero) * (double)roundFactorHV).ToString("0").PadLeft(3); } } else if (showDecimalHV) { horizontalSpeedTxt.text = hv.ToString("0.0").PadLeft(4); } else { horizontalSpeedTxt.text = hv.ToString("0").PadLeft(3); } } } if (useGForce) { float num2 = 0f - ((Component)aircraft).transform.InverseTransformDirection(Physics.gravity).y + gForceAmplitude * (relativeAccel.y - angularSpeed.x * Mathf.Abs(relativeSpeed.z)); Vector3 gravity = Physics.gravity; float num3 = num2 / ((Vector3)(ref gravity)).magnitude; if (float.IsNaN(num3)) { num3 = 0f; } gForce = Mathf.Lerp(gForce, gForceOffSet + num3, gForceFilterFactor); if ((Object)(object)gForceTxt != (Object)null) { gForceTxt.text = gForce.ToString("0.0").PadLeft(3); } if (gForce > maxGForce) { maxGForce = gForce; if ((Object)(object)maxGForceTxt != (Object)null) { maxGForceTxt.text = maxGForce.ToString("0.0").PadLeft(3); } } if (gForce < minGForce) { minGForce = gForce; if ((Object)(object)minGForceTxt != (Object)null) { minGForceTxt.text = minGForce.ToString("0.0").PadLeft(3); } } } if (!useAlphaBeta && !useGlidePath) { return; } alpha = Mathf.Lerp(alpha, alphaOffSet + alphaAmplitude * VectorAngle(new Vector2(relativeSpeed.z, relativeSpeed.y), Vector2.right), alphaFilterFactor); beta = Mathf.Lerp(beta, betaOffSet + betaAmplitude * VectorAngle(new Vector2(relativeSpeed.x, relativeSpeed.z), Vector2.up), betaFilterFactor); if (useGlidePath && (Object)(object)glidePath != (Object)null) { ((Transform)glidePath).localPosition = Vector3.Lerp(((Transform)glidePath).localPosition, new Vector3(Mathf.Clamp((0f - beta) * pitchAmplitude, 0f - glideXDeltaClamp, glideXDeltaClamp), Mathf.Clamp(alpha * pitchAmplitude, 0f - glideYDeltaClamp, glideYDeltaClamp), 0f), glidePathFilterFactor); } if (useAlphaBeta) { if ((Object)(object)alphaNeedle != (Object)null) { alphaNeedle.setValue(alpha); } if ((Object)(object)alphaArrow != (Object)null) { alphaArrow.setValue(alpha); } if ((Object)(object)betaNeedle != (Object)null) { betaNeedle.setValue(beta); } if ((Object)(object)betaArrow != (Object)null) { betaArrow.setValue(beta); } if ((Object)(object)alphaTxt != (Object)null) { alphaTxt.text = alpha.ToString("0").PadLeft(3); } if ((Object)(object)betaTxt != (Object)null) { betaTxt.text = beta.ToString("0").PadLeft(3); } } } } public class WalkingCamera : MonoBehaviour { public bool allowCursor = true; public bool startLocked = false; public bool startUnlocked = false; public float mouseSens = 100f; public float walkSpeed = 3f; [Space] public bool followGround = true; public float height = 1f; public float clamp = 45f; public KeyCode resetKey = (KeyCode)32; private void Start() { if (startLocked) { Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } else if (startUnlocked) { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } } private void Update() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Invalid comparison between Unknown and I4 //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Invalid comparison between Unknown and I4 //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0210: 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_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_029a: 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_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: 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_0307: Unknown result type (might be due to invalid IL or missing references) if (allowCursor && Input.GetKeyDown((KeyCode)9)) { if ((int)Cursor.lockState != 1) { Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } else { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } } if (followGround) { RaycastHit val = default(RaycastHit); Physics.Raycast(((Component)this).transform.position, Vector3.down, ref val, float.PositiveInfinity); if ((Object)(object)((RaycastHit)(ref val)).collider != (Object)null && (Object)(object)((Component)((RaycastHit)(ref val)).collider).gameObject != (Object)(object)((Component)this).gameObject) { ((Component)this).transform.position = new Vector3(((Component)this).transform.position.x, height + ((RaycastHit)(ref val)).point.y, ((Component)this).transform.position.z); } } if ((int)Cursor.lockState == 1) { ((Component)this).transform.Rotate(0f, Input.GetAxis("Mouse X") * Time.deltaTime * mouseSens, 0f, (Space)0); ((Component)this).transform.Rotate((0f - Input.GetAxis("Mouse Y")) * Time.deltaTime * mouseSens, 0f, 0f, (Space)1); } Quaternion localRotation = ((Component)this).transform.localRotation; float num = ((Quaternion)(ref localRotation)).eulerAngles.x; if (num > 180f) { num -= 360f; } else if (num < -180f) { num += 360f; } if (num > 70f) { Transform transform = ((Component)this).transform; Quaternion localRotation2 = ((Component)this).transform.localRotation; transform.localRotation = Quaternion.Euler(70f, ((Quaternion)(ref localRotation2)).eulerAngles.y, 0f); } else if (num < -70f) { Transform transform2 = ((Component)this).transform; Quaternion localRotation3 = ((Component)this).transform.localRotation; transform2.localRotation = Quaternion.Euler(290f, ((Quaternion)(ref localRotation3)).eulerAngles.y, 0f); } if (Input.GetKey(resetKey)) { ((Component)this).transform.rotation = Quaternion.identity; } if (Input.GetKey((KeyCode)119)) { ((Component)this).transform.Translate(Vector3.forward * Time.deltaTime * walkSpeed); } if (Input.GetKey((KeyCode)115)) { ((Component)this).transform.Translate(Vector3.back * Time.deltaTime * walkSpeed); } if (Input.GetKey((KeyCode)97)) { ((Component)this).transform.Translate(Vector3.left * Time.deltaTime * walkSpeed); } if (Input.GetKey((KeyCode)100)) { ((Component)this).transform.Translate(Vector3.right * Time.deltaTime * walkSpeed); } } } public class DisplayMsg : MonoBehaviour { public static DisplayMsg current; public Text msgTxt; [Space] [Tooltip("This display will not receive MSGs sent by 'showAll' and will be handled directly by reference.")] public bool isolateInstance = false; private string lastTimedMsg; private void OnEnable() { if (((Component)this).gameObject.activeInHierarchy && !isolateInstance) { current = this; } } private void displayMsg(string msg = "", float timed = 0f) { if (msg == "") { if (lastTimedMsg != "") { ((MonoBehaviour)this).CancelInvoke("timedClearMsg"); } lastTimedMsg = ""; msgTxt.text = ""; return; } msgTxt.text = msg; ((Component)msgTxt).gameObject.SetActive(true); if (timed > 0f) { if (lastTimedMsg != "") { ((MonoBehaviour)this).CancelInvoke("timedClearMsg"); } lastTimedMsg = msg; ((MonoBehaviour)this).Invoke("timedClearMsg", timed); } } private void timedClearMsg() { if (lastTimedMsg == msgTxt.text) { lastTimedMsg = ""; msgTxt.text = ""; } } public void displayMsg(string msg = "") { displayMsg(msg, 0f); } public void displayQuickMsg(string msg = "") { displayMsg(msg, 5f); } public void showQuick(string msg = "") { displayMsg(msg, 2f); } public static void ShowQuick(string msg = "") { if ((Object)(object)current != (Object)null) { current.displayMsg(msg, 2f); } } public static void show(string msg = "", float timed = 0f) { if ((Object)(object)current != (Object)null) { current.displayMsg(msg, timed); } } public static void showAll(string msg = "", float timed = 0f) { DisplayMsg[] array = Resources.FindObjectsOfTypeAll(); foreach (DisplayMsg displayMsg in array) { if (!displayMsg.isolateInstance) { displayMsg.displayMsg(msg, timed); } } } } public class DisableEvent : MonoBehaviour { [Serializable] public struct Actions { public GameObject[] disableObjs; public GameObject[] enableObjs; public GameObject[] toggleObjs; public bool sendTrigger; public GameObject[] triggerTargets; public bool sendMsg; public string stringMsg; public string argument; public List sendMsgTargets; } public bool isActive = true; public Actions actions = default(Actions); private void OnDisable() { if (!isActive) { return; } if (actions.disableObjs.Length > 0) { GameObject[] disableObjs = actions.disableObjs; foreach (GameObject val in disableObjs) { if ((Object)(object)val != (Object)(object)((Component)this).gameObject) { val.SetActive(false); } } } if (actions.enableObjs.Length > 0) { GameObject[] enableObjs = actions.enableObjs; foreach (GameObject val2 in enableObjs) { val2.SetActive(true); } } if (actions.toggleObjs.Length > 0) { GameObject[] toggleObjs = actions.toggleObjs; foreach (GameObject val3 in toggleObjs) { val3.SetActive(!val3.activeSelf); } } if (actions.sendTrigger && actions.triggerTargets.Length > 0) { GameObject[] triggerTargets = actions.triggerTargets; foreach (GameObject val4 in triggerTargets) { val4.SendMessage("Trigger", (SendMessageOptions)1); } } if (!actions.sendMsg || actions.sendMsgTargets.Count <= 0) { return; } foreach (GameObject sendMsgTarget in actions.sendMsgTargets) { sendMsgTarget.SendMessage(actions.stringMsg, (object)actions.argument, (SendMessageOptions)1); } } } public class LookAt : MonoBehaviour { public GameObject target; private void LateUpdate() { ((Component)this).transform.LookAt(target.transform); } } public class MoveFuObject : MonoBehaviour { [Serializable] public struct Actions { public GameObject[] disableObjs; public GameObject[] enableObjs; public GameObject[] toggleObjs; public bool sendTrigger; public GameObject[] triggerTargets; public bool sendMsg; public string stringMsg; public string argument; public List sendMsgTargets; } public GameObject moveObj; public GameObject toObj; public bool translate = true; public bool rotate = true; [Space] public bool isMoving = true; public bool hasFinished = false; public bool smoothLook = false; public bool clampRotateFactor = false; public float translateFactor = 2f; public float rotateFactor = 10f; public Vector3 positionOffSet; public bool disableOnComplete = false; public bool runActionOnComplete = false; public float translateGap = 0.025f; public float rotateAngle = 0.05f; public bool snapGap = false; private float gap = 0f; private float angle = 0f; public Actions actions = default(Actions); private void OnEnable() { if (((Component)this).gameObject.activeInHierarchy && ((Component)this).gameObject.activeSelf) { hasFinished = false; } } private void FixedUpdate() { //IL_0088: 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_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_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_00c8: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016c: 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_0176: 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_0196: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: 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_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: 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_0236: 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_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: 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_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: 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) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: 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_040a: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)moveObj == (Object)null) { isMoving = false; hasFinished = false; ((Component)this).gameObject.SetActive(false); return; } if ((Object)(object)toObj == (Object)null) { toObj = ((Component)this).gameObject; } if (!isMoving) { return; } if (!smoothLook) { if (translate) { moveObj.transform.position = toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward; } if (rotate) { moveObj.transform.rotation = toObj.transform.rotation; } return; } if (translate) { if (translateFactor == -1f) { moveObj.transform.position = toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward; } else if (translateFactor != 0f) { moveObj.transform.position = Vector3.Lerp(moveObj.transform.position, toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward, translateFactor * Time.deltaTime); } } if (rotate) { if (rotateFactor == -1f) { moveObj.transform.rotation = toObj.transform.rotation; } else if (rotateFactor != 0f) { if (clampRotateFactor) { moveObj.transform.rotation = Quaternion.Slerp(moveObj.transform.rotation, toObj.transform.rotation, Mathf.Clamp(rotateFactor * Time.deltaTime * 50f, 0.2f, 0.8f)); } else { moveObj.transform.rotation = Quaternion.Slerp(moveObj.transform.rotation, toObj.transform.rotation, rotateFactor * Time.deltaTime); } } } if (!disableOnComplete && !runActionOnComplete) { return; } if (translateGap >= 0f) { gap = Vector3.Distance(moveObj.transform.position, ((Component)this).transform.position); } else { gap = 0f; } if (rotateAngle >= 0f) { angle = Vector3.Angle(moveObj.transform.rotation * Vector3.forward, ((Component)this).transform.rotation * Vector3.forward); } else { angle = 0f; } if (hasFinished || (!(gap <= translateGap) && gap != 0f) || (!(angle <= rotateAngle) && angle != 0f)) { return; } if (snapGap) { if (translateFactor > 0f) { moveObj.transform.position = toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward; } if (rotateFactor > 0f) { moveObj.transform.rotation = toObj.transform.rotation; } } hasFinished = true; if (runActionOnComplete) { run(); } else if (disableOnComplete) { ((Component)this).gameObject.SetActive(false); } } private void run() { if (actions.disableObjs.Length > 0) { GameObject[] disableObjs = actions.disableObjs; foreach (GameObject val in disableObjs) { if ((Object)(object)val != (Object)(object)toObj) { val.SetActive(false); } else { disableOnComplete = true; } } } if (actions.enableObjs.Length > 0) { GameObject[] enableObjs = actions.enableObjs; foreach (GameObject val2 in enableObjs) { val2.SetActive(true); } } if (actions.toggleObjs.Length > 0) { GameObject[] toggleObjs = actions.toggleObjs; foreach (GameObject val3 in toggleObjs) { val3.SetActive(!val3.activeSelf); } } if (actions.sendTrigger && actions.triggerTargets.Length > 0) { GameObject[] triggerTargets = actions.triggerTargets; foreach (GameObject val4 in triggerTargets) { val4.SendMessage("Trigger", (SendMessageOptions)1); } } if (actions.sendMsg && actions.sendMsgTargets.Count > 0) { foreach (GameObject sendMsgTarget in actions.sendMsgTargets) { sendMsgTarget.SendMessage(actions.stringMsg, (object)actions.argument, (SendMessageOptions)1); } } if (disableOnComplete) { toObj.gameObject.SetActive(false); } } } public class MoveObject : MonoBehaviour { [Serializable] public struct Actions { public GameObject[] disableObjs; public GameObject[] enableObjs; public GameObject[] toggleObjs; public bool sendTrigger; public GameObject[] triggerTargets; public bool sendMsg; public string stringMsg; public string argument; public List sendMsgTargets; } public GameObject moveObj; public GameObject toObj; public bool translate = true; public bool rotate = true; [Space] public bool isMoving = true; public bool hasFinished = false; public bool smoothLook = false; public bool clampRotateFactor = false; public float translateFactor = 2f; public float rotateFactor = 10f; public Vector3 positionOffSet; public bool disableOnComplete = false; public bool runActionOnComplete = false; public float translateGap = 0.025f; public float rotateAngle = 0.05f; public bool snapGap = false; private float gap = 0f; private float angle = 0f; public Actions actions = default(Actions); private void OnEnable() { if (((Component)this).gameObject.activeInHierarchy && ((Component)this).gameObject.activeSelf) { hasFinished = false; } } private void Update() { //IL_0088: 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_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_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_00c8: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016c: 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_0176: 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_0196: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: 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_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: 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_0236: 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_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: 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_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: 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) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: 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_040a: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)moveObj == (Object)null) { isMoving = false; hasFinished = false; ((Component)this).gameObject.SetActive(false); return; } if ((Object)(object)toObj == (Object)null) { toObj = ((Component)this).gameObject; } if (!isMoving) { return; } if (!smoothLook) { if (translate) { moveObj.transform.position = toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward; } if (rotate) { moveObj.transform.rotation = toObj.transform.rotation; } return; } if (translate) { if (translateFactor == -1f) { moveObj.transform.position = toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward; } else if (translateFactor != 0f) { moveObj.transform.position = Vector3.Lerp(moveObj.transform.position, toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward, translateFactor * Time.deltaTime); } } if (rotate) { if (rotateFactor == -1f) { moveObj.transform.rotation = toObj.transform.rotation; } else if (rotateFactor != 0f) { if (clampRotateFactor) { moveObj.transform.rotation = Quaternion.Slerp(moveObj.transform.rotation, toObj.transform.rotation, Mathf.Clamp(rotateFactor * Time.deltaTime * 50f, 0.2f, 0.8f)); } else { moveObj.transform.rotation = Quaternion.Slerp(moveObj.transform.rotation, toObj.transform.rotation, rotateFactor * Time.deltaTime); } } } if (!disableOnComplete && !runActionOnComplete) { return; } if (translateGap >= 0f) { gap = Vector3.Distance(moveObj.transform.position, ((Component)this).transform.position); } else { gap = 0f; } if (rotateAngle >= 0f) { angle = Vector3.Angle(moveObj.transform.rotation * Vector3.forward, ((Component)this).transform.rotation * Vector3.forward); } else { angle = 0f; } if (hasFinished || (!(gap <= translateGap) && gap != 0f) || (!(angle <= rotateAngle) && angle != 0f)) { return; } if (snapGap) { if (translateFactor > 0f) { moveObj.transform.position = toObj.transform.position + positionOffSet.x * ((Component)this).transform.right + positionOffSet.y * ((Component)this).transform.up + positionOffSet.z * ((Component)this).transform.forward; } if (rotateFactor > 0f) { moveObj.transform.rotation = toObj.transform.rotation; } } hasFinished = true; if (runActionOnComplete) { run(); } else if (disableOnComplete) { ((Component)this).gameObject.SetActive(false); } } private void run() { if (actions.disableObjs.Length > 0) { GameObject[] disableObjs = actions.disableObjs; foreach (GameObject val in disableObjs) { if ((Object)(object)val != (Object)(object)toObj) { val.SetActive(false); } else { disableOnComplete = true; } } } if (actions.enableObjs.Length > 0) { GameObject[] enableObjs = actions.enableObjs; foreach (GameObject val2 in enableObjs) { val2.SetActive(true); } } if (actions.toggleObjs.Length > 0) { GameObject[] toggleObjs = actions.toggleObjs; foreach (GameObject val3 in toggleObjs) { val3.SetActive(!val3.activeSelf); } } if (actions.sendTrigger && actions.triggerTargets.Length > 0) { GameObject[] triggerTargets = actions.triggerTargets; foreach (GameObject val4 in triggerTargets) { val4.SendMessage("Trigger", (SendMessageOptions)1); } } if (actions.sendMsg && actions.sendMsgTargets.Count > 0) { foreach (GameObject sendMsgTarget in actions.sendMsgTargets) { sendMsgTarget.SendMessage(actions.stringMsg, (object)actions.argument, (SendMessageOptions)1); } } if (disableOnComplete) { toObj.gameObject.SetActive(false); } } } public class SndPlayer : MonoBehaviour { public static SndPlayer current; public AudioSource som; public bool isMaster = true; public bool playOnEnable = false; public int enableIndex = 0; public bool mute = false; public float volume = 1f; [Tooltip("0 - Hover / 1 - Click / 2 - Effect")] public AudioClip[] sounds; private void Awake() { if ((Object)(object)som == (Object)null) { som = ((Component)this).GetComponent(); } } private void OnEnable() { if (((Component)this).gameObject.activeInHierarchy && ((Object)(object)current == (Object)null || isMaster)) { current = this; } if (playOnEnable) { indexSnd(enableIndex); } } private bool checkIsMute() { return mute; } public void playClip(AudioClip clip, float volume = 1f) { if (!checkIsMute()) { som.PlayOneShot(clip, volume); } } public void indexSnd(int index) { if (!checkIsMute()) { current.som.PlayOneShot(current.sounds[index], current.volume); } } public void enterGuiSnd() { if (!checkIsMute()) { som.PlayOneShot(sounds[0], volume); } } public void clickGuiSnd() { if (!checkIsMute()) { som.PlayOneShot(sounds[1], volume); } } public void effectSnd() { if (!checkIsMute()) { som.PlayOneShot(sounds[2], volume); } } public static void play(AudioClip clip, float volume = 1f) { if ((Object)(object)current != (Object)null) { current.playClip(clip, volume); } } public static void play(int index) { if ((Object)(object)current != (Object)null) { current.indexSnd(index); } } public static void playHover() { if ((Object)(object)current != (Object)null) { current.enterGuiSnd(); } } public static void playClick() { if ((Object)(object)current != (Object)null) { current.clickGuiSnd(); } } public static void playEffect() { if ((Object)(object)current != (Object)null) { current.effectSnd(); } } } public class SynchStatus : MonoBehaviour { public bool isActive = true; [Space] public bool status; public int index; public SynchStatus masterParent; [Space] public bool isMaster = false; private SynchStatus[] synchAll = new SynchStatus[0]; private bool synchAllIsDone = false; private void Awake() { if (isMaster) { if (!synchAllIsDone) { synchAllIsDone = true; synchAll = ((Component)this).gameObject.GetComponentsInChildren(true); } } else { if (!((Object)(object)masterParent == (Object)null)) { return; } SynchStatus[] componentsInParent = ((Component)this).gameObject.GetComponentsInParent(true); SynchStatus[] array = componentsInParent; foreach (SynchStatus synchStatus in array) { if (synchStatus.isMaster && synchStatus.isActive) { masterParent = synchStatus; break; } } if ((Object)(object)masterParent == (Object)null) { MonoBehaviour.print((object)("GameObject " + ((Object)this).name + " missing SynchStatus MasterParent!")); isActive = false; } } } private void OnEnable() { if (!isMaster && ((Component)this).gameObject.activeSelf && !status) { status = true; updateStatusAll(); } } private void OnDisable() { if (!isMaster && !((Component)this).gameObject.activeSelf && status) { status = false; updateStatusAll(); } } public void setStatus(int indexToUpdate, bool active) { if (indexToUpdate == index && !isMaster) { status = active; ((Component)this).gameObject.SetActive(status); } } public void updateStatusAll() { if ((Object)(object)masterParent == (Object)null || isMaster) { return; } SynchStatus[] array = masterParent.synchAll; foreach (SynchStatus synchStatus in array) { if ((Object)(object)synchStatus != (Object)null && synchStatus.index == index && synchStatus.status != status) { synchStatus.setStatus(index, status); } } } } public class ArrowIndicator : MonoBehaviour { public bool isActive = true; [Space] public RectTransform arrow; public float value; public float valueFactor = 1f; public float valueOffSet = 0f; public float maxValue = 100f; public float minValue = -100f; [Space] public bool moveX = true; public float currentX = 0f; public float factorX = 1f; public float offSetX = 0f; public float maxX = 115f; public float minX = -115f; public bool clampX = true; [Space] public bool moveY = false; public float currentY; public float factorY = 1f; public float offSetY = 0f; public float maxY = 115f; public float minY = -115f; public bool clampY = true; [Space] public Text valueTxt; private void OnEnable() { if (isActive && ((Component)this).gameObject.activeInHierarchy) { setValue(value); } } [ContextMenu("Update Value")] public void setValue(float newValue) { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_01ab: Unknown result type (might be due to invalid IL or missing references) if (!isActive) { return; } value = valueOffSet + valueFactor * newValue; if (moveX) { currentX = offSetX + factorX * value * (maxX - minX) / (maxValue - minValue); if (clampX) { currentX = Mathf.Clamp(currentX, minX, maxX); } if ((Object)(object)arrow != (Object)null && !float.IsNaN(currentX)) { ((Transform)arrow).localPosition = new Vector3(currentX, ((Transform)arrow).localPosition.y, ((Transform)arrow).localPosition.z); } } if (moveY) { currentY = offSetY + factorY * value * (maxY - minY) / (maxValue - minValue); if (clampY) { currentY = Mathf.Clamp(currentY, minY, maxY); } if ((Object)(object)arrow != (Object)null && !float.IsNaN(currentY)) { ((Transform)arrow).localPosition = new Vector3(((Transform)arrow).localPosition.x, currentY, ((Transform)arrow).localPosition.z); } } if ((Object)(object)valueTxt != (Object)null) { valueTxt.text = value.ToString("000"); } } } public class CircleIndicator : MonoBehaviour { public bool isActive = true; [Space] public RectTransform ball; public Vector2 value; public float factor = 1f; [Space] public bool clampCircle = true; public bool clampSquare = false; public float maxDistance = 80f; private void OnEnable() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (isActive && ((Component)this).gameObject.activeInHierarchy) { setValue(value); } } public void setValue(Vector2 newValue) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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) if (isActive && !((Object)(object)ball == (Object)null)) { value = factor * newValue; if (clampCircle) { ((Transform)ball).localPosition = Vector2.op_Implicit(Vector2.ClampMagnitude(value * maxDistance, maxDistance)); } else if (clampSquare) { ((Transform)ball).localPosition = Vector2.op_Implicit(new Vector2(Mathf.Clamp(value.x * maxDistance, 0f - maxDistance, maxDistance), Mathf.Clamp(value.y * maxDistance, 0f - maxDistance, maxDistance))); } else { ((Transform)ball).localPosition = Vector2.op_Implicit(value * maxDistance); } } } } public class ColorImg : MonoBehaviour { public bool isActive = true; public Image image; public RawImage rawImage; public bool updateOnEnable = false; [Tooltip("If True, the index 0 of colors will be updated during awake with the current color on image component")] public bool updateIndexZero = false; public int indexColor = 0; public Color[] colors = (Color[])(object)new Color[2]; private void Awake() { //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_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) if ((Object)(object)image == (Object)null) { image = ((Component)this).GetComponent(); } if ((Object)(object)image == (Object)null && (Object)(object)rawImage == (Object)null) { rawImage = ((Component)this).GetComponent(); } if (updateIndexZero && colors.Length > 0) { if ((Object)(object)image != (Object)null) { ref Color reference = ref colors[0]; reference = ((Graphic)image).color; } else if ((Object)(object)rawImage != (Object)null) { ref Color reference2 = ref colors[0]; reference2 = ((Graphic)rawImage).color; } } } private void OnEnable() { if (updateOnEnable && ((Component)this).gameObject.activeInHierarchy && ((Component)this).gameObject.activeSelf) { setColor(indexColor); } } public void setColor(int index = 0) { //IL_0045: 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 (isActive) { if ((Object)(object)image != (Object)null && index <= colors.Length - 1) { ((Graphic)image).color = colors[index]; indexColor = index; } if ((Object)(object)rawImage != (Object)null && index <= colors.Length - 1) { ((Graphic)rawImage).color = colors[index]; indexColor = index; } } } public void toogleColor() { if (colors.Length >= 2) { if (indexColor == 0) { setColor(1); } else { setColor(); } } } } public class ColorTxt : MonoBehaviour { public bool isActive = true; public Text txt; public bool updateOnEnable = false; [Tooltip("If True, the index 0 of colors will be updated during awake with the current color on txt component")] public bool updateIndexZero = false; public int indexColor = 0; public Color[] colors = (Color[])(object)new Color[2]; private void Awake() { //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) if ((Object)(object)txt == (Object)null) { txt = ((Component)this).GetComponent(); } if (updateIndexZero && colors.Length > 0 && (Object)(object)txt != (Object)null) { ref Color reference = ref colors[0]; reference = ((Graphic)txt).color; } } private void OnEnable() { if (updateOnEnable && ((Component)this).gameObject.activeInHierarchy && ((Component)this).gameObject.activeSelf) { setColor(indexColor); } } public void setColor(int index = 0) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (isActive && (Object)(object)txt != (Object)null && index <= colors.Length - 1) { ((Graphic)txt).color = colors[index]; indexColor = index; } } public void toogleColor() { if (colors.Length >= 2) { if (indexColor == 0) { setColor(1); } else { setColor(); } } } } public class CompassBar : MonoBehaviour { public RawImage rawImg; public Text headingTxt; public float heading; public float headingOffSet = 0f; public float factor = 1f; public float maxValue = 360f; public bool isActive = true; public bool moveX = true; [Space(5f)] public bool autoStart = true; public float startX = 0f; public float startY = 0f; public float startWidth; public float startHeight; private void Start() { //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_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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if (autoStart) { Rect uvRect = rawImg.uvRect; startX = ((Rect)(ref uvRect)).x; Rect uvRect2 = rawImg.uvRect; startY = ((Rect)(ref uvRect2)).y; Rect uvRect3 = rawImg.uvRect; startWidth = ((Rect)(ref uvRect3)).width; Rect uvRect4 = rawImg.uvRect; startHeight = ((Rect)(ref uvRect4)).height; } } private void OnEnable() { if (isActive && ((Component)this).gameObject.activeInHierarchy) { setValue(heading); } } public void setValue(float value) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (!isActive) { return; } heading = value; if (moveX) { RawImage obj = rawImg; float num = factor * (heading + headingOffSet) / maxValue + startX; Rect uvRect = rawImg.uvRect; float y = ((Rect)(ref uvRect)).y; Rect uvRect2 = rawImg.uvRect; float width = ((Rect)(ref uvRect2)).width; Rect uvRect3 = rawImg.uvRect; obj.uvRect = new Rect(num, y, width, ((Rect)(ref uvRect3)).height); } if ((Object)(object)headingTxt != (Object)null) { if (heading < 0f) { headingTxt.text = (heading + 360f).ToString("000"); } else { headingTxt.text = heading.ToString("000"); } } } } public class FlashImg : MonoBehaviour { public bool isFlashing = false; public bool flashOnEnable = true; public bool disableOnDisable = false; [Space] public Image image; public float speed = 3f; public float seconds = -1f; public float secondsRand = -1f; [Space] public Color normalColor; [Space] public Color flashColor; [Space] public int indexSnd; public AudioClip flashSnd; public float volume = 1f; private float totalTime; private float randomTime = 0f; private void Awake() { if ((Object)(object)image == (Object)null) { image = ((Component)this).GetComponent(); } } private void OnEnable() { if ((isFlashing || flashOnEnable) && ((Component)this).gameObject.activeInHierarchy && ((Component)this).gameObject.activeSelf) { flash(); } } private void OnDisable() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (disableOnDisable) { ((MonoBehaviour)this).StopCoroutine("flashCall"); isFlashing = false; } ((Graphic)image).color = normalColor; } public void stopFlash() { isFlashing = false; } public void flash() { ((MonoBehaviour)this).StopCoroutine("flashCall"); if (((Component)this).gameObject.activeInHierarchy) { ((MonoBehaviour)this).StartCoroutine("flashCall"); } } private IEnumerator flashCall() { totalTime = 0f; randomTime = 0f; if (secondsRand > 0f) { randomTime = secondsRand * Random.Range(-1f, 1f); } isFlashing = true; yield return null; if (indexSnd != 0) { SndPlayer.play(indexSnd); } else if ((Object)(object)flashSnd != (Object)null) { SndPlayer.play(flashSnd, volume); } while (isFlashing) { ((Graphic)image).color = Color.Lerp(normalColor, flashColor, Mathf.PingPong(Time.time * speed, 1f)); if (seconds != -1f) { totalTime += Time.deltaTime; if (totalTime >= seconds + randomTime) { isFlashing = false; } } yield return null; } while (((Graphic)image).color != normalColor) { ((Graphic)image).color = Color.Lerp(((Graphic)image).color, normalColor, Time.deltaTime * speed); yield return null; } isFlashing = false; } } public class NeedleIndicator : MonoBehaviour { public bool isActive = true; public RectTransform needle; public float value; public float valueOffSet = 0f; public float factor = 1f; public float maxValue = 1f; public float minValue = -1f; public float currentAngle; public float angleOffSet = 0f; public bool clampAngle = true; public float maxAngle = 90f; public float minAngle = -90f; public Text valueTxt; private void OnEnable() { if (isActive && ((Component)this).gameObject.activeInHierarchy) { setValue(value); } } public void setValue(float newValue) { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) if (isActive) { value = newValue; if (!clampAngle) { currentAngle = angleOffSet + factor * value * (maxAngle - minAngle) / (maxValue - minValue) + valueOffSet; } else { currentAngle = Mathf.Clamp(angleOffSet + factor * value * (maxAngle - minAngle) / (maxValue - minValue) + valueOffSet, minAngle, maxAngle); } if ((Object)(object)needle != (Object)null) { RectTransform obj = needle; Quaternion localRotation = ((Transform)needle).localRotation; float x = ((Quaternion)(ref localRotation)).eulerAngles.x; Quaternion localRotation2 = ((Transform)needle).localRotation; ((Transform)obj).localRotation = Quaternion.Euler(x, ((Quaternion)(ref localRotation2)).eulerAngles.y, currentAngle); } if ((Object)(object)valueTxt != (Object)null) { valueTxt.text = value.ToString("000"); } } } } public class PointerIndicator : MonoBehaviour { public bool isActive = true; public RectTransform pointer; public Text valueTxt; [Space] public float rawValue; public float value; public float currentAngle; [Space] [Header("Factors and OffSets")] public float factorValue = 1f; public float valueOffSet = 0f; [Space] [Tooltip("Negative for clockwise direction")] public float factorAngle = -1f; public float angleOffSet = 0f; [Space] [Header("Alignment Values/Angles")] public float maxValue = 1f; public float minValue = 0f; [Tooltip("From 0-360 Degrees - Starting Up - RHO")] public float maxAngle = -360f; public float minAngle = 0f; [Space] public bool clampAngle = true; [Space(2f)] [Tooltip("ReadOnly! Calculated from above values")] public float APV = 1f; [Space(5f)] [Header("Send to another Pointer")] public bool sendValueTo = false; public bool sendRaw = false; public PointerIndicator toPointer; private void OnEnable() { if (isActive && ((Component)this).gameObject.activeInHierarchy) { setValue(rawValue); } } public void setValue(float newValue) { //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) if (isActive) { rawValue = newValue; value = valueOffSet + factorValue * rawValue; APV = Mathf.Abs((maxAngle - minAngle) / (maxValue - minValue)); if (!clampAngle) { currentAngle = Mathf.MoveTowardsAngle(currentAngle, minAngle + angleOffSet + factorAngle * value * APV, 360f); } else { currentAngle = Mathf.Clamp(Mathf.MoveTowardsAngle(currentAngle, minAngle + angleOffSet + factorAngle * value * APV, 360f), (!(minAngle <= maxAngle)) ? maxAngle : minAngle, (!(maxAngle >= minAngle)) ? minAngle : maxAngle); } if ((Object)(object)pointer != (Object)null) { RectTransform obj = pointer; Quaternion localRotation = ((Transform)pointer).localRotation; float x = ((Quaternion)(ref localRotation)).eulerAngles.x; Quaternion localRotation2 = ((Transform)pointer).localRotation; ((Transform)obj).localRotation = Quaternion.Euler(x, ((Quaternion)(ref localRotation2)).eulerAngles.y, currentAngle); } if ((Object)(object)valueTxt != (Object)null) { valueTxt.text = value.ToString("000"); } if (sendValueTo && (Object)(object)toPointer != (Object)null) { toPointer.setValue((!sendRaw) ? value : rawValue); } } } } public class RollDigitIndicator : MonoBehaviour { public bool isActive = true; public RawImage rawImg; [Space] public float rawValue; [Space] public float value; public float factor = 1f; public float valueOffSet = 0f; [Space] public bool continuousMode = false; public bool moveX = false; public bool moveY = true; [Space] public bool autoStartXY = true; [Range(-1f, 1f)] public float startX = 0f; [Range(-1f, 1f)] public float startY = 0f; [Space(5f)] public bool sendValueToNext = false; public bool sendRaw = false; public RollDigitIndicator nextDigit; private float maxValue = 10f; private float fraction; private float rollOverFactor; [Space(15f)] public bool debugUpdate = false; private void Update() { if (debugUpdate) { setValue(rawValue); } } private void Start() { //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_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) if (autoStartXY) { Rect uvRect = rawImg.uvRect; startX = ((Rect)(ref uvRect)).x; Rect uvRect2 = rawImg.uvRect; startY = ((Rect)(ref uvRect2)).y; } } private void OnEnable() { if (isActive && ((Component)this).gameObject.activeInHierarchy) { setValue(rawValue); } } public void setValue(float newValue) { //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: 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_0199: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: 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_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: 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_02f8: 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_0306: 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_01ed: 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_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) if (!isActive) { return; } rawValue = newValue; value = factor * (newValue + valueOffSet) % maxValue; if (!continuousMode) { if (value >= 0f) { value = Mathf.Floor(value); } else { value = Mathf.Ceil(value); } } fraction = Mathf.Abs(value / maxValue % 1f); if (sendValueToNext && (Object)(object)nextDigit != (Object)null) { if (continuousMode && value > 9f) { nextDigit.rollOverFactor = (fraction - 0.9f) * 10f; } else if (!continuousMode && value >= 9f) { nextDigit.rollOverFactor = rollOverFactor; } else { nextDigit.rollOverFactor = 0f; } nextDigit.setValue((!sendRaw) ? value : rawValue); } if (!continuousMode) { if (moveX) { RawImage obj = rawImg; float num = fraction + rollOverFactor / 10f + startX; Rect uvRect = rawImg.uvRect; float y = ((Rect)(ref uvRect)).y; Rect uvRect2 = rawImg.uvRect; float width = ((Rect)(ref uvRect2)).width; Rect uvRect3 = rawImg.uvRect; obj.uvRect = new Rect(num, y, width, ((Rect)(ref uvRect3)).height); } if (moveY) { RawImage obj2 = rawImg; Rect uvRect4 = rawImg.uvRect; float x = ((Rect)(ref uvRect4)).x; float num2 = fraction + rollOverFactor / 10f + startY; Rect uvRect5 = rawImg.uvRect; float width2 = ((Rect)(ref uvRect5)).width; Rect uvRect6 = rawImg.uvRect; obj2.uvRect = new Rect(x, num2, width2, ((Rect)(ref uvRect6)).height); } } else { if (moveX) { RawImage obj3 = rawImg; float num3 = fraction + startX; Rect uvRect7 = rawImg.uvRect; float y2 = ((Rect)(ref uvRect7)).y; Rect uvRect8 = rawImg.uvRect; float width3 = ((Rect)(ref uvRect8)).width; Rect uvRect9 = rawImg.uvRect; obj3.uvRect = new Rect(num3, y2, width3, ((Rect)(ref uvRect9)).height); } if (moveY) { RawImage obj4 = rawImg; Rect uvRect10 = rawImg.uvRect; float x2 = ((Rect)(ref uvRect10)).x; float num4 = fraction + startY; Rect uvRect11 = rawImg.uvRect; float width4 = ((Rect)(ref uvRect11)).width; Rect uvRect12 = rawImg.uvRect; obj4.uvRect = new Rect(x2, num4, width4, ((Rect)(ref uvRect12)).height); } } } } public class ScaleTransform : MonoBehaviour { public bool isActive = true; public RectTransform rectTransform; public Transform objTransform; [Space] public bool updateOnEnable = false; [Space] public float currentScale = 1f; public float scaleStep = 0.25f; public float scaleMin = 0.25f; public float scaleMax = 1f; private float initialScale = 1f; private void Awake() { //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_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) if ((Object)(object)rectTransform != (Object)null) { currentScale = ((Transform)rectTransform).localScale.x; } else if ((Object)(object)objTransform != (Object)null) { currentScale = objTransform.localScale.x; } else { currentScale = 1f; } initialScale = currentScale; } private void OnEnable() { if (updateOnEnable && ((Component)this).gameObject.activeInHierarchy && isActive) { setScale(currentScale); } } public void setScale(float setScale = 1f) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (isActive) { setScale -= setScale % scaleStep; setScale = Mathf.Clamp(setScale, scaleMin, scaleMax); currentScale = setScale; if ((Object)(object)rectTransform != (Object)null) { ((Transform)rectTransform).localScale = currentScale * Vector3.one; } else if ((Object)(object)objTransform != (Object)null) { objTransform.localScale = currentScale * Vector3.one; } } } public void scaleIn(float value = 0f) { if (value == 0f) { value = scaleStep; } setScale(currentScale + value); } public void scaleOut(float value = 0f) { if (value == 0f) { value = scaleStep; } setScale(currentScale - value); } public void scaleReset() { setScale(initialScale); } } public class ToogleImg : MonoBehaviour { public bool isActive = true; public Image image; public int indexSprite = 0; public Sprite[] sprites; public Mask mask; public void setSprite() { setSprite(indexSprite); } public void setSprite(int index) { if (isActive && !((Object)(object)image == (Object)null)) { if (index != -1) { indexSprite = index; } if (indexSprite < sprites.Length && (Object)(object)sprites[indexSprite] != (Object)null) { image.sprite = sprites[indexSprite]; } } } public void setSprite(Sprite customSprite) { if (isActive && !((Object)(object)image == (Object)null) && (Object)(object)customSprite != (Object)null) { image.sprite = customSprite; } } public void setSpriteNext() { indexSprite++; indexSprite %= sprites.Length; setSprite(indexSprite); } public void setSpriteBack() { indexSprite--; if (indexSprite < 0) { indexSprite = sprites.Length - 1; } setSprite(indexSprite); } public void toogleImg() { if (isActive && (Object)(object)image != (Object)null) { ((Behaviour)image).enabled = !((Behaviour)image).enabled; } } public void enableImg() { if (isActive && (Object)(object)image != (Object)null) { ((Behaviour)image).enabled = true; } } public void disableImg() { if (isActive && (Object)(object)image != (Object)null) { ((Behaviour)image).enabled = false; } } public void setImg(bool setTo = true) { if (setTo) { enableImg(); } else { disableImg(); } } public void toogleMask() { if (isActive && (Object)(object)mask != (Object)null) { ((Behaviour)mask).enabled = !((Behaviour)mask).enabled; } } public void enableMask() { if (isActive && (Object)(object)mask != (Object)null) { ((Behaviour)mask).enabled = true; } } public void disableMask() { if (isActive && (Object)(object)mask != (Object)null) { ((Behaviour)mask).enabled = false; } } public void toogleMaskGraph() { if (isActive && (Object)(object)mask != (Object)null) { mask.showMaskGraphic = !mask.showMaskGraphic; } } public void enableMaskGraph() { if (isActive && (Object)(object)mask != (Object)null) { mask.showMaskGraphic = true; } } public void disableMaskGraph() { if (isActive && (Object)(object)mask != (Object)null) { mask.showMaskGraphic = false; } } } public class UpdateFill : MonoBehaviour { public bool isActive = true; public bool onEnable = false; public bool update = true; [Space] public Slider fromSlider; public Image fromFill; [Space] public Slider[] toSliders; public Image[] toFills; private void OnEnable() { if (((Component)this).gameObject.activeInHierarchy && isActive && onEnable) { updateFill(); } } private void Update() { if (isActive && update) { updateFill(); } } public void updateFill() { if (toSliders.Length == 0 && toFills.Length == 0) { return; } if (toSliders.Length > 0) { if ((Object)(object)fromSlider != (Object)null) { Slider[] array = toSliders; foreach (Slider val in array) { if ((Object)(object)val != (Object)null) { val.value = fromSlider.value; } } } if ((Object)(object)fromFill != (Object)null) { Slider[] array2 = toSliders; foreach (Slider val2 in array2) { if ((Object)(object)val2 != (Object)null) { val2.value = fromFill.fillAmount; } } } } if (toFills.Length <= 0) { return; } if ((Object)(object)fromSlider != (Object)null) { Image[] array3 = toFills; foreach (Image val3 in array3) { if ((Object)(object)val3 != (Object)null) { val3.fillAmount = fromSlider.value; } } } if (!((Object)(object)fromFill != (Object)null)) { return; } Image[] array4 = toFills; foreach (Image val4 in array4) { if ((Object)(object)val4 != (Object)null) { val4.fillAmount = fromFill.fillAmount; } } } } public class UpdateString : MonoBehaviour { public bool isActive = true; public bool onEnable = false; public bool update = true; public Text toString; public Text fromString; public bool useCustomString = false; public string customString = ""; private void Awake() { if ((Object)(object)toString == (Object)null) { toString = ((Component)this).GetComponent(); } } private void updateString() { if ((Object)(object)toString == (Object)null) { MonoBehaviour.print((object)(((Object)this).name + " : null toString!")); } else if (useCustomString) { toString.text = customString; } else if ((Object)(object)fromString != (Object)null) { toString.text = fromString.text; } else { toString.text = ""; } } private void OnEnable() { if (((Component)this).gameObject.activeInHierarchy && isActive && onEnable) { updateString(); } } private void Update() { if (isActive && update) { updateString(); } } } namespace JerryComponent { public class AutoGear : MonoBehaviour { public float GearHeight = 25f; public GameObject gear; public GameObject raypos; public LayerMask lm; public GameObject airspeed; public GameObject GearLever; public GameObject GearLoopAud; public GameObject GearEndAud; private void Start() { } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0103: 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_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) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); if (Physics.Raycast(raypos.transform.position, -raypos.transform.up, ref val, float.PositiveInfinity, LayerMask.op_Implicit(lm))) { if (((RaycastHit)(ref val)).distance > GearHeight || airspeed.transform.localEulerAngles.y >= 120f) { gear.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } if (((RaycastHit)(ref val)).distance < GearHeight && airspeed.transform.localEulerAngles.y < 120f) { gear.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } if (GearLever.transform.localEulerAngles.x < 85f && GearLever.transform.localEulerAngles.x > 5f) { GearLoopAud.SetActive(true); GearEndAud.SetActive(false); } if (GearLever.transform.localEulerAngles.x >= 85f || GearLever.transform.localEulerAngles.x <= 5f) { GearLoopAud.SetActive(false); GearEndAud.SetActive(true); } } } public class HeadTrackingsystem : MonoBehaviour { public GameObject laserorcannon; private void OnTriggerStay(Collider other) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)other).gameObject).name == "GameObject (1)") { laserorcannon.transform.eulerAngles = ((Component)other).gameObject.transform.eulerAngles; } } private void OnTriggerExit(Collider other) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)other).gameObject).name == "GameObject (1)") { laserorcannon.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class TailRotorControl : MonoBehaviour { public FVRPhysicalObject Stick; public GameObject rudbase; public GameObject rudref; public ConstantForce CF; public GameObject RudderGeoL; public GameObject RudderGeoL0; public GameObject RudderGeoL1; public GameObject RudderGeoL2; public GameObject RudderGeoL3; public GameObject engineswitch; public GameObject RudderGeoR; public GameObject RudderGeoR0; public GameObject RudderGeoR1; public GameObject RudderGeoR2; public GameObject RudderGeoR3; public float thrforce; public float rudforce; public float thrmul = 0.01f; public float rudmul = 0.05f; public GameObject thrRot; public GameObject lever; public float y; public float ysp; private void Start() { } private void FixedUpdate() { //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_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_0061: 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_0082: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_014d: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: 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_02de: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_032b: 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_0378: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_04df: 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) thrforce = thrRot.transform.localEulerAngles.z - 2f; rudref.transform.localEulerAngles = new Vector3(0f, Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f); rudforce = Mathf.SmoothDamp(rudforce, rudref.transform.localEulerAngles.y - 90f, ref ysp, 0.5f); RudderGeoL.transform.localEulerAngles = new Vector3(0f, Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f); RudderGeoL0.transform.localEulerAngles = new Vector3(Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); RudderGeoL1.transform.localEulerAngles = new Vector3(Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); RudderGeoL2.transform.localEulerAngles = new Vector3(180f - Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); RudderGeoL3.transform.localEulerAngles = new Vector3(180f - Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); RudderGeoR.transform.localEulerAngles = new Vector3(0f, Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f); RudderGeoR0.transform.localEulerAngles = new Vector3(Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); RudderGeoR1.transform.localEulerAngles = new Vector3(Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); RudderGeoR2.transform.localEulerAngles = new Vector3(180f - Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); RudderGeoR3.transform.localEulerAngles = new Vector3(180f - Mathf.Clamp(rudref.transform.localEulerAngles.y, 60f, 120f), 0f, 0f); if ((Object)(object)((FVRInteractiveObject)Stick).m_hand != (Object)null && engineswitch.transform.localEulerAngles.x > 45f) { rudref.transform.eulerAngles = ((Component)((FVRInteractiveObject)Stick).m_hand).gameObject.transform.eulerAngles; } else if ((Object)(object)((FVRInteractiveObject)Stick).m_hand == (Object)null || engineswitch.transform.localEulerAngles.x < 45f) { rudref.transform.localEulerAngles = new Vector3(0f, Mathf.SmoothDamp(rudref.transform.localEulerAngles.y, 90f, ref ysp, 0.5f), 0f); } if (lever.transform.localEulerAngles.x < 45f) { CF.relativeForce = new Vector3(0f, 0f, thrmul * (thrforce * thrforce * thrforce) + rudmul * (rudforce * rudforce * rudforce)); } else if (lever.transform.localEulerAngles.x >= 45f) { CF.relativeForce = new Vector3(0f, 0f, 0f); } } } public class VortexEffectSystem : MonoBehaviour { public Rigidbody Heli; public GameObject EngineSwitch; public GameObject AutoPilot; public GameObject AltIncInstrument; public GameObject SpeedInstrument; public GameObject CollectiveRot; public GameObject realCollectiveRot; public GameObject FanLeft; public GameObject FanRight; public bool readyForTheShit = true; public bool wasLeftFan = false; public bool wasRightFan = false; public bool isVortexed = false; public bool isGeneratorDown = false; public bool isGenDowned = false; public float collectivespeed = 0f; public float currot; public float lastrot; public float cd = 5f; public float collectiveref; public GameObject warnAudio; public AudioSource vertexSF; public float audref; public float rigidref; private void Start() { //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) lastrot = CollectiveRot.transform.localEulerAngles.z; } private void Update() { //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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00d1: 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_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0238: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_014e: 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_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: 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_019f: 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_037a: 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_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: 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_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_044d: 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_0538: 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_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_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_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) currot = CollectiveRot.transform.localEulerAngles.z; collectivespeed = currot - lastrot; lastrot = currot; if (isGeneratorDown) { realCollectiveRot.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.SmoothDamp(realCollectiveRot.transform.localEulerAngles.z, CollectiveRot.transform.localEulerAngles.z * 0.25f, ref collectiveref, 0.1f)); cd -= Time.deltaTime; if (FanLeft.transform.localEulerAngles.x > 45f) { FanLeft.transform.localEulerAngles = new Vector3(0f, 0f, 0f); wasLeftFan = true; } if (FanRight.transform.localEulerAngles.x > 45f) { FanRight.transform.localEulerAngles = new Vector3(0f, 0f, 0f); wasRightFan = true; } if (cd <= 0f) { realCollectiveRot.transform.localEulerAngles = new Vector3(0f, 0f, CollectiveRot.transform.localEulerAngles.z); warnAudio.SetActive(false); isGeneratorDown = false; isGenDowned = false; cd = 5f; } } else if (!isGeneratorDown) { realCollectiveRot.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.SmoothDamp(realCollectiveRot.transform.localEulerAngles.z, CollectiveRot.transform.localEulerAngles.z, ref collectiveref, 0.05f)); if (wasLeftFan) { FanLeft.transform.localEulerAngles = new Vector3(90f, 0f, 0f); wasLeftFan = false; } if (wasRightFan) { FanRight.transform.localEulerAngles = new Vector3(90f, 0f, 0f); wasRightFan = false; } } if (EngineSwitch.transform.localEulerAngles.x > 45f) { if (readyForTheShit && CollectiveRot.transform.localEulerAngles.z > 20f && collectivespeed > 5f && !isGenDowned) { isGeneratorDown = true; warnAudio.SetActive(true); isGenDowned = true; } if (AutoPilot.transform.localEulerAngles.x > 45f) { readyForTheShit = false; } else if (AutoPilot.transform.localEulerAngles.x < 45f) { readyForTheShit = true; } } else if (EngineSwitch.transform.localEulerAngles.x < 45f) { isGeneratorDown = true; realCollectiveRot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (readyForTheShit && AltIncInstrument.transform.localEulerAngles.y > 60f && AltIncInstrument.transform.localEulerAngles.y < 180f && SpeedInstrument.transform.localEulerAngles.y < 360f && SpeedInstrument.transform.localEulerAngles.y > 300f) { isVortexed = true; } else if (!readyForTheShit || (AltIncInstrument.transform.localEulerAngles.y <= 15f && AltIncInstrument.transform.localEulerAngles.y >= 0f) || (AltIncInstrument.transform.localEulerAngles.y <= 360f && AltIncInstrument.transform.localEulerAngles.y >= 180f) || (SpeedInstrument.transform.localEulerAngles.y >= 180f && SpeedInstrument.transform.localEulerAngles.y <= 270f) || (SpeedInstrument.transform.localEulerAngles.y <= 180f && SpeedInstrument.transform.localEulerAngles.y >= 0f)) { isVortexed = false; } if (isVortexed) { Heli.mass = Mathf.SmoothDamp(Heli.mass, 5000f, ref rigidref, 0.75f); vertexSF.volume = Mathf.SmoothDamp(vertexSF.volume, 1f, ref audref, 0.075f); } else if (!isVortexed) { Heli.mass = Mathf.SmoothDamp(Heli.mass, 1000f, ref rigidref, 0.5f); vertexSF.volume = Mathf.SmoothDamp(vertexSF.volume, 0f, ref audref, 0.075f); } } } public class crash : MonoBehaviour { public tailbreak tb; public GameObject blade; public GameObject bladeRB; public GameObject pos; public GameObject audio; public bool isbladespawned = false; private void Update() { } } public class BombRelease : MonoBehaviour { private GameObject bomberTrigger; public FVRFireArmAttachment bomb; private float timeb; public float fuze; public GameObject explode; public GameObject explosion; public GameObject bombobj; private bool release = false; private bool release2 = false; private bool detached = false; public GameObject safety; public GameObject phys; private void Start() { } private void OnCollisionEnter(Collision col) { //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_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) if (detached) { Vector3 relativeVelocity = col.relativeVelocity; if (((Vector3)(ref relativeVelocity)).magnitude > 1.5f && safety.transform.localEulerAngles.x >= 45f) { Object.Destroy((Object)(object)this); Object.Destroy((Object)(object)phys); Debug.Log((object)"Boom on collision"); } } } private void Update() { //IL_00d2: 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_0104: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) bomberTrigger = GameObject.Find("BomberTrigger"); if (!release) { } if (release2 && !detached) { timeb = Time.deltaTime; Debug.Log((object)"fuse activated"); if (timeb >= 10f) { Object.Destroy((Object)(object)this); Object.Destroy((Object)(object)phys); Debug.Log((object)"Boom on timeout"); } } if (release && !detached) { bomb.DetachFromMount(); detached = true; } if ((Object)(object)bomberTrigger == (Object)null) { } if ((Object)(object)bomberTrigger != (Object)null) { if (bomberTrigger.transform.localEulerAngles.x >= 45f) { release = true; release2 = true; } if (!(bomberTrigger.transform.localEulerAngles.x < 45f) && !(safety.transform.localEulerAngles.x < 45f)) { } } } private void OnDestroy() { Object.Instantiate(explosion, bombobj.transform); Object.Instantiate(explode, bombobj.transform); Object.Destroy((Object)(object)phys); } } public class Crash : MonoBehaviour { public tailbreak tb; public GameObject blade; public GameObject bladeRB; public GameObject pos; public GameObject audio; public bool isbladespawned = false; private void Update() { //IL_0046: 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 (tb.crashed && !isbladespawned) { audio.SetActive(true); blade.SetActive(false); Object.Instantiate(bladeRB, pos.transform.position, pos.transform.rotation); isbladespawned = true; } if (!tb.crashed || isbladespawned) { } if (!((Object)(object)tb == (Object)null)) { } } } [RequireComponent(typeof(Rigidbody))] public class DeepSeeksAutoLevel : MonoBehaviour { public class PIDController { private float kP; private float kI; private float kD; private float integral; private float previousError; public PIDController(float p, float i, float d) { kP = p; kI = i; kD = d; } public float Update(float error, float derivative, float deltaTime) { integral += error * deltaTime; float result = kP * error + kI * integral + kD * derivative; previousError = error; return result; } } [Header("Control Surfaces")] public Transform cyclicX; public Transform cyclicY; public Transform collectiveZ; [Header("Stabilization Settings")] public float maxCyclicAngle = 15f; public float maxCollectiveAngle = 50f; public float stabilizationSpeed = 2f; public float targetAltitude = 100f; public bool isHeightLocked = false; [Header("PID Settings")] public Vector3 angularPID = new Vector3(0.5f, 0.1f, 0.2f); public Vector3 altitudePID = new Vector3(0.8f, 0.05f, 0.3f); private Rigidbody rb; private PIDController pitchPID; private PIDController rollPID; private PIDController altitudePIDController; public GameObject lever; public GameObject engine; public ManipulateObject X; public ManipulateObject Y; public ManipulateObject Z; public Collider Stick; public Collider Throttle; public ConstantForce TRC; private void Start() { rb = ((Component)this).GetComponent(); pitchPID = new PIDController(angularPID.x, angularPID.y, angularPID.z); rollPID = new PIDController(angularPID.x, angularPID.y, angularPID.z); altitudePIDController = new PIDController(altitudePID.x, altitudePID.y, altitudePID.z); } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_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_0104: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (lever.transform.localEulerAngles.x >= 45f && engine.transform.localEulerAngles.x >= 45f) { if (!isHeightLocked) { targetAltitude = ((Component)rb).gameObject.transform.position.y; isHeightLocked = true; } ((Behaviour)X).enabled = false; ((Behaviour)Y).enabled = false; ((Behaviour)Z).enabled = false; Stick.enabled = false; Throttle.enabled = false; StabilizeAngularMotion(); StabilizeAltitude(); ((Behaviour)TRC).enabled = false; } else if (lever.transform.localEulerAngles.x < 45f || engine.transform.localEulerAngles.x < 45f) { isHeightLocked = false; ((Behaviour)X).enabled = true; ((Behaviour)Y).enabled = true; ((Behaviour)Z).enabled = true; Stick.enabled = true; Throttle.enabled = true; ((Behaviour)TRC).enabled = true; } } private void StabilizeAngularMotion() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) Quaternion rotation = rb.rotation; Vector3 eulerAngles = ((Quaternion)(ref rotation)).eulerAngles; ((Vector3)(ref eulerAngles))..ctor((!(eulerAngles.x > 180f)) ? eulerAngles.x : (eulerAngles.x - 360f), (!(eulerAngles.y > 180f)) ? eulerAngles.y : (eulerAngles.y - 360f), (!(eulerAngles.z > 180f)) ? eulerAngles.z : (eulerAngles.z - 360f)); Vector3 val = rb.angularVelocity * 57.29578f; float input = pitchPID.Update(0f - eulerAngles.x, 0f - val.x, Time.fixedDeltaTime); UpdateCyclicX(input); float input2 = rollPID.Update(0f - eulerAngles.z, 0f - val.z, Time.fixedDeltaTime); UpdateCyclicY(input2); } private void StabilizeAltitude() { //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_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) float y = ((Component)this).transform.position.y; float error = targetAltitude - y; float y2 = rb.velocity.y; float input = altitudePIDController.Update(error, 0f - y2, Time.fixedDeltaTime); UpdateCollective(input); } private void UpdateCyclicX(float input) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)cyclicX == (Object)null)) { float num = Mathf.Clamp(input * stabilizationSpeed + 15f, 15f - maxCyclicAngle, 15f + maxCyclicAngle); Vector3 localEulerAngles = cyclicX.localEulerAngles; localEulerAngles.x = Mathf.LerpAngle(localEulerAngles.x, num, Time.fixedDeltaTime * stabilizationSpeed); cyclicX.localEulerAngles = localEulerAngles; } } private void UpdateCyclicY(float input) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)cyclicY == (Object)null)) { float num = Mathf.Clamp(input * stabilizationSpeed + 15f, 15f - maxCyclicAngle, 15f + maxCyclicAngle); Vector3 localEulerAngles = cyclicY.localEulerAngles; localEulerAngles.y = Mathf.LerpAngle(localEulerAngles.y, num, Time.fixedDeltaTime * stabilizationSpeed); cyclicY.localEulerAngles = localEulerAngles; } } private void UpdateCollective(float input) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)collectiveZ == (Object)null)) { float num = Mathf.Clamp(input * maxCollectiveAngle, 4f, maxCollectiveAngle); Vector3 localEulerAngles = collectiveZ.localEulerAngles; localEulerAngles.z = Mathf.LerpAngle(localEulerAngles.z, num, Time.fixedDeltaTime * stabilizationSpeed); collectiveZ.localEulerAngles = localEulerAngles; } } } public class FireRopeDerringer : MonoBehaviour { public SimpleLauncher[] gun; public GameObject trigger; private SimpleLauncher gunToFire = null; 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_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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (trigger.transform.localEulerAngles.x > 0f) { gunToFire = gun[(int)trigger.transform.localEulerAngles.x]; } if (trigger.transform.localEulerAngles.x <= 0f) { gunToFire = null; } if ((Object)(object)gunToFire == (Object)null) { } if ((Object)(object)gunToFire != (Object)null) { gunToFire.Fire(); } } } public class MGMount : MonoBehaviour { public GameObject rcol; 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0133: 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) if ((Object)(object)((Component)other).gameObject == (Object)(object)rcol || ((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; } else if (mgMoveX < 0f) { mgMoveX = 0f; } if (mgMoveY > 1f) { mgMoveY = 1f; } else 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 Start() { } private void Update() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_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) if ((Object)(object)GM.CurrentPlayerBody == (Object)null) { rcol.transform.localPosition = new Vector3(0f, 0f, 0f); } else if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { rcol.transform.position = ((Component)GM.CurrentPlayerBody.RightHand).gameObject.transform.position; } if (trigger.transform.localEulerAngles.x > 2f && trigger.transform.localEulerAngles.x < 88f) { gun.Fire(); } } } public class MPD : MonoBehaviour { public GameObject detector; public GameObject parent; public GameObject GS; public bool crashed = false; public Collider col; public Collider colsub; private void Start() { col.enabled = true; colsub.enabled = true; } private void OnTriggerStay(Collider other) { //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_006c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject == (Object)(object)detector) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent(((Component)this).gameObject.transform); ((Component)GM.CurrentMovementManager).gameObject.transform.localEulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.localEulerAngles.y, 0f); } } private void OnTriggerExit(Collider other) { //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_0062: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject == (Object)(object)detector) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); } } private void OnDisable() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); col.enabled = false; colsub.enabled = false; } private void OnDestroy() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); col.enabled = false; colsub.enabled = false; } private void FixedUpdate() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (!GS.activeInHierarchy && !crashed) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); col.enabled = false; colsub.enabled = false; crashed = true; } } } public class RealStick : MonoBehaviour { public GameObject joystickX; public GameObject joystickY; public FVRInteractiveObject stickobj; private FVRViveHand right; private GameObject rightHand = null; private float stickXmove; private float stickYmove; private GameObject player; public GameObject stickspace; public Vector3 velx = Vector3.zero; public Vector3 vely = Vector3.zero; private void Start() { } private void FixedUpdate() { //IL_00ca: 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_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rightHand == (Object)null || (Object)(object)right == (Object)null || (Object)(object)player == (Object)null) { } if (stickobj.m_isHeld) { right = stickobj.m_hand; rightHand = ((Component)right).gameObject; if ((Object)(object)right != (Object)null || (Object)(object)rightHand != (Object)null) { player = ((Component)right.Head).gameObject; rightHand.transform.parent = stickspace.transform; } stickXmove = rightHand.transform.localPosition.z; if (stickXmove > 0.3f) { stickXmove = 0.3f; } if (stickXmove < 0f) { stickXmove = 0f; } joystickX.transform.localEulerAngles = new Vector3(stickXmove * 100f, 0f, 0f); stickYmove = rightHand.transform.localPosition.x; if (stickYmove > 0.3f) { stickYmove = 0.3f; } if (stickYmove < 0f) { stickYmove = 0f; } joystickY.transform.localEulerAngles = new Vector3(0f, stickYmove * 100f, 0f); } if (!stickobj.m_isHeld) { if ((Object)(object)right != (Object)null || (Object)(object)rightHand != (Object)null) { rightHand.transform.parent = player.transform; right = null; rightHand = null; player = null; } joystickX.transform.localEulerAngles = new Vector3(15f, 0f, 0f); joystickY.transform.localEulerAngles = new Vector3(0f, 15f, 0f); } } } public class RotateAlong : MonoBehaviour { public GameObject targ; public GameObject rotobj; public GameObject snap; private void Update() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) rotobj.transform.localEulerAngles = new Vector3(0f, targ.transform.localEulerAngles.y, 0f); targ.transform.position = snap.transform.position; targ.transform.rotation = snap.transform.rotation; } } } public class RotorLeanPlate : MonoBehaviour { public GameObject Lever; public GameObject Targ; public bool haveX; public bool haveY; public bool haveZ; private void Update() { //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) AxisLookAt(Lever.transform, Targ.transform.position, Vector3.forward); } 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_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_0083: 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_0092: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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_012e: 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_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: 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; if (haveX && haveY && haveZ) { tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, tr_self.localEulerAngles.z); } if (!haveX && !haveY && !haveZ) { tr_self.localEulerAngles = new Vector3(0f, 0f, 0f); } if (!haveX && haveY && haveZ) { tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, tr_self.localEulerAngles.z); } if (!haveX && !haveY && haveZ) { tr_self.localEulerAngles = new Vector3(0f, 0f, tr_self.localEulerAngles.z); } if (!haveX && haveY && !haveZ) { tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, 0f); } if (haveX && !haveY && !haveZ) { tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } if (haveX && !haveY && haveZ) { tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, tr_self.localEulerAngles.z); } if (haveX && haveY && !haveZ) { tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } } } public class coldstart : MonoBehaviour { public Material M1; public Material M2; public Material M3; public Material M4; public Material M5; public Material M6; public Material M7; public GameObject warnaudio; public GameObject warnaudiobase; public GameObject battery; public GameObject rectifier; public GameObject generator; public GameObject buttons1; public GameObject buttons2; public GameObject buttons3; public GameObject buttons4; public GameObject buttons5; public GameObject buttons6; public GameObject oilpump; public GameObject apu; public GameObject engine; public GameObject enginesw; public GameObject batterygeo; public GameObject rectifiergeo; public GameObject generatorgeo; public GameObject buttons1geo; public GameObject buttons2geo; public GameObject buttons3geo; public GameObject buttons4geo; public GameObject buttons5geo; public GameObject buttons6geo; public GameObject oilpumpgeo; public GameObject apugeo; public GameObject enginegeo; public GameObject engineswgeo; public GameObject battery_rot; public GameObject rectifier_rot; public GameObject generator_rot; public GameObject buttons1_rot; public GameObject buttons2_rot; public GameObject buttons3_rot; public GameObject buttons4_rot; public GameObject buttons5_rot; public GameObject buttons6_rot; public GameObject oilpump_rot; public GameObject apu_rot; public GameObject engine_rot; private bool battery_is45 = false; private bool rectifier_is45 = false; private bool generator_is45 = false; private bool buttons1_is45 = false; private bool buttons2_is45 = false; private bool buttons3_is45 = false; private bool buttons4_is45 = false; private bool buttons5_is45 = false; private bool buttons6_is45 = false; private bool oilpump_is45 = false; private bool apu_is45 = false; private bool engine_is45 = false; private bool nextframe = false; private void Start() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) M1.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M2.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M3.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M4.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M5.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M6.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M7.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); } private void battery_over45() { //IL_0050: 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_00a2: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) if (battery_is45) { batterygeo.SetActive(false); rectifier.SetActive(true); warnaudiobase.SetActive(true); M1.SetVector("_EmissionColor", new Vector4(0.8f, 0.6f, 0.6f, 1f)); M2.SetVector("_EmissionColor", new Vector4(0.8f, 0.6f, 0.6f, 1f)); M3.SetVector("_EmissionColor", new Vector4(0.8f, 0.6f, 0.6f, 1f)); M4.SetVector("_EmissionColor", new Vector4(0.8f, 0.6f, 0.6f, 1f)); M5.SetVector("_EmissionColor", new Vector4(0.8f, 0.6f, 0.6f, 1f)); M6.SetVector("_EmissionColor", new Vector4(0.8f, 0.6f, 0.6f, 1f)); M7.SetVector("_EmissionColor", new Vector4(0.8f, 0.6f, 0.6f, 1f)); } battery_is45 = false; } private void battery_under45() { //IL_0050: 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_00a2: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) if (!battery_is45) { rectifier.SetActive(false); batterygeo.SetActive(true); warnaudiobase.SetActive(false); M1.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M2.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M3.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M4.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M5.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M6.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); M7.SetVector("_EmissionColor", new Vector4(0f, 0f, 0f, 0f)); } battery_is45 = true; } private void rectifier_over45() { if (rectifier_is45) { rectifiergeo.SetActive(false); generator.SetActive(true); } rectifier_is45 = false; } private void rectifier_under45() { if (!rectifier_is45) { generator.SetActive(false); rectifiergeo.SetActive(true); } rectifier_is45 = true; } private void generator_over45() { if (generator_is45) { generatorgeo.SetActive(false); buttons1.SetActive(true); } generator_is45 = false; } private void generator_under45() { if (!generator_is45) { buttons1.SetActive(false); generatorgeo.SetActive(true); } generator_is45 = true; } private void buttons1_over45() { if (buttons1_is45) { buttons1geo.SetActive(false); buttons2.SetActive(true); } buttons1_is45 = false; } private void buttons1_under45() { if (!buttons1_is45) { buttons2.SetActive(false); buttons1geo.SetActive(true); } buttons1_is45 = true; } private void buttons2_over45() { if (buttons2_is45) { buttons2geo.SetActive(false); buttons3.SetActive(true); } buttons2_is45 = false; } private void buttons2_under45() { if (!buttons2_is45) { buttons3.SetActive(false); buttons2geo.SetActive(true); } buttons2_is45 = true; } private void buttons3_over45() { if (buttons3_is45) { buttons3geo.SetActive(false); buttons4.SetActive(true); } buttons3_is45 = false; } private void buttons3_under45() { if (!buttons3_is45) { buttons4.SetActive(false); buttons3geo.SetActive(true); } buttons3_is45 = true; } private void buttons4_over45() { if (buttons4_is45) { buttons4geo.SetActive(false); buttons5.SetActive(true); } buttons4_is45 = false; } private void buttons4_under45() { if (!buttons4_is45) { buttons5.SetActive(false); buttons4geo.SetActive(true); } buttons4_is45 = true; } private void buttons5_over45() { if (buttons5_is45) { buttons5geo.SetActive(false); buttons6.SetActive(true); } buttons5_is45 = false; } private void buttons5_under45() { if (!buttons5_is45) { buttons6.SetActive(false); buttons5geo.SetActive(true); } buttons5_is45 = true; } private void buttons6_over45() { if (buttons6_is45) { buttons6geo.SetActive(false); oilpump.SetActive(true); } buttons6_is45 = false; } private void buttons6_under45() { if (!buttons6_is45) { oilpump.SetActive(false); buttons6geo.SetActive(true); } buttons6_is45 = true; } private void oilpump_over45() { if (oilpump_is45) { oilpumpgeo.SetActive(false); apu.SetActive(true); warnaudio.SetActive(false); } oilpump_is45 = false; } private void oilpump_under45() { if (!oilpump_is45) { apu.SetActive(false); oilpumpgeo.SetActive(true); warnaudio.SetActive(true); } oilpump_is45 = true; } private void apu_over45() { if (apu_is45) { apugeo.SetActive(false); engine.SetActive(true); } apu_is45 = false; } private void apu_under45() { if (!apu_is45) { engine.SetActive(false); apugeo.SetActive(true); } apu_is45 = true; } private void engine_over45() { if (engine_is45) { enginegeo.SetActive(false); enginesw.SetActive(true); } engine_is45 = false; } private void engine_under45() { if (!engine_is45) { enginesw.SetActive(false); enginegeo.SetActive(true); } engine_is45 = true; } private void FixedUpdate() { //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_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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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_01f1: 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_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: 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_0302: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: 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_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) if (!(nextframe = !nextframe)) { if (battery_rot.transform.localEulerAngles.x < 45f) { battery_over45(); } else if (battery_rot.transform.localEulerAngles.x > 45f) { battery_under45(); } if (rectifier_rot.transform.localEulerAngles.x < 45f) { rectifier_over45(); } else if (rectifier_rot.transform.localEulerAngles.x > 45f) { rectifier_under45(); } if (generator_rot.transform.localEulerAngles.x < 45f) { generator_over45(); } else if (generator_rot.transform.localEulerAngles.x > 45f) { generator_under45(); } if (buttons1_rot.transform.localEulerAngles.x < 45f) { buttons1_over45(); } else if (buttons1_rot.transform.localEulerAngles.x > 45f) { buttons1_under45(); } if (buttons2_rot.transform.localEulerAngles.x < 45f) { buttons2_over45(); } else if (buttons2_rot.transform.localEulerAngles.x > 45f) { buttons2_under45(); } if (buttons3_rot.transform.localEulerAngles.x < 45f) { buttons3_over45(); } else if (buttons3_rot.transform.localEulerAngles.x > 45f) { buttons3_under45(); } if (buttons4_rot.transform.localEulerAngles.x < 45f) { buttons4_over45(); } else if (buttons4_rot.transform.localEulerAngles.x > 45f) { buttons4_under45(); } if (buttons5_rot.transform.localEulerAngles.x < 45f) { buttons5_over45(); } else if (buttons5_rot.transform.localEulerAngles.x > 45f) { buttons5_under45(); } if (buttons6_rot.transform.localEulerAngles.x < 45f) { buttons6_over45(); } else if (buttons6_rot.transform.localEulerAngles.x > 45f) { buttons6_under45(); } if (oilpump_rot.transform.localEulerAngles.x < 45f) { oilpump_over45(); } else if (oilpump_rot.transform.localEulerAngles.x > 45f) { oilpump_under45(); } if (apu_rot.transform.localEulerAngles.x < 45f) { apu_over45(); } else if (apu_rot.transform.localEulerAngles.x > 45f) { apu_under45(); } if (engine_rot.transform.localEulerAngles.x < 45f) { engine_over45(); } else if (engine_rot.transform.localEulerAngles.x > 45f) { engine_under45(); } } } } namespace JerryComponent { public class coldstart2 : MonoBehaviour { public GameObject warnaudio; public GameObject warnaudiobase; public Material M1; public Material M2; public Material M3; public Material M4; public Material M5; public Material M6; public Material M7; public tailbreak tb; public AR15HandleSightFlipper Batt1; public AR15HandleSightFlipper Batt2; public AR15HandleSightFlipper Rect1; public AR15HandleSightFlipper Rect2; public AR15HandleSightFlipper Rect3; public AR15HandleSightFlipper Gen1; public AR15HandleSightFlipper Gen2; public AR15HandleSightFlipper Butt01; public AR15HandleSightFlipper Butt02; public AR15HandleSightFlipper Butt03; public AR15HandleSightFlipper Butt04; public AR15HandleSightFlipper Butt05; public AR15HandleSightFlipper Butt06; public AR15HandleSightFlipper Butt07; public AR15HandleSightFlipper Butt08; public AR15HandleSightFlipper Butt09; public AR15HandleSightFlipper Butt11; public AR15HandleSightFlipper Butt12; public AR15HandleSightFlipper Butt13; public AR15HandleSightFlipper Butt14; public AR15HandleSightFlipper Butt15; public AR15HandleSightFlipper Butt16; public AR15HandleSightFlipper Butt17; public AR15HandleSightFlipper Butt18; public AR15HandleSightFlipper Butt19; public AR15HandleSightFlipper Butt21; public AR15HandleSightFlipper Butt22; public AR15HandleSightFlipper Butt23; public AR15HandleSightFlipper Butt24; public AR15HandleSightFlipper Butt25; public AR15HandleSightFlipper Butt26; public AR15HandleSightFlipper Butt27; public AR15HandleSightFlipper Butt28; public AR15HandleSightFlipper Butt29; public AR15HandleSightFlipper Butt31; public AR15HandleSightFlipper Butt32; public AR15HandleSightFlipper Butt33; public AR15HandleSightFlipper Butt34; public AR15HandleSightFlipper Butt35; public AR15HandleSightFlipper Butt36; public AR15HandleSightFlipper Butt37; public AR15HandleSightFlipper Butt38; public AR15HandleSightFlipper Butt39; public AR15HandleSightFlipper Butt41; public AR15HandleSightFlipper Butt42; public AR15HandleSightFlipper Butt43; public AR15HandleSightFlipper Butt44; public AR15HandleSightFlipper Butt45; public AR15HandleSightFlipper Butt46; public AR15HandleSightFlipper Butt47; public AR15HandleSightFlipper Butt48; public AR15HandleSightFlipper Butt49; public AR15HandleSightFlipper Butt51; public AR15HandleSightFlipper Butt52; public AR15HandleSightFlipper Butt53; public AR15HandleSightFlipper Butt54; public AR15HandleSightFlipper Butt55; public AR15HandleSightFlipper Butt56; public AR15HandleSightFlipper Butt57; public AR15HandleSightFlipper Butt58; public AR15HandleSightFlipper Butt59; public AR15HandleSightFlipper ButtLev1; public AR15HandleSightFlipper ButtLev2; public AR15HandleSightFlipper ButtLev3; public AR15HandleSightFlipper ButtLev4; public AR15HandleSightFlipper ButtLev5; public AR15HandleSightFlipper ButtLev6; public AR15HandleSightFlipper OilPumpCov1; public AR15HandleSightFlipper OilPumpCov2; public AR15HandleSightFlipper OilPump1; public AR15HandleSightFlipper OilPump2; public AR15HandleSightFlipper APU; public AR15HandleSightFlipper Engine; public AR15HandleSightFlipper EngineLever; public RotateOverTime ROT; public RotateOverTime ROTt; public float Yref; public float LowCar = 500f; public float Damp = 5f; public float cd = 50f; public AR15HandleSightFlipper EngineSwitch; public bool APULock = true; public bool StartFailed = false; public bool isOn = false; public bool APUStarted = false; public AudioSource APUStart; private void Start() { M1.SetFloat("_EmissionWeight", 0f); M2.SetFloat("_EmissionWeight", 0f); M3.SetFloat("_EmissionWeight", 0f); M4.SetFloat("_EmissionWeight", 0f); M5.SetFloat("_EmissionWeight", 0f); M6.SetFloat("_EmissionWeight", 0f); M7.SetFloat("_EmissionWeight", 0f); } public void FixedUpdate() { //IL_0d59: Unknown result type (might be due to invalid IL or missing references) //IL_0d5e: Unknown result type (might be due to invalid IL or missing references) //IL_0e0c: Unknown result type (might be due to invalid IL or missing references) //IL_0e11: Unknown result type (might be due to invalid IL or missing references) //IL_0ebf: Unknown result type (might be due to invalid IL or missing references) //IL_0ec4: Unknown result type (might be due to invalid IL or missing references) //IL_0f72: Unknown result type (might be due to invalid IL or missing references) //IL_0f77: Unknown result type (might be due to invalid IL or missing references) //IL_1025: Unknown result type (might be due to invalid IL or missing references) //IL_102a: Unknown result type (might be due to invalid IL or missing references) //IL_10d9: Unknown result type (might be due to invalid IL or missing references) //IL_10de: Unknown result type (might be due to invalid IL or missing references) if (!Batt1.m_isLargeAperture && !Batt2.m_isLargeAperture) { M1.SetFloat("_EmissionWeight", 1f); M2.SetFloat("_EmissionWeight", 1f); M3.SetFloat("_EmissionWeight", 1f); M4.SetFloat("_EmissionWeight", 1f); M5.SetFloat("_EmissionWeight", 1f); M6.SetFloat("_EmissionWeight", 1f); M7.SetFloat("_EmissionWeight", 1f); warnaudiobase.SetActive(true); } if (Batt1.m_isLargeAperture || Batt2.m_isLargeAperture) { warnaudiobase.SetActive(false); M1.SetFloat("_EmissionWeight", 0f); M2.SetFloat("_EmissionWeight", 0f); M3.SetFloat("_EmissionWeight", 0f); M4.SetFloat("_EmissionWeight", 0f); M5.SetFloat("_EmissionWeight", 0f); M6.SetFloat("_EmissionWeight", 0f); M7.SetFloat("_EmissionWeight", 0f); OilPump1.m_isLargeAperture = true; OilPump2.m_isLargeAperture = true; Engine.m_isLargeAperture = true; } if (OilPumpCov1.m_isLargeAperture) { OilPump1.m_isLargeAperture = true; warnaudio.SetActive(true); } if (OilPumpCov2.m_isLargeAperture) { OilPump2.m_isLargeAperture = true; warnaudio.SetActive(true); } if (!Batt1.m_isLargeAperture && !Batt2.m_isLargeAperture && !Rect1.m_isLargeAperture && !Rect2.m_isLargeAperture && !Rect3.m_isLargeAperture && !Gen1.m_isLargeAperture && !Gen2.m_isLargeAperture && !Butt01.m_isLargeAperture && !Butt02.m_isLargeAperture && !Butt03.m_isLargeAperture && !Butt04.m_isLargeAperture && !Butt05.m_isLargeAperture && !Butt06.m_isLargeAperture && !Butt07.m_isLargeAperture && !Butt08.m_isLargeAperture && !Butt09.m_isLargeAperture && !Butt11.m_isLargeAperture && !Butt12.m_isLargeAperture && !Butt13.m_isLargeAperture && !Butt14.m_isLargeAperture && !Butt15.m_isLargeAperture && !Butt16.m_isLargeAperture && !Butt17.m_isLargeAperture && !Butt18.m_isLargeAperture && !Butt19.m_isLargeAperture && !Butt21.m_isLargeAperture && !Butt22.m_isLargeAperture && !Butt23.m_isLargeAperture && !Butt24.m_isLargeAperture && !Butt25.m_isLargeAperture && !Butt26.m_isLargeAperture && !Butt27.m_isLargeAperture && !Butt28.m_isLargeAperture && !Butt29.m_isLargeAperture && !Butt31.m_isLargeAperture && !Butt32.m_isLargeAperture && !Butt33.m_isLargeAperture && !Butt34.m_isLargeAperture && !Butt35.m_isLargeAperture && !Butt36.m_isLargeAperture && !Butt37.m_isLargeAperture && !Butt38.m_isLargeAperture && !Butt39.m_isLargeAperture && !Butt41.m_isLargeAperture && !Butt42.m_isLargeAperture && !Butt43.m_isLargeAperture && !Butt44.m_isLargeAperture && !Butt45.m_isLargeAperture && !Butt46.m_isLargeAperture && !Butt47.m_isLargeAperture && !Butt48.m_isLargeAperture && !Butt49.m_isLargeAperture && !Butt51.m_isLargeAperture && !Butt52.m_isLargeAperture && !Butt53.m_isLargeAperture && !Butt54.m_isLargeAperture && !Butt55.m_isLargeAperture && !Butt56.m_isLargeAperture && !Butt57.m_isLargeAperture && !Butt58.m_isLargeAperture && !Butt59.m_isLargeAperture && !OilPump1.m_isLargeAperture && !OilPump2.m_isLargeAperture) { APULock = false; warnaudio.SetActive(false); } else if (Batt1.m_isLargeAperture || Batt2.m_isLargeAperture || Rect1.m_isLargeAperture || Rect2.m_isLargeAperture || Rect3.m_isLargeAperture || Gen1.m_isLargeAperture || Gen2.m_isLargeAperture || Butt01.m_isLargeAperture || Butt02.m_isLargeAperture || Butt03.m_isLargeAperture || Butt04.m_isLargeAperture || Butt05.m_isLargeAperture || Butt06.m_isLargeAperture || Butt07.m_isLargeAperture || Butt08.m_isLargeAperture || Butt09.m_isLargeAperture || Butt11.m_isLargeAperture || Butt12.m_isLargeAperture || Butt13.m_isLargeAperture || Butt14.m_isLargeAperture || Butt15.m_isLargeAperture || Butt16.m_isLargeAperture || Butt17.m_isLargeAperture || Butt18.m_isLargeAperture || Butt19.m_isLargeAperture || Butt21.m_isLargeAperture || Butt22.m_isLargeAperture || Butt23.m_isLargeAperture || Butt24.m_isLargeAperture || Butt25.m_isLargeAperture || Butt26.m_isLargeAperture || Butt27.m_isLargeAperture || Butt28.m_isLargeAperture || Butt29.m_isLargeAperture || Butt31.m_isLargeAperture || Butt32.m_isLargeAperture || Butt33.m_isLargeAperture || Butt34.m_isLargeAperture || Butt35.m_isLargeAperture || Butt36.m_isLargeAperture || Butt37.m_isLargeAperture || Butt38.m_isLargeAperture || Butt39.m_isLargeAperture || Butt41.m_isLargeAperture || Butt42.m_isLargeAperture || Butt43.m_isLargeAperture || Butt44.m_isLargeAperture || Butt45.m_isLargeAperture || Butt46.m_isLargeAperture || Butt47.m_isLargeAperture || Butt48.m_isLargeAperture || Butt49.m_isLargeAperture || Butt51.m_isLargeAperture || Butt52.m_isLargeAperture || Butt53.m_isLargeAperture || Butt54.m_isLargeAperture || Butt55.m_isLargeAperture || Butt56.m_isLargeAperture || Butt57.m_isLargeAperture || Butt58.m_isLargeAperture || Butt59.m_isLargeAperture || OilPump1.m_isLargeAperture || OilPump2.m_isLargeAperture) { APULock = true; } if (APULock) { APU.m_isLargeAperture = true; } if (!APU.m_isLargeAperture && !APUStarted) { APUStart.Play(); APUStarted = true; } if (!APUStart.isPlaying && APUStarted) { APU.m_isLargeAperture = true; APUStarted = false; isOn = false; if (ROT.angularVelocity.y < LowCar * 0.75f) { StartFailed = true; } } if (ROT.angularVelocity.y > LowCar * 0.75f && isOn) { EngineSwitch.m_isLargeAperture = false; } if (ROT.angularVelocity.y > LowCar * 0.75f && EngineLever.m_isLargeAperture) { StartFailed = true; } if (StartFailed) { if (cd > 0f) { cd -= Time.deltaTime; } EngineSwitch.m_isLargeAperture = true; ROT.angularVelocity.y = Mathf.SmoothDamp(ROT.angularVelocity.y, 0f, ref Yref, Damp); ROTt.angularVelocity.y = ROT.angularVelocity.y; } if (cd <= 0f) { StartFailed = false; cd = 75f; } if (tb.crashed) { ROT.angularVelocity.y = Mathf.SmoothDamp(ROT.angularVelocity.y, 0f, ref Yref, Damp); ROTt.angularVelocity.y = ROT.angularVelocity.y; } if (APUStart.isPlaying && !EngineLever.m_isLargeAperture && !Engine.m_isLargeAperture) { ROT.angularVelocity.y = Mathf.SmoothDamp(ROT.angularVelocity.y, LowCar, ref Yref, Damp); ROTt.angularVelocity.y = ROT.angularVelocity.y; isOn = true; } if (!ButtLev1.m_isLargeAperture) { Butt01.m_isLargeAperture = false; Butt02.m_isLargeAperture = false; Butt03.m_isLargeAperture = false; Butt04.m_isLargeAperture = false; Butt05.m_isLargeAperture = false; Butt06.m_isLargeAperture = false; Butt07.m_isLargeAperture = false; Butt08.m_isLargeAperture = false; Butt09.m_isLargeAperture = false; if (((Component)ButtLev1.Flipsight).transform.localEulerAngles.x > 55f) { ButtLev1.m_isLargeAperture = true; } } if (!ButtLev2.m_isLargeAperture) { Butt11.m_isLargeAperture = false; Butt12.m_isLargeAperture = false; Butt13.m_isLargeAperture = false; Butt14.m_isLargeAperture = false; Butt15.m_isLargeAperture = false; Butt16.m_isLargeAperture = false; Butt17.m_isLargeAperture = false; Butt18.m_isLargeAperture = false; Butt19.m_isLargeAperture = false; if (((Component)ButtLev2.Flipsight).transform.localEulerAngles.x > 55f) { ButtLev2.m_isLargeAperture = true; } } if (!ButtLev3.m_isLargeAperture) { Butt21.m_isLargeAperture = false; Butt22.m_isLargeAperture = false; Butt23.m_isLargeAperture = false; Butt24.m_isLargeAperture = false; Butt25.m_isLargeAperture = false; Butt26.m_isLargeAperture = false; Butt27.m_isLargeAperture = false; Butt28.m_isLargeAperture = false; Butt29.m_isLargeAperture = false; if (((Component)ButtLev3.Flipsight).transform.localEulerAngles.x > 55f) { ButtLev3.m_isLargeAperture = true; } } if (!ButtLev4.m_isLargeAperture) { Butt31.m_isLargeAperture = false; Butt32.m_isLargeAperture = false; Butt33.m_isLargeAperture = false; Butt34.m_isLargeAperture = false; Butt35.m_isLargeAperture = false; Butt36.m_isLargeAperture = false; Butt37.m_isLargeAperture = false; Butt38.m_isLargeAperture = false; Butt39.m_isLargeAperture = false; if (((Component)ButtLev4.Flipsight).transform.localEulerAngles.x > 55f) { ButtLev4.m_isLargeAperture = true; } } if (!ButtLev5.m_isLargeAperture) { Butt41.m_isLargeAperture = false; Butt42.m_isLargeAperture = false; Butt43.m_isLargeAperture = false; Butt44.m_isLargeAperture = false; Butt45.m_isLargeAperture = false; Butt46.m_isLargeAperture = false; Butt47.m_isLargeAperture = false; Butt48.m_isLargeAperture = false; Butt49.m_isLargeAperture = false; if (((Component)ButtLev5.Flipsight).transform.localEulerAngles.x > 55f) { ButtLev5.m_isLargeAperture = true; } } if (!ButtLev6.m_isLargeAperture) { Butt51.m_isLargeAperture = false; Butt52.m_isLargeAperture = false; Butt53.m_isLargeAperture = false; Butt54.m_isLargeAperture = false; Butt55.m_isLargeAperture = false; Butt56.m_isLargeAperture = false; Butt57.m_isLargeAperture = false; Butt58.m_isLargeAperture = false; Butt59.m_isLargeAperture = false; if (((Component)ButtLev6.Flipsight).transform.localEulerAngles.x > 55f) { ButtLev6.m_isLargeAperture = true; } } } } public class damagetail : MonoBehaviour, IFVRDamageable { public tailbreak tb; public float MinDamageRequired = 5000f; public float MaxDamageRequired = 10000f; private float _damageRequired; private float _damageReceived; private void Start() { _damageRequired = Random.Range(MinDamageRequired, MaxDamageRequired); } public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000f: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if ((int)dam.Class == 1) { Vector3 val = dam.point + dam.hitNormal * Random.Range(0.002f, 0.008f); _damageReceived += dam.Dam_Blunt; if (_damageReceived >= _damageRequired) { tb.crashed = true; } } } private void FixedUpdate() { } } public class delete : MonoBehaviour, IFVRDamageable { public Crash crashedblade1; public Crash crashedblade2; public Crash crashedblade3; public Crash crashedblade4; public Crash crashedblade5; public GameObject audiocrash; public GameObject engineswitch; public GameObject wings; public tailbreak tb; public GameObject tail; public GameObject gears; public GameObject blade1; public GameObject blade2; public GameObject blade3; public GameObject blade4; public GameObject blade5; private GameObject gearFGeo; private GameObject tailGeo; private GameObject bladeGeo; public float MinDamageRequired = 5000f; public float MaxDamageRequired = 10000f; private float _damageRequired; private float _damageReceived; public Material matdam; private void Start() { _damageRequired = Random.Range(MinDamageRequired, MaxDamageRequired); matdam.SetFloat("_DecalWeight", 0f); } public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000f: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if ((int)dam.Class == 1) { Vector3 val = dam.point + dam.hitNormal * Random.Range(0.002f, 0.008f); _damageReceived += dam.Dam_Blunt; if (_damageReceived >= _damageRequired) { tb.crashed = true; } } } private void FixedUpdate() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (tb.jointbroke) { tail.SetActive(false); audiocrash.SetActive(true); matdam.SetFloat("_DecalWeight", 1f); engineswitch.transform.localEulerAngles = new Vector3(0f, 0f, 0f); gears.SetActive(false); wings.SetActive(false); } if (crashedblade1.isbladespawned) { blade1.SetActive(false); } if (crashedblade2.isbladespawned) { blade2.SetActive(false); } if (crashedblade3.isbladespawned) { blade3.SetActive(false); } if (crashedblade4.isbladespawned) { blade4.SetActive(false); } if (crashedblade5.isbladespawned) { blade5.SetActive(false); } } } public class lilFans : MonoBehaviour { public GameObject fanlo; public GameObject fanhi; public GameObject onsound; public GameObject offsound; public RotateOverTime fan; public GameObject switchfan; public bool fanstop; public float timef = 0f; private void OnTriggerStay(Collider other) { fanstop = true; } private void OnTriggerExit(Collider other) { fanstop = false; } private void Start() { } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) if (switchfan.transform.localEulerAngles.x > 45f) { onsound.SetActive(true); offsound.SetActive(false); if (!fanstop) { fan.angularVelocity.y = Mathf.SmoothDamp(fan.angularVelocity.y, 1500f, ref timef, 1f); } else if (fanstop) { fan.angularVelocity.y = 0f; } } if (fan.angularVelocity.y > 750f) { fanlo.SetActive(false); fanhi.SetActive(true); } else if (fan.angularVelocity.y < 750f) { fanlo.SetActive(true); fanhi.SetActive(false); } if (switchfan.transform.localEulerAngles.x < 45f) { onsound.SetActive(false); offsound.SetActive(true); fan.angularVelocity.y = Mathf.SmoothDamp(fan.angularVelocity.y, 0f, ref timef, 2.5f); } } } public class realthrottle : MonoBehaviour { public GameObject engineswitch; public GameObject throttle; public FVRInteractiveObject throttleobj; private FVRViveHand left; private GameObject leftHand = null; private float throttlemove; private GameObject player; public GameObject throttlespace; public bool startup = false; private void Start() { } private void FixedUpdate() { //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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)leftHand == (Object)null || (Object)(object)left == (Object)null || (Object)(object)player == (Object)null) { } if (engineswitch.transform.localEulerAngles.x < 45f) { startup = false; throttlemove = 0f; throttle.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (!(engineswitch.transform.localEulerAngles.x > 45f)) { return; } if (!startup) { throttlemove = 0.03f; throttle.transform.localEulerAngles = new Vector3(0f, 0f, 6f); startup = true; } if (throttleobj.m_isHeld) { left = throttleobj.m_hand; leftHand = ((Component)left).gameObject; if ((Object)(object)left != (Object)null || (Object)(object)leftHand != (Object)null) { player = ((Component)left.Head).gameObject; leftHand.transform.parent = throttlespace.transform; } throttlemove = leftHand.transform.localPosition.z; if (throttlemove > 0.25f) { throttlemove = 0.25f; } if (throttlemove < 0.03f) { throttlemove = 0.03f; } throttle.transform.localEulerAngles = new Vector3(0f, 0f, throttlemove * 200f); } if (!throttleobj.m_isHeld && ((Object)(object)leftHand != (Object)null || (Object)(object)left != (Object)null)) { leftHand.transform.parent = player.transform; leftHand = null; left = null; player = null; } } } public class tailbreak : MonoBehaviour { public GameObject gearF; public GameObject gearL; public GameObject gearR; public GameObject gearFpos; public GameObject gearLpos; public GameObject gearRpos; public GameObject tailGeo; public Transform tailpos; public GameObject tail; public GameObject audio; public GameObject wires; public GameObject engineswitch; public ConfigurableJoint joint; public float breakforce; public Rigidbody heli; public float spinVel; public float foreVel; public float sideVel; public float timec = 0f; public float timed = 0f; public float timedes = 0f; public bool crashed = false; public bool readytocrash = false; public bool jointbroke = false; public float SPINmul = 5000f; public float FSPINY = 0f; public float FSPINX = 0f; public float FSPINZ = 0f; private void Start() { jointbroke = false; } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_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_020f: 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_01ee: 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_029b: 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_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: 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_0303: Unknown result type (might be due to invalid IL or missing references) //IL_031f: 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) if (engineswitch.transform.localEulerAngles.x > 45f) { readytocrash = true; } if (((Object)(object)tail != (Object)null && (Object)(object)joint != (Object)null && readytocrash && ((Joint)joint).currentForce.x >= breakforce) || ((Object)(object)tail != (Object)null && (Object)(object)joint != (Object)null && readytocrash && ((Joint)joint).currentForce.y >= breakforce) || ((Object)(object)tail != (Object)null && (Object)(object)joint != (Object)null && readytocrash && ((Joint)joint).currentForce.z >= breakforce)) { crashed = true; } if (crashed) { timec += 0.1f * Time.deltaTime; wires.SetActive(false); audio.SetActive(true); joint.angularXMotion = (ConfigurableJointMotion)2; joint.angularYMotion = (ConfigurableJointMotion)2; joint.angularZMotion = (ConfigurableJointMotion)2; if (engineswitch.transform.localEulerAngles.x > 45f) { FSPINY += SPINmul * Time.deltaTime; heli.AddRelativeTorque(new Vector3(FSPINX, FSPINY, FSPINZ), (ForceMode)0); heli.angularVelocity = new Vector3(foreVel, spinVel, sideVel); } ((Component)tailpos).transform.localEulerAngles = tail.transform.localEulerAngles; } else if ((Object)(object)tail == (Object)null || (Object)(object)joint == (Object)null || !crashed || !readytocrash) { return; } if (timec > timed && !jointbroke) { ((Joint)joint).breakForce = 0f; Object.Instantiate(tailGeo, ((Component)tailpos).transform.position, ((Component)tailpos).transform.rotation); Object.Instantiate(gearF, gearFpos.transform.position, gearFpos.transform.rotation); Object.Instantiate(gearL, gearLpos.transform.position, gearLpos.transform.rotation); Object.Instantiate(gearR, gearRpos.transform.position, gearRpos.transform.rotation); tail.SetActive(false); jointbroke = true; } if (timec > timedes) { timec = timedes; crashed = false; } } } public class tailjointbreak : MonoBehaviour { public GameObject gearF; public GameObject gearL; public GameObject gearR; public GameObject gearFpos; public GameObject gearLpos; public GameObject gearRpos; public GameObject tailGeo; public Transform tailpos; public GameObject tail; private void OnJointBreak(float breakForce) { //IL_0012: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0096: 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) Object.Instantiate(tailGeo, ((Component)tailpos).transform.position, ((Component)tailpos).transform.rotation); Object.Instantiate(gearF, gearFpos.transform.position, gearFpos.transform.rotation); Object.Instantiate(gearL, gearLpos.transform.position, gearLpos.transform.rotation); Object.Instantiate(gearR, gearRpos.transform.position, gearRpos.transform.rotation); tail.SetActive(false); } } public class wheelcollide : MonoBehaviour { private void Start() { Physics.IgnoreLayerCollision(0, 18); Physics.IgnoreLayerCollision(20, 31); } } public class AircraftBreakableParts : MonoBehaviour, IFVRDamageable { public float MinDamageRequired = 5000f; public float MaxDamageRequired = 10000f; private float _damageRequired; private float _damageReceived; private void Start() { _damageRequired = Random.Range(MinDamageRequired, MaxDamageRequired); } public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000f: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if ((int)dam.Class == 2) { Vector3 val = dam.point + dam.hitNormal * Random.Range(0.002f, 0.008f); _damageReceived += dam.Dam_Blunt; if (!(_damageReceived >= _damageRequired)) { } } } private void FixedUpdate() { } } public class ChangeMass : MonoBehaviour { public Rigidbody rb; public float masstarg; public float cd; private void Start() { } private void FixedUpdate() { if (cd > 0f) { cd -= Time.deltaTime; } else if (cd <= 0f) { cd = 0f; rb.mass = masstarg; } } } public class ControllerScaleLock : MonoBehaviour { private void FixedUpdate() { //IL_0035: 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 ((Object)(object)GM.CurrentMovementManager != (Object)null) { ((Component)GM.CurrentMovementManager.LeftHand).gameObject.transform.localScale = new Vector3(1f, 1f, 1f); ((Component)GM.CurrentMovementManager.RightHand).gameObject.transform.localScale = new Vector3(1f, 1f, 1f); } } } public class MIG29ACS : MonoBehaviour { public AR15HandleSightFlipper flaps; public GameObject lightL; public GameObject lightR; public AR15HandleSightFlipper battery; public AR15HandleSightFlipper butt1; public AR15HandleSightFlipper butt2; public AR15HandleSightFlipper butt3; public AR15HandleSightFlipper butt4; public AR15HandleSightFlipper butt5; public AR15HandleSightFlipper butt6; public AR15HandleSightFlipper lever; public AR15HandleSightFlipper StartBut; public AudioSource EngineStart; public GameObject HUD; public Collider throttlecol; public Collider stickcol; public GameObject throttle; public GameObject LG; public GameObject RG; public float enginelooprefvolL; public float enginelooprefvolR; public float enginelooprefL; public float enginelooprefR; public AudioSource engineloopL; public AudioSource engineloopR; public bool csEnd = false; public bool islefton = false; public bool isrighton = false; private void Start() { throttlecol.enabled = false; stickcol.enabled = false; HUD.SetActive(false); lightL.SetActive(false); lightR.SetActive(false); } private void FixedUpdate() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) if (((Component)StartBut.Flipsight).transform.localEulerAngles.x >= 89f) { StartBut.m_isLargeAperture = true; } if (!lever.m_isLargeAperture && ((Component)lever.Flipsight).transform.localEulerAngles.x >= 45f) { butt1.m_isLargeAperture = false; butt2.m_isLargeAperture = false; butt3.m_isLargeAperture = false; butt4.m_isLargeAperture = false; butt5.m_isLargeAperture = false; butt6.m_isLargeAperture = false; battery.m_isLargeAperture = false; } if (((Component)lever.Flipsight).transform.localEulerAngles.x >= 89f) { lever.m_isLargeAperture = true; } LG.transform.localEulerAngles = new Vector3(0f, 0f, 250f * (1f - engineloopL.volume)); RG.transform.localEulerAngles = new Vector3(0f, 0f, 250f * (1f - engineloopR.volume)); if (battery.m_isLargeAperture || butt1.m_isLargeAperture || butt2.m_isLargeAperture || butt3.m_isLargeAperture || butt4.m_isLargeAperture || butt5.m_isLargeAperture || butt6.m_isLargeAperture) { csEnd = true; } if (!battery.m_isLargeAperture && !butt1.m_isLargeAperture && !butt2.m_isLargeAperture && !butt3.m_isLargeAperture && !butt4.m_isLargeAperture && !butt5.m_isLargeAperture && !butt6.m_isLargeAperture && !StartBut.m_isLargeAperture) { csEnd = false; } if (!csEnd) { if (!islefton) { engineloopL.pitch = Mathf.SmoothDamp(engineloopL.pitch, 1f, ref enginelooprefL, 10f); engineloopL.volume = Mathf.SmoothDamp(engineloopL.volume, 1f, ref enginelooprefvolL, 10f); } if (engineloopL.volume > 0.9f) { HUD.SetActive(true); lightL.SetActive(true); lightR.SetActive(true); if (!isrighton) { isrighton = true; } } if (isrighton) { engineloopR.pitch = Mathf.SmoothDamp(engineloopR.pitch, 1f, ref enginelooprefR, 10f); engineloopR.volume = Mathf.SmoothDamp(engineloopR.volume, 1f, ref enginelooprefvolR, 10f); } } if (csEnd) { islefton = false; isrighton = false; engineloopL.pitch = Mathf.SmoothDamp(engineloopL.pitch, 0.25f, ref enginelooprefL, 10f); engineloopL.volume = Mathf.SmoothDamp(engineloopL.volume, 0f, ref enginelooprefvolL, 10f); engineloopR.pitch = Mathf.SmoothDamp(engineloopR.pitch, 0.25f, ref enginelooprefR, 10f); engineloopR.volume = Mathf.SmoothDamp(engineloopR.volume, 0f, ref enginelooprefvolR, 10f); } if (engineloopL.volume > 0.9f && engineloopR.volume > 0.9f) { throttlecol.enabled = true; stickcol.enabled = true; } if (engineloopR.volume < 0.9f) { throttlecol.enabled = false; stickcol.enabled = false; throttle.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (engineloopL.volume < 0.9f) { HUD.SetActive(false); lightL.SetActive(false); lightR.SetActive(false); } } } public class MIG29Utils : MonoBehaviour { public GameObject StickX; public GameObject targ; public FVRInteractiveObject throttle; public GameObject frontgear; public GameObject rudL; public GameObject rudR; public WheelCollider wM; public WheelCollider wl; public WheelCollider wr; public GameObject thrstick; public float maxangle = 20f; private float currentvel = 0f; public bool Left = false; public bool Right = false; public Material cloud; public AutoGear AltWarnSystem; public GameObject gearlever; public GameObject AOA; public MIG29ACS cs; public float cl; public float[] Y; public float num; public int maxnum = 15; public GameObject AltWarn; public GameObject OverG; public GameObject MaxAOA; public GameObject MinSpeed; public GameObject CheckGear; public float maxAOAvalue; private void Start() { AltWarn.SetActive(false); OverG.SetActive(false); MaxAOA.SetActive(false); MinSpeed.SetActive(false); CheckGear.SetActive(false); cl = 0f; } private void Update() { //IL_0026: 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_0039: 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_00bd: 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_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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: 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_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: 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) //IL_02ff: 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_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_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: 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) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0852: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Unknown result type (might be due to invalid IL or missing references) targ.transform.localPosition = new Vector3(0f, 0f, AltWarnSystem.airspeed.transform.localEulerAngles.y * 0.5f); cloud.SetColor("_Color", new Color(1f, 1f, 1f, cl)); num += 100f * Time.deltaTime; if (num > (float)maxnum) { num = 0f; } cloud.mainTextureOffset = new Vector2(0f, Y[(int)num]); if (AltWarnSystem.airspeed.transform.localEulerAngles.y >= 100f && StickX.transform.localEulerAngles.x >= 25f) { cl = Mathf.Lerp(cl, 1f, 0.05f); } else if (AltWarnSystem.airspeed.transform.localEulerAngles.y < 100f || StickX.transform.localEulerAngles.x < 25f) { cl = Mathf.Lerp(cl, 0f, 0.05f); } if (AltWarnSystem.gear.transform.localEulerAngles.x <= 45f) { if (!CheckGear.activeInHierarchy && !OverG.activeInHierarchy && !MinSpeed.activeInHierarchy && !MaxAOA.activeInHierarchy) { AltWarn.SetActive(true); } else if (CheckGear.activeInHierarchy || OverG.activeInHierarchy || MinSpeed.activeInHierarchy || MaxAOA.activeInHierarchy) { AltWarn.SetActive(false); } } else if (AltWarnSystem.gear.transform.localEulerAngles.x > 45f) { AltWarn.SetActive(false); } if (gearlever.transform.localEulerAngles.x > 20f && AltWarnSystem.airspeed.transform.localEulerAngles.y >= 120f && AltWarnSystem.gear.transform.localEulerAngles.x <= 45f) { if (!OverG.activeInHierarchy && !MinSpeed.activeInHierarchy && !MaxAOA.activeInHierarchy) { CheckGear.SetActive(true); } else if (OverG.activeInHierarchy || MinSpeed.activeInHierarchy || MaxAOA.activeInHierarchy) { CheckGear.SetActive(false); } } else if (gearlever.transform.localEulerAngles.x < 20f || AltWarnSystem.airspeed.transform.localEulerAngles.y < 120f || AltWarnSystem.gear.transform.localEulerAngles.x > 45f) { CheckGear.SetActive(false); } if (AltWarnSystem.airspeed.transform.localEulerAngles.y < 120f && AltWarnSystem.gear.transform.localEulerAngles.x > 45f) { if (!OverG.activeInHierarchy && !MaxAOA.activeInHierarchy) { MinSpeed.SetActive(true); } else if (OverG.activeInHierarchy || MaxAOA.activeInHierarchy) { MinSpeed.SetActive(false); } } else if (AltWarnSystem.airspeed.transform.localEulerAngles.y >= 120f || AltWarnSystem.gear.transform.localEulerAngles.x <= 45f) { MinSpeed.SetActive(false); } if (AOA.transform.localEulerAngles.x >= 0.5f * maxAOAvalue && AltWarnSystem.airspeed.transform.localEulerAngles.y >= 120f) { if (!MaxAOA.activeInHierarchy) { OverG.SetActive(true); } else if (MaxAOA.activeInHierarchy) { OverG.SetActive(false); } } if (AOA.transform.localEulerAngles.x >= maxAOAvalue) { MaxAOA.SetActive(true); } if ((Object)(object)throttle.m_hand != (Object)null) { if (throttle.m_hand.Input.TouchpadAxes.x > 0.5f) { Left = false; Right = true; } if (throttle.m_hand.Input.TouchpadAxes.x < -0.5f) { Left = true; Right = false; } if (throttle.m_hand.Input.TouchpadAxes.x >= -0.5f && throttle.m_hand.Input.TouchpadAxes.x <= 0.5f) { Left = false; Right = false; } } else if ((Object)(object)throttle.m_hand == (Object)null) { Left = false; Right = false; } frontgear.transform.localEulerAngles = new Vector3(0f, 0f, wM.steerAngle + maxangle); if (Left && !Right) { WheelCollider obj = wM; obj.steerAngle -= 25f * Time.deltaTime; } if (!Left && Right) { WheelCollider obj2 = wM; obj2.steerAngle += 25f * Time.deltaTime; } if (!Left && !Right) { wM.steerAngle = Mathf.SmoothDamp(wM.steerAngle, 0f, ref currentvel, 1f); } if (wM.steerAngle > maxangle) { wM.steerAngle = maxangle; } if (wM.steerAngle < 0f - maxangle) { wM.steerAngle = 0f - maxangle; } wl.motorTorque = 10f * thrstick.transform.localEulerAngles.z; wr.motorTorque = 10f * thrstick.transform.localEulerAngles.z; } } public class SPO15 : MonoBehaviour { public GameObject MainRadarType; public GameObject RadarType; public GameObject Ready; public GameObject R1; public GameObject R2; public GameObject R3; public GameObject R4; public GameObject R5; public GameObject R6; public GameObject R7; public GameObject R8; public GameObject R9; public GameObject R10; public GameObject R11; public GameObject R12; public GameObject R13; public GameObject R14; public GameObject R15; public GameObject R16; public GameObject R10D; public GameObject R30D; public GameObject R50D; public GameObject R90D; public GameObject L10D; public GameObject L30D; public GameObject L50D; public GameObject L90D; public GameObject R10DM; public GameObject R30DM; public GameObject R50DM; public GameObject R90DM; public GameObject L10DM; public GameObject L30DM; public GameObject L50DM; public GameObject L90DM; public GameObject UPnLOW; public GameObject Tracking; public GameObject MainRearRight; public GameObject MainRearLeft; public GameObject RearRight; public GameObject RearLeft; [NonSerialized] public GameObject SAMRADARMain; [NonSerialized] public GameObject SAMRADAR; [NonSerialized] public GameObject MissileMain; [NonSerialized] public GameObject Missile; public GameObject MainY; public GameObject Y; public bool locked = false; public bool shot = false; public bool tracking; public float cd = 0.15f; private void OnTriggerStay(Collider other) { if ((Object)(object)SAMRADARMain == (Object)null) { if (((Object)((Component)other).gameObject).name == "RadarTrigger") { SAMRADARMain = ((Component)other).gameObject; locked = true; } } else if ((Object)(object)SAMRADARMain != (Object)null && ((Object)((Component)other).gameObject).name == "RadarTrigger" && (Object)(object)SAMRADAR == (Object)null) { SAMRADAR = ((Component)other).gameObject; locked = true; } if ((Object)(object)MissileMain == (Object)null) { if (((Object)((Component)other).gameObject).name == "MissileCore") { MissileMain = ((Component)other).gameObject; locked = false; shot = true; } } else if ((Object)(object)MissileMain != (Object)null && ((Object)((Component)other).gameObject).name == "MissileCore" && (Object)(object)Missile == (Object)null) { Missile = ((Component)other).gameObject; locked = false; shot = true; } } private void FixedUpdate() { //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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_1c9d: Unknown result type (might be due to invalid IL or missing references) //IL_1ca2: 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_0f2c: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_1cf6: Unknown result type (might be due to invalid IL or missing references) //IL_1cfb: Unknown result type (might be due to invalid IL or missing references) //IL_1cc0: Unknown result type (might be due to invalid IL or missing references) //IL_1cc5: Unknown result type (might be due to invalid IL or missing references) //IL_0f88: Unknown result type (might be due to invalid IL or missing references) //IL_0f98: Unknown result type (might be due to invalid IL or missing references) //IL_0f4b: Unknown result type (might be due to invalid IL or missing references) //IL_0f5b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_1d19: 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_0ff4: Unknown result type (might be due to invalid IL or missing references) //IL_1004: Unknown result type (might be due to invalid IL or missing references) //IL_0fb7: Unknown result type (might be due to invalid IL or missing references) //IL_0fc7: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_1d4a: Unknown result type (might be due to invalid IL or missing references) //IL_1d4f: Unknown result type (might be due to invalid IL or missing references) //IL_1060: 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_1023: Unknown result type (might be due to invalid IL or missing references) //IL_1033: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_2b6b: Unknown result type (might be due to invalid IL or missing references) //IL_2b70: Unknown result type (might be due to invalid IL or missing references) //IL_1da3: Unknown result type (might be due to invalid IL or missing references) //IL_1da8: Unknown result type (might be due to invalid IL or missing references) //IL_1d6d: Unknown result type (might be due to invalid IL or missing references) //IL_1d72: Unknown result type (might be due to invalid IL or missing references) //IL_10cc: Unknown result type (might be due to invalid IL or missing references) //IL_10dc: Unknown result type (might be due to invalid IL or missing references) //IL_108f: Unknown result type (might be due to invalid IL or missing references) //IL_109f: 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_0202: Unknown result type (might be due to invalid IL or missing references) //IL_2bee: Unknown result type (might be due to invalid IL or missing references) //IL_2bf3: Unknown result type (might be due to invalid IL or missing references) //IL_2bb5: Unknown result type (might be due to invalid IL or missing references) //IL_2bba: Unknown result type (might be due to invalid IL or missing references) //IL_1dc6: Unknown result type (might be due to invalid IL or missing references) //IL_1dcb: Unknown result type (might be due to invalid IL or missing references) //IL_1138: Unknown result type (might be due to invalid IL or missing references) //IL_1148: Unknown result type (might be due to invalid IL or missing references) //IL_10fb: Unknown result type (might be due to invalid IL or missing references) //IL_110b: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_2c27: Unknown result type (might be due to invalid IL or missing references) //IL_2c2c: Unknown result type (might be due to invalid IL or missing references) //IL_1df7: Unknown result type (might be due to invalid IL or missing references) //IL_1dfc: Unknown result type (might be due to invalid IL or missing references) //IL_11a4: Unknown result type (might be due to invalid IL or missing references) //IL_11b4: Unknown result type (might be due to invalid IL or missing references) //IL_1167: Unknown result type (might be due to invalid IL or missing references) //IL_1177: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_1e50: Unknown result type (might be due to invalid IL or missing references) //IL_1e55: Unknown result type (might be due to invalid IL or missing references) //IL_1e1a: Unknown result type (might be due to invalid IL or missing references) //IL_1e1f: Unknown result type (might be due to invalid IL or missing references) //IL_1210: Unknown result type (might be due to invalid IL or missing references) //IL_1220: Unknown result type (might be due to invalid IL or missing references) //IL_11d3: Unknown result type (might be due to invalid IL or missing references) //IL_11e3: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_1e73: Unknown result type (might be due to invalid IL or missing references) //IL_1e78: Unknown result type (might be due to invalid IL or missing references) //IL_127c: Unknown result type (might be due to invalid IL or missing references) //IL_128c: Unknown result type (might be due to invalid IL or missing references) //IL_123f: Unknown result type (might be due to invalid IL or missing references) //IL_124f: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_1ea4: Unknown result type (might be due to invalid IL or missing references) //IL_1ea9: Unknown result type (might be due to invalid IL or missing references) //IL_12e8: Unknown result type (might be due to invalid IL or missing references) //IL_12f8: Unknown result type (might be due to invalid IL or missing references) //IL_12ab: Unknown result type (might be due to invalid IL or missing references) //IL_12bb: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_1efd: Unknown result type (might be due to invalid IL or missing references) //IL_1f02: Unknown result type (might be due to invalid IL or missing references) //IL_1ec7: Unknown result type (might be due to invalid IL or missing references) //IL_1ecc: Unknown result type (might be due to invalid IL or missing references) //IL_1354: Unknown result type (might be due to invalid IL or missing references) //IL_1364: Unknown result type (might be due to invalid IL or missing references) //IL_1317: Unknown result type (might be due to invalid IL or missing references) //IL_1327: 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_035c: Unknown result type (might be due to invalid IL or missing references) //IL_1f20: Unknown result type (might be due to invalid IL or missing references) //IL_1f25: Unknown result type (might be due to invalid IL or missing references) //IL_13c0: Unknown result type (might be due to invalid IL or missing references) //IL_13d0: Unknown result type (might be due to invalid IL or missing references) //IL_1383: Unknown result type (might be due to invalid IL or missing references) //IL_1393: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_1f51: Unknown result type (might be due to invalid IL or missing references) //IL_1f56: Unknown result type (might be due to invalid IL or missing references) //IL_142c: Unknown result type (might be due to invalid IL or missing references) //IL_143c: Unknown result type (might be due to invalid IL or missing references) //IL_13ef: Unknown result type (might be due to invalid IL or missing references) //IL_13ff: 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_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: 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_1faf: Unknown result type (might be due to invalid IL or missing references) //IL_1f74: Unknown result type (might be due to invalid IL or missing references) //IL_1f79: Unknown result type (might be due to invalid IL or missing references) //IL_1498: Unknown result type (might be due to invalid IL or missing references) //IL_14a8: Unknown result type (might be due to invalid IL or missing references) //IL_145b: Unknown result type (might be due to invalid IL or missing references) //IL_146b: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_1fcd: Unknown result type (might be due to invalid IL or missing references) //IL_1fd2: Unknown result type (might be due to invalid IL or missing references) //IL_1504: Unknown result type (might be due to invalid IL or missing references) //IL_1514: Unknown result type (might be due to invalid IL or missing references) //IL_14c7: Unknown result type (might be due to invalid IL or missing references) //IL_14d7: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_1ffe: Unknown result type (might be due to invalid IL or missing references) //IL_2003: Unknown result type (might be due to invalid IL or missing references) //IL_1570: Unknown result type (might be due to invalid IL or missing references) //IL_1580: Unknown result type (might be due to invalid IL or missing references) //IL_1533: Unknown result type (might be due to invalid IL or missing references) //IL_1543: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_2057: Unknown result type (might be due to invalid IL or missing references) //IL_205c: Unknown result type (might be due to invalid IL or missing references) //IL_2021: Unknown result type (might be due to invalid IL or missing references) //IL_2026: Unknown result type (might be due to invalid IL or missing references) //IL_15dc: Unknown result type (might be due to invalid IL or missing references) //IL_15ec: Unknown result type (might be due to invalid IL or missing references) //IL_159f: Unknown result type (might be due to invalid IL or missing references) //IL_15af: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_207a: Unknown result type (might be due to invalid IL or missing references) //IL_207f: Unknown result type (might be due to invalid IL or missing references) //IL_1648: Unknown result type (might be due to invalid IL or missing references) //IL_1658: Unknown result type (might be due to invalid IL or missing references) //IL_160b: Unknown result type (might be due to invalid IL or missing references) //IL_161b: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_20ab: 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_16b4: Unknown result type (might be due to invalid IL or missing references) //IL_16c4: Unknown result type (might be due to invalid IL or missing references) //IL_1677: 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_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_2104: Unknown result type (might be due to invalid IL or missing references) //IL_2109: Unknown result type (might be due to invalid IL or missing references) //IL_20ce: Unknown result type (might be due to invalid IL or missing references) //IL_20d3: Unknown result type (might be due to invalid IL or missing references) //IL_1720: Unknown result type (might be due to invalid IL or missing references) //IL_1730: Unknown result type (might be due to invalid IL or missing references) //IL_16e3: Unknown result type (might be due to invalid IL or missing references) //IL_16f3: Unknown result type (might be due to invalid IL or missing references) //IL_055e: 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_2127: Unknown result type (might be due to invalid IL or missing references) //IL_212c: Unknown result type (might be due to invalid IL or missing references) //IL_178c: Unknown result type (might be due to invalid IL or missing references) //IL_179c: Unknown result type (might be due to invalid IL or missing references) //IL_174f: Unknown result type (might be due to invalid IL or missing references) //IL_175f: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_2158: Unknown result type (might be due to invalid IL or missing references) //IL_215d: Unknown result type (might be due to invalid IL or missing references) //IL_17f8: Unknown result type (might be due to invalid IL or missing references) //IL_1808: Unknown result type (might be due to invalid IL or missing references) //IL_17bb: Unknown result type (might be due to invalid IL or missing references) //IL_17cb: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_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_21b1: Unknown result type (might be due to invalid IL or missing references) //IL_21b6: Unknown result type (might be due to invalid IL or missing references) //IL_217b: Unknown result type (might be due to invalid IL or missing references) //IL_2180: Unknown result type (might be due to invalid IL or missing references) //IL_1864: Unknown result type (might be due to invalid IL or missing references) //IL_1874: Unknown result type (might be due to invalid IL or missing references) //IL_1827: Unknown result type (might be due to invalid IL or missing references) //IL_1837: 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_0610: Unknown result type (might be due to invalid IL or missing references) //IL_21d4: Unknown result type (might be due to invalid IL or missing references) //IL_21d9: Unknown result type (might be due to invalid IL or missing references) //IL_18d0: Unknown result type (might be due to invalid IL or missing references) //IL_18e0: Unknown result type (might be due to invalid IL or missing references) //IL_1893: Unknown result type (might be due to invalid IL or missing references) //IL_18a3: Unknown result type (might be due to invalid IL or missing references) //IL_063c: 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_2205: Unknown result type (might be due to invalid IL or missing references) //IL_220a: Unknown result type (might be due to invalid IL or missing references) //IL_193c: Unknown result type (might be due to invalid IL or missing references) //IL_194c: Unknown result type (might be due to invalid IL or missing references) //IL_18ff: Unknown result type (might be due to invalid IL or missing references) //IL_190f: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_225e: Unknown result type (might be due to invalid IL or missing references) //IL_2263: Unknown result type (might be due to invalid IL or missing references) //IL_2228: Unknown result type (might be due to invalid IL or missing references) //IL_222d: Unknown result type (might be due to invalid IL or missing references) //IL_19a8: Unknown result type (might be due to invalid IL or missing references) //IL_19b8: Unknown result type (might be due to invalid IL or missing references) //IL_196b: Unknown result type (might be due to invalid IL or missing references) //IL_197b: 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_2281: Unknown result type (might be due to invalid IL or missing references) //IL_2286: Unknown result type (might be due to invalid IL or missing references) //IL_1a14: Unknown result type (might be due to invalid IL or missing references) //IL_1a24: Unknown result type (might be due to invalid IL or missing references) //IL_19d7: Unknown result type (might be due to invalid IL or missing references) //IL_19e7: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_22b2: Unknown result type (might be due to invalid IL or missing references) //IL_22b7: Unknown result type (might be due to invalid IL or missing references) //IL_1a80: Unknown result type (might be due to invalid IL or missing references) //IL_1a90: Unknown result type (might be due to invalid IL or missing references) //IL_1a43: Unknown result type (might be due to invalid IL or missing references) //IL_1a53: 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_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0711: 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_2310: Unknown result type (might be due to invalid IL or missing references) //IL_22d5: Unknown result type (might be due to invalid IL or missing references) //IL_22da: Unknown result type (might be due to invalid IL or missing references) //IL_1aec: Unknown result type (might be due to invalid IL or missing references) //IL_1afc: Unknown result type (might be due to invalid IL or missing references) //IL_1aaf: Unknown result type (might be due to invalid IL or missing references) //IL_1abf: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_232e: Unknown result type (might be due to invalid IL or missing references) //IL_2333: Unknown result type (might be due to invalid IL or missing references) //IL_1b58: Unknown result type (might be due to invalid IL or missing references) //IL_1b68: Unknown result type (might be due to invalid IL or missing references) //IL_1b1b: Unknown result type (might be due to invalid IL or missing references) //IL_1b2b: Unknown result type (might be due to invalid IL or missing references) //IL_0796: 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_235f: Unknown result type (might be due to invalid IL or missing references) //IL_2364: Unknown result type (might be due to invalid IL or missing references) //IL_1bc4: Unknown result type (might be due to invalid IL or missing references) //IL_1bd4: Unknown result type (might be due to invalid IL or missing references) //IL_1b87: Unknown result type (might be due to invalid IL or missing references) //IL_1b97: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_23b8: Unknown result type (might be due to invalid IL or missing references) //IL_23bd: Unknown result type (might be due to invalid IL or missing references) //IL_2382: Unknown result type (might be due to invalid IL or missing references) //IL_2387: Unknown result type (might be due to invalid IL or missing references) //IL_1c30: Unknown result type (might be due to invalid IL or missing references) //IL_1c40: Unknown result type (might be due to invalid IL or missing references) //IL_1bf3: Unknown result type (might be due to invalid IL or missing references) //IL_1c03: Unknown result type (might be due to invalid IL or missing references) //IL_0812: Unknown result type (might be due to invalid IL or missing references) //IL_0817: Unknown result type (might be due to invalid IL or missing references) //IL_23db: Unknown result type (might be due to invalid IL or missing references) //IL_23e0: Unknown result type (might be due to invalid IL or missing references) //IL_1c5f: Unknown result type (might be due to invalid IL or missing references) //IL_1c6f: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_240c: Unknown result type (might be due to invalid IL or missing references) //IL_2411: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_2465: Unknown result type (might be due to invalid IL or missing references) //IL_246a: Unknown result type (might be due to invalid IL or missing references) //IL_242f: Unknown result type (might be due to invalid IL or missing references) //IL_2434: Unknown result type (might be due to invalid IL or missing references) //IL_08bf: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Unknown result type (might be due to invalid IL or missing references) //IL_2488: Unknown result type (might be due to invalid IL or missing references) //IL_248d: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_08f5: Unknown result type (might be due to invalid IL or missing references) //IL_24b9: Unknown result type (might be due to invalid IL or missing references) //IL_24be: Unknown result type (might be due to invalid IL or missing references) //IL_0949: Unknown result type (might be due to invalid IL or missing references) //IL_094e: Unknown result type (might be due to invalid IL or missing references) //IL_0913: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_2512: Unknown result type (might be due to invalid IL or missing references) //IL_2517: Unknown result type (might be due to invalid IL or missing references) //IL_24dc: Unknown result type (might be due to invalid IL or missing references) //IL_24e1: Unknown result type (might be due to invalid IL or missing references) //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_0971: Unknown result type (might be due to invalid IL or missing references) //IL_2535: Unknown result type (might be due to invalid IL or missing references) //IL_253a: 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_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_2566: Unknown result type (might be due to invalid IL or missing references) //IL_256b: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_09c0: Unknown result type (might be due to invalid IL or missing references) //IL_09c5: Unknown result type (might be due to invalid IL or missing references) //IL_25bf: Unknown result type (might be due to invalid IL or missing references) //IL_25c4: Unknown result type (might be due to invalid IL or missing references) //IL_2589: Unknown result type (might be due to invalid IL or missing references) //IL_258e: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: 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_25e2: Unknown result type (might be due to invalid IL or missing references) //IL_25e7: 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_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_2613: Unknown result type (might be due to invalid IL or missing references) //IL_2618: 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_0aa8: Unknown result type (might be due to invalid IL or missing references) //IL_0a6d: Unknown result type (might be due to invalid IL or missing references) //IL_0a72: Unknown result type (might be due to invalid IL or missing references) //IL_266c: Unknown result type (might be due to invalid IL or missing references) //IL_2671: Unknown result type (might be due to invalid IL or missing references) //IL_2636: Unknown result type (might be due to invalid IL or missing references) //IL_263b: 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_0acb: Unknown result type (might be due to invalid IL or missing references) //IL_268f: Unknown result type (might be due to invalid IL or missing references) //IL_2694: Unknown result type (might be due to invalid IL or missing references) //IL_0af7: Unknown result type (might be due to invalid IL or missing references) //IL_0afc: Unknown result type (might be due to invalid IL or missing references) //IL_26c0: Unknown result type (might be due to invalid IL or missing references) //IL_26c5: Unknown result type (might be due to invalid IL or missing references) //IL_0b50: Unknown result type (might be due to invalid IL or missing references) //IL_0b55: Unknown result type (might be due to invalid IL or missing references) //IL_0b1a: Unknown result type (might be due to invalid IL or missing references) //IL_0b1f: Unknown result type (might be due to invalid IL or missing references) //IL_2719: Unknown result type (might be due to invalid IL or missing references) //IL_271e: Unknown result type (might be due to invalid IL or missing references) //IL_26e3: Unknown result type (might be due to invalid IL or missing references) //IL_26e8: Unknown result type (might be due to invalid IL or missing references) //IL_0b73: Unknown result type (might be due to invalid IL or missing references) //IL_0b78: Unknown result type (might be due to invalid IL or missing references) //IL_273c: Unknown result type (might be due to invalid IL or missing references) //IL_2741: Unknown result type (might be due to invalid IL or missing references) //IL_0ba4: Unknown result type (might be due to invalid IL or missing references) //IL_0ba9: Unknown result type (might be due to invalid IL or missing references) //IL_276d: Unknown result type (might be due to invalid IL or missing references) //IL_2772: Unknown result type (might be due to invalid IL or missing references) //IL_0bfd: Unknown result type (might be due to invalid IL or missing references) //IL_0c02: Unknown result type (might be due to invalid IL or missing references) //IL_0bc7: Unknown result type (might be due to invalid IL or missing references) //IL_0bcc: Unknown result type (might be due to invalid IL or missing references) //IL_27c6: Unknown result type (might be due to invalid IL or missing references) //IL_27cb: Unknown result type (might be due to invalid IL or missing references) //IL_2790: Unknown result type (might be due to invalid IL or missing references) //IL_2795: Unknown result type (might be due to invalid IL or missing references) //IL_0c20: Unknown result type (might be due to invalid IL or missing references) //IL_0c25: Unknown result type (might be due to invalid IL or missing references) //IL_27e9: Unknown result type (might be due to invalid IL or missing references) //IL_27ee: Unknown result type (might be due to invalid IL or missing references) //IL_0c51: Unknown result type (might be due to invalid IL or missing references) //IL_0c56: Unknown result type (might be due to invalid IL or missing references) //IL_281a: Unknown result type (might be due to invalid IL or missing references) //IL_281f: Unknown result type (might be due to invalid IL or missing references) //IL_0caa: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Unknown result type (might be due to invalid IL or missing references) //IL_0c74: Unknown result type (might be due to invalid IL or missing references) //IL_0c79: Unknown result type (might be due to invalid IL or missing references) //IL_2873: Unknown result type (might be due to invalid IL or missing references) //IL_2878: Unknown result type (might be due to invalid IL or missing references) //IL_283d: Unknown result type (might be due to invalid IL or missing references) //IL_2842: Unknown result type (might be due to invalid IL or missing references) //IL_0ccd: Unknown result type (might be due to invalid IL or missing references) //IL_0cd2: Unknown result type (might be due to invalid IL or missing references) //IL_2896: Unknown result type (might be due to invalid IL or missing references) //IL_289b: Unknown result type (might be due to invalid IL or missing references) //IL_0cfe: Unknown result type (might be due to invalid IL or missing references) //IL_0d03: Unknown result type (might be due to invalid IL or missing references) //IL_28c7: Unknown result type (might be due to invalid IL or missing references) //IL_28cc: Unknown result type (might be due to invalid IL or missing references) //IL_0d57: Unknown result type (might be due to invalid IL or missing references) //IL_0d5c: Unknown result type (might be due to invalid IL or missing references) //IL_0d21: Unknown result type (might be due to invalid IL or missing references) //IL_0d26: Unknown result type (might be due to invalid IL or missing references) //IL_2920: Unknown result type (might be due to invalid IL or missing references) //IL_2925: Unknown result type (might be due to invalid IL or missing references) //IL_28ea: Unknown result type (might be due to invalid IL or missing references) //IL_28ef: Unknown result type (might be due to invalid IL or missing references) //IL_0d7a: Unknown result type (might be due to invalid IL or missing references) //IL_0d7f: Unknown result type (might be due to invalid IL or missing references) //IL_2943: Unknown result type (might be due to invalid IL or missing references) //IL_2948: Unknown result type (might be due to invalid IL or missing references) //IL_2974: Unknown result type (might be due to invalid IL or missing references) //IL_2979: Unknown result type (might be due to invalid IL or missing references) //IL_29cd: Unknown result type (might be due to invalid IL or missing references) //IL_29d2: Unknown result type (might be due to invalid IL or missing references) //IL_2997: Unknown result type (might be due to invalid IL or missing references) //IL_299c: Unknown result type (might be due to invalid IL or missing references) //IL_29f0: Unknown result type (might be due to invalid IL or missing references) //IL_29f5: Unknown result type (might be due to invalid IL or missing references) if (locked) { tracking = true; UPnLOW.SetActive(true); if (Y.transform.localEulerAngles.y > 180f && Y.transform.localEulerAngles.y < 250f) { RearLeft.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 180f || Y.transform.localEulerAngles.y >= -110f) { RearLeft.SetActive(false); } if (Y.transform.localEulerAngles.y < 180f && Y.transform.localEulerAngles.y > 110f) { RearRight.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 180f || Y.transform.localEulerAngles.y <= 110f) { RearRight.SetActive(false); } if (Y.transform.localEulerAngles.y < 360f && Y.transform.localEulerAngles.y >= 340f) { L10D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 360f || Y.transform.localEulerAngles.y < 340f) { L10D.SetActive(false); } if (Y.transform.localEulerAngles.y < 340f && Y.transform.localEulerAngles.y >= 320f) { L30D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 340f || Y.transform.localEulerAngles.y < 320f) { L30D.SetActive(false); } if (Y.transform.localEulerAngles.y < 320f && Y.transform.localEulerAngles.y >= 290f) { L50D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 320f || Y.transform.localEulerAngles.y < 290f) { L50D.SetActive(false); } if (Y.transform.localEulerAngles.y < 290f && Y.transform.localEulerAngles.y >= 250f) { L10D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 290f || Y.transform.localEulerAngles.y < 250f) { L10D.SetActive(false); } if (Y.transform.localEulerAngles.y > 0f && Y.transform.localEulerAngles.y <= 20f) { R10D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 0f || Y.transform.localEulerAngles.y > 20f) { R10D.SetActive(false); } if (Y.transform.localEulerAngles.y > 20f && Y.transform.localEulerAngles.y <= 40f) { R30D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 20f || Y.transform.localEulerAngles.y > 40f) { R30D.SetActive(false); } if (Y.transform.localEulerAngles.y > 40f && Y.transform.localEulerAngles.y <= 70f) { R50D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 40f || Y.transform.localEulerAngles.y > 70f) { R50D.SetActive(false); } if (Y.transform.localEulerAngles.y > 70f && Y.transform.localEulerAngles.y <= 110f) { R90D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 70f || Y.transform.localEulerAngles.y > 110f) { R90D.SetActive(false); } if (MainY.transform.localEulerAngles.y > 180f && MainY.transform.localEulerAngles.y < 250f) { MainRearLeft.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 180f || MainY.transform.localEulerAngles.y >= -110f) { MainRearLeft.SetActive(false); } if (MainY.transform.localEulerAngles.y < 180f && MainY.transform.localEulerAngles.y > 110f) { MainRearRight.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 180f || MainY.transform.localEulerAngles.y <= 110f) { MainRearRight.SetActive(false); } if (MainY.transform.localEulerAngles.y < 360f && MainY.transform.localEulerAngles.y >= 340f) { L10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 360f || MainY.transform.localEulerAngles.y < 340f) { L10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 340f && MainY.transform.localEulerAngles.y >= 320f) { L30DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 340f || MainY.transform.localEulerAngles.y < 320f) { L30DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 320f && MainY.transform.localEulerAngles.y >= 290f) { L50DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 320f || MainY.transform.localEulerAngles.y < 290f) { L50DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 290f && MainY.transform.localEulerAngles.y >= 250f) { L10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 290f || MainY.transform.localEulerAngles.y < 250f) { L10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 0f && MainY.transform.localEulerAngles.y <= 20f) { R10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 0f || MainY.transform.localEulerAngles.y > 20f) { R10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 20f && MainY.transform.localEulerAngles.y <= 40f) { R30DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 20f || MainY.transform.localEulerAngles.y > 40f) { R30DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 40f && MainY.transform.localEulerAngles.y <= 70f) { R50DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 40f || MainY.transform.localEulerAngles.y > 70f) { R50DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 70f && MainY.transform.localEulerAngles.y <= 110f) { R90DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 70f || MainY.transform.localEulerAngles.y > 110f) { R90DM.SetActive(false); } } if (!shot && !tracking) { R10D.SetActive(false); L10D.SetActive(false); R10DM.SetActive(false); L10DM.SetActive(false); R30D.SetActive(false); L30D.SetActive(false); R30DM.SetActive(false); L30DM.SetActive(false); R50D.SetActive(false); L50D.SetActive(false); R50DM.SetActive(false); L50DM.SetActive(false); R90D.SetActive(false); L90D.SetActive(false); R90DM.SetActive(false); L90DM.SetActive(false); RearLeft.SetActive(false); RearRight.SetActive(false); MainRearLeft.SetActive(false); MainRearRight.SetActive(false); } if (shot) { UPnLOW.SetActive(true); cd -= Time.deltaTime; if (cd <= 0f) { cd = 0.15f; tracking = !tracking; } if ((Object)(object)MissileMain != (Object)null) { if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1500f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1600f) { R1.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1500f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1600f) { R1.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1400f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1500f) { R2.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1400f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1500f) { R2.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1300f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1400f) { R3.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1300f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1400f) { R3.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1200f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1300f) { R4.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1200f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1300f) { R4.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1100f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1200f) { R5.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1100f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1200f) { R5.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1000f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1100f) { R6.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1000f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1100f) { R6.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 900f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 1000f) { R7.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 900f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 1000f) { R7.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 800f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 900f) { R8.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 800f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 900f) { R8.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 700f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 800f) { R9.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 700f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 800f) { R9.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 600f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 700f) { R10.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 600f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 700f) { R10.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 500f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 600f) { R11.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 500f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 600f) { R11.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 400f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 500f) { R12.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 400f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 500f) { R12.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 300f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 400f) { R13.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 300f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 400f) { R13.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 200f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 300f) { R14.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 200f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 300f) { R14.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 100f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 200f) { R15.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 100f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 200f) { R15.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 0f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 100f) { R16.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) <= 0f && Vector3.Distance(((Component)this).gameObject.transform.position, MissileMain.transform.position) > 100f) { R16.SetActive(false); } } if (Y.transform.localEulerAngles.y > 180f && Y.transform.localEulerAngles.y < 250f) { RearLeft.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 180f || Y.transform.localEulerAngles.y >= -110f) { RearLeft.SetActive(false); } if (Y.transform.localEulerAngles.y < 180f && Y.transform.localEulerAngles.y > 110f) { RearRight.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 180f || Y.transform.localEulerAngles.y <= 110f) { RearRight.SetActive(false); } if (Y.transform.localEulerAngles.y < 360f && Y.transform.localEulerAngles.y >= 340f) { L10D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 360f || Y.transform.localEulerAngles.y < 340f) { L10D.SetActive(false); } if (Y.transform.localEulerAngles.y < 340f && Y.transform.localEulerAngles.y >= 320f) { L30D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 340f || Y.transform.localEulerAngles.y < 320f) { L30D.SetActive(false); } if (Y.transform.localEulerAngles.y < 320f && Y.transform.localEulerAngles.y >= 290f) { L50D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 320f || Y.transform.localEulerAngles.y < 290f) { L50D.SetActive(false); } if (Y.transform.localEulerAngles.y < 290f && Y.transform.localEulerAngles.y >= 250f) { L10D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 290f || Y.transform.localEulerAngles.y < 250f) { L10D.SetActive(false); } if (Y.transform.localEulerAngles.y > 0f && Y.transform.localEulerAngles.y <= 20f) { R10D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 0f || Y.transform.localEulerAngles.y > 20f) { R10D.SetActive(false); } if (Y.transform.localEulerAngles.y > 20f && Y.transform.localEulerAngles.y <= 40f) { R30D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 20f || Y.transform.localEulerAngles.y > 40f) { R30D.SetActive(false); } if (Y.transform.localEulerAngles.y > 40f && Y.transform.localEulerAngles.y <= 70f) { R50D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 40f || Y.transform.localEulerAngles.y > 70f) { R50D.SetActive(false); } if (Y.transform.localEulerAngles.y > 70f && Y.transform.localEulerAngles.y <= 110f) { R90D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 70f || Y.transform.localEulerAngles.y > 110f) { R90D.SetActive(false); } if (MainY.transform.localEulerAngles.y > 180f && MainY.transform.localEulerAngles.y < 250f) { MainRearLeft.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 180f || MainY.transform.localEulerAngles.y >= -110f) { MainRearLeft.SetActive(false); } if (MainY.transform.localEulerAngles.y < 180f && MainY.transform.localEulerAngles.y > 110f) { MainRearRight.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 180f || MainY.transform.localEulerAngles.y <= 110f) { MainRearRight.SetActive(false); } if (MainY.transform.localEulerAngles.y < 360f && MainY.transform.localEulerAngles.y >= 340f) { L10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 360f || MainY.transform.localEulerAngles.y < 340f) { L10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 340f && MainY.transform.localEulerAngles.y >= 320f) { L30DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 340f || MainY.transform.localEulerAngles.y < 320f) { L30DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 320f && MainY.transform.localEulerAngles.y >= 290f) { L50DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 320f || MainY.transform.localEulerAngles.y < 290f) { L50DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 290f && MainY.transform.localEulerAngles.y >= 250f) { L10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 290f || MainY.transform.localEulerAngles.y < 250f) { L10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 0f && MainY.transform.localEulerAngles.y <= 20f) { R10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 0f || MainY.transform.localEulerAngles.y > 20f) { R10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 20f && MainY.transform.localEulerAngles.y <= 40f) { R30DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 20f || MainY.transform.localEulerAngles.y > 40f) { R30DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 40f && MainY.transform.localEulerAngles.y <= 70f) { R50DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 40f || MainY.transform.localEulerAngles.y > 70f) { R50DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 70f && MainY.transform.localEulerAngles.y <= 110f) { R90DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 70f || MainY.transform.localEulerAngles.y > 110f) { R90DM.SetActive(false); } } else if (!shot || (Object)(object)MissileMain == (Object)null) { R1.SetActive(false); R2.SetActive(false); R3.SetActive(false); R4.SetActive(false); R5.SetActive(false); R6.SetActive(false); R7.SetActive(false); R8.SetActive(false); R9.SetActive(false); R10.SetActive(false); R11.SetActive(false); R12.SetActive(false); R13.SetActive(false); R14.SetActive(false); R15.SetActive(false); R16.SetActive(false); } if (tracking) { Tracking.SetActive(true); } else if (!tracking) { Tracking.SetActive(false); } if ((Object)(object)MissileMain == (Object)null && (Object)(object)SAMRADARMain != (Object)null) { AxisLookAtY(MainY.transform, SAMRADARMain.transform.position, Vector3.forward); } if ((Object)(object)Missile == (Object)null && (Object)(object)SAMRADAR != (Object)null) { AxisLookAtY(Y.transform, SAMRADAR.transform.position, Vector3.forward); } if ((Object)(object)MissileMain != (Object)null) { AxisLookAtY(MainY.transform, MissileMain.transform.position, Vector3.forward); } if ((Object)(object)Missile != (Object)null) { AxisLookAtY(Y.transform, Missile.transform.position, Vector3.forward); } if ((Object)(object)SAMRADARMain == (Object)null) { SAMRADAR = null; tracking = false; } if ((Object)(object)MissileMain == (Object)null) { Missile = null; shot = false; } } private void AxisLookAtX(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } private void AxisLookAtY(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, 0f); } } public class SPO15P : MonoBehaviour { private class RigidbodyDistance { public Rigidbody rigidbody; public float distance; public RigidbodyDistance(Rigidbody rb, float dist) { rigidbody = rb; distance = dist; } } public List currentAI = new List(); public List currentAI2 = new List(); public AudioSource beep; public GameObject volknob; [NonSerialized] public Transform nearestAI; public bool see1; public bool see2; public bool exist1; public bool exist2; public GameObject MainRadarType; public GameObject RadarType; public GameObject Ready; public GameObject R1; public GameObject R2; public GameObject R3; public GameObject R4; public GameObject R5; public GameObject R6; public GameObject R7; public GameObject R8; public GameObject R9; public GameObject R10; public GameObject R11; public GameObject R12; public GameObject R13; public GameObject R14; public GameObject R15; public GameObject R16; public GameObject R10D; public GameObject R30D; public GameObject R50D; public GameObject R90D; public GameObject L10D; public GameObject L30D; public GameObject L50D; public GameObject L90D; public GameObject R10DM; public GameObject R30DM; public GameObject R50DM; public GameObject R90DM; public GameObject L10DM; public GameObject L30DM; public GameObject L50DM; public GameObject L90DM; public GameObject UPnLOW; public GameObject Tracking; public GameObject MainRearRight; public GameObject MainRearLeft; public GameObject RearRight; public GameObject RearLeft; [NonSerialized] public GameObject SAMRADARMain; [NonSerialized] public GameObject SAMRADAR; [NonSerialized] public GameObject MainMissile; [NonSerialized] public GameObject Missile; public GameObject MainY; public GameObject Y; public GameObject MainYM; public GameObject YM; public bool locked = false; public bool shot = false; public bool tracking; public float cd = 0.15f; public GameObject GetGameObjectByDistanceOrder(Transform player, List objects, int order = 1) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if (objects == null || objects.Count == 0 || order < 1 || order > objects.Count) { return null; } List list = new List(); foreach (Rigidbody @object in objects) { if ((Object)(object)@object != (Object)null) { float dist = Vector3.Distance(player.position, ((Component)@object).transform.position); list.Add(new RigidbodyDistance(@object, dist)); } } if (order > list.Count) { return null; } list.Sort((RigidbodyDistance a, RigidbodyDistance b) => a.distance.CompareTo(b.distance)); return ((Component)list[order - 1].rigidbody).gameObject; } public GameObject GetNearestGameObject(Transform player, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) GameObject val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).gameObject; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; i++) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).gameObject; } } } return val; } private void OnTriggerStay(Collider other) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { Rigidbody component = ((Component)other).gameObject.GetComponent(); if (((Object)((Component)other).gameObject).name == "RadarTrigger" && !currentAI.Contains(component)) { currentAI.Add(component); } if (((Object)((Component)other).gameObject).name == "MissileCore" && !currentAI2.Contains(component)) { currentAI2.Add(component); } } } private void FixedUpdate() { //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_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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: 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_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0484: 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_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_1af9: Unknown result type (might be due to invalid IL or missing references) //IL_1afe: Unknown result type (might be due to invalid IL or missing references) //IL_1358: Unknown result type (might be due to invalid IL or missing references) //IL_1368: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_1b52: Unknown result type (might be due to invalid IL or missing references) //IL_1b57: Unknown result type (might be due to invalid IL or missing references) //IL_1b1c: Unknown result type (might be due to invalid IL or missing references) //IL_1b21: Unknown result type (might be due to invalid IL or missing references) //IL_1395: Unknown result type (might be due to invalid IL or missing references) //IL_13a5: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_1b75: Unknown result type (might be due to invalid IL or missing references) //IL_1b7a: Unknown result type (might be due to invalid IL or missing references) //IL_13d2: Unknown result type (might be due to invalid IL or missing references) //IL_13e2: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_1ba6: Unknown result type (might be due to invalid IL or missing references) //IL_1bab: Unknown result type (might be due to invalid IL or missing references) //IL_140f: Unknown result type (might be due to invalid IL or missing references) //IL_141f: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0614: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_1bff: Unknown result type (might be due to invalid IL or missing references) //IL_1c04: Unknown result type (might be due to invalid IL or missing references) //IL_1bc9: Unknown result type (might be due to invalid IL or missing references) //IL_1bce: Unknown result type (might be due to invalid IL or missing references) //IL_144c: Unknown result type (might be due to invalid IL or missing references) //IL_145c: Unknown result type (might be due to invalid IL or missing references) //IL_0632: 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_1c22: Unknown result type (might be due to invalid IL or missing references) //IL_1c27: Unknown result type (might be due to invalid IL or missing references) //IL_1489: Unknown result type (might be due to invalid IL or missing references) //IL_1499: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_1c53: Unknown result type (might be due to invalid IL or missing references) //IL_1c58: Unknown result type (might be due to invalid IL or missing references) //IL_14c6: Unknown result type (might be due to invalid IL or missing references) //IL_14d6: Unknown result type (might be due to invalid IL or missing references) //IL_06bc: Unknown result type (might be due to invalid IL or missing references) //IL_06c1: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_1cac: Unknown result type (might be due to invalid IL or missing references) //IL_1cb1: Unknown result type (might be due to invalid IL or missing references) //IL_1c76: Unknown result type (might be due to invalid IL or missing references) //IL_1c7b: Unknown result type (might be due to invalid IL or missing references) //IL_1503: Unknown result type (might be due to invalid IL or missing references) //IL_1513: Unknown result type (might be due to invalid IL or missing references) //IL_06df: 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_1ccf: Unknown result type (might be due to invalid IL or missing references) //IL_1cd4: Unknown result type (might be due to invalid IL or missing references) //IL_1540: Unknown result type (might be due to invalid IL or missing references) //IL_1550: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_1d00: Unknown result type (might be due to invalid IL or missing references) //IL_1d05: 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_158d: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_0733: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_1d59: Unknown result type (might be due to invalid IL or missing references) //IL_1d5e: 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_1d28: 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_15ca: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_1d7c: Unknown result type (might be due to invalid IL or missing references) //IL_1d81: 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_1607: Unknown result type (might be due to invalid IL or missing references) //IL_07bd: Unknown result type (might be due to invalid IL or missing references) //IL_07c2: Unknown result type (might be due to invalid IL or missing references) //IL_1dad: Unknown result type (might be due to invalid IL or missing references) //IL_1db2: Unknown result type (might be due to invalid IL or missing references) //IL_1634: Unknown result type (might be due to invalid IL or missing references) //IL_1644: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Unknown result type (might be due to invalid IL or missing references) //IL_081b: Unknown result type (might be due to invalid IL or missing references) //IL_07e0: Unknown result type (might be due to invalid IL or missing references) //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_1e06: Unknown result type (might be due to invalid IL or missing references) //IL_1e0b: Unknown result type (might be due to invalid IL or missing references) //IL_1dd0: Unknown result type (might be due to invalid IL or missing references) //IL_1dd5: Unknown result type (might be due to invalid IL or missing references) //IL_1671: Unknown result type (might be due to invalid IL or missing references) //IL_1681: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_1e29: Unknown result type (might be due to invalid IL or missing references) //IL_1e2e: Unknown result type (might be due to invalid IL or missing references) //IL_16ae: Unknown result type (might be due to invalid IL or missing references) //IL_16be: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_1e5a: Unknown result type (might be due to invalid IL or missing references) //IL_1e5f: Unknown result type (might be due to invalid IL or missing references) //IL_16eb: Unknown result type (might be due to invalid IL or missing references) //IL_16fb: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_1eb3: 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_1e7d: Unknown result type (might be due to invalid IL or missing references) //IL_1e82: Unknown result type (might be due to invalid IL or missing references) //IL_1728: Unknown result type (might be due to invalid IL or missing references) //IL_1738: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_1ed6: Unknown result type (might be due to invalid IL or missing references) //IL_1edb: Unknown result type (might be due to invalid IL or missing references) //IL_1765: Unknown result type (might be due to invalid IL or missing references) //IL_1775: 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_091c: Unknown result type (might be due to invalid IL or missing references) //IL_1f07: Unknown result type (might be due to invalid IL or missing references) //IL_1f0c: Unknown result type (might be due to invalid IL or missing references) //IL_17a2: Unknown result type (might be due to invalid IL or missing references) //IL_17b2: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Unknown result type (might be due to invalid IL or missing references) //IL_0975: Unknown result type (might be due to invalid IL or missing references) //IL_093a: Unknown result type (might be due to invalid IL or missing references) //IL_093f: Unknown result type (might be due to invalid IL or missing references) //IL_1f60: Unknown result type (might be due to invalid IL or missing references) //IL_1f65: Unknown result type (might be due to invalid IL or missing references) //IL_1f2a: Unknown result type (might be due to invalid IL or missing references) //IL_1f2f: Unknown result type (might be due to invalid IL or missing references) //IL_17df: Unknown result type (might be due to invalid IL or missing references) //IL_17ef: Unknown result type (might be due to invalid IL or missing references) //IL_0993: 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_1f83: Unknown result type (might be due to invalid IL or missing references) //IL_1f88: Unknown result type (might be due to invalid IL or missing references) //IL_181c: Unknown result type (might be due to invalid IL or missing references) //IL_182c: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Unknown result type (might be due to invalid IL or missing references) //IL_09c9: Unknown result type (might be due to invalid IL or missing references) //IL_1fb4: Unknown result type (might be due to invalid IL or missing references) //IL_1fb9: Unknown result type (might be due to invalid IL or missing references) //IL_1859: Unknown result type (might be due to invalid IL or missing references) //IL_1869: Unknown result type (might be due to invalid IL or missing references) //IL_0a1d: Unknown result type (might be due to invalid IL or missing references) //IL_0a22: Unknown result type (might be due to invalid IL or missing references) //IL_09e7: Unknown result type (might be due to invalid IL or missing references) //IL_09ec: Unknown result type (might be due to invalid IL or missing references) //IL_200d: 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_1fd7: Unknown result type (might be due to invalid IL or missing references) //IL_1fdc: Unknown result type (might be due to invalid IL or missing references) //IL_1896: Unknown result type (might be due to invalid IL or missing references) //IL_18a6: Unknown result type (might be due to invalid IL or missing references) //IL_0a40: Unknown result type (might be due to invalid IL or missing references) //IL_0a45: 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_18d3: Unknown result type (might be due to invalid IL or missing references) //IL_18e3: 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_0a76: Unknown result type (might be due to invalid IL or missing references) //IL_2061: Unknown result type (might be due to invalid IL or missing references) //IL_2066: Unknown result type (might be due to invalid IL or missing references) //IL_1910: Unknown result type (might be due to invalid IL or missing references) //IL_1920: Unknown result type (might be due to invalid IL or missing references) //IL_0aca: 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_0a94: Unknown result type (might be due to invalid IL or missing references) //IL_0a99: Unknown result type (might be due to invalid IL or missing references) //IL_20ba: Unknown result type (might be due to invalid IL or missing references) //IL_20bf: Unknown result type (might be due to invalid IL or missing references) //IL_2084: Unknown result type (might be due to invalid IL or missing references) //IL_2089: Unknown result type (might be due to invalid IL or missing references) //IL_194d: Unknown result type (might be due to invalid IL or missing references) //IL_195d: Unknown result type (might be due to invalid IL or missing references) //IL_0aed: Unknown result type (might be due to invalid IL or missing references) //IL_0af2: Unknown result type (might be due to invalid IL or missing references) //IL_20dd: Unknown result type (might be due to invalid IL or missing references) //IL_20e2: Unknown result type (might be due to invalid IL or missing references) //IL_198a: Unknown result type (might be due to invalid IL or missing references) //IL_199a: Unknown result type (might be due to invalid IL or missing references) //IL_0b1e: Unknown result type (might be due to invalid IL or missing references) //IL_0b23: Unknown result type (might be due to invalid IL or missing references) //IL_210e: Unknown result type (might be due to invalid IL or missing references) //IL_2113: Unknown result type (might be due to invalid IL or missing references) //IL_19c7: Unknown result type (might be due to invalid IL or missing references) //IL_19d7: 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_0b7c: Unknown result type (might be due to invalid IL or missing references) //IL_0b41: Unknown result type (might be due to invalid IL or missing references) //IL_0b46: Unknown result type (might be due to invalid IL or missing references) //IL_2167: Unknown result type (might be due to invalid IL or missing references) //IL_216c: Unknown result type (might be due to invalid IL or missing references) //IL_2131: Unknown result type (might be due to invalid IL or missing references) //IL_2136: Unknown result type (might be due to invalid IL or missing references) //IL_1a04: Unknown result type (might be due to invalid IL or missing references) //IL_1a14: Unknown result type (might be due to invalid IL or missing references) //IL_0b9a: Unknown result type (might be due to invalid IL or missing references) //IL_0b9f: Unknown result type (might be due to invalid IL or missing references) //IL_218a: Unknown result type (might be due to invalid IL or missing references) //IL_218f: Unknown result type (might be due to invalid IL or missing references) //IL_1a41: Unknown result type (might be due to invalid IL or missing references) //IL_1a51: Unknown result type (might be due to invalid IL or missing references) //IL_0bcb: Unknown result type (might be due to invalid IL or missing references) //IL_0bd0: Unknown result type (might be due to invalid IL or missing references) //IL_21bb: Unknown result type (might be due to invalid IL or missing references) //IL_21c0: Unknown result type (might be due to invalid IL or missing references) //IL_1a7e: Unknown result type (might be due to invalid IL or missing references) //IL_1a8e: Unknown result type (might be due to invalid IL or missing references) //IL_0c24: Unknown result type (might be due to invalid IL or missing references) //IL_0c29: Unknown result type (might be due to invalid IL or missing references) //IL_0bee: Unknown result type (might be due to invalid IL or missing references) //IL_0bf3: Unknown result type (might be due to invalid IL or missing references) //IL_2214: Unknown result type (might be due to invalid IL or missing references) //IL_2219: Unknown result type (might be due to invalid IL or missing references) //IL_21de: Unknown result type (might be due to invalid IL or missing references) //IL_21e3: Unknown result type (might be due to invalid IL or missing references) //IL_1abb: 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_0c47: Unknown result type (might be due to invalid IL or missing references) //IL_0c4c: Unknown result type (might be due to invalid IL or missing references) //IL_2237: Unknown result type (might be due to invalid IL or missing references) //IL_223c: Unknown result type (might be due to invalid IL or missing references) //IL_0c78: Unknown result type (might be due to invalid IL or missing references) //IL_0c7d: Unknown result type (might be due to invalid IL or missing references) //IL_2268: Unknown result type (might be due to invalid IL or missing references) //IL_226d: Unknown result type (might be due to invalid IL or missing references) //IL_0cd1: Unknown result type (might be due to invalid IL or missing references) //IL_0cd6: Unknown result type (might be due to invalid IL or missing references) //IL_0c9b: 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_22c1: Unknown result type (might be due to invalid IL or missing references) //IL_22c6: Unknown result type (might be due to invalid IL or missing references) //IL_228b: Unknown result type (might be due to invalid IL or missing references) //IL_2290: Unknown result type (might be due to invalid IL or missing references) //IL_0cf4: Unknown result type (might be due to invalid IL or missing references) //IL_0cf9: Unknown result type (might be due to invalid IL or missing references) //IL_22e4: Unknown result type (might be due to invalid IL or missing references) //IL_22e9: Unknown result type (might be due to invalid IL or missing references) //IL_0d25: Unknown result type (might be due to invalid IL or missing references) //IL_0d2a: Unknown result type (might be due to invalid IL or missing references) //IL_2315: Unknown result type (might be due to invalid IL or missing references) //IL_231a: Unknown result type (might be due to invalid IL or missing references) //IL_0d7e: Unknown result type (might be due to invalid IL or missing references) //IL_0d83: Unknown result type (might be due to invalid IL or missing references) //IL_0d48: Unknown result type (might be due to invalid IL or missing references) //IL_0d4d: Unknown result type (might be due to invalid IL or missing references) //IL_236e: Unknown result type (might be due to invalid IL or missing references) //IL_2373: Unknown result type (might be due to invalid IL or missing references) //IL_2338: Unknown result type (might be due to invalid IL or missing references) //IL_233d: Unknown result type (might be due to invalid IL or missing references) //IL_0da1: Unknown result type (might be due to invalid IL or missing references) //IL_0da6: Unknown result type (might be due to invalid IL or missing references) //IL_2391: Unknown result type (might be due to invalid IL or missing references) //IL_2396: Unknown result type (might be due to invalid IL or missing references) //IL_0dd2: Unknown result type (might be due to invalid IL or missing references) //IL_0dd7: Unknown result type (might be due to invalid IL or missing references) //IL_23c2: Unknown result type (might be due to invalid IL or missing references) //IL_23c7: Unknown result type (might be due to invalid IL or missing references) //IL_0e2b: Unknown result type (might be due to invalid IL or missing references) //IL_0e30: Unknown result type (might be due to invalid IL or missing references) //IL_0df5: Unknown result type (might be due to invalid IL or missing references) //IL_0dfa: Unknown result type (might be due to invalid IL or missing references) //IL_241b: Unknown result type (might be due to invalid IL or missing references) //IL_2420: Unknown result type (might be due to invalid IL or missing references) //IL_23e5: Unknown result type (might be due to invalid IL or missing references) //IL_23ea: Unknown result type (might be due to invalid IL or missing references) //IL_0e4e: Unknown result type (might be due to invalid IL or missing references) //IL_0e53: Unknown result type (might be due to invalid IL or missing references) //IL_243e: Unknown result type (might be due to invalid IL or missing references) //IL_2443: Unknown result type (might be due to invalid IL or missing references) //IL_0e7f: Unknown result type (might be due to invalid IL or missing references) //IL_0e84: Unknown result type (might be due to invalid IL or missing references) //IL_246f: Unknown result type (might be due to invalid IL or missing references) //IL_2474: Unknown result type (might be due to invalid IL or missing references) //IL_0ed8: Unknown result type (might be due to invalid IL or missing references) //IL_0edd: Unknown result type (might be due to invalid IL or missing references) //IL_0ea2: Unknown result type (might be due to invalid IL or missing references) //IL_0ea7: Unknown result type (might be due to invalid IL or missing references) //IL_24c8: Unknown result type (might be due to invalid IL or missing references) //IL_24cd: Unknown result type (might be due to invalid IL or missing references) //IL_2492: Unknown result type (might be due to invalid IL or missing references) //IL_2497: Unknown result type (might be due to invalid IL or missing references) //IL_0efb: Unknown result type (might be due to invalid IL or missing references) //IL_0f00: Unknown result type (might be due to invalid IL or missing references) //IL_24eb: Unknown result type (might be due to invalid IL or missing references) //IL_24f0: Unknown result type (might be due to invalid IL or missing references) //IL_0f2c: Unknown result type (might be due to invalid IL or missing references) //IL_0f31: Unknown result type (might be due to invalid IL or missing references) //IL_251c: Unknown result type (might be due to invalid IL or missing references) //IL_2521: 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_0f4f: Unknown result type (might be due to invalid IL or missing references) //IL_0f54: Unknown result type (might be due to invalid IL or missing references) //IL_2575: Unknown result type (might be due to invalid IL or missing references) //IL_257a: Unknown result type (might be due to invalid IL or missing references) //IL_253f: Unknown result type (might be due to invalid IL or missing references) //IL_2544: 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_2598: Unknown result type (might be due to invalid IL or missing references) //IL_259d: Unknown result type (might be due to invalid IL or missing references) //IL_0fd9: Unknown result type (might be due to invalid IL or missing references) //IL_0fde: Unknown result type (might be due to invalid IL or missing references) //IL_25c9: Unknown result type (might be due to invalid IL or missing references) //IL_25ce: Unknown result type (might be due to invalid IL or missing references) //IL_1032: Unknown result type (might be due to invalid IL or missing references) //IL_1037: Unknown result type (might be due to invalid IL or missing references) //IL_0ffc: Unknown result type (might be due to invalid IL or missing references) //IL_1001: Unknown result type (might be due to invalid IL or missing references) //IL_2622: Unknown result type (might be due to invalid IL or missing references) //IL_2627: Unknown result type (might be due to invalid IL or missing references) //IL_25ec: Unknown result type (might be due to invalid IL or missing references) //IL_25f1: Unknown result type (might be due to invalid IL or missing references) //IL_1055: 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_2645: Unknown result type (might be due to invalid IL or missing references) //IL_264a: Unknown result type (might be due to invalid IL or missing references) //IL_1086: Unknown result type (might be due to invalid IL or missing references) //IL_108b: Unknown result type (might be due to invalid IL or missing references) //IL_2676: Unknown result type (might be due to invalid IL or missing references) //IL_267b: Unknown result type (might be due to invalid IL or missing references) //IL_10df: Unknown result type (might be due to invalid IL or missing references) //IL_10e4: Unknown result type (might be due to invalid IL or missing references) //IL_10a9: Unknown result type (might be due to invalid IL or missing references) //IL_10ae: Unknown result type (might be due to invalid IL or missing references) //IL_26cf: Unknown result type (might be due to invalid IL or missing references) //IL_26d4: Unknown result type (might be due to invalid IL or missing references) //IL_2699: Unknown result type (might be due to invalid IL or missing references) //IL_269e: Unknown result type (might be due to invalid IL or missing references) //IL_1102: Unknown result type (might be due to invalid IL or missing references) //IL_1107: Unknown result type (might be due to invalid IL or missing references) //IL_26f2: Unknown result type (might be due to invalid IL or missing references) //IL_26f7: Unknown result type (might be due to invalid IL or missing references) //IL_1133: Unknown result type (might be due to invalid IL or missing references) //IL_1138: Unknown result type (might be due to invalid IL or missing references) //IL_2723: Unknown result type (might be due to invalid IL or missing references) //IL_2728: Unknown result type (might be due to invalid IL or missing references) //IL_118c: Unknown result type (might be due to invalid IL or missing references) //IL_1191: Unknown result type (might be due to invalid IL or missing references) //IL_1156: Unknown result type (might be due to invalid IL or missing references) //IL_115b: Unknown result type (might be due to invalid IL or missing references) //IL_277c: Unknown result type (might be due to invalid IL or missing references) //IL_2781: Unknown result type (might be due to invalid IL or missing references) //IL_2746: Unknown result type (might be due to invalid IL or missing references) //IL_274b: Unknown result type (might be due to invalid IL or missing references) //IL_11af: Unknown result type (might be due to invalid IL or missing references) //IL_11b4: Unknown result type (might be due to invalid IL or missing references) //IL_279f: Unknown result type (might be due to invalid IL or missing references) //IL_27a4: Unknown result type (might be due to invalid IL or missing references) //IL_27d0: Unknown result type (might be due to invalid IL or missing references) //IL_27d5: Unknown result type (might be due to invalid IL or missing references) //IL_2829: Unknown result type (might be due to invalid IL or missing references) //IL_282e: Unknown result type (might be due to invalid IL or missing references) //IL_27f3: Unknown result type (might be due to invalid IL or missing references) //IL_27f8: Unknown result type (might be due to invalid IL or missing references) //IL_284c: Unknown result type (might be due to invalid IL or missing references) //IL_2851: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MainMissile != (Object)null) { AxisLookAtY(MainYM.transform, MainMissile.transform.position, Vector3.forward); } if ((Object)(object)Missile != (Object)null) { AxisLookAtY(YM.transform, Missile.transform.position, Vector3.forward); } beep.volume = volknob.transform.localEulerAngles.x / 180f; if ((Object)(object)SAMRADARMain != (Object)null) { AxisLookAtY(MainY.transform, SAMRADARMain.transform.position, Vector3.forward); } else if ((Object)(object)SAMRADARMain == (Object)null) { shot = false; locked = false; SAMRADAR = null; Y.transform.localEulerAngles = new Vector3(0f, 0f, 0f); MainY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)SAMRADAR != (Object)null) { AxisLookAtY(Y.transform, SAMRADAR.transform.position, Vector3.forward); } else if ((Object)(object)SAMRADAR == (Object)null) { Y.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (currentAI != null) { for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null || Vector3.Distance(((Component)this).gameObject.transform.position, ((Component)currentAI[i]).gameObject.transform.position) > 1500f) { currentAI.Remove(currentAI[i]); } } SAMRADARMain = GetNearestGameObject(((Component)this).gameObject.transform, currentAI); SAMRADAR = GetGameObjectByDistanceOrder(((Component)this).gameObject.transform, currentAI, 2); } if (currentAI2 != null) { for (int j = 0; j < currentAI2.Count; j++) { if ((Object)(object)currentAI2[j] == (Object)null || Vector3.Distance(((Component)this).gameObject.transform.position, ((Component)currentAI2[j]).gameObject.transform.position) > 1500f) { currentAI2.Remove(currentAI2[j]); } } MainMissile = GetNearestGameObject(((Component)this).gameObject.transform, currentAI2); Missile = GetGameObjectByDistanceOrder(((Component)this).gameObject.transform, currentAI2, 2); } if ((Object)(object)MainMissile != (Object)null || (Object)(object)Missile != (Object)null) { shot = true; } if ((Object)(object)MainMissile == (Object)null && (Object)(object)Missile == (Object)null) { shot = false; } if ((Object)(object)SAMRADARMain != (Object)null || (Object)(object)SAMRADAR != (Object)null) { if (!shot) { locked = true; } else if (shot) { locked = false; } } if ((Object)(object)SAMRADARMain == (Object)null && (Object)(object)SAMRADAR == (Object)null) { locked = false; } if (locked) { tracking = true; UPnLOW.SetActive(true); if (Y.transform.localEulerAngles.y > 180f && Y.transform.localEulerAngles.y < 250f) { RearLeft.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 180f || Y.transform.localEulerAngles.y >= -110f) { RearLeft.SetActive(false); } if (Y.transform.localEulerAngles.y < 180f && Y.transform.localEulerAngles.y > 110f) { RearRight.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 180f || Y.transform.localEulerAngles.y <= 110f) { RearRight.SetActive(false); } if (Y.transform.localEulerAngles.y < 360f && Y.transform.localEulerAngles.y >= 340f) { L10D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 360f || Y.transform.localEulerAngles.y < 340f) { L10D.SetActive(false); } if (Y.transform.localEulerAngles.y < 340f && Y.transform.localEulerAngles.y >= 320f) { L30D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 340f || Y.transform.localEulerAngles.y < 320f) { L30D.SetActive(false); } if (Y.transform.localEulerAngles.y < 320f && Y.transform.localEulerAngles.y >= 290f) { L50D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 320f || Y.transform.localEulerAngles.y < 290f) { L50D.SetActive(false); } if (Y.transform.localEulerAngles.y < 290f && Y.transform.localEulerAngles.y >= 250f) { L90D.SetActive(true); } else if (Y.transform.localEulerAngles.y >= 290f || Y.transform.localEulerAngles.y < 250f) { L90D.SetActive(false); } if (Y.transform.localEulerAngles.y > 0f && Y.transform.localEulerAngles.y <= 20f) { R10D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 0f || Y.transform.localEulerAngles.y > 20f) { R10D.SetActive(false); } if (Y.transform.localEulerAngles.y > 20f && Y.transform.localEulerAngles.y <= 40f) { R30D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 20f || Y.transform.localEulerAngles.y > 40f) { R30D.SetActive(false); } if (Y.transform.localEulerAngles.y > 40f && Y.transform.localEulerAngles.y <= 70f) { R50D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 40f || Y.transform.localEulerAngles.y > 70f) { R50D.SetActive(false); } if (Y.transform.localEulerAngles.y > 70f && Y.transform.localEulerAngles.y <= 110f) { R90D.SetActive(true); } else if (Y.transform.localEulerAngles.y <= 70f || Y.transform.localEulerAngles.y > 110f) { R90D.SetActive(false); } if (MainY.transform.localEulerAngles.y > 180f && MainY.transform.localEulerAngles.y < 250f) { MainRearLeft.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 180f || MainY.transform.localEulerAngles.y >= -110f) { MainRearLeft.SetActive(false); } if (MainY.transform.localEulerAngles.y < 180f && MainY.transform.localEulerAngles.y > 110f) { MainRearRight.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 180f || MainY.transform.localEulerAngles.y <= 110f) { MainRearRight.SetActive(false); } if (MainY.transform.localEulerAngles.y < 360f && MainY.transform.localEulerAngles.y >= 340f) { L10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 360f || MainY.transform.localEulerAngles.y < 340f) { L10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 340f && MainY.transform.localEulerAngles.y >= 320f) { L30DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 340f || MainY.transform.localEulerAngles.y < 320f) { L30DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 320f && MainY.transform.localEulerAngles.y >= 290f) { L50DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 320f || MainY.transform.localEulerAngles.y < 290f) { L50DM.SetActive(false); } if (MainY.transform.localEulerAngles.y < 290f && MainY.transform.localEulerAngles.y >= 250f) { L90DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y >= 290f || MainY.transform.localEulerAngles.y < 250f) { L90DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 0f && MainY.transform.localEulerAngles.y <= 20f) { R10DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 0f || MainY.transform.localEulerAngles.y > 20f) { R10DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 20f && MainY.transform.localEulerAngles.y <= 40f) { R30DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 20f || MainY.transform.localEulerAngles.y > 40f) { R30DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 40f && MainY.transform.localEulerAngles.y <= 70f) { R50DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 40f || MainY.transform.localEulerAngles.y > 70f) { R50DM.SetActive(false); } if (MainY.transform.localEulerAngles.y > 70f && MainY.transform.localEulerAngles.y <= 110f) { R90DM.SetActive(true); } else if (MainY.transform.localEulerAngles.y <= 70f || MainY.transform.localEulerAngles.y > 110f) { R90DM.SetActive(false); } } if (!shot && !locked) { R10D.SetActive(false); L10D.SetActive(false); R10DM.SetActive(false); L10DM.SetActive(false); R30D.SetActive(false); L30D.SetActive(false); R30DM.SetActive(false); L30DM.SetActive(false); R50D.SetActive(false); L50D.SetActive(false); R50DM.SetActive(false); L50DM.SetActive(false); R90D.SetActive(false); L90D.SetActive(false); R90DM.SetActive(false); L90DM.SetActive(false); RearLeft.SetActive(false); RearRight.SetActive(false); MainRearLeft.SetActive(false); MainRearRight.SetActive(false); tracking = false; } if (shot) { UPnLOW.SetActive(true); cd -= Time.deltaTime; if (cd <= 0f) { cd = 0.15f; tracking = !tracking; } if ((Object)(object)MainMissile != (Object)null) { if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 1600f) { R1.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 1600f) { R1.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 1500f) { R2.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 1500f) { R2.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 140f) { R3.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 1400f) { R3.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 1300f) { R4.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 1300f) { R4.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 1200f) { R5.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 1200f) { R5.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 1100f) { R6.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 1100f) { R6.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 1000f) { R7.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 1000f) { R7.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 900f) { R8.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 900f) { R8.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 800f) { R9.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 800f) { R9.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 700f) { R10.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 700f) { R10.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 600f) { R11.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 600f) { R11.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 500f) { R12.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 500f) { R12.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 400f) { R13.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 400f) { R13.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 300f) { R14.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 300f) { R14.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 200f) { R15.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 200f) { R15.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) <= 100f) { R16.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, MainMissile.transform.position) > 100f) { R16.SetActive(false); } } if (YM.transform.localEulerAngles.y > 180f && YM.transform.localEulerAngles.y < 250f) { RearLeft.SetActive(true); } else if (YM.transform.localEulerAngles.y <= 180f || YM.transform.localEulerAngles.y >= -110f) { RearLeft.SetActive(false); } if (YM.transform.localEulerAngles.y < 180f && YM.transform.localEulerAngles.y > 110f) { RearRight.SetActive(true); } else if (YM.transform.localEulerAngles.y >= 180f || YM.transform.localEulerAngles.y <= 110f) { RearRight.SetActive(false); } if (YM.transform.localEulerAngles.y < 360f && YM.transform.localEulerAngles.y >= 340f) { L10D.SetActive(true); } else if (YM.transform.localEulerAngles.y >= 360f || YM.transform.localEulerAngles.y < 340f) { L10D.SetActive(false); } if (YM.transform.localEulerAngles.y < 340f && YM.transform.localEulerAngles.y >= 320f) { L30D.SetActive(true); } else if (YM.transform.localEulerAngles.y >= 340f || YM.transform.localEulerAngles.y < 320f) { L30D.SetActive(false); } if (YM.transform.localEulerAngles.y < 320f && YM.transform.localEulerAngles.y >= 290f) { L50D.SetActive(true); } else if (YM.transform.localEulerAngles.y >= 320f || YM.transform.localEulerAngles.y < 290f) { L50D.SetActive(false); } if (YM.transform.localEulerAngles.y < 290f && YM.transform.localEulerAngles.y >= 250f) { L90D.SetActive(true); } else if (YM.transform.localEulerAngles.y >= 290f || YM.transform.localEulerAngles.y < 250f) { L90D.SetActive(false); } if (YM.transform.localEulerAngles.y > 0f && YM.transform.localEulerAngles.y <= 20f) { R10D.SetActive(true); } else if (YM.transform.localEulerAngles.y <= 0f || YM.transform.localEulerAngles.y > 20f) { R10D.SetActive(false); } if (YM.transform.localEulerAngles.y > 20f && YM.transform.localEulerAngles.y <= 40f) { R30D.SetActive(true); } else if (YM.transform.localEulerAngles.y <= 20f || YM.transform.localEulerAngles.y > 40f) { R30D.SetActive(false); } if (YM.transform.localEulerAngles.y > 40f && YM.transform.localEulerAngles.y <= 70f) { R50D.SetActive(true); } else if (YM.transform.localEulerAngles.y <= 40f || YM.transform.localEulerAngles.y > 70f) { R50D.SetActive(false); } if (YM.transform.localEulerAngles.y > 70f && YM.transform.localEulerAngles.y <= 110f) { R90D.SetActive(true); } else if (YM.transform.localEulerAngles.y <= 70f || YM.transform.localEulerAngles.y > 110f) { R90D.SetActive(false); } if (MainYM.transform.localEulerAngles.y > 180f && MainYM.transform.localEulerAngles.y < 250f) { MainRearLeft.SetActive(true); } else if (MainYM.transform.localEulerAngles.y <= 180f || MainYM.transform.localEulerAngles.y >= -110f) { MainRearLeft.SetActive(false); } if (MainYM.transform.localEulerAngles.y < 180f && MainYM.transform.localEulerAngles.y > 110f) { MainRearRight.SetActive(true); } else if (MainYM.transform.localEulerAngles.y >= 180f || MainYM.transform.localEulerAngles.y <= 110f) { MainRearRight.SetActive(false); } if (MainYM.transform.localEulerAngles.y < 360f && MainYM.transform.localEulerAngles.y >= 340f) { L10DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y >= 360f || MainYM.transform.localEulerAngles.y < 340f) { L10DM.SetActive(false); } if (MainYM.transform.localEulerAngles.y < 340f && MainYM.transform.localEulerAngles.y >= 320f) { L30DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y >= 340f || MainYM.transform.localEulerAngles.y < 320f) { L30DM.SetActive(false); } if (MainYM.transform.localEulerAngles.y < 320f && MainYM.transform.localEulerAngles.y >= 290f) { L50DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y >= 320f || MainYM.transform.localEulerAngles.y < 290f) { L50DM.SetActive(false); } if (MainYM.transform.localEulerAngles.y < 290f && MainYM.transform.localEulerAngles.y >= 250f) { L90DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y >= 290f || MainYM.transform.localEulerAngles.y < 250f) { L90DM.SetActive(false); } if (MainYM.transform.localEulerAngles.y > 0f && MainYM.transform.localEulerAngles.y <= 20f) { R10DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y <= 0f || MainYM.transform.localEulerAngles.y > 20f) { R10DM.SetActive(false); } if (MainYM.transform.localEulerAngles.y > 20f && MainYM.transform.localEulerAngles.y <= 40f) { R30DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y <= 20f || MainYM.transform.localEulerAngles.y > 40f) { R30DM.SetActive(false); } if (MainYM.transform.localEulerAngles.y > 40f && MainYM.transform.localEulerAngles.y <= 70f) { R50DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y <= 40f || MainYM.transform.localEulerAngles.y > 70f) { R50DM.SetActive(false); } if (MainYM.transform.localEulerAngles.y > 70f && MainYM.transform.localEulerAngles.y <= 110f) { R90DM.SetActive(true); } else if (MainYM.transform.localEulerAngles.y <= 70f || MainYM.transform.localEulerAngles.y > 110f) { R90DM.SetActive(false); } } else if (!shot) { R1.SetActive(false); R2.SetActive(false); R3.SetActive(false); R4.SetActive(false); R5.SetActive(false); R6.SetActive(false); R7.SetActive(false); R8.SetActive(false); R9.SetActive(false); R10.SetActive(false); R11.SetActive(false); R12.SetActive(false); R13.SetActive(false); R14.SetActive(false); R15.SetActive(false); R16.SetActive(false); } if (tracking) { Tracking.SetActive(true); } else if (!tracking) { Tracking.SetActive(false); } } private void AxisLookAtX(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } private void AxisLookAtY(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, 0f); } } public class VoiceDisengage : MonoBehaviour { public GameObject obj; public AudioSource au; public float cd; public float cdtarg; private void Awake() { cd = cdtarg; } private void FixedUpdate() { if (cd > 0f) { cd -= Time.deltaTime; } else if (cd <= 0f) { cd = 0f; if (!au.isPlaying) { obj.SetActive(false); } } } } public class control_component : MonoBehaviour { public GameObject Comp; public GameObject Comp2; public GameObject Rot; private bool is45; private void Start() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (Rot.transform.localEulerAngles.x > 45f) { is45 = true; } if (Rot.transform.localEulerAngles.x < 45f) { is45 = false; } } private void over45() { if (is45) { Comp.SetActive(false); Comp2.SetActive(true); } is45 = false; } private void under45() { if (!is45) { Comp2.SetActive(false); Comp.SetActive(true); } is45 = true; } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (Rot.transform.localEulerAngles.x > 45f) { over45(); } if (Rot.transform.localEulerAngles.x < 45f) { under45(); } } } } namespace JerryAr.PAK36 { [BepInPlugin("JerryAr.PAK36", "PAK36", "1.0.0")] [BepInProcess("h3vr.exe")] [Description("Built with MeatKit")] [BepInDependency("h3vr.otherloader", "1.3.0")] public class PAK36Plugin : 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.PAK36"); OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.PAK36", "", "", "pak36", ""); } } } [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 AutoLevel : MonoBehaviour { public enum TAircraftControllerType { bypass, helicopter_autolevel } public ConstantForce CF; public GAircraft aircraft = null; public TAircraftControllerType type = TAircraftControllerType.bypass; public float pitchLimit = 25f; public float pitchMultiplier = 2f; public float yawLimit = 55f; public float yawMultiplier = 1.5f; public float rollLimit = 45f; public float rollMultiplier = 1.5f; private float auto_ailerons = 0f; private float auto_ailerons_filtered = 0f; private float auto_ailerons_filter_coeficient = 0.01f; private float auto_elevator = 0f; private float auto_elevator_filtered = 0f; private float auto_elevator_filter_coeficient = 0.01f; private float auto_rudder = 0f; private float auto_rudder_filtered = 0f; private float auto_rudder_filter_coeficient = 0.01f; private float auto_rudder_target = 0f; private float auto_throttle = 0f; private float auto_throttle_filtered = 0f; private float auto_throttle_filter_coeficient = 0.01f; private float auto_throttle_target = 0f; public FVRPhysicalObject stick; public float cthrottle_filter_coef; public float cthrottle_automanual_coef; public float cthrottle_coef; public float crudder_filter_coef; public float crudder_coef; public float crudder_automanual_coef; public float celevator_coef; public float celevator_automanual_coef; public float cailerons_coef; public float cailerons_automanual_coef; private void Start() { } private void FixedUpdate() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: 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_02fb: 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) Vector3 zero = Vector3.zero; TAircraftControllerType tAircraftControllerType = type; if (tAircraftControllerType == TAircraftControllerType.bypass || tAircraftControllerType != TAircraftControllerType.helicopter_autolevel) { ((Behaviour)CF).enabled = true; GPivot.setAnyPivot("cailerons", aircraft.inputAilerons_output); GPivot.setAnyPivot("celevator", aircraft.inputElevator_output); GPivot.setAnyPivot("crudder", aircraft.inputRudder_output); GPivot.setAnyPivot("cthrottle", aircraft.inputThrottle_output); return; } ((Behaviour)CF).enabled = false; float num = 0.01f; float num2 = 0.4f; float num3 = 0.4f; float num4 = 0.1f; float num5 = 0.4f; float num6 = 0.2f; float num7 = 0.01f; float num8 = 0.2f; float num9 = 0.01f; float num10 = 0.2f; zero = ((Component)this).gameObject.transform.eulerAngles; if (zero.x > 180f) { zero.x -= 360f; } if (zero.y > 180f) { zero.y -= 360f; } if (zero.z > 180f) { zero.z -= 360f; } if (auto_rudder_target < zero.y - 180f) { auto_rudder_target += 360f; } if (auto_rudder_target > zero.y + 180f) { auto_rudder_target -= 360f; } auto_rudder_target = auto_rudder_target * (1f - num4) + zero.y * num4; auto_throttle_target = auto_throttle_target * (1f - num) + ((Component)this).gameObject.transform.position.y * num; auto_ailerons = 0.5f + zero.z * num9; if (auto_ailerons < 0f) { auto_ailerons = 0f; } if (auto_ailerons > 1f) { auto_ailerons = 1f; } auto_elevator = 0.5f + zero.x * num7; if (auto_elevator < 0f) { auto_elevator = 0f; } if (auto_elevator > 1f) { auto_elevator = 1f; } auto_rudder = 0.5f + (auto_rudder_target - zero.y) * num5; if (auto_rudder < 0f) { auto_rudder = 0f; } if (auto_rudder > 1f) { auto_rudder = 1f; } auto_throttle = (auto_throttle_target - ((Component)this).gameObject.transform.position.y) * num3; if (auto_throttle < 0.2f) { auto_throttle = 0.2f; } if (auto_throttle > 0.8f) { auto_throttle = 0.8f; } GPivot.setAnyPivot("cailerons", auto_ailerons * num10 + aircraft.inputAilerons_output * (1f - num10)); GPivot.setAnyPivot("celevator", auto_elevator * num8 + aircraft.inputElevator_output * (1f - num8)); GPivot.setAnyPivot("crudder", auto_rudder * num6 + aircraft.inputRudder_output * (1f - num6)); GPivot.setAnyPivot("cthrottle", auto_throttle * num2 + aircraft.inputThrottle_output * (1f - num2)); aircraft.inputAilerons_internal = auto_ailerons * num10 + aircraft.inputAilerons_output * (1f - num10); aircraft.inputElevator_internal = auto_elevator * num8 + aircraft.inputElevator_output * (1f - num8); aircraft.inputRudder_internal = auto_rudder * num6 + aircraft.inputRudder_output * (1f - num6); aircraft.inputThrottle_output = auto_throttle * num2 + (aircraft.inputThrottle_output + aircraft.inputThrottle_internal + aircraft.kThrottle_aft) * (1f - num2); } } public class AutoStab : MonoBehaviour { public bool isLaserRanged = false; public GameObject Xreftrue; public ParticleSystem PS; public Transform rotorbase; public LayerMask lm; public FVRPhysicalObject ThrottleGrab; public GLandingGear GF; public GLandingGear GL; public GLandingGear GR; public Transform laser; public LayerMask layermask; public float X; public float Z; public float Alt; public float curT = 0f; public GameObject engineswitch; public GameObject stickX; public GameObject throttle; public float fwdSpeed; public float uwdSpeed; public float fwddamp; public Vector3 uwddamp; public float uwdmul; public ConstantForce TRC; public Rigidbody heli; public GameObject engswitch; public GameObject apswitch; public Vector3 currenttrans; private void FixedUpdate() { //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_014d: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_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_0219: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_0592: 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_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)ThrottleGrab).m_hand == (Object)null) { GL.brakeResidualForce = 1f; GR.brakeResidualForce = 1f; GF.brakeResidualForce = 1f; } else if ((Object)(object)((FVRInteractiveObject)ThrottleGrab).m_hand != (Object)null) { if (((FVRInteractiveObject)ThrottleGrab).m_hand.Input.TriggerPressed) { GL.brakeResidualForce = 0f; GR.brakeResidualForce = 0f; GF.brakeResidualForce = 0f; } else if (!((FVRInteractiveObject)ThrottleGrab).m_hand.Input.TriggerPressed) { GL.brakeResidualForce = 1f; GR.brakeResidualForce = 1f; GF.brakeResidualForce = 1f; } } Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)rotorbase).transform.position, -Vector3.up); ((Component)PS).gameObject.transform.eulerAngles = new Vector3(90f, 0f, 0f); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2, 7.5f, LayerMask.op_Implicit(lm)) && engineswitch.transform.localEulerAngles.x > 45f) { ((Component)PS).gameObject.transform.position = ((RaycastHit)(ref val2)).point; PS.Play(); } else if (!Physics.Raycast(val, ref val2, 7.5f, LayerMask.op_Implicit(lm)) || engineswitch.transform.localEulerAngles.x < 45f) { ((Component)PS).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); PS.Stop(); } if (apswitch.transform.localEulerAngles.x > 45f && engswitch.transform.localEulerAngles.x > 45f) { ((Behaviour)TRC).enabled = false; if (!isLaserRanged) { currenttrans = ((Component)heli).gameObject.transform.eulerAngles; isLaserRanged = true; } if (heli.drag < 50f) { heli.drag += Time.deltaTime; } else if (heli.drag >= 50f) { heli.drag = 50f; heli.isKinematic = true; } if (heli.angularDrag < 50f) { heli.angularDrag += 0.1f * Time.deltaTime; } else if (heli.angularDrag >= 10f) { heli.angularDrag = 10f; } if (currenttrans.x > 0f && currenttrans.x < 180f) { currenttrans.x = Mathf.SmoothDamp(currenttrans.x, 0f, ref X, 0.75f); } else if (currenttrans.x > 180f && currenttrans.x < 360f) { currenttrans.x = Mathf.SmoothDamp(currenttrans.x, 360f, ref X, 0.75f); } if (currenttrans.z > 0f && currenttrans.z < 180f) { currenttrans.z = Mathf.SmoothDamp(currenttrans.z, 0f, ref Z, 0.75f); } else if (currenttrans.z > 180f && currenttrans.z < 360f) { currenttrans.z = Mathf.SmoothDamp(currenttrans.z, 360f, ref Z, 0.75f); } ((Component)heli).gameObject.transform.eulerAngles = new Vector3(currenttrans.x, ((Component)heli).gameObject.transform.eulerAngles.y, currenttrans.z); throttle.transform.localEulerAngles = new Vector3(0f, 0f, 18.5f); } else if (apswitch.transform.localEulerAngles.x < 45f || engineswitch.transform.localEulerAngles.x < 45f) { ((Behaviour)TRC).enabled = true; heli.isKinematic = false; heli.drag = 0f; heli.angularDrag = 0.05f; isLaserRanged = false; } } } public class EngineStartActivate : MonoBehaviour { public GameObject engineswitch; public GameObject lever; public MonoBehaviour delete; public MonoBehaviour crash1; public MonoBehaviour crash2; public MonoBehaviour crash3; public MonoBehaviour crash4; public MonoBehaviour crash5; public MonoBehaviour damagetail; public MonoBehaviour tailbreak; private void Start() { } private void FixedUpdate() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (!((Object)(object)delete == (Object)null) && !((Object)(object)crash1 == (Object)null) && !((Object)(object)crash2 == (Object)null) && !((Object)(object)crash3 == (Object)null) && !((Object)(object)crash4 == (Object)null) && !((Object)(object)crash5 == (Object)null) && !((Object)(object)damagetail == (Object)null) && !((Object)(object)tailbreak == (Object)null)) { if (engineswitch.transform.localEulerAngles.x < 45f || lever.transform.localEulerAngles.x > 45f) { ((Behaviour)delete).enabled = false; ((Behaviour)crash1).enabled = false; ((Behaviour)crash2).enabled = false; ((Behaviour)crash3).enabled = false; ((Behaviour)crash4).enabled = false; ((Behaviour)crash5).enabled = false; ((Behaviour)damagetail).enabled = false; ((Behaviour)tailbreak).enabled = false; } else if (engineswitch.transform.localEulerAngles.x > 45f && lever.transform.localEulerAngles.x < 45f) { ((Behaviour)delete).enabled = true; ((Behaviour)crash1).enabled = true; ((Behaviour)crash2).enabled = true; ((Behaviour)crash3).enabled = true; ((Behaviour)crash4).enabled = true; ((Behaviour)crash5).enabled = true; ((Behaviour)damagetail).enabled = true; ((Behaviour)tailbreak).enabled = true; } } } } public class LiveryToggle : MonoBehaviour { public tailbreak tb; public Texture tx1_1; public Texture tx1_2; public Texture tx1_3; public Texture tx1_4; public Texture tx1_5; public Texture tx1_6; public Texture tx2_1; public Texture tx2_2; public Texture tx2_3; public Texture tx2_4; public Texture tx2_5; public Texture tx2_6; public Texture tx3_1; public Texture tx3_2; public Texture tx3_3; public Texture tx3_4; public Texture tx3_5; public Texture tx3_6; public Texture tx4_1; public Texture tx4_2; public Texture tx4_3; public Texture tx4_4; public Texture tx4_5; public Texture tx4_6; public Texture tx5_1; public Texture tx5_2; public Texture tx5_3; public Texture tx5_4; public Texture tx5_5; public Texture tx5_6; public Material mt1; public Material mt2; public Material mt3; public Material mt4; public Material mt5; public Material mt6; public GameObject piece; private bool lv1 = true; private bool lv2 = false; private bool lv3 = false; private bool lv4 = false; private bool lv5 = false; public GameObject FuturisticKit; public GameObject OldDoor1; public GameObject OldDoor2; public GameObject NewDoor1; public GameObject NewDoor2; public GameObject NewNose; public GameObject NewRear; public GameObject CheekArmor; private void Start() { mt1.SetTexture("_MainTex", tx1_1); mt2.SetTexture("_MainTex", tx1_2); mt3.SetTexture("_MainTex", tx1_3); mt4.SetTexture("_MainTex", tx1_4); mt5.SetTexture("_MainTex", tx1_5); mt6.SetTexture("_MainTex", tx1_6); mt6.SetFloat("_EmissionWeight", 1f); } private void Livery1() { if (!lv1) { lv1 = true; lv2 = false; lv3 = false; lv4 = false; lv5 = false; mt1.SetTexture("_MainTex", tx1_1); mt2.SetTexture("_MainTex", tx1_2); mt3.SetTexture("_MainTex", tx1_3); mt4.SetTexture("_MainTex", tx1_4); mt5.SetTexture("_MainTex", tx1_5); mt6.SetTexture("_MainTex", tx1_6); OldDoor1.SetActive(true); OldDoor2.SetActive(true); NewDoor1.SetActive(false); NewDoor2.SetActive(false); NewNose.SetActive(false); NewRear.SetActive(false); CheekArmor.SetActive(true); FuturisticKit.SetActive(false); } else if (!lv1) { } } private void Livery2() { if (!lv2) { lv1 = false; lv2 = true; lv3 = false; lv4 = false; lv5 = false; mt1.SetTexture("_MainTex", tx2_1); mt2.SetTexture("_MainTex", tx2_2); mt3.SetTexture("_MainTex", tx2_3); mt4.SetTexture("_MainTex", tx2_4); mt5.SetTexture("_MainTex", tx2_5); mt6.SetTexture("_MainTex", tx2_6); OldDoor1.SetActive(false); OldDoor2.SetActive(false); NewDoor1.SetActive(true); NewDoor2.SetActive(true); NewNose.SetActive(true); NewRear.SetActive(true); CheekArmor.SetActive(false); FuturisticKit.SetActive(false); } else if (!lv2) { } } private void Livery3() { if (!lv3) { lv1 = false; lv2 = false; lv3 = true; lv4 = false; lv5 = false; mt1.SetTexture("_MainTex", tx3_1); mt2.SetTexture("_MainTex", tx3_2); mt3.SetTexture("_MainTex", tx3_3); mt4.SetTexture("_MainTex", tx3_4); mt5.SetTexture("_MainTex", tx3_5); mt6.SetTexture("_MainTex", tx3_6); OldDoor1.SetActive(true); OldDoor2.SetActive(true); NewDoor1.SetActive(false); NewDoor2.SetActive(false); NewNose.SetActive(false); NewRear.SetActive(false); CheekArmor.SetActive(true); FuturisticKit.SetActive(false); } else if (!lv3) { } } private void Livery4() { if (!lv4) { lv1 = false; lv2 = false; lv3 = false; lv4 = true; lv5 = false; mt1.SetTexture("_MainTex", tx4_1); mt2.SetTexture("_MainTex", tx4_2); mt3.SetTexture("_MainTex", tx4_3); mt4.SetTexture("_MainTex", tx4_4); mt5.SetTexture("_MainTex", tx4_5); mt6.SetTexture("_MainTex", tx4_6); OldDoor1.SetActive(true); OldDoor2.SetActive(true); NewDoor1.SetActive(false); NewDoor2.SetActive(false); NewNose.SetActive(false); NewRear.SetActive(false); CheekArmor.SetActive(true); FuturisticKit.SetActive(true); } else if (!lv4) { } } private void Livery5() { if (!lv5) { lv1 = false; lv2 = false; lv3 = false; lv4 = false; lv5 = true; mt1.SetTexture("_MainTex", tx5_1); mt2.SetTexture("_MainTex", tx5_2); mt3.SetTexture("_MainTex", tx5_3); mt4.SetTexture("_MainTex", tx5_4); mt5.SetTexture("_MainTex", tx5_5); mt6.SetTexture("_MainTex", tx5_6); OldDoor1.SetActive(true); OldDoor2.SetActive(true); NewDoor1.SetActive(false); NewDoor2.SetActive(false); NewNose.SetActive(false); NewRear.SetActive(false); CheekArmor.SetActive(true); FuturisticKit.SetActive(false); } else if (!lv5) { } } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0154: 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_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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) if (piece.transform.localPosition.y >= 0f && piece.transform.localPosition.y < 1f) { Livery1(); } else if (piece.transform.localPosition.y >= 1f && piece.transform.localPosition.y < 2f) { Livery2(); } else if (piece.transform.localPosition.y >= 2f && piece.transform.localPosition.y < 3f) { Livery3(); } else if (piece.transform.localPosition.y >= 3f && piece.transform.localPosition.y < 4f) { Livery4(); } else if (piece.transform.localPosition.y >= 4f && piece.transform.localPosition.y < 5f) { Livery5(); } if (tb.crashed) { mt6.SetFloat("_EmissionWeight", 0f); } } } public class ObjectShake : MonoBehaviour { public enum ShakeDirection { Horizontal, Vertical, Both } public float shakeAmount = 0.1f; public float shakeTime = 0.3f; private void Start() { } private void Update() { } public void ShakeCoroutine(Transform transform, ShakeDirection shakeDirection, float shakeAmount, bool shake) { //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_009b: 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_0083: 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) Vector3 localPosition = transform.localPosition; while (shake) { float num = Random.Range(-1f, 1f) * shakeAmount; float num2 = Random.Range(-1f, 1f) * shakeAmount; float num3 = 0f; switch (shakeDirection) { case ShakeDirection.Horizontal: num2 = 0f; break; case ShakeDirection.Vertical: num = 0f; break; case ShakeDirection.Both: num3 = Random.Range(-1f, 1f) * shakeAmount; break; } transform.localPosition = localPosition + new Vector3(num, num2, num3); } transform.localPosition = localPosition; } } public class VortexAndTailRoter : MonoBehaviour { public GameObject engineswitch; public Rigidbody RB; public GameObject speedmeter; public GameObject verticlemeter; public float weight; public ObjectShake shake; public ScreenShakeVR ssvr; public tailbreak tb; private void Start() { } private void Update() { //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_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (tb.crashed) { ((Behaviour)ssvr).enabled = true; } else if (!tb.crashed) { ((Behaviour)ssvr).enabled = false; } if (engineswitch.transform.localEulerAngles.x > 45f) { if (verticlemeter.transform.localEulerAngles.y > 45f && verticlemeter.transform.localEulerAngles.y < 90f && speedmeter.transform.localEulerAngles.y > 345f && speedmeter.transform.localEulerAngles.y < 360f) { RB.mass = Mathf.SmoothDamp(RB.mass, 1000f + (15f - speedmeter.transform.localEulerAngles.y) * 100f, ref weight, 5f); shake.ShakeCoroutine(((Component)shake).gameObject.transform, ObjectShake.ShakeDirection.Both, 1.5f - speedmeter.transform.localEulerAngles.y * 0.1f, shake: true); ((Behaviour)ssvr).enabled = true; } else { RB.mass = 1000f; shake.ShakeCoroutine(((Component)shake).gameObject.transform, ObjectShake.ShakeDirection.Both, 1.5f - speedmeter.transform.localEulerAngles.y * 0.1f, shake: false); ((Behaviour)ssvr).enabled = false; } } else { RB.mass = 1000f; shake.ShakeCoroutine(((Component)shake).gameObject.transform, ObjectShake.ShakeDirection.Both, 1.5f - speedmeter.transform.localEulerAngles.y * 0.1f, shake: false); ((Behaviour)ssvr).enabled = false; } } } } public class NoCrash : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class SelfDestruction : MonoBehaviour { public Transform hitpoint; public Transform scanpos; public LayerMask lm; public GameObject phys; public GameObject physdoor1; public GameObject physdoor2; public GameObject physdoor3; public GameObject physpylon; public GameObject Scrap; public tailbreak tb; public GameObject button; public GameObject explosion; public GameObject explode; public GameObject plane; public GameObject left; public GameObject right; public GameObject left2; public GameObject right2; public GameObject carrier; public GameObject stickbase; public FVRPhysicalObject stick; public FVRPhysicalObject throttle; public float countdown = 15f; public bool startexplosion = false; public bool exploded = false; public bool scrapped = false; public AR15HandleSightFlipper crashallow; private void Start() { } 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_018f: 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_0199: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: 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) if ((Object)(object)tb == (Object)null) { return; } if (button.transform.localEulerAngles.x > 45f) { startexplosion = true; crashallow.m_isLargeAperture = false; } if (countdown >= 0f && startexplosion) { countdown -= 1f * Time.deltaTime; ((FVRInteractiveObject)stick).ForceBreakInteraction(); ((FVRInteractiveObject)throttle).ForceBreakInteraction(); } if (countdown < 10f && (Object)(object)tb != (Object)null) { tb.crashed = true; } if (countdown < 6f) { if (!exploded) { Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); exploded = true; } phys.SetActive(false); physdoor1.SetActive(false); physdoor2.SetActive(false); physdoor3.SetActive(false); physpylon.SetActive(false); } if (countdown < 5.5f) { Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)scanpos).transform.position, -Vector3.up); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2, 100f, LayerMask.op_Implicit(lm)) && !scrapped) { hitpoint.position = ((RaycastHit)(ref val2)).point; hitpoint.eulerAngles = ((RaycastHit)(ref val2)).normal; Object.Instantiate(Scrap, hitpoint.position, hitpoint.rotation); scrapped = true; } } if (countdown <= 0f) { Object.Destroy((Object)(object)left); Object.Destroy((Object)(object)right); Object.Destroy((Object)(object)left2); Object.Destroy((Object)(object)right2); Object.Destroy((Object)(object)carrier); Object.Destroy((Object)(object)stickbase); Object.Destroy((Object)(object)((Component)stick).gameObject); Object.Destroy((Object)(object)((Component)throttle).gameObject); Object.Destroy((Object)(object)plane); } } } public class Slotarea1 : MonoBehaviour { public GameObject parent; public string Exception; private void OnTriggerStay(Collider other) { GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && !((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null && ((Object)((Component)component).gameObject).name != Exception) { 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) { GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && ((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null && ((Object)((Component)component).gameObject).name != Exception) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = true; component2.isKinematic = false; } } } } public class SosigCarrier : MonoBehaviour { public Rigidbody rigid; public GameObject hingeDoor; public GameObject hingeToggle; public List torso; public GameObject[] fakeSosig; public Transform enterPoint; public Transform[] poses; public SosigWeapon[] sosigW1; public SosigWeapon[] sosigW2; public SosigWeapon[] sosigW3; public SosigWeapon[] sosigW4; public bool[] isStoped; public bool[] isSet; public Vector3 GetValidNavPosition(Vector3 position) { //IL_0001: 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_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_0029: Unknown result type (might be due to invalid IL or missing references) NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(position, ref val, 50f, -1)) { return ((NavMeshHit)(ref val)).position; } return position; } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count < 8) { torso.Add(((Component)other).gameObject.GetComponent()); } if (torso.Count <= 8) { } } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count >= 0) { torso.Remove(((Component)other).gameObject.GetComponent()); } if (torso.Count >= 0) { } } } public void Unload() { } 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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_016f: 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_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Invalid comparison between Unknown and I4 //IL_0ba5: Unknown result type (might be due to invalid IL or missing references) //IL_0bab: Invalid comparison between Unknown and I4 if (hingeDoor.transform.localEulerAngles.x < 45f) { } if (!(hingeDoor.transform.localEulerAngles.x > 45f)) { return; } if (hingeToggle.transform.localEulerAngles.x < 45f) { for (int i = 0; i < torso.Count; i++) { torso[i].S.BodyState = (SosigBodyState)0; torso[i].S.SetCurrentOrder((SosigOrder)1); torso[i].S.SetMovementSpeed((SosigMoveSpeed)4); torso[i].S.MoveSpeed = (SosigMoveSpeed)4; torso[i].S.SetAssaultSpeed((SosigMoveSpeed)4); torso[i].S.SetGuardInvestigateDistanceThreshold(0f); torso[i].S.CoverSearchRange = 0f; torso[i].S.m_guardPoint = enterPoint.position; ((Behaviour)torso[i].S.Agent).enabled = true; if (Vector3.Distance(((Component)torso[i].S).transform.position, enterPoint.position) < 2f) { fakeSosig[i].SetActive(true); sosigW1[i] = torso[i].S.Hand_Primary.HeldObject; sosigW2[i] = torso[i].S.Hand_Secondary.HeldObject; sosigW3[i] = torso[i].S.Inventory.Slots[0].HeldObject; sosigW4[i] = torso[i].S.Inventory.Slots[1].HeldObject; if ((Object)(object)sosigW1[i] == (Object)null) { } if ((Object)(object)sosigW2[i] == (Object)null) { } if ((Object)(object)sosigW3[i] == (Object)null) { } if ((Object)(object)sosigW4[i] == (Object)null) { } if ((Object)(object)sosigW1[i] != (Object)null) { ((Component)sosigW1[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW1[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW2[i] != (Object)null) { ((Component)sosigW2[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW2[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW3[i] != (Object)null) { ((Component)sosigW3[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW3[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW4[i] != (Object)null) { ((Component)sosigW4[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW4[i]).gameObject.SetActive(false); } ((Component)torso[i].S).gameObject.transform.parent = ((Component)enterPoint).transform; isSet[i] = false; if (!isStoped[i]) { ((Joint)((Component)torso[i].S.Links[0]).gameObject.AddComponent()).connectedBody = rigid; ((Joint)((Component)torso[i].S.Links[1]).gameObject.AddComponent()).connectedBody = rigid; ((Joint)((Component)torso[i].S.Links[2]).gameObject.AddComponent()).connectedBody = rigid; ((Joint)((Component)torso[i].S.Links[3]).gameObject.AddComponent()).connectedBody = rigid; isStoped[i] = true; } ((Component)torso[i].S.Links[0]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[1]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[2]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[3]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S).gameObject.SetActive(false); ((Component)torso[i].S.Links[0]).gameObject.SetActive(false); ((Component)torso[i].S.Links[1]).gameObject.SetActive(false); ((Component)torso[i].S.Links[2]).gameObject.SetActive(false); ((Component)torso[i].S.Links[3]).gameObject.SetActive(false); ((Behaviour)torso[i].S.Agent).enabled = false; } if ((Object)(object)torso[i] == (Object)null || (int)torso[i].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[i]); } if (torso.Count >= 0) { } } } } if (!(hingeToggle.transform.localEulerAngles.x > 45f)) { return; } for (int j = 0; j < torso.Count; j++) { fakeSosig[j].SetActive(false); isStoped[j] = false; if (!isSet[j]) { Vector3 validNavPosition = GetValidNavPosition(poses[j].position); ((Component)torso[j].S).gameObject.transform.position = validNavPosition; Object.Destroy((Object)(object)((Component)torso[j].S.Links[0]).gameObject.GetComponent()); Object.Destroy((Object)(object)((Component)torso[j].S.Links[1]).gameObject.GetComponent()); Object.Destroy((Object)(object)((Component)torso[j].S.Links[2]).gameObject.GetComponent()); Object.Destroy((Object)(object)((Component)torso[j].S.Links[3]).gameObject.GetComponent()); isSet[j] = true; } ((Behaviour)torso[j].S.Agent).enabled = true; ((Component)torso[j].S).gameObject.transform.parent = null; ((Component)torso[j].S).gameObject.SetActive(true); ((Component)torso[j].S.Links[0]).gameObject.SetActive(true); ((Component)torso[j].S.Links[1]).gameObject.SetActive(true); ((Component)torso[j].S.Links[2]).gameObject.SetActive(true); ((Component)torso[j].S.Links[3]).gameObject.SetActive(true); ((Component)torso[j].S.Links[0]).gameObject.transform.parent = null; ((Component)torso[j].S.Links[1]).gameObject.transform.parent = null; ((Component)torso[j].S.Links[2]).gameObject.transform.parent = null; ((Component)torso[j].S.Links[3]).gameObject.transform.parent = null; if ((Object)(object)sosigW1[j] != (Object)null) { ((Component)sosigW1[j]).gameObject.transform.parent = null; ((Component)sosigW1[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW2[j] != (Object)null) { ((Component)sosigW2[j]).gameObject.transform.parent = null; ((Component)sosigW2[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW3[j] != (Object)null) { ((Component)sosigW3[j]).gameObject.transform.parent = null; ((Component)sosigW3[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW4[j] != (Object)null) { ((Component)sosigW4[j]).gameObject.transform.parent = null; ((Component)sosigW4[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW1[j] == (Object)null) { } if ((Object)(object)sosigW2[j] == (Object)null) { } if ((Object)(object)sosigW3[j] == (Object)null) { } if ((Object)(object)sosigW4[j] == (Object)null) { } torso[j].S.SetCurrentOrder((SosigOrder)6); if ((Object)(object)torso[j] == (Object)null || (int)torso[j].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[j]); } if (torso.Count >= 0) { } } } } } public class SosigCarrierV2 : MonoBehaviour { public Rigidbody rigid; public GameObject hingeDoor; public GameObject hingeToggle; public List torso; public GameObject[] fakeSosig; public Transform enterPoint; public Transform[] poses; public SosigWeapon[] sosigW1; public SosigWeapon[] sosigW2; public SosigWeapon[] sosigW3; public SosigWeapon[] sosigW4; public bool isUnloading = false; public Vector3 GetValidNavPosition(Vector3 position) { //IL_0001: 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_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_0029: Unknown result type (might be due to invalid IL or missing references) NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(position, ref val, 50f, -1)) { return ((NavMeshHit)(ref val)).position; } return position; } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count < 8) { torso.Add(((Component)other).gameObject.GetComponent()); } if (torso.Count <= 8) { } } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count >= 0) { torso.Remove(((Component)other).gameObject.GetComponent()); } if (torso.Count >= 0) { } } } private bool IsDoorOpen() { //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_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_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) if (hingeDoor.transform.localEulerAngles.x > 45f) { if (hingeToggle.transform.localEulerAngles.x < 45f) { return true; } if (hingeToggle.transform.localEulerAngles.x >= 45f) { return false; } } return false; } private void LoadSosigs() { //IL_001b: 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_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_0105: 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_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Invalid comparison between Unknown and I4 for (int i = 0; i < torso.Count; i++) { torso[i].S.BodyState = (SosigBodyState)0; torso[i].S.SetCurrentOrder((SosigOrder)1); torso[i].S.SetMovementSpeed((SosigMoveSpeed)4); torso[i].S.MoveSpeed = (SosigMoveSpeed)4; torso[i].S.SetAssaultSpeed((SosigMoveSpeed)4); torso[i].S.SetGuardInvestigateDistanceThreshold(0f); torso[i].S.CoverSearchRange = 0f; torso[i].S.m_guardPoint = enterPoint.position; ((Behaviour)torso[i].S.Agent).enabled = true; if (Vector3.Distance(((Component)torso[i].S).transform.position, enterPoint.position) < 2f) { fakeSosig[i].SetActive(true); sosigW1[i] = torso[i].S.Hand_Primary.HeldObject; sosigW2[i] = torso[i].S.Hand_Secondary.HeldObject; sosigW3[i] = torso[i].S.Inventory.Slots[0].HeldObject; sosigW4[i] = torso[i].S.Inventory.Slots[1].HeldObject; if ((Object)(object)sosigW1[i] == (Object)null) { } if ((Object)(object)sosigW2[i] == (Object)null) { } if ((Object)(object)sosigW3[i] == (Object)null) { } if ((Object)(object)sosigW4[i] == (Object)null) { } if ((Object)(object)sosigW1[i] != (Object)null) { ((Component)sosigW1[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW1[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW2[i] != (Object)null) { ((Component)sosigW2[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW2[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW3[i] != (Object)null) { ((Component)sosigW3[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW3[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW4[i] != (Object)null) { ((Component)sosigW4[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW4[i]).gameObject.SetActive(false); } ((Component)torso[i].S).gameObject.transform.parent = ((Component)enterPoint).transform; torso[i].S.Agent.isStopped = true; if ((Object)(object)((Component)torso[i].S.Links[0]).gameObject.GetComponent() == (Object)null) { ((Joint)((Component)torso[i].S.Links[0]).gameObject.AddComponent()).connectedBody = rigid; } if ((Object)(object)((Component)torso[i].S.Links[1]).gameObject.GetComponent() == (Object)null) { ((Joint)((Component)torso[i].S.Links[1]).gameObject.AddComponent()).connectedBody = rigid; } if ((Object)(object)((Component)torso[i].S.Links[2]).gameObject.GetComponent() == (Object)null) { ((Joint)((Component)torso[i].S.Links[2]).gameObject.AddComponent()).connectedBody = rigid; } if ((Object)(object)((Component)torso[i].S.Links[3]).gameObject.GetComponent() == (Object)null) { ((Joint)((Component)torso[i].S.Links[3]).gameObject.AddComponent()).connectedBody = rigid; } ((Component)torso[i].S.Links[0]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[1]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[2]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[3]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S).gameObject.SetActive(false); ((Component)torso[i].S.Links[0]).gameObject.SetActive(false); ((Component)torso[i].S.Links[1]).gameObject.SetActive(false); ((Component)torso[i].S.Links[2]).gameObject.SetActive(false); ((Component)torso[i].S.Links[3]).gameObject.SetActive(false); ((Behaviour)torso[i].S.Agent).enabled = false; } if ((Object)(object)torso[i] == (Object)null || (int)torso[i].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[i]); } if (torso.Count >= 0) { } } } } private IEnumerator UnloadSosigs() { isUnloading = true; for (int i = 0; i < torso.Count; i++) { fakeSosig[i].SetActive(false); Vector3 validPosition = GetValidNavPosition(enterPoint.position); torso[i].S.Agent.SetDestination(validPosition); torso[i].S.Agent.Warp(validPosition); ((Component)torso[i].S).gameObject.transform.position = validPosition; if ((Object)(object)((Component)torso[i].S.Links[0]).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)torso[i].S.Links[0]).gameObject.GetComponent()); } if ((Object)(object)((Component)torso[i].S.Links[1]).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)torso[i].S.Links[1]).gameObject.GetComponent()); } if ((Object)(object)((Component)torso[i].S.Links[2]).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)torso[i].S.Links[2]).gameObject.GetComponent()); } if ((Object)(object)((Component)torso[i].S.Links[3]).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)torso[i].S.Links[3]).gameObject.GetComponent()); } ((Behaviour)torso[i].S.Agent).enabled = true; ((Component)torso[i].S).gameObject.transform.parent = null; ((Component)torso[i].S).gameObject.SetActive(true); ((Component)torso[i].S.Links[0]).gameObject.SetActive(true); ((Component)torso[i].S.Links[1]).gameObject.SetActive(true); ((Component)torso[i].S.Links[2]).gameObject.SetActive(true); ((Component)torso[i].S.Links[3]).gameObject.SetActive(true); ((Component)torso[i].S.Links[0]).gameObject.transform.parent = null; ((Component)torso[i].S.Links[1]).gameObject.transform.parent = null; ((Component)torso[i].S.Links[2]).gameObject.transform.parent = null; ((Component)torso[i].S.Links[3]).gameObject.transform.parent = null; if ((Object)(object)sosigW1[i] != (Object)null) { ((Component)sosigW1[i]).gameObject.transform.parent = null; ((Component)sosigW1[i]).gameObject.SetActive(true); } if ((Object)(object)sosigW2[i] != (Object)null) { ((Component)sosigW2[i]).gameObject.transform.parent = null; ((Component)sosigW2[i]).gameObject.SetActive(true); } if ((Object)(object)sosigW3[i] != (Object)null) { ((Component)sosigW3[i]).gameObject.transform.parent = null; ((Component)sosigW3[i]).gameObject.SetActive(true); } if ((Object)(object)sosigW4[i] != (Object)null) { ((Component)sosigW4[i]).gameObject.transform.parent = null; ((Component)sosigW4[i]).gameObject.SetActive(true); } if ((Object)(object)sosigW1[i] == (Object)null) { } if ((Object)(object)sosigW2[i] == (Object)null) { } if ((Object)(object)sosigW3[i] == (Object)null) { } if ((Object)(object)sosigW4[i] == (Object)null) { } torso[i].S.SetCurrentOrder((SosigOrder)6); if ((Object)(object)torso[i] == (Object)null || (int)torso[i].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[i]); } if (torso.Count >= 0) { } } else { yield return (object)new WaitForSeconds(3f); isUnloading = false; } } } 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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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) if (hingeDoor.transform.localEulerAngles.x < 45f) { } if (!(hingeDoor.transform.localEulerAngles.x > 45f)) { return; } if (hingeToggle.transform.localEulerAngles.x < 45f) { if (isUnloading || torso.Count <= 0) { return; } LoadSosigs(); } if (hingeToggle.transform.localEulerAngles.x > 45f) { ((MonoBehaviour)this).StartCoroutine(UnloadSosigs()); } } } public class SosigCarrierV3 : MonoBehaviour { public Rigidbody rigid; public GameObject hingeDoor; public GameObject hingeToggle; public List torso; public GameObject[] fakeSosig; public Transform enterPoint; public Transform[] poses; public SosigWeapon[] sosigW1; public SosigWeapon[] sosigW2; public SosigWeapon[] sosigW3; public SosigWeapon[] sosigW4; public bool[] isStoped; public bool[] isSet; public Vector3 GetValidNavPosition(Vector3 position) { //IL_0001: 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_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_0029: Unknown result type (might be due to invalid IL or missing references) NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(position, ref val, 50f, -1)) { return ((NavMeshHit)(ref val)).position; } return position; } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count < 8) { torso.Add(((Component)other).gameObject.GetComponent()); } if (torso.Count <= 8) { } } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count >= 0) { torso.Remove(((Component)other).gameObject.GetComponent()); } if (torso.Count >= 0) { } } } public void Unload() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_044f: Invalid comparison between Unknown and I4 fakeSosig[0].SetActive(false); isStoped[0] = false; if (!isSet[0]) { Vector3 validNavPosition = GetValidNavPosition(poses[0].position); ((Component)torso[0].S).gameObject.transform.position = validNavPosition; Object.Destroy((Object)(object)((Component)torso[0].S.Links[0]).gameObject.GetComponent()); Object.Destroy((Object)(object)((Component)torso[0].S.Links[1]).gameObject.GetComponent()); Object.Destroy((Object)(object)((Component)torso[0].S.Links[2]).gameObject.GetComponent()); Object.Destroy((Object)(object)((Component)torso[0].S.Links[3]).gameObject.GetComponent()); isSet[0] = true; } ((Behaviour)torso[0].S.Agent).enabled = true; ((Component)torso[0].S).gameObject.transform.parent = null; ((Component)torso[0].S).gameObject.SetActive(true); ((Component)torso[0].S.Links[0]).gameObject.SetActive(true); ((Component)torso[0].S.Links[1]).gameObject.SetActive(true); ((Component)torso[0].S.Links[2]).gameObject.SetActive(true); ((Component)torso[0].S.Links[3]).gameObject.SetActive(true); ((Component)torso[0].S.Links[0]).gameObject.transform.parent = null; ((Component)torso[0].S.Links[1]).gameObject.transform.parent = null; ((Component)torso[0].S.Links[2]).gameObject.transform.parent = null; ((Component)torso[0].S.Links[3]).gameObject.transform.parent = null; if ((Object)(object)sosigW1[0] != (Object)null) { ((Component)sosigW1[0]).gameObject.transform.parent = null; ((Component)sosigW1[0]).gameObject.SetActive(true); } if ((Object)(object)sosigW2[0] != (Object)null) { ((Component)sosigW2[0]).gameObject.transform.parent = null; ((Component)sosigW2[0]).gameObject.SetActive(true); } if ((Object)(object)sosigW3[0] != (Object)null) { ((Component)sosigW3[0]).gameObject.transform.parent = null; ((Component)sosigW3[0]).gameObject.SetActive(true); } if ((Object)(object)sosigW4[0] != (Object)null) { ((Component)sosigW4[0]).gameObject.transform.parent = null; ((Component)sosigW4[0]).gameObject.SetActive(true); } if ((Object)(object)sosigW1[0] == (Object)null) { } if ((Object)(object)sosigW2[0] == (Object)null) { } if ((Object)(object)sosigW3[0] == (Object)null) { } if ((Object)(object)sosigW4[0] == (Object)null) { } torso[0].S.SetCurrentOrder((SosigOrder)6); if ((Object)(object)torso[0] == (Object)null || (int)torso[0].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[0]); } if (torso.Count >= 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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_016f: 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_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Invalid comparison between Unknown and I4 if (hingeDoor.transform.localEulerAngles.x < 45f) { } if (!(hingeDoor.transform.localEulerAngles.x > 45f)) { return; } if (hingeToggle.transform.localEulerAngles.x < 45f) { for (int i = 0; i < torso.Count; i++) { torso[i].S.BodyState = (SosigBodyState)0; torso[i].S.SetCurrentOrder((SosigOrder)1); torso[i].S.SetMovementSpeed((SosigMoveSpeed)4); torso[i].S.MoveSpeed = (SosigMoveSpeed)4; torso[i].S.SetAssaultSpeed((SosigMoveSpeed)4); torso[i].S.SetGuardInvestigateDistanceThreshold(0f); torso[i].S.CoverSearchRange = 0f; torso[i].S.m_guardPoint = enterPoint.position; ((Behaviour)torso[i].S.Agent).enabled = true; if (Vector3.Distance(((Component)torso[i].S).transform.position, enterPoint.position) < 2f) { fakeSosig[i].SetActive(true); sosigW1[i] = torso[i].S.Hand_Primary.HeldObject; sosigW2[i] = torso[i].S.Hand_Secondary.HeldObject; sosigW3[i] = torso[i].S.Inventory.Slots[0].HeldObject; sosigW4[i] = torso[i].S.Inventory.Slots[1].HeldObject; if ((Object)(object)sosigW1[i] == (Object)null) { } if ((Object)(object)sosigW2[i] == (Object)null) { } if ((Object)(object)sosigW3[i] == (Object)null) { } if ((Object)(object)sosigW4[i] == (Object)null) { } if ((Object)(object)sosigW1[i] != (Object)null) { ((Component)sosigW1[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW1[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW2[i] != (Object)null) { ((Component)sosigW2[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW2[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW3[i] != (Object)null) { ((Component)sosigW3[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW3[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW4[i] != (Object)null) { ((Component)sosigW4[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW4[i]).gameObject.SetActive(false); } ((Component)torso[i].S).gameObject.transform.parent = ((Component)enterPoint).transform; isSet[i] = false; if (!isStoped[i]) { ((Joint)((Component)torso[i].S.Links[0]).gameObject.AddComponent()).connectedBody = rigid; ((Joint)((Component)torso[i].S.Links[1]).gameObject.AddComponent()).connectedBody = rigid; ((Joint)((Component)torso[i].S.Links[2]).gameObject.AddComponent()).connectedBody = rigid; ((Joint)((Component)torso[i].S.Links[3]).gameObject.AddComponent()).connectedBody = rigid; isStoped[i] = true; } ((Component)torso[i].S.Links[0]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[1]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[2]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[3]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S).gameObject.SetActive(false); ((Component)torso[i].S.Links[0]).gameObject.SetActive(false); ((Component)torso[i].S.Links[1]).gameObject.SetActive(false); ((Component)torso[i].S.Links[2]).gameObject.SetActive(false); ((Component)torso[i].S.Links[3]).gameObject.SetActive(false); ((Behaviour)torso[i].S.Agent).enabled = false; } if ((Object)(object)torso[i] == (Object)null || (int)torso[i].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[i]); } if (torso.Count >= 0) { } } } } if (hingeToggle.transform.localEulerAngles.x > 45f && torso.Count > 0) { ((MonoBehaviour)this).InvokeRepeating("Unload", 1f, 1f); } } } public class SosigCarrierV4 : MonoBehaviour { public Rigidbody rigid; public GameObject hingeDoor; public GameObject hingeToggle; public List torso; public GameObject[] fakeSosig; public Transform enterPoint; public Transform[] poses; public SosigWeapon[] sosigW1; public SosigWeapon[] sosigW2; public SosigWeapon[] sosigW3; public SosigWeapon[] sosigW4; [Header("Base Info")] public SosigEnemyTemplate TemplateToUse; public SosigOrder CurrentOrder; public SosigOrder FallbackOrder; public int m_spawn_equipmentMode; public int m_spawnWithFullAmmo; public int m_spawn_iff; public List ActiveSosigs = new List(); public List SpawnPoints; [Header("PathTo Testing")] public List PathToPoints; public float PointNoise; public Vector2 PointLingerRange; public float PointTolerance; public SosigMoveSpeed MaxSpeed; public PathLoopType LoopType; public float LookLerpRange; public float LookCycleSpeed; public bool IsPatrol; public Vector3 GetValidNavPosition(Vector3 position) { //IL_0001: 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_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_0029: Unknown result type (might be due to invalid IL or missing references) NavMeshHit val = default(NavMeshHit); if (NavMesh.SamplePosition(position, ref val, 50f, -1)) { return ((NavMeshHit)(ref val)).position; } return position; } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count < 8) { torso.Add(((Component)other).gameObject.GetComponent()); } if (torso.Count < 8) { } } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count >= 0) { torso.Remove(((Component)other).gameObject.GetComponent()); } if (torso.Count >= 0) { } } } public void Unload() { } public int SpawnAccesoryToLink(List gs, SosigLink l, int index) { //IL_003f: 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 (gs.Count < 1) { return -1; } int num = Random.Range(0, gs.Count); if (index > -1) { num = index; } GameObject val = Object.Instantiate(((AnvilAsset)gs[num]).GetGameObject(), ((Component)l).transform.position, ((Component)l).transform.rotation); val.transform.SetParent(((Component)l).transform); SosigWearable component = val.GetComponent(); component.RegisterWearable(l); return num; } public Sosig SpawnSosigAndConfigureSosig(GameObject prefab, Vector3 pos, Quaternion rot, SosigConfigTemplate t, SosigOutfitConfig w) { //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) GameObject val = Object.Instantiate(prefab, pos, rot); Sosig componentInChildren = val.GetComponentInChildren(); float num = Random.Range(0f, 1f); int num2 = -1; if (num < w.Chance_Torsowear) { num2 = SpawnAccesoryToLink(w.Torsowear, componentInChildren.Links[1], -1); } num = Random.Range(0f, 1f); int index = -1; if (w.HeadUsesTorsoIndex) { index = num2; } if (num < w.Chance_Headwear) { SpawnAccesoryToLink(w.Headwear, componentInChildren.Links[0], index); } num = Random.Range(0f, 1f); int num3 = -1; if (w.PantsUsesTorsoIndex) { num3 = num2; } if (num < w.Chance_Pantswear) { num3 = SpawnAccesoryToLink(w.Pantswear, componentInChildren.Links[2], num3); } num = Random.Range(0f, 1f); int index2 = -1; if (w.PantsLowerUsesPantsIndex) { index2 = num3; } if (num < w.Chance_Pantswear_Lower) { SpawnAccesoryToLink(w.Pantswear_Lower, componentInChildren.Links[3], index2); } num = Random.Range(0f, 1f); if (num < w.Chance_Facewear) { SpawnAccesoryToLink(w.Facewear, componentInChildren.Links[0], -1); } num = Random.Range(0f, 1f); if (num < w.Chance_Eyewear) { SpawnAccesoryToLink(w.Eyewear, componentInChildren.Links[0], -1); } num = Random.Range(0f, 1f); if (num < w.Chance_Backpacks) { SpawnAccesoryToLink(w.Backpacks, componentInChildren.Links[1], -1); } num = Random.Range(0f, 1f); if (num < w.Chance_TorosDecoration) { SpawnAccesoryToLink(w.TorosDecoration, componentInChildren.Links[1], -1); } if (t.UsesLinkSpawns) { for (int i = 0; i < componentInChildren.Links.Count; i++) { float num4 = Random.Range(0f, 1f); if (num4 < t.LinkSpawnChance[i]) { componentInChildren.Links[i].RegisterSpawnOnDestroy(t.LinkSpawns[i]); } } } componentInChildren.Configure(t); componentInChildren.Inventory.FillAllAmmo(); return componentInChildren; } public SosigWeapon SpawnWeapon(List o) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(((AnvilAsset)o[Random.Range(0, o.Count)]).GetGameObject(), new Vector3(0f, 30f, 0f), Quaternion.identity); return val.GetComponent(); } public void SpawnSosigWithTemplate(SosigEnemyTemplate template, Vector3 position, Vector3 forward) { //IL_005f: 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) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0293: 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_0239: Unknown result type (might be due to invalid IL or missing references) FVRObject val = template.SosigPrefabs[Random.Range(0, template.SosigPrefabs.Count)]; SosigConfigTemplate t = template.ConfigTemplates[Random.Range(0, template.ConfigTemplates.Count)]; SosigOutfitConfig w = template.OutfitConfig[Random.Range(0, template.OutfitConfig.Count)]; Sosig val2 = SpawnSosigAndConfigureSosig(((AnvilAsset)val).GetGameObject(), position, Quaternion.LookRotation(forward, Vector3.up), t, w); val2.InitHands(); val2.Inventory.Init(); bool flag = false; if (m_spawn_equipmentMode < 4) { flag = true; } if (flag && template.WeaponOptions.Count > 0) { SosigWeapon val3 = SpawnWeapon(template.WeaponOptions); val3.SetAutoDestroy(true); val2.ForceEquip(val3); if ((int)val3.Type == 0 && m_spawnWithFullAmmo > 0) { val2.Inventory.FillAmmoWithType(val3.AmmoType); } } bool flag2 = false; if (m_spawn_equipmentMode == 0 || m_spawn_equipmentMode == 2 || (m_spawn_equipmentMode == 3 && Random.Range(0f, 1f) >= template.SecondaryChance)) { flag2 = true; } if (template.WeaponOptions_Secondary.Count > 0 && flag2) { SosigWeapon val4 = SpawnWeapon(template.WeaponOptions_Secondary); val4.SetAutoDestroy(true); val2.ForceEquip(val4); if ((int)val4.Type == 0 && m_spawnWithFullAmmo > 0) { val2.Inventory.FillAmmoWithType(val4.AmmoType); } } bool flag3 = false; if (m_spawn_equipmentMode == 0 || (m_spawn_equipmentMode == 3 && Random.Range(0f, 1f) >= template.TertiaryChance)) { flag3 = true; } if (template.WeaponOptions_Tertiary.Count > 0 && flag3) { SosigWeapon val5 = SpawnWeapon(template.WeaponOptions_Tertiary); val5.SetAutoDestroy(true); val2.ForceEquip(val5); if ((int)val5.Type == 0 && m_spawnWithFullAmmo > 0) { val2.Inventory.FillAmmoWithType(val5.AmmoType); } } int iFF = m_spawn_iff; if (m_spawn_iff >= 5) { iFF = Random.Range(6, 31); } val2.SetIFF(iFF); val2.CurrentOrder = (SosigOrder)9; val2.FallbackOrder = (SosigOrder)9; val2.UpdateGuardPoint(position); val2.SetDominantGuardDirection(forward); val2.UpdateAssaultPoint(position); val2.UpdateIdlePoint(position); ActiveSosigs.Add(val2); } 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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_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_0085: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_016f: 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_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Invalid comparison between Unknown and I4 //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Invalid comparison between Unknown and I4 if (hingeDoor.transform.localEulerAngles.x < 45f) { } if (!(hingeDoor.transform.localEulerAngles.x > 45f)) { return; } if (hingeToggle.transform.localEulerAngles.x < 45f) { for (int i = 0; i < torso.Count; i++) { torso[i].S.BodyState = (SosigBodyState)0; torso[i].S.SetCurrentOrder((SosigOrder)1); torso[i].S.SetMovementSpeed((SosigMoveSpeed)4); torso[i].S.MoveSpeed = (SosigMoveSpeed)4; torso[i].S.SetAssaultSpeed((SosigMoveSpeed)4); torso[i].S.SetGuardInvestigateDistanceThreshold(0f); torso[i].S.CoverSearchRange = 0f; torso[i].S.m_guardPoint = enterPoint.position; ((Behaviour)torso[i].S.Agent).enabled = true; if (Vector3.Distance(((Component)torso[i].S).transform.position, enterPoint.position) < 2f) { fakeSosig[i].SetActive(true); sosigW1[i] = torso[i].S.Hand_Primary.HeldObject; sosigW2[i] = torso[i].S.Hand_Secondary.HeldObject; sosigW3[i] = torso[i].S.Inventory.Slots[0].HeldObject; sosigW4[i] = torso[i].S.Inventory.Slots[1].HeldObject; if ((Object)(object)sosigW1[i] == (Object)null) { } if ((Object)(object)sosigW2[i] == (Object)null) { } if ((Object)(object)sosigW3[i] == (Object)null) { } if ((Object)(object)sosigW4[i] == (Object)null) { } if ((Object)(object)sosigW1[i] != (Object)null) { ((Component)sosigW1[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW1[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW2[i] != (Object)null) { ((Component)sosigW2[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW2[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW3[i] != (Object)null) { ((Component)sosigW3[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW3[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW4[i] != (Object)null) { ((Component)sosigW4[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW4[i]).gameObject.SetActive(false); } ((Component)torso[i].S).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[0]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[1]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[2]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[3]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S).gameObject.SetActive(false); ((Component)torso[i].S.Links[0]).gameObject.SetActive(false); ((Component)torso[i].S.Links[1]).gameObject.SetActive(false); ((Component)torso[i].S.Links[2]).gameObject.SetActive(false); ((Component)torso[i].S.Links[3]).gameObject.SetActive(false); ((Behaviour)torso[i].S.Agent).enabled = false; } if ((Object)(object)torso[i] == (Object)null || (int)torso[i].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[i]); } if (torso.Count >= 0) { } } } } if (!(hingeToggle.transform.localEulerAngles.x > 45f)) { return; } for (int j = 0; j < torso.Count; j++) { fakeSosig[j].SetActive(false); ((Behaviour)torso[j].S.Agent).enabled = true; ((Component)torso[j].S).gameObject.transform.parent = null; ((Component)torso[j].S).gameObject.SetActive(true); ((Component)torso[j].S.Links[0]).gameObject.SetActive(true); ((Component)torso[j].S.Links[1]).gameObject.SetActive(true); ((Component)torso[j].S.Links[2]).gameObject.SetActive(true); ((Component)torso[j].S.Links[3]).gameObject.SetActive(true); ((Component)torso[j].S.Links[0]).gameObject.transform.parent = null; ((Component)torso[j].S.Links[1]).gameObject.transform.parent = null; ((Component)torso[j].S.Links[2]).gameObject.transform.parent = null; ((Component)torso[j].S.Links[3]).gameObject.transform.parent = null; if ((Object)(object)sosigW1[j] != (Object)null) { ((Component)sosigW1[j]).gameObject.transform.parent = null; ((Component)sosigW1[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW2[j] != (Object)null) { ((Component)sosigW2[j]).gameObject.transform.parent = null; ((Component)sosigW2[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW3[j] != (Object)null) { ((Component)sosigW3[j]).gameObject.transform.parent = null; ((Component)sosigW3[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW4[j] != (Object)null) { ((Component)sosigW4[j]).gameObject.transform.parent = null; ((Component)sosigW4[j]).gameObject.SetActive(true); } if ((Object)(object)sosigW1[j] == (Object)null) { } if ((Object)(object)sosigW2[j] == (Object)null) { } if ((Object)(object)sosigW3[j] == (Object)null) { } if ((Object)(object)sosigW4[j] == (Object)null) { } torso[j].S.SetCurrentOrder((SosigOrder)6); if ((Object)(object)torso[j] == (Object)null || (int)torso[j].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[j]); } if (torso.Count >= 0) { } } } } } public class SosigCarrierV5 : MonoBehaviour { public SphereCollider col; public int length = 0; public Rigidbody rigid; public GameObject hingeDoor; public GameObject hingeToggle; public List torso; public GameObject[] fakeSosig; public Transform enterPoint; public Transform[] poses; public SosigWeapon[] sosigW1; public SosigWeapon[] sosigW2; public SosigWeapon[] sosigW3; public SosigWeapon[] sosigW4; [Header("Spawn Options")] [Header("Sosig Options")] public SosigEnemyID SosigType; public int IFF; public bool SpawnActive; public SosigOrder SpawnState; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count < 8) { torso.Add(((Component)other).gameObject.GetComponent()); } if (torso.Count < 8) { } } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && ((Component)other).gameObject.GetComponent().S.E.IFFCode == GM.CurrentPlayerBody.m_playerIFF) { if (torso.Count >= 0) { torso.Remove(((Component)other).gameObject.GetComponent()); } if (torso.Count >= 0) { } } } private void Update() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_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_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_018e: 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_01ca: 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_0616: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Invalid comparison between Unknown and I4 if (length > 8) { length = 8; } if (length < 0) { length = 0; } if (hingeDoor.transform.localEulerAngles.x < 45f) { col.radius = 0.001f; } if (!(hingeDoor.transform.localEulerAngles.x > 45f)) { return; } if (hingeToggle.transform.localEulerAngles.x < 45f) { col.radius = 5f; length = torso.Count; for (int i = 0; i < torso.Count; i++) { torso[i].S.BodyState = (SosigBodyState)0; torso[i].S.SetCurrentOrder((SosigOrder)7); torso[i].S.SetMovementSpeed((SosigMoveSpeed)4); torso[i].S.MoveSpeed = (SosigMoveSpeed)4; torso[i].S.SetAssaultSpeed((SosigMoveSpeed)4); torso[i].S.SetGuardInvestigateDistanceThreshold(0f); torso[i].S.CoverSearchRange = 0f; torso[i].S.m_assaultPoint = enterPoint.position; ((Behaviour)torso[i].S.Agent).enabled = true; if (Vector3.Distance(((Component)torso[i].S).transform.position, enterPoint.position) < 2f) { sosigW1[i] = torso[i].S.Hand_Primary.HeldObject; sosigW2[i] = torso[i].S.Hand_Secondary.HeldObject; sosigW3[i] = torso[i].S.Inventory.Slots[0].HeldObject; sosigW4[i] = torso[i].S.Inventory.Slots[1].HeldObject; if ((Object)(object)sosigW1[i] == (Object)null) { } if ((Object)(object)sosigW2[i] == (Object)null) { } if ((Object)(object)sosigW3[i] == (Object)null) { } if ((Object)(object)sosigW4[i] == (Object)null) { } if ((Object)(object)sosigW1[i] != (Object)null) { ((Component)sosigW1[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW1[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW2[i] != (Object)null) { ((Component)sosigW2[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW2[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW3[i] != (Object)null) { ((Component)sosigW3[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW3[i]).gameObject.SetActive(false); } if ((Object)(object)sosigW4[i] != (Object)null) { ((Component)sosigW4[i]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)sosigW4[i]).gameObject.SetActive(false); } ((Component)torso[i].S).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[0]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[1]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[2]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S.Links[3]).gameObject.transform.parent = ((Component)enterPoint).transform; ((Component)torso[i].S).gameObject.SetActive(false); ((Component)torso[i].S.Links[0]).gameObject.SetActive(false); ((Component)torso[i].S.Links[1]).gameObject.SetActive(false); ((Component)torso[i].S.Links[2]).gameObject.SetActive(false); ((Component)torso[i].S.Links[3]).gameObject.SetActive(false); ((Behaviour)torso[i].S.Agent).enabled = false; fakeSosig[i].SetActive(true); } if ((Object)(object)torso[i] == (Object)null || (int)torso[i].S.BodyState == 3) { if (torso.Count >= 0) { torso.Remove(torso[i]); fakeSosig[i].SetActive(false); } if (torso.Count >= 0) { } } } ((MonoBehaviour)this).CancelInvoke("Spawn"); } if (hingeToggle.transform.localEulerAngles.x > 45f) { col.radius = 0.001f; if (length > 0) { ((MonoBehaviour)this).InvokeRepeating("Spawn", 1f, 5f); } if (length <= 0) { ((MonoBehaviour)this).CancelInvoke("Spawn"); } } } public void Spawn() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0022: 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_005e: 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_0092: 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) if (length < 0) { return; } SpawnOptions val = new SpawnOptions(); val.SpawnActivated = SpawnActive; val.SpawnState = SpawnState; val.IFF = IFF; val.SpawnWithFullAmmo = true; val.EquipmentMode = (EquipmentSlots)7; val.SosigTargetPosition = ((Component)this).transform.position; val.SosigTargetRotation = ((Component)this).transform.eulerAngles; SpawnOptions val2 = val; SosigAPI.Spawn(ManagerSingleton.Instance.odicSosigObjsByID[SosigType], val2, ((Component)poses[length]).transform.position, ((Component)poses[length]).transform.rotation); length--; if ((Object)(object)torso[length] != (Object)null) { if ((Object)(object)sosigW1[length] != (Object)null) { Object.Destroy((Object)(object)((Component)sosigW1[length]).gameObject); } if ((Object)(object)sosigW2[length] != (Object)null) { Object.Destroy((Object)(object)((Component)sosigW2[length]).gameObject); } if ((Object)(object)sosigW3[length] != (Object)null) { Object.Destroy((Object)(object)((Component)sosigW3[length]).gameObject); } if ((Object)(object)sosigW4[length] != (Object)null) { Object.Destroy((Object)(object)((Component)sosigW4[length]).gameObject); } if ((Object)(object)sosigW1[length] == (Object)null) { } if ((Object)(object)sosigW2[length] == (Object)null) { } if ((Object)(object)sosigW3[length] == (Object)null) { } if ((Object)(object)sosigW4[length] == (Object)null) { } Object.Destroy((Object)(object)((Component)torso[length].S.Links[0]).gameObject); Object.Destroy((Object)(object)((Component)torso[length].S.Links[1]).gameObject); Object.Destroy((Object)(object)((Component)torso[length].S.Links[2]).gameObject); Object.Destroy((Object)(object)((Component)torso[length].S.Links[3]).gameObject); Object.Destroy((Object)(object)torso[length]); } torso.Remove(torso[length]); fakeSosig[length].SetActive(false); } private void OnDrawGizmos() { //IL_0015: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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) Gizmos.color = new Color(0.8f, 0.2f, 0.2f, 0.5f); Gizmos.DrawSphere(((Component)enterPoint).transform.position, 0.1f); Gizmos.DrawLine(((Component)enterPoint).transform.position, ((Component)enterPoint).transform.position + ((Component)enterPoint).transform.forward * 0.25f); } } public class StabTrigger : MonoBehaviour { public GameObject triggerrot; public AutoLevel AL; 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 (triggerrot.transform.localEulerAngles.x > 45f) { AL.type = AutoLevel.TAircraftControllerType.helicopter_autolevel; } else if (triggerrot.transform.localEulerAngles.x <= 45f) { AL.type = AutoLevel.TAircraftControllerType.bypass; } } } } namespace Cityrobo { public class MultiSpawnAnimalNoiseMaker : AnimalNoiseMaker { public FVRObject[] MoreSpawnOnHitObjects; [Tooltip("If used needs to be the same amount as the additional objects. Relative to object center.")] public Transform[] AdditionalSpawnPositions; public override void OnCollisionEnter(Collision col) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_00b7: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00ea: 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) if (base.SpawnOnHit && base.m_isPrimed && !base.m_hasSpawned && !((Object)(object)col.collider.attachedRigidbody != (Object)null) && !(Vector3.Angle(((ContactPoint)(ref col.contacts[0])).normal, Vector3.up) > 15f)) { Vector3 point = ((ContactPoint)(ref col.contacts[0])).point; Vector3 forward = GM.CurrentPlayerBody.Head.forward; forward.y = 0f; ((Vector3)(ref forward)).Normalize(); for (int i = 0; i < MoreSpawnOnHitObjects.Length; i++) { FVRObject val = MoreSpawnOnHitObjects[i]; Vector3 val2 = ((AdditionalSpawnPositions.Length <= 0) ? point : (point + AdditionalSpawnPositions[i].position - ((Component)this).transform.position)); Object.Instantiate(((AnvilAsset)val).GetGameObject(), val2, Quaternion.LookRotation(forward, Vector3.up)); } ((AnimalNoiseMaker)this).OnCollisionEnter(col); } } } } namespace JerryComponent { public class PAKCannon : MonoBehaviour { public GameObject trigger; public ClosedBoltWeapon gun; public Rigidbody main; public Rigidbody vWheel; public GameObject vMount; public float speedV = 0.1f; public HingeJoint jointV; private Vector3 velLinearWorldL; private Vector3 velLinearWorldR; public Transform slapDir; public float slapRange = 0.1f; private bool Slamed = false; public GameObject assistGeo; public float forwardValue; private float forref; public AudioEvent slap; public float speedrequired = 1f; private void FixedUpdate() { //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_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_0066: 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_0156: 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_0086: 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_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: 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_01bf: 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_0216: Unknown result type (might be due to invalid IL or missing references) gun.Chamber.IsAccessible = true; velLinearWorldL = GM.CurrentMovementManager.Hands[0].Input.VelLinearWorld; velLinearWorldR = GM.CurrentMovementManager.Hands[1].Input.VelLinearWorld; if (!Slamed && Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapDir.position) < 0.1f && Vector3.Angle(velLinearWorldL, slapDir.forward) < 50f && ((Vector3)(ref velLinearWorldL)).magnitude > speedrequired) { SM.PlayCoreSound((FVRPooledAudioType)41, slap, assistGeo.transform.position); if (gun.Chamber.IsFull && !gun.Chamber.IsSpent) { gun.Fire(); main.AddRelativeForce(new Vector3(0f, 5f, -1f), (ForceMode)2); } Slamed = true; } if (!Slamed && Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapDir.position) < 0.1f && Vector3.Angle(velLinearWorldR, slapDir.forward) < 50f && ((Vector3)(ref velLinearWorldR)).magnitude > speedrequired) { SM.PlayCoreSound((FVRPooledAudioType)41, slap, assistGeo.transform.position); if (gun.Chamber.IsFull && !gun.Chamber.IsSpent) { gun.Fire(); main.AddRelativeForce(new Vector3(0f, 5f, -1f), (ForceMode)2); } Slamed = true; } if (Slamed) { assistGeo.transform.localPosition = new Vector3(0f, 0f, Mathf.SmoothDamp(assistGeo.transform.localPosition.z, forwardValue, ref forref, 0.05f)); } else if (!Slamed) { assistGeo.transform.localPosition = new Vector3(0f, 0f, Mathf.SmoothDamp(assistGeo.transform.localPosition.z, 0f, ref forref, 0.1f)); } if (assistGeo.transform.localPosition.z >= forwardValue * 0.9f) { Slamed = false; } } private void Start() { } private void Update() { //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_009b: 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_0108: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gun == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } Vector3 val = ((Component)vWheel).transform.InverseTransformVector(vWheel.angularVelocity); if (val.x >= 1f || val.x <= -1f) { if (vMount.transform.localEulerAngles.x > 30f) { vMount.transform.localEulerAngles = new Vector3(30f, 0f, 0f); vMount.transform.Rotate(0f * Time.deltaTime, 0f, 0f); } if (vMount.transform.localEulerAngles.x < 15f) { vMount.transform.localEulerAngles = new Vector3(15f, 0f, 0f); vMount.transform.Rotate(0f * Time.deltaTime, 0f, 0f); } else { vMount.transform.Rotate(new Vector3(val.x * speedV * Time.deltaTime, 0f, 0f)); } } } } public class FireRopeDer : MonoBehaviour { public Derringer gun; public GameObject trigger; private bool fired = false; public int number = 0; private void FireMS() { if (!fired) { gun.FireBarrel(number); gun.IterateBarrel(); number++; fired = true; } if (!fired) { } } private void DontFireMS() { if (fired) { fired = false; } if (fired) { } } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (trigger.transform.localEulerAngles.x > 45f) { FireMS(); } if (trigger.transform.localEulerAngles.x <= 45f) { DontFireMS(); } if (number > 23) { number = 0; } } } public class SnapToPoint : MonoBehaviour { public Transform pointSpapTo; private void Start() { } private void Update() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)pointSpapTo != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)pointSpapTo).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)pointSpapTo).transform.eulerAngles; } else if ((Object)(object)pointSpapTo == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } 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; } else { 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); } if ((Object)(object)snapTo == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } [RequireComponent(typeof(AudioSource))] public class SoundPlay : MonoBehaviour { [Tooltip("List of audio clips to play.")] public AudioClip[] waveFile; [Tooltip("Stops the currently playing clip in the audioSource. Otherwise clips will overlap/mix.")] public bool stopOnPlay; [Tooltip("After the audio clip finishes playing, disable the game object the sound is on.")] public bool disableOnEnd; [Tooltip("Loop the sound after the wave file variation has been chosen.")] public bool looping; [Tooltip("If the sound is looping and updating it's position every frame, stop the sound at the end of the wav/clip length. ")] public bool stopOnEnd; [Tooltip("Start a wave file playing on awake, but after a delay.")] public bool playOnAwakeWithDelay; [Header("Random Volume")] public bool useRandomVolume = true; [Tooltip("Minimum volume that will be used when randomly set.")] [Range(0f, 1f)] public float volMin = 1f; [Tooltip("Maximum volume that will be used when randomly set.")] [Range(0f, 1f)] public float volMax = 1f; [Header("Random Pitch")] [Tooltip("Use min and max random pitch levels when playing sounds.")] public bool useRandomPitch = true; [Tooltip("Minimum pitch that will be used when randomly set.")] [Range(-3f, 3f)] public float pitchMin = 1f; [Tooltip("Maximum pitch that will be used when randomly set.")] [Range(-3f, 3f)] public float pitchMax = 1f; [Header("Random Time")] [Tooltip("Use Retrigger Time to repeat the sound within a time range")] public bool useRetriggerTime; [Tooltip("Inital time before the first repetion starts")] [Range(0f, 360f)] public float timeInitial; [Tooltip("Minimum time that will pass before the sound is retriggered")] [Range(0f, 360f)] public float timeMin; [Tooltip("Maximum pitch that will be used when randomly set.")] [Range(0f, 360f)] public float timeMax; [Header("Random Silence")] [Tooltip("Use Retrigger Time to repeat the sound within a time range")] public bool useRandomSilence; [Tooltip("Percent chance that the wave file will not play")] [Range(0f, 1f)] public float percentToNotPlay; [Header("Delay Time")] [Tooltip("Time to offset playback of sound")] public float delayOffsetTime; [NonSerialized] public AudioSource audioSource; [NonSerialized] public AudioClip clip; public void Awake() { audioSource = ((Component)this).GetComponent(); clip = audioSource.clip; if (audioSource.playOnAwake) { if (useRetriggerTime) { ((MonoBehaviour)this).InvokeRepeating("Play", timeInitial, Random.Range(timeMin, timeMax)); } else { Play(); } } else if (!audioSource.playOnAwake && playOnAwakeWithDelay) { PlayWithDelay(delayOffsetTime); if (useRetriggerTime) { ((MonoBehaviour)this).InvokeRepeating("Play", timeInitial, Random.Range(timeMin, timeMax)); } } else if (audioSource.playOnAwake && playOnAwakeWithDelay) { PlayWithDelay(delayOffsetTime); if (useRetriggerTime) { ((MonoBehaviour)this).InvokeRepeating("Play", timeInitial, Random.Range(timeMin, timeMax)); } } } public void Play() { if (looping) { PlayLooping(); } else { PlayOneShotSound(); } } public void PlayWithDelay(float delayTime) { if (looping) { ((MonoBehaviour)this).Invoke("PlayLooping", delayTime); } else { ((MonoBehaviour)this).Invoke("PlayOneShotSound", delayTime); } } public AudioClip PlayOneShotSound() { if (!((Behaviour)audioSource).isActiveAndEnabled) { return null; } SetAudioSource(); if (stopOnPlay) { audioSource.Stop(); } if (disableOnEnd) { ((MonoBehaviour)this).Invoke("Disable", clip.length); } audioSource.PlayOneShot(clip); return clip; } public AudioClip PlayLooping() { SetAudioSource(); if (!audioSource.loop) { audioSource.loop = true; } audioSource.Play(); if (stopOnEnd) { ((MonoBehaviour)this).Invoke("Stop", audioSource.clip.length); } return clip; } public void Disable() { ((Component)this).gameObject.SetActive(false); } public void Stop() { audioSource.Stop(); } public void SetAudioSource() { if (useRandomVolume) { audioSource.volume = Random.Range(volMin, volMax); if (useRandomSilence && (float)Random.Range(0, 1) < percentToNotPlay) { audioSource.volume = 0f; } } if (useRandomPitch) { audioSource.pitch = Random.Range(pitchMin, pitchMax); } if (waveFile.Length > 0) { audioSource.clip = waveFile[Random.Range(0, waveFile.Length)]; clip = audioSource.clip; } } } public class StickControl : MonoBehaviour { public GameObject _GunGrip; private void Start() { } private void Update() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = 0f; num = Mathf.Clamp(((Component)this).transform.localPosition.x, 0.1f, 0.4f); num2 = Mathf.Clamp(((Component)this).transform.localPosition.z, 0.1f, 0.4f); _GunGrip.transform.localPosition = new Vector3(num, 0f, num2); } } }