using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using FistVR; using H3VRUtils.FVRInteractiveObjects; using HarmonyLib; using OpenScripts2; using OtherLoader; using UnityEngine; using UnityEngine.UI; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace JerryComponent { public class BallisticChronograph : MonoBehaviour { private class BulletState { public Vector3 prevWorldPos; public bool plane1Triggered; public bool plane2Triggered; public double plane1Time; public double plane2Time; public Vector3 plane1WorldPos; public Vector3 plane2WorldPos; } private struct Intersection { public int plane; public Vector3 localPos; public float t; } [Header("UI Display")] public Text display; public GameObject hit1obj; public GameObject hit2obj; public bool is1 = false; public bool is2 = false; public float cd = 5f; public float count; public float vel; [Header("Detection Planes (Local Coordinates)")] private const float PLANE1_Z = -0.125f; private const float PLANE2_Z = 0.125f; private const float X_MIN = -0.0625f; private const float X_MAX = 0.0625f; private const float Y_MIN = 0.025f; private const float Y_MAX = 0.145f; [Header("Visualization (Optional)")] public GameObject hit1; public GameObject hit2; public List projs = new List(); private Dictionary bulletStates = new Dictionary(); private void Awake() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown OpenScripts2_BasePlugin.ProjectileFiredEvent += new ProjectileFired(ProjectileFiredEvent); } private void OnDestroy() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown OpenScripts2_BasePlugin.ProjectileFiredEvent -= new ProjectileFired(ProjectileFiredEvent); } private void ProjectileFiredEvent(FVRFireArm fireArm, ref BallisticProjectile projectile) { //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) projs.Add(projectile); bulletStates[projectile] = new BulletState { prevWorldPos = ((Component)projectile).transform.position }; } private void FixedUpdate() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0190: 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_0297: 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_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: 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_02ba: 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_02c9: 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_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_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0331: 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_0347: 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_0318: 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_037e: 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_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_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: 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_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0443: 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_0502: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) if (!is1 && is2) { is1 = false; is2 = false; } if (is1) { if (!is2) { if (cd > 0f) { cd -= Time.deltaTime; } if (cd <= 0f) { is1 = false; is2 = false; } vel = 0f; count += Time.deltaTime; } else if (is2) { vel = Vector3.Distance(hit1.transform.position, hit2.transform.position) / count; display.text = vel.ToString("F2"); Debug.Log((object)(vel + "=" + Vector3.Distance(hit1.transform.position, hit2.transform.position) + "/" + count)); is1 = false; is2 = false; hit1obj.transform.localPosition = new Vector3(0f, 0f, 0f); hit2obj.transform.localPosition = new Vector3(0f, 0f, 0f); vel = 0f; } } if (!is1) { count = 0f; cd = 5f; } float fixedDeltaTime = Time.fixedDeltaTime; float time = Time.time; float num = time - fixedDeltaTime; for (int num2 = projs.Count - 1; num2 >= 0; num2--) { BallisticProjectile val = projs[num2]; if ((Object)(object)val == (Object)null) { projs.RemoveAt(num2); bulletStates.Remove(val); } else { if (!bulletStates.TryGetValue(val, out var value)) { BulletState bulletState = new BulletState(); bulletState.prevWorldPos = ((Component)val).transform.position; value = bulletState; bulletStates[val] = value; } Vector3 position = ((Component)val).transform.position; Vector3 p = ((Component)this).transform.InverseTransformPoint(value.prevWorldPos); Vector3 p2 = ((Component)this).transform.InverseTransformPoint(position); List list = new List(); if (IntersectPlane(p, p2, -0.125f, out var intersectPoint, out var t) && IsWithinXYBounds(intersectPoint, -0.0625f, 0.0625f, 0.025f, 0.145f)) { list.Add(new Intersection { plane = 1, localPos = intersectPoint, t = t }); } if (IntersectPlane(p, p2, 0.125f, out intersectPoint, out t) && IsWithinXYBounds(intersectPoint, -0.0625f, 0.0625f, 0.025f, 0.145f)) { list.Add(new Intersection { plane = 2, localPos = intersectPoint, t = t }); } list.Sort((Intersection a, Intersection b) => a.t.CompareTo(b.t)); foreach (Intersection item in list) { float num3 = num + item.t * fixedDeltaTime; Vector3 val2 = ((Component)this).transform.TransformPoint(item.localPos); if (item.plane == 1 && !value.plane1Triggered) { value.plane1Triggered = true; value.plane1Time = num3; value.plane1WorldPos = val2; if ((Object)(object)hit1 != (Object)null) { hit1.transform.position = val2; } } else if (item.plane == 2 && !value.plane2Triggered) { value.plane2Triggered = true; value.plane2Time = num3; value.plane2WorldPos = val2; if ((Object)(object)hit2 != (Object)null) { hit2.transform.position = val2; } } } if (value.plane1Triggered && value.plane2Triggered) { float num4 = Mathf.Abs((float)(value.plane2Time - value.plane1Time)); float num5 = Vector3.Distance(value.plane1WorldPos, value.plane2WorldPos); float num6 = num5 / num4; if ((Object)(object)display != (Object)null) { display.text = num6.ToString("F2"); } Debug.Log((object)("Bullet speed: " + num6 + " m/s, distance " + num5 + ", time " + num4)); projs.RemoveAt(num2); bulletStates.Remove(val); } else { value.prevWorldPos = position; } } } CleanupFarBullets(); } private bool IntersectPlane(Vector3 p1, Vector3 p2, float planeZ, out Vector3 intersectPoint, out float t) { //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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_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) intersectPoint = Vector3.zero; t = 0f; if (Mathf.Approximately(p2.z - p1.z, 0f)) { return false; } t = (planeZ - p1.z) / (p2.z - p1.z); if (t < 0f || t > 1f) { return false; } intersectPoint = Vector3.Lerp(p1, p2, t); return true; } private bool IsWithinXYBounds(Vector3 point, float xMin, float xMax, float yMin, float yMax) { return point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax; } private void CleanupFarBullets() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) for (int num = projs.Count - 1; num >= 0; num--) { if ((Object)(object)projs[num] == (Object)null) { projs.RemoveAt(num); } else { Vector3 val = ((Component)this).transform.InverseTransformPoint(((Component)projs[num]).transform.position); if (val.z < -1f || val.z > 1f) { bulletStates.Remove(projs[num]); projs.RemoveAt(num); } } } } } public class HitColBC : MonoBehaviour { public BallisticChronograph BC; public bool isFront; public GameObject pos; private void OnTriggerEnter(Collider other) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { if (isFront) { Debug.Log((object)"is1 Triggered"); BC.hit1obj.transform.position = ((Component)other).gameObject.transform.position; BC.is1 = true; } else if (!isFront) { Debug.Log((object)"is2 Triggered"); BC.hit2obj.transform.position = ((Component)other).gameObject.transform.position; BC.is2 = true; } } } private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) ((Component)this).gameObject.transform.position = pos.transform.position; ((Component)this).gameObject.transform.eulerAngles = pos.transform.eulerAngles; } } } [Serializable] public class BlurCircle { [Range(0f, 1f)] public float positionX = 0.5f; [Range(0f, 1f)] public float positionY = 0.5f; [Range(0.01f, 0.5f)] public float radius = 0.1f; [Range(0.1f, 5f)] public float transitionSharpness = 1f; [Range(0f, 1f)] public float intensity = 1f; public bool isActive = true; [HideInInspector] public float pulseTimer = 0f; [HideInInspector] public float pulseSpeed = 1f; [HideInInspector] public float minRadius = 0.05f; [HideInInspector] public float maxRadius = 0.2f; public Vector2 Position { get { //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_0018: Unknown result type (might be due to invalid IL or missing references) return new Vector2(positionX, positionY); } set { positionX = Mathf.Clamp01(value.x); positionY = Mathf.Clamp01(value.y); } } } public class EnhancedCircleBlur : MonoBehaviour { [Header("Blur Settings")] [Range(0f, 10f)] public float blurStrength = 5f; [Range(0.1f, 10f)] public float globalTransitionSharpness = 3f; [Range(0f, 1f)] public float globalIntensity = 1f; public bool invertEffect = false; [Header("Circle Management")] public List circles = new List(); public int maxCircles = 60; [Header("Animation")] public bool animateCircles = false; public float animationSpeed = 1f; public bool pulseRadius = false; public float pulseMin = 0.05f; public float pulseMax = 0.2f; [Header("Performance")] public int updateRate = 30; public bool useFastBlur = true; [Header("References")] public Material targetMaterial; public Renderer targetRenderer; private Texture2D circleDataTexture; private float updateTimer = 0f; private bool materialAssigned = false; private static readonly int CircleDataTexID = Shader.PropertyToID("_CircleDataTex"); private static readonly int CircleCountID = Shader.PropertyToID("_CircleCount"); private static readonly int BlurStrengthID = Shader.PropertyToID("_BlurStrength"); private static readonly int TransitionSharpnessID = Shader.PropertyToID("_TransitionSharpness"); private static readonly int InvertEffectID = Shader.PropertyToID("_InvertEffect"); private static readonly int GlobalIntensityID = Shader.PropertyToID("_GlobalIntensity"); private void Start() { if ((Object)(object)targetRenderer == (Object)null) { targetRenderer = ((Component)this).GetComponent(); } if ((Object)(object)targetMaterial == (Object)null && (Object)(object)targetRenderer != (Object)null) { targetMaterial = targetRenderer.sharedMaterial; } if (circles.Count == 0) { circles.Add(new BlurCircle()); } if (circles.Count > maxCircles) { circles.RemoveRange(maxCircles, circles.Count - maxCircles); } CreateCircleDataTexture(); if ((Object)(object)targetMaterial != (Object)null) { targetMaterial.SetTexture(CircleDataTexID, (Texture)(object)circleDataTexture); UpdateMaterialProperties(); materialAssigned = true; } InitializeAnimation(); } private void Update() { updateTimer += Time.deltaTime; float num = 1f / (float)updateRate; if (updateTimer >= num) { if (animateCircles) { UpdateAnimations(); } UpdateCircleDataTexture(); if (materialAssigned) { UpdateMaterialProperties(); } updateTimer = 0f; } } private void CreateCircleDataTexture() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown circleDataTexture = new Texture2D(maxCircles, 1, (TextureFormat)20, false); ((Texture)circleDataTexture).wrapMode = (TextureWrapMode)1; ((Texture)circleDataTexture).filterMode = (FilterMode)0; ((Object)circleDataTexture).name = "CircleDataTexture"; UpdateCircleDataTexture(); } private void UpdateCircleDataTexture() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_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) if ((Object)(object)circleDataTexture == (Object)null) { return; } Color[] array = (Color[])(object)new Color[maxCircles]; for (int i = 0; i < maxCircles; i++) { ref Color reference = ref array[i]; reference = Color.black; } int num = 0; for (int j = 0; j < circles.Count && j < maxCircles; j++) { if (circles[j].isActive) { BlurCircle blurCircle = circles[j]; float num2 = Mathf.Clamp01(blurCircle.radius / 0.5f); float num3 = Mathf.Clamp01(blurCircle.transitionSharpness / 5f); ref Color reference2 = ref array[num]; reference2 = new Color(blurCircle.positionX, blurCircle.positionY, num2, num3); num++; } } circleDataTexture.SetPixels(array); circleDataTexture.Apply(); if ((Object)(object)targetMaterial != (Object)null) { targetMaterial.SetTexture(CircleDataTexID, (Texture)(object)circleDataTexture); targetMaterial.SetInt(CircleCountID, num); } } private void UpdateMaterialProperties() { if (!((Object)(object)targetMaterial == (Object)null)) { targetMaterial.SetFloat(BlurStrengthID, blurStrength); targetMaterial.SetFloat(TransitionSharpnessID, globalTransitionSharpness); targetMaterial.SetFloat(GlobalIntensityID, globalIntensity); targetMaterial.SetFloat(InvertEffectID, (!invertEffect) ? 0f : 1f); } } private void InitializeAnimation() { foreach (BlurCircle circle in circles) { circle.pulseTimer = Random.Range(0f, (float)Math.PI * 2f); circle.pulseSpeed = Random.Range(0.5f, 2f); circle.minRadius = pulseMin; circle.maxRadius = pulseMax; } } private void UpdateAnimations() { if (!animateCircles) { return; } foreach (BlurCircle circle in circles) { if (circle.isActive) { circle.pulseTimer += Time.deltaTime * animationSpeed * circle.pulseSpeed; if (pulseRadius) { float num = (Mathf.Sin(circle.pulseTimer) + 1f) * 0.5f; circle.radius = Mathf.Lerp(circle.minRadius, circle.maxRadius, num); } circle.positionX = Mathf.Clamp01(circle.positionX); circle.positionY = Mathf.Clamp01(circle.positionY); circle.radius = Mathf.Clamp(circle.radius, 0.01f, 0.5f); } } } public void AddCircle(Vector2 position, float radius, float transitionSharpness) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (circles.Count >= maxCircles) { Debug.LogWarning((object)("Maximum number of circles reached:" + maxCircles)); return; } BlurCircle blurCircle = new BlurCircle(); blurCircle.Position = position; blurCircle.radius = Mathf.Clamp(radius, 0.01f, 0.5f); blurCircle.transitionSharpness = Mathf.Clamp(transitionSharpness, 0.1f, 5f); blurCircle.isActive = true; BlurCircle item = blurCircle; circles.Add(item); } public void RemoveCircle(int index) { if (index >= 0 && index < circles.Count) { circles.RemoveAt(index); } } public void SetCircleActive(int index, bool active) { if (index >= 0 && index < circles.Count) { circles[index].isActive = active; } } public void ClearCircles() { circles.Clear(); } public void RandomizeCircles(int count) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) circles.Clear(); for (int i = 0; i < count && i < maxCircles; i++) { AddCircle(new Vector2(Random.value, Random.value), Random.Range(0.05f, 0.2f), Random.Range(0.5f, 3f)); } } private void OnValidate() { blurStrength = Mathf.Clamp(blurStrength, 0f, 10f); globalTransitionSharpness = Mathf.Clamp(globalTransitionSharpness, 0.1f, 10f); globalIntensity = Mathf.Clamp01(globalIntensity); foreach (BlurCircle circle in circles) { circle.positionX = Mathf.Clamp01(circle.positionX); circle.positionY = Mathf.Clamp01(circle.positionY); circle.radius = Mathf.Clamp(circle.radius, 0.01f, 0.5f); circle.transitionSharpness = Mathf.Clamp(circle.transitionSharpness, 0.1f, 5f); circle.intensity = Mathf.Clamp01(circle.intensity); } if (Application.isPlaying && (Object)(object)circleDataTexture != (Object)null) { UpdateCircleDataTexture(); UpdateMaterialProperties(); } } private void OnDrawGizmosSelected() { //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_0075: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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 (circles == null || !((Behaviour)this).enabled) { return; } Color color = default(Color); foreach (BlurCircle circle in circles) { if (circle.isActive) { Vector3 val = ((Component)this).transform.TransformPoint(new Vector3(circle.positionX - 0.5f, 0f, circle.positionY - 0.5f)); Gizmos.color = Color.green; Gizmos.DrawWireSphere(val, circle.radius * 0.5f); ((Color)(ref color))..ctor(0f, 1f, 0f, 0.2f); Gizmos.color = color; Gizmos.DrawSphere(val, circle.radius * 0.5f); Gizmos.color = Color.red; Gizmos.DrawSphere(val, 0.01f); } } } private void OnDestroy() { if ((Object)(object)circleDataTexture != (Object)null) { Object.DestroyImmediate((Object)(object)circleDataTexture); } } } public class CircleDataMul { public Vector2 position; public float radius; public float transitionSpeed; public CircleDataMul(Vector2 pos, float rad, float speed) { //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) position = pos; radius = rad; transitionSpeed = speed; } } public class MultiCircleBlurController : MonoBehaviour { [Header("Shader Properties")] public Material targetMaterial; [Range(0f, 1f)] public float blurStrength = 0.5f; public float defaultRadius = 0.1f; public float transitionSmoothness = 2f; [Header("Circle Settings")] public List circlePositions = new List(); public List circleRadii = new List(); public List circleTransitions = new List(); [Header("Animation Settings")] public bool animateTransitions = true; public float transitionDuration = 2f; private List currentTransitionValues = new List(); private List targetTransitionValues = new List(); private float transitionTimer = 0f; private const int MAX_CIRCLES = 8; private void Start() { InitializeCircles(); UpdateShaderProperties(); for (int i = 0; i < circleTransitions.Count; i++) { currentTransitionValues.Add(circleTransitions[i]); targetTransitionValues.Add(circleTransitions[i]); } } private void Update() { if (animateTransitions) { UpdateTransitions(); } UpdateShaderProperties(); } private void InitializeCircles() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (circlePositions.Count == 0) { circlePositions.Add(new Vector2(0.5f, 0.5f)); circleRadii.Add(defaultRadius); circleTransitions.Add(1f); } while (circleRadii.Count < circlePositions.Count) { circleRadii.Add(defaultRadius); } while (circleTransitions.Count < circlePositions.Count) { circleTransitions.Add(1f); } } private void UpdateTransitions() { transitionTimer += Time.deltaTime; if (transitionTimer >= transitionDuration) { transitionTimer = 0f; for (int i = 0; i < targetTransitionValues.Count; i++) { targetTransitionValues[i] = Random.Range(0.1f, 3f); } } float num = transitionTimer / transitionDuration; float num2 = Mathf.SmoothStep(0f, 1f, num); for (int j = 0; j < currentTransitionValues.Count; j++) { currentTransitionValues[j] = Mathf.Lerp(circleTransitions[j], targetTransitionValues[j], num2); } } private void UpdateShaderProperties() { //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_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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: 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_0249: 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_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0265: 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_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_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_040b: 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_042f: 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_028c: 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_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_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_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) if ((Object)(object)targetMaterial == (Object)null) { return; } targetMaterial.SetFloat("_BlurStrength", blurStrength); targetMaterial.SetFloat("_CircleRadius", defaultRadius); targetMaterial.SetFloat("_TransitionSmoothness", transitionSmoothness); int num = Mathf.Min(circlePositions.Count, 8); targetMaterial.SetInt("_CircleCount", num); Vector4 zero = Vector4.zero; Vector4 zero2 = Vector4.zero; Vector4 zero3 = Vector4.zero; for (int i = 0; i < Mathf.Min(num, 4); i++) { if (i == 0) { zero.x = circlePositions[i].x; } if (i == 0) { zero.y = circlePositions[i].y; } if (i == 1) { zero.z = circlePositions[i].x; } if (i == 1) { zero.w = circlePositions[i].y; } if (i == 0) { zero2.x = circleRadii[i]; } if (i == 1) { zero2.y = circleRadii[i]; } if (i == 2) { zero2.z = circleRadii[i]; } if (i == 3) { zero2.w = circleRadii[i]; } float num2 = ((!animateTransitions) ? circleTransitions[i] : currentTransitionValues[i]); if (i == 0) { zero3.x = num2; } if (i == 1) { zero3.y = num2; } if (i == 2) { zero3.z = num2; } if (i == 3) { zero3.w = num2; } } targetMaterial.SetVector("_CirclePositions", zero); targetMaterial.SetVector("_CircleRadii", zero2); targetMaterial.SetVector("_CircleTransitions", zero3); if (num <= 4) { return; } Vector4 zero4 = Vector4.zero; Vector4 zero5 = Vector4.zero; Vector4 zero6 = Vector4.zero; for (int j = 4; j < Mathf.Min(num, 8); j++) { int num3 = j - 4; if (num3 == 0) { zero4.x = circlePositions[j].x; } if (num3 == 0) { zero4.y = circlePositions[j].y; } if (num3 == 1) { zero4.z = circlePositions[j].x; } if (num3 == 1) { zero4.w = circlePositions[j].y; } if (num3 == 0) { zero5.x = circleRadii[j]; } if (num3 == 1) { zero5.y = circleRadii[j]; } if (num3 == 2) { zero5.z = circleRadii[j]; } if (num3 == 3) { zero5.w = circleRadii[j]; } float num4 = ((!animateTransitions) ? circleTransitions[j] : currentTransitionValues[j]); if (num3 == 0) { zero6.x = num4; } if (num3 == 1) { zero6.y = num4; } if (num3 == 2) { zero6.z = num4; } if (num3 == 3) { zero6.w = num4; } } targetMaterial.SetVector("_CirclePositions2", zero4); targetMaterial.SetVector("_CircleRadii2", zero5); targetMaterial.SetVector("_CircleTransitions2", zero6); } public void AddCircle(Vector2 position, float radius, float transitionSpeed) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (circlePositions.Count >= 8) { Debug.LogWarning((object)("已达到最大圆数量限制 (" + 8 + ")")); return; } circlePositions.Add(position); circleRadii.Add(radius); circleTransitions.Add(transitionSpeed); currentTransitionValues.Add(transitionSpeed); targetTransitionValues.Add(transitionSpeed); } public void RemoveCircle(int index) { if (index >= 0 && index < circlePositions.Count) { circlePositions.RemoveAt(index); circleRadii.RemoveAt(index); circleTransitions.RemoveAt(index); currentTransitionValues.RemoveAt(index); targetTransitionValues.RemoveAt(index); } } public void UpdateCircle(int index, Vector2 position, float radius, float transitionSpeed) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (index >= 0 && index < circlePositions.Count) { circlePositions[index] = position; circleRadii[index] = radius; circleTransitions[index] = transitionSpeed; } } public void SetCircleTransition(int index, float transitionValue) { if (index >= 0 && index < circleTransitions.Count) { circleTransitions[index] = transitionValue; if (index < currentTransitionValues.Count) { currentTransitionValues[index] = transitionValue; } } } private void OnDrawGizmosSelected() { //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_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) //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_0075: 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_00ab: 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) if (circlePositions == null) { return; } for (int i = 0; i < circlePositions.Count; i++) { if (i < circleRadii.Count) { Vector3 val = ((Component)this).transform.TransformPoint(new Vector3(circlePositions[i].x - 0.5f, 0f, circlePositions[i].y - 0.5f)); Gizmos.color = Color.green; Gizmos.DrawWireSphere(val, circleRadii[i] * 0.5f); Gizmos.color = new Color(0f, 1f, 0f, 0.3f); Gizmos.DrawSphere(val, circleRadii[i] * 0.5f); } } } } public class BezierMover : MonoBehaviour { [Header("控制点")] public Transform p0; public Transform p1; public Transform p2; public Transform p3; public GameObject hook; [Header("运动设置")] public LineRenderer wire; public Transform wp0; public Transform wp1; public Transform wp2; public Transform wp3; public GameObject[] joints; private void Update() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < joints.Length; i++) { joints[i].transform.position = GetCubicBezierPoint((float)i * 0.1f, p0.position, p1.position, p2.position, p3.position); if (i == joints.Length - 1) { AxisLookAt(joints[i].transform, hook.transform.position, -Vector3.right); } if (i != joints.Length - 1) { AxisLookAt(joints[i].transform, joints[i + 1].transform.position, -Vector3.right); } } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_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(0f, tr_self.localEulerAngles.y, tr_self.localEulerAngles.z); } public static Vector3 GetCubicBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3) { //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_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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) float num = 1f - t; float num2 = t * t; float num3 = num * num; float num4 = num3 * num; float num5 = num2 * t; return num4 * p0 + 3f * num3 * t * p1 + 3f * num * num2 * p2 + num5 * p3; } private void OnDrawGizmos() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_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_0062: 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) Gizmos.color = Color.white; Vector3 val = p0.position; for (int i = 1; i <= 30; i++) { float t = (float)i / 30f; Vector3 cubicBezierPoint = GetCubicBezierPoint(t, wp0.position, wp1.position, wp2.position, wp3.position); Gizmos.DrawLine(val, cubicBezierPoint); val = cubicBezierPoint; } } } public class FishingRodPhysics : MonoBehaviour { [Serializable] public class RodBone { public Transform boneTransform; public Vector3 restPosition; public Quaternion restRotation; public float flexibility = 1f; } public GameObject hook; public GameObject top; public GameObject topref; [Header("骨骼设置")] public RodBone[] rodBones = new RodBone[9]; [Header("物理参数")] [SerializeField] private float pullForce = 0f; [SerializeField] private Vector3 pullDirection = Vector3.right; [SerializeField] private float maxBendAngle = 60f; [SerializeField] private float springStiffness = 100f; [SerializeField] private float damping = 10f; [SerializeField] private float rodLength = 2f; [Header("弯曲曲线")] public AnimationCurve bendCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); private Vector3[] bonePositions; private Vector3[] boneVelocities; private Vector3 pullPointWorld; public float PullForce { get { return pullForce; } set { pullForce = Mathf.Clamp01(value); } } public Vector3 PullDirection { get { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return pullDirection; } set { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) pullDirection = ((Vector3)(ref value)).normalized; } } private void Start() { //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_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_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) InitializeBones(); bonePositions = (Vector3[])(object)new Vector3[rodBones.Length]; boneVelocities = (Vector3[])(object)new Vector3[rodBones.Length]; for (int i = 0; i < rodBones.Length; i++) { if ((Object)(object)rodBones[i].boneTransform != (Object)null) { ref Vector3 reference = ref bonePositions[i]; reference = rodBones[i].boneTransform.position; ref Vector3 reference2 = ref boneVelocities[i]; reference2 = Vector3.zero; } } pullPointWorld = top.transform.position; } private void InitializeBones() { //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_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_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) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rodBones[0].boneTransform == (Object)null) { Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren(); int num = Mathf.Min(9, componentsInChildren.Length - 1); for (int i = 0; i < num; i++) { rodBones[i].boneTransform = componentsInChildren[i + 1]; rodBones[i].restPosition = rodBones[i].boneTransform.localPosition; rodBones[i].restRotation = rodBones[i].boneTransform.localRotation; } return; } for (int j = 0; j < rodBones.Length; j++) { if ((Object)(object)rodBones[j].boneTransform != (Object)null) { rodBones[j].restPosition = rodBones[j].boneTransform.localPosition; rodBones[j].restRotation = rodBones[j].boneTransform.localRotation; } } } private void Update() { //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_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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00d8: 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_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) SimulateRodPhysics(Time.deltaTime); for (int i = 0; i < rodBones.Length; i++) { rodBones[i].boneTransform.localEulerAngles = new Vector3(0f, rodBones[i].boneTransform.localEulerAngles.y, rodBones[i].boneTransform.localEulerAngles.z); } pullForce = Vector3.Distance(top.transform.position, hook.transform.position); top.transform.position = topref.transform.position; top.transform.eulerAngles = topref.transform.eulerAngles; pullDirection = hook.transform.position - top.transform.position; ApplyBendToBones(); } private void SimulateRodPhysics(float deltaTime) { //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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_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_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_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_010e: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_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_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_013f: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: 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) if (rodBones.Length == 0) { return; } Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(pullDirection.x, pullDirection.y, pullDirection.z); Vector3 val2 = val * pullForce * 10f; for (int i = 1; i < rodBones.Length; i++) { if (!((Object)(object)rodBones[i].boneTransform == (Object)null)) { float num = bendCurve.Evaluate((float)i / (float)(rodBones.Length - 1)); Vector3 val3 = val2 * num * rodBones[i].flexibility; Vector3 val4 = ((Component)this).transform.TransformPoint(rodBones[i].restPosition); Vector3 val5 = (val4 - bonePositions[i]) * springStiffness; Vector3 val6 = -boneVelocities[i] * damping; Vector3 val7 = val3 + val5 + val6; ref Vector3 reference = ref boneVelocities[i]; reference += val7 * deltaTime; ref Vector3 reference2 = ref bonePositions[i]; reference2 += boneVelocities[i] * deltaTime; } } if ((Object)(object)rodBones[0].boneTransform != (Object)null) { ref Vector3 reference3 = ref bonePositions[0]; reference3 = ((Component)this).transform.TransformPoint(rodBones[0].restPosition); ref Vector3 reference4 = ref boneVelocities[0]; reference4 = Vector3.zero; } ApplyDistanceConstraints(); } private void ApplyDistanceConstraints() { //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) //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_00a1: 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_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_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_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_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_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) float num = rodLength / (float)(rodBones.Length - 1); for (int i = 0; i < 3; i++) { for (int j = 0; j < rodBones.Length - 1; j++) { if ((Object)(object)rodBones[j].boneTransform == (Object)null || (Object)(object)rodBones[j + 1].boneTransform == (Object)null) { continue; } Vector3 val = bonePositions[j + 1] - bonePositions[j]; float magnitude = ((Vector3)(ref val)).magnitude; float num2 = magnitude - num; if (magnitude > 0f) { Vector3 val2 = val * (num2 / magnitude) * 0.5f; if (j > 0) { ref Vector3 reference = ref bonePositions[j]; reference += val2; } ref Vector3 reference2 = ref bonePositions[j + 1]; reference2 -= val2; } } } } private void ApplyBendToBones() { //IL_0079: 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_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_00a7: 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_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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //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_011b: 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_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_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_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_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_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_00f6: 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_010d: 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_0160: 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_0189: 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) Vector3 val4 = default(Vector3); for (int i = 0; i < rodBones.Length; i++) { if ((Object)(object)rodBones[i].boneTransform == (Object)null) { continue; } Vector3 val; Quaternion val2; if (i == 0) { val = ((Component)this).transform.TransformPoint(rodBones[i].restPosition); val2 = ((Component)this).transform.rotation * rodBones[i].restRotation; } else { Vector3 val3 = bonePositions[i - 1] - bonePositions[i]; val = bonePositions[i]; if (val3 != Vector3.zero) { ((Vector3)(ref val4))..ctor(val3.x, val3.y, 0f); Vector3 normalized = ((Vector3)(ref val4)).normalized; Quaternion val5 = Quaternion.FromToRotation(Vector3.right, normalized); val2 = ((Component)this).transform.rotation * val5 * rodBones[i].restRotation; } else { val2 = ((Component)this).transform.rotation * rodBones[i].restRotation; } } rodBones[i].boneTransform.position = Vector3.Lerp(rodBones[i].boneTransform.position, val, Time.deltaTime * 20f); rodBones[i].boneTransform.rotation = Quaternion.Slerp(rodBones[i].boneTransform.rotation, val2, Time.deltaTime * 20f); } } private void OnDrawGizmosSelected() { //IL_001e: 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_00e1: 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_0115: 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_0124: 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_0146: 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_0148: 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_014a: 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_0155: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if (rodBones == null || rodBones.Length == 0) { return; } Gizmos.color = Color.green; for (int i = 0; i < rodBones.Length; i++) { if ((Object)(object)rodBones[i].boneTransform != (Object)null) { Gizmos.DrawSphere(rodBones[i].boneTransform.position, 0.02f); if (i < rodBones.Length - 1 && (Object)(object)rodBones[i + 1].boneTransform != (Object)null) { Gizmos.DrawLine(rodBones[i].boneTransform.position, rodBones[i + 1].boneTransform.position); } } } if (pullForce > 0.01f) { Gizmos.color = Color.red; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f - pullDirection.x, pullDirection.y, 0f); Vector3 val2 = val * pullForce * 0.5f; Vector3 val3 = ((Component)this).transform.TransformPoint(new Vector3(0f - rodLength, 0f, 0f)); Gizmos.DrawLine(val3, val3 + val2); Gizmos.DrawSphere(val3 + val2, 0.03f); } } public void TestPull(float force, Vector2 direction) { //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) PullForce = force; PullDirection = Vector2.op_Implicit(direction); } public void ResetRod() { //IL_0042: 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_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) PullForce = 0f; for (int i = 0; i < rodBones.Length; i++) { if ((Object)(object)rodBones[i].boneTransform != (Object)null) { rodBones[i].boneTransform.localPosition = rodBones[i].restPosition; rodBones[i].boneTransform.localRotation = rodBones[i].restRotation; ref Vector3 reference = ref boneVelocities[i]; reference = Vector3.zero; } } } } namespace JerryComponent { public class G11Handle : FVRInteractiveObject { public Transform RotPiece; public AudioEvent HandleCrank; [NonSerialized] public float m_curRot; public Transform FlapPiece; [NonSerialized] public Vector3 lastHandForward = Vector3.zero; public override void BeginInteraction(FVRViveHand hand) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //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) ((FVRInteractiveObject)this).BeginInteraction(hand); SetFlapState(isOut: true); lastHandForward = Vector3.ProjectOnPlane(((HandInput)(ref base.m_hand.Input)).Up, ((Component)this).transform.right); } public override void EndInteraction(FVRViveHand hand) { ((FVRInteractiveObject)this).EndInteraction(hand); } public void SetFlapState(bool isOut) { //IL_0043: 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 (isOut) { FlapPiece.localEulerAngles = new Vector3(0f, 90f, -90f); } else { FlapPiece.localEulerAngles = new Vector3(0f, 90f, 0f); } } public override void FVRFixedUpdate() { //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) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0066: 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_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_0160: 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_0114: 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_016c: 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 (((FVRInteractiveObject)this).IsHeld) { float curRot = m_curRot; Vector3 val = Vector3.ProjectOnPlane(((HandInput)(ref base.m_hand.Input)).Up, -((Component)this).transform.right); Vector3 val2 = Vector3.ProjectOnPlane(lastHandForward, -((Component)this).transform.right); float num = Mathf.Atan2(Vector3.Dot(-((Component)this).transform.right, Vector3.Cross(val, val2)), Vector3.Dot(val, val2)) * 57.29578f; if (num > 0f) { m_curRot -= num; } if (curRot > -180f && m_curRot <= -180f) { SM.PlayCoreSound((FVRPooledAudioType)10, HandleCrank, ((Component)this).transform.position); } if (m_curRot <= -360f) { RotPiece.localEulerAngles = new Vector3(0f, 0f, 0f); SM.PlayCoreSound((FVRPooledAudioType)10, HandleCrank, ((Component)this).transform.position); m_curRot = 0f; SetFlapState(isOut: false); base.m_hand.EndInteractionIfHeld((FVRInteractiveObject)(object)this); ((FVRInteractiveObject)this).ForceBreakInteraction(); } else { RotPiece.localEulerAngles = new Vector3(0f, 0f, m_curRot); } lastHandForward = val; } ((FVRInteractiveObject)this).FVRFixedUpdate(); } } public class GM6Barrel : MonoBehaviour { public Rigidbody gunrig; public GameObject barrelRig; public Mac11_Stock grab; public GameObject grabtarg; public GameObject barreltarg; public ClosedBoltReceiverDustCoverTrigger dustcover; public WaggleJoint dustcoverJoint; public AR15HandleSightFlipper barrelLatch; public Vector2 ZbarrelLimit; public float rear; public float fore; public GameObject snapbarrel; public ClosedBolt bolt; public GameObject boltGeo; public ClosedBoltWeapon gun; public GameObject boltrot; public AudioEvent snaptorearaud; public bool reachedtorear = false; public bool shot = false; public GameObject foreexp; public GameObject rearexp; public bool pulled = false; public bool startrecoil = false; public float recoverspeedbarrel; public float recoverspeedbolt; public bool blowback1 = false; public bool blowback2 = false; public float mul1 = 1f; public float mul2 = 1f; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)gun) { if (((FVRInteractiveObject)bolt).IsHeld) { ((FVRInteractiveObject)bolt).ForceBreakInteraction(); } ((FVRInteractiveObject)bolt).IsSimpleInteract = true; bolt.Speed_Rearward = 0f; shot = true; startrecoil = true; } } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); } private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_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_017e: 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_01c0: 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_0212: 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_0077: 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_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0266: 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_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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0437: 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_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_0553: 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_058e: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: 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_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_0798: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_0736: 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_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09c3: 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_07fd: 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_08f8: Unknown result type (might be due to invalid IL or missing references) //IL_08fd: Unknown result type (might be due to invalid IL or missing references) //IL_0838: Unknown result type (might be due to invalid IL or missing references) //IL_0944: 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_0960: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) if ((int)((FVRPhysicalObject)gun).Size == 3 && (Object)(object)((FVRPhysicalObject)gun).m_quickbeltSlot != (Object)null && ((FVRPhysicalObject)gun).m_isHardnessed) { ((FVRPhysicalObject)gun).m_isHardnessed = false; } if (((FVRInteractiveObject)bolt).IsHeld) { boltGeo.gameObject.transform.localPosition = ((Component)bolt).gameObject.transform.localPosition; if (boltrot.transform.localEulerAngles.y >= 1f && !pulled) { barrelRig.gameObject.transform.localPosition = ((Component)bolt).gameObject.transform.localPosition; } else if (boltrot.transform.localEulerAngles.y < 1f) { pulled = true; blowback1 = false; blowback2 = false; } } dustcoverJoint.angleLimitRight = -1f * ((Component)dustcover).gameObject.transform.localEulerAngles.z; barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, barrelRig.gameObject.transform.localPosition.z); boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, boltGeo.gameObject.transform.localPosition.z); barrelRig.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); boltGeo.gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (barrelRig.gameObject.transform.localPosition.z < rear) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); } if (barrelRig.gameObject.transform.localPosition.z > fore) { pulled = false; if (mul1 != 1f) { if (!((FVRInteractiveObject)bolt).IsHeld) { SM.PlayCoreSound((FVRPooledAudioType)41, snaptorearaud, barrelRig.gameObject.transform.position); } mul1 = 1f; } barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, fore); } if (boltGeo.gameObject.transform.localPosition.z < rear) { boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); } if (boltGeo.gameObject.transform.localPosition.z > fore) { pulled = false; if (mul2 != 1f) { if (!((FVRInteractiveObject)bolt).IsHeld) { SM.PlayCoreSound((FVRPooledAudioType)41, snaptorearaud, boltGeo.gameObject.transform.position); } mul2 = 1f; } boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, fore); } if (boltGeo.gameObject.transform.localPosition.z >= fore) { pulled = false; } if (barrelRig.gameObject.transform.localPosition.z < rear + 0.01f && !barrelLatch.m_isLargeAperture) { snapbarrel.SetActive(true); if (((FVRInteractiveObject)grab).IsHeld) { ((FVRInteractiveObject)grab).ForceBreakInteraction(); ((FVRInteractiveObject)grab).IsSimpleInteract = true; } ((FVRPhysicalObject)gun).Size = (FVRPhysicalObjectSize)2; barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); if (!dustcover.m_isOpen) { dustcover.ToggleDustCoverState(); } ((FVRInteractiveObject)bolt).IsSimpleInteract = true; } if (barrelLatch.m_isLargeAperture && !((FVRInteractiveObject)grab).IsHeld) { ((FVRPhysicalObject)gun).Size = (FVRPhysicalObjectSize)3; ((Component)grab).transform.position = grabtarg.transform.position; ((Component)grab).transform.eulerAngles = grabtarg.transform.eulerAngles; ((FVRInteractiveObject)grab).IsSimpleInteract = false; ((FVRInteractiveObject)bolt).IsSimpleInteract = false; snapbarrel.SetActive(false); if (barrelRig.gameObject.transform.localPosition.z < fore) { mul1 += Time.deltaTime; barrelRig.transform.localPosition = new Vector3(0f, 0f, barrelRig.transform.localPosition.z + recoverspeedbarrel * mul1); } } if (((FVRInteractiveObject)grab).IsHeld) { if (!dustcover.m_isOpen) { dustcover.ToggleDustCoverState(); } snapbarrel.SetActive(false); ((FVRInteractiveObject)bolt).IsSimpleInteract = false; barrelRig.gameObject.transform.eulerAngles = barreltarg.transform.eulerAngles; barrelRig.gameObject.transform.position = barreltarg.transform.position; } if (startrecoil && barrelRig.gameObject.transform.localPosition.z > rear) { barrelRig.gameObject.transform.localPosition = new Vector3(0f, 0f, barrelRig.gameObject.transform.localPosition.z - recoverspeedbarrel * 25f); } if (barrelRig.gameObject.transform.localPosition.z < fore - 0.01f) { if (boltGeo.gameObject.transform.localPosition.z > rear + 0.01f) { boltGeo.gameObject.transform.localPosition = barrelRig.gameObject.transform.localPosition; } else if (boltGeo.gameObject.transform.localPosition.z < rear + 0.01f) { boltGeo.gameObject.transform.localPosition = new Vector3(0f, 0f, rear); if (!reachedtorear && shot) { startrecoil = false; SM.PlayCoreSound((FVRPooledAudioType)41, snaptorearaud, boltGeo.gameObject.transform.position); reachedtorear = true; shot = false; blowback1 = false; blowback2 = false; } } } else if (barrelRig.gameObject.transform.localPosition.z >= fore - 0.01f) { if (!((FVRInteractiveObject)bolt).IsHeld && boltGeo.gameObject.transform.localPosition.z < fore) { mul2 += Time.deltaTime; boltGeo.transform.localPosition = new Vector3(0f, 0f, boltGeo.transform.localPosition.z + recoverspeedbolt * mul2); } if (reachedtorear) { if (!((FVRInteractiveObject)bolt).IsHeld) { bolt.Speed_Rearward = -100f; bolt.SnapToRear(); } reachedtorear = false; } } if (boltGeo.gameObject.transform.localPosition.z >= fore - 0.01f) { ((FVRInteractiveObject)bolt).IsSimpleInteract = false; } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } } public class G50Seeker : MonoBehaviour { public QuadcopterController QC; public AR15HandleSightFlipper trigger; public GameObject wingrot; public GameObject explosion; public GameObject audseek; public GameObject audfly; public FVRPhysicalObject main; public Collider detectcol; [NonSerialized] public List currentAI = new List(); [NonSerialized] public Transform nearestAI; public GameObject lookdir; public LayerMask lm; public bool clicked = false; public bool triggered = true; public GameObject lookdir2; private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } private void OnTriggerStay(Collider other) { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Invalid comparison between Unknown and I4 if (!trigger.m_isLargeAperture && !((FVRInteractiveObject)main).m_isHeld && (Object)(object)main.m_quickbeltSlot == (Object)null && ((Object)((Component)other).gameObject).name == "Sosig_Torso" && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && (Object)(object)GM.CurrentPlayerBody != (Object)null && !currentAI.Contains(((Component)other).gameObject.GetComponent()) && (int)((Component)other).gameObject.GetComponent().S.BodyState != 3) { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void Update() { //IL_012e: 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_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_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_02b9: 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_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_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_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Invalid comparison between Unknown and I4 //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_0500: 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_053f: 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 (((FVRInteractiveObject)main).m_isHeld) { if (((FVRInteractiveObject)main).m_hand.Input.TriggerFloat > 0.75f) { if (!clicked) { triggered = !triggered; clicked = true; } } else { clicked = false; } } else if (!((FVRInteractiveObject)main).m_isHeld) { clicked = false; } trigger.m_isLargeAperture = triggered; if ((Object)(object)main == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (trigger.m_isLargeAperture || ((FVRInteractiveObject)main).m_isHeld || (Object)(object)main.m_quickbeltSlot != (Object)null) { detectcol.enabled = false; audfly.SetActive(false); audseek.SetActive(false); nearestAI = null; wingrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Behaviour)QC).enabled = false; } if (trigger.m_isLargeAperture || ((FVRInteractiveObject)main).m_isHeld || !((Object)(object)main.m_quickbeltSlot == (Object)null)) { return; } detectcol.enabled = true; audfly.SetActive(true); wingrot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); ((Behaviour)QC).enabled = true; if (currentAI == null || (Object)(object)nearestAI == (Object)null) { if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { QC.SetFollowTarget(((Component)GM.CurrentPlayerBody.Head).gameObject.transform); QC.SetTargetHeight(((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position.y + 0.25f); } QC.obstacleCheckDistanceY = 1f; QC.followDistance = 1f; audseek.SetActive(false); } if ((Object)(object)nearestAI != (Object)null) { AxisLookAt(lookdir.transform, ((Component)nearestAI).gameObject.transform.position, Vector3.forward); RaycastHit val = default(RaycastHit); if (Physics.Raycast(lookdir2.transform.position, lookdir2.transform.forward, ref val, 25f, LayerMask.op_Implicit(lm))) { if ((Object)(object)((Component)((RaycastHit)(ref val)).collider).gameObject.GetComponentInParent() != (Object)null) { audseek.SetActive(true); QC.SetFollowTarget(((Component)nearestAI).gameObject.transform); QC.SetTargetHeight(((Component)nearestAI).gameObject.transform.position.y); QC.followDistance = 0f; QC.obstacleCheckDistanceY = 0.1f; } else { if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { QC.SetFollowTarget(((Component)GM.CurrentPlayerBody.Head).gameObject.transform); QC.SetTargetHeight(((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position.y + 0.25f); } QC.obstacleCheckDistanceY = 1f; QC.followDistance = 1f; audseek.SetActive(false); } } else { if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { QC.SetFollowTarget(((Component)GM.CurrentPlayerBody.Head).gameObject.transform); QC.SetTargetHeight(((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position.y + 0.25f); } QC.obstacleCheckDistanceY = 1f; QC.followDistance = 1f; audseek.SetActive(false); } if ((Object)(object)GM.CurrentPlayerBody != (Object)null && Vector3.Distance(((Component)main).gameObject.transform.position, ((Component)nearestAI).gameObject.transform.position) <= 1f && Vector3.Distance(((Component)main).gameObject.transform.position, ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position) >= 2.5f) { Object.Instantiate(explosion, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); Object.Destroy((Object)(object)((Component)main).gameObject); } } if (currentAI == null) { return; } for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null || (int)currentAI[i].S.BodyState == 3 || Vector3.Distance(((Component)main).gameObject.transform.position, ((Component)currentAI[i]).gameObject.transform.position) > 25f) { currentAI.Remove(currentAI[i]); } } nearestAI = GetNearestGameObject(((Component)this).gameObject.transform, currentAI); } 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; } } [RequireComponent(typeof(Rigidbody))] public class QuadcopterController : MonoBehaviour { [Header("悬停设置")] public float targetHeight = 1.8f; public float heightTolerance = 0.1f; public float maxLiftForce = 50f; [Header("PID控制器参数")] public float P_Gain = 5f; public float I_Gain = 0.5f; public float D_Gain = 2f; [Header("避障设置")] public LayerMask obstacleMask = LayerMask.op_Implicit(-1); public float obstacleCheckDistance = 3f; public float avoidanceForce = 15f; public float obstacleCheckDistanceY = 1f; public float sideRayOffset = 0.5f; [Header("跟随设置")] public Transform followTarget; public float followDistance = 3f; public float followForce = 10f; public float rotationSpeed = 5f; [Header("稳定设置")] public float stability = 10f; public float stabilitySpeed = 100f; private Rigidbody rb; private float heightErrorIntegral = 0f; private float previousHeightError = 0f; private Vector3 avoidanceVector = Vector3.zero; private float horizontalErrorIntegralX = 0f; private float horizontalErrorIntegralZ = 0f; private Vector3 previousHorizontalError = Vector3.zero; private void Start() { rb = ((Component)this).GetComponent(); rb.drag = 1f; rb.angularDrag = 5f; rb.useGravity = true; if ((Object)(object)followTarget == (Object)null) { ((MonoBehaviour)this).StartCoroutine(HoverInPlace()); } } private void FixedUpdate() { AvoidObstacles(); ControlHeight(); FollowTarget(); StabilizeRotation(); } private void ControlHeight() { //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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: 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_00b3: Unknown result type (might be due to invalid IL or missing references) float y = ((Component)this).transform.position.y; float num = targetHeight - y; heightErrorIntegral += num * Time.fixedDeltaTime; float num2 = (num - previousHeightError) / Time.fixedDeltaTime; previousHeightError = num; float num3 = num * P_Gain + heightErrorIntegral * I_Gain + num2 * D_Gain; num3 = Mathf.Clamp(num3, 0f - maxLiftForce, maxLiftForce); Vector3 val = Vector3.up * (num3 + Mathf.Abs(Physics.gravity.y) * rb.mass); rb.AddForce(val); if (Mathf.Abs(num) < heightTolerance) { heightErrorIntegral *= 0.9f; } } private void AvoidObstacles() { //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_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_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_0040: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0105: 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_01e3: 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_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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: 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_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_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_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: 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_023f: 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_025b: 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_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_02bb: Unknown result type (might be due to invalid IL or missing references) avoidanceVector = Vector3.zero; Vector3[] array = (Vector3[])(object)new Vector3[7] { ((Component)this).transform.forward, -((Component)this).transform.forward, ((Component)this).transform.right, -((Component)this).transform.right, ((Component)this).transform.forward + ((Component)this).transform.right, ((Component)this).transform.forward - ((Component)this).transform.right, Vector3.up }; Vector3[] array2 = array; RaycastHit val2 = default(RaycastHit); foreach (Vector3 val in array2) { if (Physics.Raycast(((Component)this).transform.position, val, ref val2, obstacleCheckDistance, LayerMask.op_Implicit(obstacleMask))) { Vector3 val3 = ((Component)this).transform.position - ((RaycastHit)(ref val2)).point; Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = 1f - ((RaycastHit)(ref val2)).distance / obstacleCheckDistance; avoidanceVector += normalized * avoidanceForce * num; Debug.DrawLine(((Component)this).transform.position, ((RaycastHit)(ref val2)).point, Color.red); } else { Debug.DrawRay(((Component)this).transform.position, val * obstacleCheckDistance, Color.green); } } RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(((Component)this).transform.position, Vector3.down, ref val4, obstacleCheckDistanceY, LayerMask.op_Implicit(obstacleMask))) { Vector3 val5 = ((Component)this).transform.position - ((RaycastHit)(ref val4)).point; Vector3 normalized2 = ((Vector3)(ref val5)).normalized; float num2 = 1f - ((RaycastHit)(ref val4)).distance / obstacleCheckDistance; avoidanceVector += normalized2 * avoidanceForce * num2; Debug.DrawLine(((Component)this).transform.position, ((RaycastHit)(ref val4)).point, Color.red); } else { Debug.DrawRay(((Component)this).transform.position, Vector3.down * obstacleCheckDistance, Color.green); } if (avoidanceVector != Vector3.zero) { rb.AddForce(avoidanceVector); } } private void FollowTarget() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_005c: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_013a: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_01b2: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)followTarget == (Object)null)) { Vector3 val = followTarget.position + followTarget.forward * followDistance; val.y = targetHeight; Vector3 val2 = val - ((Component)this).transform.position; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(val2.x, 0f, val2.z); horizontalErrorIntegralX += val3.x * Time.fixedDeltaTime; horizontalErrorIntegralZ += val3.z * Time.fixedDeltaTime; Vector3 val4 = (val3 - previousHorizontalError) / Time.fixedDeltaTime; previousHorizontalError = val3; Vector3 val5 = default(Vector3); ((Vector3)(ref val5))..ctor(val3.x * P_Gain + horizontalErrorIntegralX * I_Gain + val4.x * D_Gain, 0f, val3.z * P_Gain + horizontalErrorIntegralZ * I_Gain + val4.z * D_Gain); val5 = Vector3.ClampMagnitude(val5, followForce); Vector3 val6 = val5 - Vector3.Project(val5, ((Vector3)(ref avoidanceVector)).normalized); rb.AddForce(val6); if (((Vector3)(ref val2)).magnitude > 0.5f) { Quaternion val7 = Quaternion.LookRotation(new Vector3(val2.x, 0f, val2.z)); rb.MoveRotation(Quaternion.Slerp(rb.rotation, val7, rotationSpeed * Time.fixedDeltaTime)); } } } private void StabilizeRotation() { //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_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_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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0068: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = rb.rotation; Quaternion val = Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f); Quaternion val2 = val * Quaternion.Inverse(rb.rotation); Vector3 val3 = new Vector3(val2.x, val2.y, val2.z) * stabilitySpeed; rb.AddTorque(val3 - rb.angularVelocity * stability); } private IEnumerator HoverInPlace() { Vector3 hoverPosition = ((Component)this).transform.position + Vector3.up * targetHeight; Vector3 val = default(Vector3); while ((Object)(object)followTarget == (Object)null) { Vector3 targetPos = new Vector3(hoverPosition.x, targetHeight, hoverPosition.z); Vector3 direction = targetPos - ((Component)this).transform.position; if (((Vector3)(ref direction)).magnitude > 0.5f) { Rigidbody obj = rb; ((Vector3)(ref val))..ctor(direction.x, 0f, direction.z); obj.AddForce(((Vector3)(ref val)).normalized * followForce * 0.5f); } yield return (object)new WaitForFixedUpdate(); } } public void SetFollowTarget(Transform target) { followTarget = target; ((MonoBehaviour)this).StopCoroutine("HoverInPlace"); } public void ClearFollowTarget() { followTarget = null; ((MonoBehaviour)this).StartCoroutine(HoverInPlace()); } public void SetTargetHeight(float height) { targetHeight = height; } private void OnDrawGizmosSelected() { //IL_0010: 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_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_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_007b: 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_008e: 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_0095: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) if (Application.isPlaying) { Gizmos.color = Color.blue; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(((Component)this).transform.position.x - 2f, targetHeight, ((Component)this).transform.position.z); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(((Component)this).transform.position.x + 2f, targetHeight, ((Component)this).transform.position.z); Gizmos.DrawLine(val, val2); Gizmos.color = Color.yellow; Gizmos.DrawWireSphere(((Component)this).transform.position, obstacleCheckDistance); if ((Object)(object)followTarget != (Object)null) { Gizmos.color = Color.green; Gizmos.DrawLine(((Component)this).transform.position, followTarget.position); } } } } public class JetPackJR : MonoBehaviour { public FVRInteractiveObject handleL; public FVRInteractiveObject handleR; public FVRFireArm gunL; public FVRFireArm gunR; public FVRFireArmChamber chamberL; public FVRFireArmChamber chamberR; public RotateOverTime rotL; public RotateOverTime rotR; public float rotLref; public float rotRref; public FVRPhysicalObject main; public bool fire; public float cdL; public float cdR; public bool isL; public bool isR; public AudioEvent shot; private void Update() { if ((Object)(object)main.m_quickbeltSlot != (Object)null) { if ((Object)(object)handleL.m_hand != (Object)null) { if (handleL.m_hand.Input.TriggerFloat > 0.9f) { isL = true; } else if (handleL.m_hand.Input.TriggerFloat <= 0.9f) { isL = false; } } else if ((Object)(object)handleL.m_hand == (Object)null) { isL = false; } if ((Object)(object)handleR.m_hand != (Object)null) { if (handleR.m_hand.Input.TriggerFloat > 0.9f) { isR = true; } else if (handleR.m_hand.Input.TriggerFloat <= 0.9f) { isR = false; } } else if ((Object)(object)handleR.m_hand == (Object)null) { isR = false; } } else if ((Object)(object)main.m_quickbeltSlot == (Object)null) { isL = false; isR = false; } if (isL || isR) { rotL.angularVelocity.z = Mathf.SmoothDamp(rotL.angularVelocity.z, 2000f, ref rotLref, 0.25f); rotR.angularVelocity.z = Mathf.SmoothDamp(rotR.angularVelocity.z, 2000f, ref rotRref, 0.25f); Fire(); } if (!isL && !isR) { rotL.angularVelocity.z = Mathf.SmoothDamp(rotL.angularVelocity.z, 0f, ref rotLref, 0.25f); rotR.angularVelocity.z = Mathf.SmoothDamp(rotR.angularVelocity.z, 0f, ref rotRref, 0.25f); cdL = 0.25f; cdR = 0.5f; } } private void Fire() { //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_00ad: 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_00f8: 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) cdL -= Time.deltaTime; cdR -= Time.deltaTime; if (cdL <= 0f) { cdL = 0.025f; chamberL.SetRound((FireArmRoundClass)63, ((Component)chamberL).transform.position, ((Component)chamberL).transform.rotation); gunL.Fire(chamberL, gunL.MuzzlePos, true, 1f, -1f); SM.PlayCoreSound((FVRPooledAudioType)41, shot, ((Component)gunL.MuzzlePos).transform.position); } if (cdR <= 0f) { cdR = 0.025f; chamberR.SetRound((FireArmRoundClass)63, ((Component)chamberR).transform.position, ((Component)chamberR).transform.rotation); gunR.Fire(chamberR, gunR.MuzzlePos, true, 1f, -1f); SM.PlayCoreSound((FVRPooledAudioType)41, shot, ((Component)gunR.MuzzlePos).transform.position); } } } public class KragLoader : MonoBehaviour { public FVRFireArmMagazine mag; public Collider triggercol; public float cd; public float cdtar = 0.025f; public GameObject latch; private void Update() { //IL_0245: 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_0163: 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_01ef: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)mag).m_hand != (Object)null) { if (((FVRInteractiveObject)mag).m_hand.IsInStreamlinedMode) { if (((FVRInteractiveObject)mag).m_hand.Input.AXButtonPressed) { latch.transform.localEulerAngles = new Vector3(90f, 0f, 0f); triggercol.enabled = false; cd -= Time.deltaTime; if (cd <= 0f) { cd = cdtar; EjectRound(); } } if (!((FVRInteractiveObject)mag).m_hand.Input.AXButtonPressed) { latch.transform.localEulerAngles = new Vector3(0f, 0f, 0f); triggercol.enabled = true; cd = cdtar; } } else if (!((FVRInteractiveObject)mag).m_hand.IsInStreamlinedMode) { if (((FVRInteractiveObject)mag).m_hand.Input.TouchpadAxes.y <= -0.75f) { latch.transform.localEulerAngles = new Vector3(90f, 0f, 0f); triggercol.enabled = false; cd -= Time.deltaTime; if (cd <= 0f) { cd = cdtar; EjectRound(); } } if (((FVRInteractiveObject)mag).m_hand.Input.TouchpadAxes.y > -0.75f) { latch.transform.localEulerAngles = new Vector3(0f, 0f, 0f); triggercol.enabled = true; cd = cdtar; } } } if ((Object)(object)((FVRInteractiveObject)mag).m_hand == (Object)null) { latch.transform.localEulerAngles = new Vector3(0f, 0f, 0f); triggercol.enabled = true; cd = cdtar; } } private void EjectRound() { //IL_00ad: 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_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_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_016c: 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_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_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_0157: 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_01c1: 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_0212: 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) if ((Object)(object)mag.RoundEjectionPos != (Object)null && mag.HasARound()) { if (mag is CartridgeBox) { FVRFireArmMagazine obj = mag; ((CartridgeBox)((obj is CartridgeBox) ? obj : null)).OpenFarEnoughToEject(mag.m_numRounds); } if (mag.UsesOverrideInOut) { SM.PlayGenericSound(mag.ProfileOverride.MagazineEjectRound, ((Component)mag).transform.position); } else { SM.PlayGenericSound(mag.Profile.MagazineEjectRound, ((Component)mag).transform.position); } Vector3 position = mag.RoundEjectionPos.position; Quaternion rotation = mag.RoundEjectionPos.rotation; if (mag is CartridgeBox) { position = mag.DisplayBullets[Mathf.Clamp(mag.m_numRounds - 1, 0, mag.DisplayBullets.Length - 1)].transform.position; rotation = mag.DisplayBullets[Mathf.Clamp(mag.m_numRounds - 1, 0, mag.DisplayBullets.Length - 1)].transform.rotation; } GameObject val = mag.RemoveRound(false); GameObject val2 = Object.Instantiate(val, position, rotation); ((FVRPhysicalObject)val2.GetComponent()).SetIFF(GM.CurrentPlayerBody.GetPlayerIFF()); val2.GetComponent().AddForce(val2.transform.up * 0.5f, (ForceMode)2); if (mag is CartridgeBox) { val2.GetComponent().BeginAnimationFrom(position, rotation); } else if (mag.DisplayBullets.Length > 0 && (Object)(object)mag.DisplayBullets[0] != (Object)null) { val2.GetComponent().BeginAnimationFrom(mag.DisplayBullets[0].transform.position, mag.DisplayBullets[0].transform.rotation); } Debug.Log((object)"Ejected"); } } } public class KragRifle : MonoBehaviour { public BoltActionRifle krag; public Collider chambercol; public AR15HandleSightFlipper safety; public AR15HandleSightFlipper cutoff; public FVRFireArmMagazine mag; public bool extracted; public bool safetytoggled; public Collider magloadtrigger; public FVRFoldingStockYAxis lid; public WaggleJoint lidwag; public bool shut; public float cdcol; public float cdcoltar = 0.025f; public Transform roundejectionposmag; public Collider safetycol; private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Invalid comparison between Unknown and I4 //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Invalid comparison between Unknown and I4 //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_0769: 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_0511: Unknown result type (might be due to invalid IL or missing references) //IL_054e: 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_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_01ec: 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_0202: 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_0213: 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_05f8: Unknown result type (might be due to invalid IL or missing references) //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_0627: 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_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: 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_02ae: 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_0313: 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_0296: 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_0654: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: 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_039f: Unknown result type (might be due to invalid IL or missing references) if ((int)krag.BoltHandle.HandleRot == 2) { safetycol.enabled = true; } else if ((int)krag.BoltHandle.HandleRot != 2) { safetycol.enabled = false; } if (safety.m_isLargeAperture && !safetytoggled) { krag.ToggleFireSelector(); safetytoggled = true; } if (!safety.m_isLargeAperture && safetytoggled) { krag.ToggleFireSelector(); safetytoggled = false; } lidwag.angleLimitLeft = ((Component)lid.Stock).transform.localEulerAngles.y - 90f; if ((int)krag.BoltHandle.HandleState == 2 && !extracted) { chambercol.enabled = false; if (cutoff.m_isLargeAperture && ((Component)lid).transform.localEulerAngles.y <= 5f && (Object)(object)mag.RoundEjectionPos != (Object)null && mag.HasARound()) { if (mag is CartridgeBox) { FVRFireArmMagazine obj = mag; ((CartridgeBox)((obj is CartridgeBox) ? obj : null)).OpenFarEnoughToEject(mag.m_numRounds); } else if (mag.UsesOverrideInOut) { SM.PlayGenericSound(mag.ProfileOverride.MagazineEjectRound, ((Component)mag).transform.position); } else { SM.PlayGenericSound(mag.Profile.MagazineEjectRound, ((Component)mag).transform.position); } Vector3 position = mag.RoundEjectionPos.position; Quaternion rotation = mag.RoundEjectionPos.rotation; if (mag is CartridgeBox) { position = mag.DisplayBullets[Mathf.Clamp(mag.m_numRounds - 1, 0, mag.DisplayBullets.Length - 1)].transform.position; rotation = mag.DisplayBullets[Mathf.Clamp(mag.m_numRounds - 1, 0, mag.DisplayBullets.Length - 1)].transform.rotation; } GameObject val = mag.RemoveRound(false); GameObject val2 = Object.Instantiate(val, position, rotation); val2.GetComponent().m_pickUpCooldown = 0f; ((FVRInteractiveObject)val2.GetComponent()).triggerCooldown = 0f; ((FVRInteractiveObject)val2.GetComponent()).m_hasTriggeredUpSinceBegin = true; ((FVRPhysicalObject)val2.GetComponent()).SetIFF(GM.CurrentPlayerBody.GetPlayerIFF()); val2.GetComponent().AddForce(val2.transform.up * 0.5f, (ForceMode)2); if (mag is CartridgeBox) { val2.GetComponent().BeginAnimationFrom(position, rotation); } else if (mag.DisplayBullets.Length > 0 && (Object)(object)mag.DisplayBullets[0] != (Object)null) { val2.GetComponent().BeginAnimationFrom(mag.DisplayBullets[0].transform.position, mag.DisplayBullets[0].transform.rotation); } Debug.Log((object)"Extracted"); } extracted = true; } if ((int)krag.BoltHandle.HandleState == 1 && extracted) { chambercol.enabled = true; extracted = false; } if (((Component)lid).transform.localEulerAngles.y <= 5f && !shut) { ((FVRInteractiveObject)lid).ForceBreakInteraction(); ((Component)lid.Stock).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); shut = true; } if (((Component)lid).transform.localEulerAngles.y >= 15f) { shut = false; if ((Object)(object)roundejectionposmag != (Object)null && mag.HasARound()) { if (mag is CartridgeBox) { FVRFireArmMagazine obj2 = mag; ((CartridgeBox)((obj2 is CartridgeBox) ? obj2 : null)).OpenFarEnoughToEject(mag.m_numRounds); } else if (mag.UsesOverrideInOut) { SM.PlayGenericSound(mag.ProfileOverride.MagazineEjectRound, ((Component)mag).transform.position); } else { SM.PlayGenericSound(mag.Profile.MagazineEjectRound, ((Component)mag).transform.position); } Vector3 position2 = roundejectionposmag.position; Quaternion rotation2 = roundejectionposmag.rotation; if (mag is CartridgeBox) { position2 = mag.DisplayBullets[Mathf.Clamp(mag.m_numRounds - 1, 0, mag.DisplayBullets.Length - 1)].transform.position; rotation2 = mag.DisplayBullets[Mathf.Clamp(mag.m_numRounds - 1, 0, mag.DisplayBullets.Length - 1)].transform.rotation; } GameObject val3 = mag.RemoveRound(true); GameObject val4 = Object.Instantiate(val3, position2, rotation2); ((FVRPhysicalObject)val4.GetComponent()).SetIFF(GM.CurrentPlayerBody.GetPlayerIFF()); val4.GetComponent().AddForce(val4.transform.up * 0.5f, (ForceMode)2); if (mag is CartridgeBox) { val4.GetComponent().BeginAnimationFrom(position2, rotation2); } else if (mag.DisplayBullets.Length > 0 && (Object)(object)mag.DisplayBullets[0] != (Object)null) { val4.GetComponent().BeginAnimationFrom(mag.DisplayBullets[0].transform.position, mag.DisplayBullets[0].transform.rotation); } Debug.Log((object)"Dumpt"); } } if (((Component)lid).transform.localEulerAngles.y <= 5f) { if (cdcol > 0f) { cdcol -= Time.deltaTime; magloadtrigger.enabled = true; } if (cdcol <= 0f) { cdcol = 0f; magloadtrigger.enabled = false; } } else if (((Component)lid).transform.localEulerAngles.y > 5f) { cdcol = cdcoltar; magloadtrigger.enabled = false; } } private void OnTriggerStay(Collider other) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && ((Component)other).gameObject.GetComponent().RoundType == ((FVRFireArm)krag).RoundType && mag.m_numRounds < mag.m_capacity) { mag.AddRound(((Component)other).gameObject.GetComponent().RoundClass, true, true); Object.Destroy((Object)(object)((Component)other).gameObject); } } } public class SMLEQuickBolt : MonoBehaviour { public BoltActionRifle rifle; public BoltActionRifle_Handle handle; public Vector3 velLinearWorld; public Vector3 velLinearWorld2; public FVRAlternateGrip grip; public Transform slapdirOpen; public Transform slapdirClose; public bool Slamed = false; public float drive = 0f; public bool stop = true; public Vector3 gunrecoilref; public Vector3 gunholdref; public Transform clipEjectdir; private Vector3 Pos; private Vector3 Rot; private GameObject shoulderpos; private GameObject headpos; private GameObject Gunholder; private GameObject Gunref; private float shoulderdis = 0.25f; private bool shouldered = false; public bool wasHarnessed; public FVRQuickBeltSlot slot; private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(shotthis); } private void shotthis(FVRFireArm gun) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) Gunref.transform.localPosition = new Vector3(Gunref.transform.localPosition.x, Gunref.transform.localPosition.y, Gunref.transform.localPosition.z - 0.05f); } private void FixedUpdate() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Invalid comparison between Unknown and I4 //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Invalid comparison between Unknown and I4 //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: 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_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: 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_0297: 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_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) if (!Slamed && !stop) { drive -= 10f * Time.deltaTime; handle.DriveBolt(drive); if ((int)handle.HandleState == 0 && handle.rotAngle <= handle.MinRot + 1f) { stop = true; } } if (Slamed && !stop) { drive += 2f * Time.deltaTime; handle.DriveBolt(drive); if ((int)handle.HandleState == 2 && handle.rotAngle == handle.MaxRot) { stop = true; } } drive = Mathf.Clamp(drive, 0f, 1f); if (((FVRPhysicalObject)rifle).IsAltHeld && (Object)(object)((FVRFireArm)rifle).Clip != (Object)null) { velLinearWorld2 = ((FVRInteractiveObject)rifle).m_hand.OtherHand.Input.VelLinearWorld; if (Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, clipEjectdir.position) < 0.1f && Vector3.Angle(velLinearWorld2, clipEjectdir.forward) < 50f && ((Vector3)(ref velLinearWorld2)).magnitude > 0.5f) { ((FVRFireArm)rifle).EjectClip(); } } if (((FVRPhysicalObject)rifle).IsAltHeld && !((FVRInteractiveObject)handle).m_isHeld && (Object)(object)((FVRInteractiveObject)rifle).m_hand.OtherHand.m_currentInteractable != (Object)(object)rifle && (Object)(object)((FVRInteractiveObject)rifle).m_hand.OtherHand.m_currentInteractable != (Object)(object)handle) { velLinearWorld = ((FVRInteractiveObject)rifle).m_hand.OtherHand.Input.VelLinearWorld; if (!Slamed && Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, slapdirOpen.position) < 0.1f && Vector3.Angle(velLinearWorld, slapdirOpen.forward) < 50f && ((Vector3)(ref velLinearWorld)).magnitude > 1f) { stop = false; Slamed = true; } if (Slamed && Vector3.Distance(((FVRInteractiveObject)rifle).m_hand.OtherHand.PalmTransform.position, slapdirClose.position) < 0.1f && Vector3.Angle(velLinearWorld, slapdirClose.forward) < 50f && ((Vector3)(ref velLinearWorld)).magnitude > 1f) { stop = false; Slamed = false; } } if (((FVRInteractiveObject)handle).m_isHeld) { if ((int)handle.HandleState == 2 && handle.rotAngle >= handle.MaxRot - 1f) { Slamed = true; } if ((int)handle.HandleState == 0 && handle.rotAngle <= handle.MaxRot + 1f) { Slamed = false; } drive = Mathf.Abs(handle.BoltActionHandleRoot.localPosition.z / handle.Point_Rearward.localPosition.z); } } private void Update() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Gunholder == (Object)null) { Gunholder = new GameObject("Gunholder"); Debug.Log((object)"GunHolder"); } if ((Object)(object)Gunref == (Object)null) { Gunref = new GameObject("Gunref"); Gunref.transform.SetParent(Gunholder.transform); Debug.Log((object)"Gunref"); } if ((Object)(object)headpos == (Object)null) { headpos = new GameObject("HeadPos"); Debug.Log((object)"Headpos"); } if ((Object)(object)shoulderpos == (Object)null) { shoulderpos = new GameObject("ShoulderPos"); Debug.Log((object)"ShoulderPos"); if ((Object)(object)headpos != (Object)null) { shoulderpos.transform.SetParent(headpos.transform); shoulderpos.transform.localPosition = new Vector3(0.05f, -0.05f, 0f); } } headpos.transform.position = ((Component)GM.CurrentMovementManager.Head).transform.position; headpos.transform.eulerAngles = ((Component)GM.CurrentMovementManager.Head).transform.eulerAngles; if (Vector3.Distance(((FVRFireArm)rifle).StockPos.position, shoulderpos.transform.position) < shoulderdis && ((FVRPhysicalObject)rifle).IsAltHeld && ((FVRInteractiveObject)handle).IsHeld && ((((FVRInteractiveObject)handle).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)handle).m_hand.Input.AXButtonPressed) || (!((FVRInteractiveObject)handle).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)handle).m_hand.Input.TouchpadAxes.y <= -0.9f))) { if (((FVRPhysicalObject)rifle).m_isHardnessed) { wasHarnessed = true; slot = ((FVRPhysicalObject)rifle).m_quickbeltSlot; slot.CurObject = null; ((FVRPhysicalObject)rifle).m_quickbeltSlot = null; ((FVRPhysicalObject)rifle).m_isHardnessed = false; } if (!shouldered) { Gunholder.transform.position = ((FVRFireArm)rifle).Foregrip.transform.position; Gunholder.transform.eulerAngles = ((FVRFireArm)rifle).Foregrip.transform.eulerAngles; Gunref.transform.position = ((Component)rifle).transform.position; Gunref.transform.eulerAngles = ((Component)rifle).transform.eulerAngles; gunholdref = Gunref.transform.localPosition; ((FVRInteractiveObject)rifle).ForceBreakInteraction(); ((FVRInteractiveObject)grip).ForceBreakInteraction(); ((FVRPhysicalObject)rifle).StoreAndDestroyRigidbody(); shouldered = true; } } if (shouldered && GM.CurrentMovementManager.Hands[0].Input.GripPressed) { if (((FVRInteractiveObject)handle).m_isHeld) { if (((FVRInteractiveObject)handle).m_hand.Input.TriggerFloat >= 0.75f && (int)rifle.CurBoltHandleState == 0 && (int)rifle.FireSelector_Modes[rifle.m_fireSelectorMode].ModeType != 0) { rifle.Fire(); } ((Component)rifle).gameObject.transform.SetParent(Gunref.transform); ((Component)rifle).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)rifle).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); Gunref.transform.localEulerAngles = Vector3.zero; Gunref.transform.localPosition = Vector3.SmoothDamp(Gunref.transform.localPosition, gunholdref, ref gunrecoilref, 0.1f); Gunholder.transform.position = ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.position; AxisLookAt(Gunholder.transform, shoulderpos.transform.position, Vector3.back); GM.CurrentMovementManager.Hands[0].Display_Controller.SetActive(false); } else if (!((FVRInteractiveObject)handle).m_isHeld) { if (wasHarnessed && (Object)(object)slot != (Object)null) { ((FVRPhysicalObject)rifle).m_quickbeltSlot = slot; slot.CurObject = (FVRPhysicalObject)(object)rifle; ((FVRPhysicalObject)rifle).m_isHardnessed = true; wasHarnessed = false; } ((FVRPhysicalObject)rifle).BeginInteractionThroughAltGrip(GM.CurrentMovementManager.Hands[0], grip); shouldered = false; } } else if (shouldered && !GM.CurrentMovementManager.Hands[0].Input.GripPressed) { if (wasHarnessed && (Object)(object)slot != (Object)null) { ((FVRPhysicalObject)rifle).m_quickbeltSlot = slot; slot.CurObject = (FVRPhysicalObject)(object)rifle; ((FVRPhysicalObject)rifle).m_isHardnessed = true; wasHarnessed = false; } ((Component)rifle).gameObject.transform.SetParent((Transform)null); ((FVRPhysicalObject)rifle).RecoverRigidbody(); GM.CurrentMovementManager.Hands[0].Display_Controller.SetActive(true); shouldered = false; } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(shotthis); } } public class LightSaber : MonoBehaviour { public LightsaberTrail trail; public AudioSource whooshAudio; public GameObject bladeGeo; public AR15HandleSightFlipper flipper; public FVRPhysicalObject main; public GameObject togglebutton; public GameObject bladeball; public Vector3 bladeballref; public AudioSource on; public AudioSource idle; public AudioSource off; public bool isOn = false; public float volumeref; public float pitchref; public float v; public float p; public GameObject bladeballtarg; public float bladeballSmooth; public float volumeSmooth; public float pitchSmooth; public float volumeMul; public float pitchMul; public Collider damcol; public GameObject mainobj; public Light l; public float lengthMul = 1.15f; public GameObject thisObj; public float speed; public Vector3 lastPosition; public float speedlim = 10f; public LayerMask lm; public GameObject bladeHolderScale; public AudioSource hitaud; public bool buttonpressed = false; public float bladelength = 0.935f; public float ThermalDamage = 100f; 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_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_0089: 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_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_00b5: 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_00c9: 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_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_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) 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)0; val.Dam_Thermal = ThermalDamage; val.Dam_Blunt = ThermalDamage * 0.5f; val.Dam_TotalEnergetic = ThermalDamage * 0.5f; 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); } } public void OnTriggerEnter(Collider other) { IFVRDamageable component = ((Component)other).GetComponent(); if (component == null && (Object)(object)other.attachedRigidbody != (Object)null) { component = ((Component)other.attachedRigidbody).GetComponent(); } if (component != null) { hitaud.Play(); } 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) { hitaud.Play(); } } private void Start() { //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) lastPosition = Vector3.zero; whooshAudio.volume = 0f; } private void Update() { //IL_0124: 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_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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ba: 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_01d4: 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_01f1: 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_0467: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_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_022e: 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_024f: 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_0277: 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_0319: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: 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_03be: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)main).m_isHeld) { if (((FVRInteractiveObject)main).m_hand.Input.TriggerFloat >= 0.75f && !buttonpressed) { buttonpressed = true; flipper.m_isLargeAperture = !flipper.m_isLargeAperture; } if (((FVRInteractiveObject)main).m_hand.Input.TriggerFloat < 0.75f) { buttonpressed = false; } } if (!((FVRInteractiveObject)main).m_isHeld) { buttonpressed = false; } whooshAudio.volume = Mathf.SmoothDamp(whooshAudio.volume, speed * volumeMul, ref volumeref, volumeSmooth); whooshAudio.pitch = Mathf.SmoothDamp(whooshAudio.pitch, 0.5f + speed * pitchMul, ref pitchref, pitchSmooth); thisObj.transform.localScale = bladeGeo.transform.localScale; if (speed > speedlim) { speed = speedlim; } speed = Vector3.Distance(bladeballtarg.transform.position, lastPosition) / Time.deltaTime; lastPosition = bladeballtarg.transform.position; if (togglebutton.transform.localEulerAngles.x > 1f) { Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.forward); RaycastHit val2 = default(RaycastHit); Physics.Raycast(val, ref val2, bladelength, LayerMask.op_Implicit(lm)); if (Vector3.Distance(((RaycastHit)(ref val2)).point, ((Component)this).gameObject.transform.position) <= bladelength) { bladeHolderScale.transform.localScale = new Vector3(1f, 1f, Vector3.Distance(((RaycastHit)(ref val2)).point, ((Component)this).gameObject.transform.position) / bladelength); trail.height = bladelength * (Vector3.Distance(((RaycastHit)(ref val2)).point, ((Component)this).gameObject.transform.position) / bladelength); } else if (Vector3.Distance(((RaycastHit)(ref val2)).point, ((Component)this).gameObject.transform.position) > bladelength) { trail.height = bladelength; bladeHolderScale.transform.localScale = new Vector3(1f, 1f, 1f); } bladeball.transform.position = Vector3.SmoothDamp(bladeball.transform.position, bladeballtarg.transform.position, ref bladeballref, bladeballSmooth); bladeGeo.transform.localScale = new Vector3(1f, 1f, lengthMul * (togglebutton.transform.localEulerAngles.x / 90f)); l.intensity = 2f * (togglebutton.transform.localEulerAngles.x / 90f); idle.volume = togglebutton.transform.localEulerAngles.x / 90f; if (!isOn) { damcol.enabled = true; on.Play(); isOn = true; } } else if (togglebutton.transform.localEulerAngles.x <= 1f) { l.intensity = 0f; v = 0f; p = 0f; bladeball.transform.localPosition = new Vector3(0f, 0f, 0f); bladeGeo.transform.localScale = new Vector3(0f, 0f, 0f); if (isOn) { damcol.enabled = false; on.Play(); isOn = false; } } } } } internal class TronTrailSection { public Vector3 point; public Vector3 upDir; public float time; public TronTrailSection() { } public TronTrailSection(Vector3 p, float t) { //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) point = p; time = t; } } [RequireComponent(typeof(MeshFilter))] public class LightsaberTrail : MonoBehaviour { public float height = 2f; public float time = 2f; public bool alwaysUp = false; public float minDistance = 0.1f; public float timeTransitionSpeed = 1f; public float desiredTime = 2f; public Color startColor = Color.white; public Color endColor = new Color(1f, 1f, 1f, 0f); private Vector3 position; private float now = 0f; private TronTrailSection currentSection; private Matrix4x4 localSpaceTransform; private Mesh mesh; private Vector3[] vertices; private Color[] colors; private Vector2[] uv; private MeshRenderer meshRenderer; private Material trailMaterial; private List sections = new List(); private void Awake() { Component component = ((Component)this).GetComponent(typeof(MeshFilter)); MeshFilter val = (MeshFilter)(object)((component is MeshFilter) ? component : null); mesh = val.mesh; ref MeshRenderer reference = ref meshRenderer; Component component2 = ((Component)this).GetComponent(typeof(MeshRenderer)); reference = (MeshRenderer)(object)((component2 is MeshRenderer) ? component2 : null); trailMaterial = ((Renderer)meshRenderer).material; } public void StartTrail(float timeToTweenTo, float fadeInTime) { desiredTime = timeToTweenTo; if (time != desiredTime) { timeTransitionSpeed = Mathf.Abs(desiredTime - time) / fadeInTime; } if (time <= 0f) { time = 0.01f; } } public void SetTime(float trailTime, float timeToTweenTo, float tweenSpeed) { time = trailTime; desiredTime = timeToTweenTo; timeTransitionSpeed = tweenSpeed; if (time <= 0f) { ClearTrail(); } } public void FadeOut(float fadeTime) { desiredTime = 0f; if (time > 0f) { timeTransitionSpeed = time / fadeTime; } } public void SetTrailColor(Color color) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) trailMaterial.SetColor("_TintColor", color); } public void Iterate(float itterateTime) { //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_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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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) position = ((Component)this).transform.position; now = itterateTime; if (sections.Count != 0) { Vector3 val = sections[0].point - position; if (!(((Vector3)(ref val)).sqrMagnitude > minDistance * minDistance)) { return; } } TronTrailSection tronTrailSection = new TronTrailSection(); tronTrailSection.point = position; if (alwaysUp) { tronTrailSection.upDir = Vector3.up; } else { tronTrailSection.upDir = ((Component)this).transform.TransformDirection(Vector3.up); } tronTrailSection.time = now; sections.Insert(0, tronTrailSection); } public void UpdateTrail(float currentTime, float deltaTime) { //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0157: 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_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_01d7: 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_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_01f7: 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_020d: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) mesh.Clear(); while (sections.Count > 0 && currentTime > sections[sections.Count - 1].time + time) { sections.RemoveAt(sections.Count - 1); } if (sections.Count < 2) { return; } vertices = (Vector3[])(object)new Vector3[sections.Count * 2]; colors = (Color[])(object)new Color[sections.Count * 2]; uv = (Vector2[])(object)new Vector2[sections.Count * 2]; currentSection = sections[0]; localSpaceTransform = ((Component)this).transform.worldToLocalMatrix; for (int i = 0; i < sections.Count; i++) { currentSection = sections[i]; float num = 0f; if (i != 0) { num = Mathf.Clamp01((currentTime - currentSection.time) / time); } Vector3 upDir = currentSection.upDir; ref Vector3 reference = ref vertices[i * 2]; reference = ((Matrix4x4)(ref localSpaceTransform)).MultiplyPoint(currentSection.point); ref Vector3 reference2 = ref vertices[i * 2 + 1]; reference2 = ((Matrix4x4)(ref localSpaceTransform)).MultiplyPoint(currentSection.point + upDir * height); ref Vector2 reference3 = ref uv[i * 2]; reference3 = new Vector2(num, 0f); ref Vector2 reference4 = ref uv[i * 2 + 1]; reference4 = new Vector2(num, 1f); Color val = Color.Lerp(startColor, endColor, num); colors[i * 2] = val; colors[i * 2 + 1] = val; } int[] array = new int[(sections.Count - 1) * 2 * 3]; for (int j = 0; j < array.Length / 6; j++) { array[j * 6] = j * 2; array[j * 6 + 1] = j * 2 + 1; array[j * 6 + 2] = j * 2 + 2; array[j * 6 + 3] = j * 2 + 2; array[j * 6 + 4] = j * 2 + 1; array[j * 6 + 5] = j * 2 + 3; } mesh.vertices = vertices; mesh.colors = colors; mesh.uv = uv; mesh.triangles = array; if (time > desiredTime) { time -= deltaTime * timeTransitionSpeed; if (time <= desiredTime) { time = desiredTime; } } else if (time < desiredTime) { time += deltaTime * timeTransitionSpeed; if (time >= desiredTime) { time = desiredTime; } } } public void ClearTrail() { desiredTime = 0f; time = 0f; if ((Object)(object)mesh != (Object)null) { mesh.Clear(); sections.Clear(); } } } [RequireComponent(typeof(LightsaberTrail))] public class LightsaberTrailController : MonoBehaviour { private LightsaberTrail lightsaberTrail; private void Start() { lightsaberTrail = ((Component)this).GetComponent(); } private void Update() { lightsaberTrail.Iterate(Time.time); lightsaberTrail.UpdateTrail(Time.time, 0f); } } namespace JerryAr.BRUH_H { [BepInPlugin("JerryAr.BRUH_H", "BRUH_H", "1.1.0")] [BepInProcess("h3vr.exe")] [Description("Built with MeatKit")] [BepInDependency("h3vr.otherloader", "1.3.0")] public class BRUH_HPlugin : 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.BRUH_H"); OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.BRUH_H", "", "", "bruh", ""); } } } namespace JerryComponent { 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(); } } } public class ParentPlayer : MonoBehaviour { public FVRPhysicalObject ObjItself; public bool kicked = false; public float kickForceMul = 10f; public GameObject ParentObj; public GameObject PlayerRef; public float SteerMul = 100f; public float MaxX; public float MinX; public float MaxY; public float MinY; public float MaxZ; public float MinZ; public GameObject board; public WheelCollider WheelSteerL; public WheelCollider WheelSteerR; public WheelCollider WheelStaticL; public WheelCollider WheelStaticR; [NonSerialized] public float WFL; [NonSerialized] public float WFR; [NonSerialized] public float WRL; [NonSerialized] public float WRR; public GameObject Fsus; public GameObject Rsus; public GameObject WheelFrontL; public GameObject WheelFrontR; public GameObject WheelRearL; public GameObject WheelRearR; public GameObject navb; [NonSerialized] public float FY; [NonSerialized] public float RY; [NonSerialized] public float BZ; [NonSerialized] public float WSL; [NonSerialized] public float WSR; [NonSerialized] public float WSL2; [NonSerialized] public float WSR2; private void Start() { navb.transform.SetParent((Transform)null); } private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_007d: 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_00a2: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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_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) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: 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_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0702: 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_0727: 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_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_08b2: Unknown result type (might be due to invalid IL or missing references) //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08fa: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0823: Unknown result type (might be due to invalid IL or missing references) //IL_0831: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_0756: 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_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: 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_0478: 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_0536: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0561: 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_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: 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_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_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_06cf: 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_06e2: Unknown result type (might be due to invalid IL or missing references) WheelFrontL.transform.localEulerAngles = new Vector3(WheelFrontL.transform.localEulerAngles.x - WheelSteerL.rpm, 0f, 0f); WheelFrontR.transform.localEulerAngles = new Vector3(WheelFrontR.transform.localEulerAngles.x - WheelSteerR.rpm, 0f, 0f); WheelRearL.transform.localEulerAngles = new Vector3(WheelRearL.transform.localEulerAngles.x - WheelStaticL.rpm, 0f, 0f); WheelRearR.transform.localEulerAngles = new Vector3(WheelRearR.transform.localEulerAngles.x - WheelStaticR.rpm, 0f, 0f); WheelStaticL.motorTorque = Mathf.SmoothDamp(WheelStaticL.motorTorque, 0f, ref WSL, 5f); WheelStaticR.motorTorque = Mathf.SmoothDamp(WheelStaticR.motorTorque, 0f, ref WSR, 5f); WheelSteerL.motorTorque = Mathf.SmoothDamp(WheelSteerL.motorTorque, 0f, ref WSL2, 5f); WheelSteerR.motorTorque = Mathf.SmoothDamp(WheelSteerR.motorTorque, 0f, ref WSR2, 5f); if (((FVRInteractiveObject)ObjItself).IsHeld || (Object)(object)ObjItself.QuickbeltSlot != (Object)null) { WheelStaticL.motorTorque = 0f; WheelStaticR.motorTorque = 0f; WheelSteerL.motorTorque = 0f; WheelSteerR.motorTorque = 0f; navb.SetActive(false); ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); kicked = false; WheelSteerL.steerAngle = 0f; WheelSteerR.steerAngle = 0f; WheelStaticL.steerAngle = 0f; WheelStaticR.steerAngle = 0f; Fsus.transform.localEulerAngles = new Vector3(0f, 0f, 0f); Rsus.transform.localEulerAngles = new Vector3(0f, 0f, 0f); board.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else { if (((FVRInteractiveObject)ObjItself).IsHeld || !((Object)(object)ObjItself.QuickbeltSlot == (Object)null)) { return; } navb.SetActive(true); if (!((Object)(object)GM.CurrentMovementManager != (Object)null)) { return; } PlayerRef.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position.x, ((Component)GM.CurrentMovementManager).gameObject.transform.position.y, ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position.z); if (PlayerRef.transform.localPosition.x < MaxX && PlayerRef.transform.localPosition.x > MinX && PlayerRef.transform.localPosition.y < MaxY && PlayerRef.transform.localPosition.y > MinY && PlayerRef.transform.localPosition.z < MaxZ && PlayerRef.transform.localPosition.z > MinZ) { if (!kicked) { WheelStaticL.motorTorque = ((Vector3)(ref GM.CurrentMovementManager.m_smoothLocoVelocity)).magnitude * kickForceMul; WheelStaticR.motorTorque = ((Vector3)(ref GM.CurrentMovementManager.m_smoothLocoVelocity)).magnitude * kickForceMul; WheelSteerL.motorTorque = ((Vector3)(ref GM.CurrentMovementManager.m_smoothLocoVelocity)).magnitude * kickForceMul; WheelSteerR.motorTorque = ((Vector3)(ref GM.CurrentMovementManager.m_smoothLocoVelocity)).magnitude * kickForceMul; kicked = true; } WheelSteerL.steerAngle = PlayerRef.transform.localPosition.x * SteerMul; WheelSteerR.steerAngle = PlayerRef.transform.localPosition.x * SteerMul; board.transform.localEulerAngles = new Vector3(PlayerRef.transform.localPosition.x * -73.3f, 0f, 0f); Fsus.transform.localEulerAngles = new Vector3(0f, PlayerRef.transform.localPosition.x * 100f, 0f); Rsus.transform.localEulerAngles = new Vector3(0f, PlayerRef.transform.localPosition.x * -100f, 0f); WheelStaticL.steerAngle = PlayerRef.transform.localPosition.x * (0f - SteerMul); WheelStaticR.steerAngle = PlayerRef.transform.localPosition.x * (0f - SteerMul); ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent(ParentObj.transform); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); } else if (PlayerRef.transform.localPosition.x > 2f * MaxX || PlayerRef.transform.localPosition.x < 2f * MinX || PlayerRef.transform.localPosition.y > 2f * MaxY || PlayerRef.transform.localPosition.y < 2f * MinY || PlayerRef.transform.localPosition.z > 2f * MaxZ || PlayerRef.transform.localPosition.z < 2f * MinZ) { if (kicked) { ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); kicked = false; } WheelSteerL.steerAngle = 0f; WheelSteerR.steerAngle = 0f; WheelStaticL.steerAngle = 0f; WheelStaticR.steerAngle = 0f; Fsus.transform.localEulerAngles = new Vector3(0f, 0f, 0f); Rsus.transform.localEulerAngles = new Vector3(0f, 0f, 0f); board.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } private void OnDestroy() { //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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)navb); kicked = false; WheelSteerL.steerAngle = Mathf.Lerp(WheelSteerL.steerAngle, 0f, 0.1f); WheelSteerR.steerAngle = Mathf.Lerp(WheelSteerL.steerAngle, 0f, 0.1f); WheelStaticL.steerAngle = Mathf.Lerp(WheelStaticL.steerAngle, 0f, 0.1f); WheelStaticR.steerAngle = Mathf.Lerp(WheelStaticR.steerAngle, 0f, 0.1f); Fsus.transform.localEulerAngles = new Vector3(0f, Mathf.SmoothDamp(Fsus.transform.localEulerAngles.y, 0f, ref FY, 0.25f), 0f); Rsus.transform.localEulerAngles = new Vector3(0f, Mathf.SmoothDamp(Rsus.transform.localEulerAngles.y, 0f, ref RY, 0.25f), 0f); board.transform.localEulerAngles = new Vector3(Mathf.SmoothDamp(board.transform.localEulerAngles.x, 0f, ref BZ, 0.25f), 0f, 0f); ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); } } public class SPO15P : MonoBehaviour { private class RigidbodyDistance { public SosigLink rigidbody; public float distance; public RigidbodyDistance(SosigLink rb, float dist) { rigidbody = rb; distance = dist; } } public List currentAI = null; public AudioSource beep; public GameObject volknob; public bool see1; public bool see2; public bool exist1; public bool exist2; public GameObject YMainHolder; public GameObject trueiff; 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; public GameObject SAMRADARMain; public GameObject SAMRADAR; public GameObject MainY; public GameObject Y; 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_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) if (objects == null || objects.Count <= 0 || order < 1 || order > objects.Count) { return null; } List list = new List(); foreach (SosigLink @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; } private void OnTriggerStay(Collider other) { //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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0116: 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_01d6: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Invalid comparison between Unknown and I4 if (!(((Object)((Component)other).gameObject).name == "Sosig_Torso") || !((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null)) { return; } if (!currentAI.Contains(((Component)other).gameObject.GetComponent()) && Vector3.Distance(((Component)this).gameObject.transform.position, ((Component)other).gameObject.transform.position) < 80f && (Object)(object)((Component)other).gameObject.GetComponent().S != (Object)null && (int)((Component)other).gameObject.GetComponent().S.BodyState != 3) { currentAI.Add(((Component)other).gameObject.GetComponent()); } if (currentAI == null || currentAI.Count <= 0 || !currentAI.Contains(((Component)other).gameObject.GetComponent())) { return; } if (Vector3.Distance(((Component)this).gameObject.transform.position, ((Component)other).gameObject.transform.position) < 80f) { if ((Object)(object)((Component)other).gameObject.GetComponent().S != (Object)null) { if ((int)((Component)other).gameObject.GetComponent().S.BodyState == 3) { currentAI.Remove(((Component)other).gameObject.GetComponent()); } } else if ((Object)(object)((Component)other).gameObject.GetComponent().S == (Object)null) { currentAI.Remove(((Component)other).gameObject.GetComponent()); } } else if (Vector3.Distance(((Component)this).gameObject.transform.position, ((Component)other).gameObject.transform.position) > 80f) { currentAI.Remove(((Component)other).gameObject.GetComponent()); } } private void FixedUpdate() { //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_009b: 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_0994: Unknown result type (might be due to invalid IL or missing references) //IL_09b8: 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_0a04: 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_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0aaa: 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_0b82: Unknown result type (might be due to invalid IL or missing references) //IL_0b87: 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_0bdb: Unknown result type (might be due to invalid IL or missing references) //IL_0be0: Unknown result type (might be due to invalid IL or missing references) //IL_0ba5: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: 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_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0bfe: Unknown result type (might be due to invalid IL or missing references) //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c2f: Unknown result type (might be due to invalid IL or missing references) //IL_0c34: Unknown result type (might be due to invalid IL or missing references) //IL_222b: Unknown result type (might be due to invalid IL or missing references) //IL_2230: 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_1a9a: Unknown result type (might be due to invalid IL or missing references) //IL_0c88: Unknown result type (might be due to invalid IL or missing references) //IL_0c8d: Unknown result type (might be due to invalid IL or missing references) //IL_0c52: Unknown result type (might be due to invalid IL or missing references) //IL_0c57: 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_03fd: 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_02c5: Invalid comparison between Unknown and I4 //IL_2284: Unknown result type (might be due to invalid IL or missing references) //IL_2289: Unknown result type (might be due to invalid IL or missing references) //IL_224e: Unknown result type (might be due to invalid IL or missing references) //IL_2253: Unknown result type (might be due to invalid IL or missing references) //IL_1ac7: Unknown result type (might be due to invalid IL or missing references) //IL_1ad7: Unknown result type (might be due to invalid IL or missing references) //IL_0cab: Unknown result type (might be due to invalid IL or missing references) //IL_0cb0: Unknown result type (might be due to invalid IL or missing references) //IL_22a7: Unknown result type (might be due to invalid IL or missing references) //IL_22ac: Unknown result type (might be due to invalid IL or missing references) //IL_1b04: Unknown result type (might be due to invalid IL or missing references) //IL_1b14: Unknown result type (might be due to invalid IL or missing references) //IL_0cdc: 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_22d8: Unknown result type (might be due to invalid IL or missing references) //IL_22dd: Unknown result type (might be due to invalid IL or missing references) //IL_1b41: Unknown result type (might be due to invalid IL or missing references) //IL_1b51: Unknown result type (might be due to invalid IL or missing references) //IL_0d35: Unknown result type (might be due to invalid IL or missing references) //IL_0d3a: Unknown result type (might be due to invalid IL or missing references) //IL_0cff: 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_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Invalid comparison between Unknown and I4 //IL_2331: Unknown result type (might be due to invalid IL or missing references) //IL_2336: Unknown result type (might be due to invalid IL or missing references) //IL_22fb: Unknown result type (might be due to invalid IL or missing references) //IL_2300: Unknown result type (might be due to invalid IL or missing references) //IL_1b7e: Unknown result type (might be due to invalid IL or missing references) //IL_1b8e: Unknown result type (might be due to invalid IL or missing references) //IL_0d58: Unknown result type (might be due to invalid IL or missing references) //IL_0d5d: 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_0630: Unknown result type (might be due to invalid IL or missing references) //IL_2354: Unknown result type (might be due to invalid IL or missing references) //IL_2359: Unknown result type (might be due to invalid IL or missing references) //IL_1bbb: Unknown result type (might be due to invalid IL or missing references) //IL_1bcb: Unknown result type (might be due to invalid IL or missing references) //IL_0d89: Unknown result type (might be due to invalid IL or missing references) //IL_0d8e: Unknown result type (might be due to invalid IL or missing references) //IL_2385: Unknown result type (might be due to invalid IL or missing references) //IL_238a: Unknown result type (might be due to invalid IL or missing references) //IL_1bf8: 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_0de2: Unknown result type (might be due to invalid IL or missing references) //IL_0de7: 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_23de: Unknown result type (might be due to invalid IL or missing references) //IL_23e3: Unknown result type (might be due to invalid IL or missing references) //IL_23a8: Unknown result type (might be due to invalid IL or missing references) //IL_23ad: Unknown result type (might be due to invalid IL or missing references) //IL_1c35: Unknown result type (might be due to invalid IL or missing references) //IL_1c45: Unknown result type (might be due to invalid IL or missing references) //IL_0e05: Unknown result type (might be due to invalid IL or missing references) //IL_0e0a: 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_068b: Unknown result type (might be due to invalid IL or missing references) //IL_2401: Unknown result type (might be due to invalid IL or missing references) //IL_2406: Unknown result type (might be due to invalid IL or missing references) //IL_1c72: Unknown result type (might be due to invalid IL or missing references) //IL_1c82: Unknown result type (might be due to invalid IL or missing references) //IL_0e36: Unknown result type (might be due to invalid IL or missing references) //IL_0e3b: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_2432: Unknown result type (might be due to invalid IL or missing references) //IL_2437: Unknown result type (might be due to invalid IL or missing references) //IL_1caf: Unknown result type (might be due to invalid IL or missing references) //IL_1cbf: Unknown result type (might be due to invalid IL or missing references) //IL_0e8f: Unknown result type (might be due to invalid IL or missing references) //IL_0e94: Unknown result type (might be due to invalid IL or missing references) //IL_0e59: Unknown result type (might be due to invalid IL or missing references) //IL_0e5e: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_0825: Invalid comparison between Unknown and I4 //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_248b: Unknown result type (might be due to invalid IL or missing references) //IL_2490: Unknown result type (might be due to invalid IL or missing references) //IL_2455: Unknown result type (might be due to invalid IL or missing references) //IL_245a: Unknown result type (might be due to invalid IL or missing references) //IL_1cec: Unknown result type (might be due to invalid IL or missing references) //IL_1cfc: Unknown result type (might be due to invalid IL or missing references) //IL_0eb2: Unknown result type (might be due to invalid IL or missing references) //IL_0eb7: 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_0842: Invalid comparison between Unknown and I4 //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Invalid comparison between Unknown and I4 //IL_24ae: Unknown result type (might be due to invalid IL or missing references) //IL_24b3: Unknown result type (might be due to invalid IL or missing references) //IL_1d29: Unknown result type (might be due to invalid IL or missing references) //IL_1d39: Unknown result type (might be due to invalid IL or missing references) //IL_0ee3: Unknown result type (might be due to invalid IL or missing references) //IL_0ee8: Unknown result type (might be due to invalid IL or missing references) //IL_0719: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Invalid comparison between Unknown and I4 //IL_24df: Unknown result type (might be due to invalid IL or missing references) //IL_24e4: Unknown result type (might be due to invalid IL or missing references) //IL_1d66: Unknown result type (might be due to invalid IL or missing references) //IL_1d76: Unknown result type (might be due to invalid IL or missing references) //IL_0f3c: Unknown result type (might be due to invalid IL or missing references) //IL_0f41: Unknown result type (might be due to invalid IL or missing references) //IL_0f06: Unknown result type (might be due to invalid IL or missing references) //IL_0f0b: Unknown result type (might be due to invalid IL or missing references) //IL_2538: Unknown result type (might be due to invalid IL or missing references) //IL_253d: Unknown result type (might be due to invalid IL or missing references) //IL_2502: Unknown result type (might be due to invalid IL or missing references) //IL_2507: 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_1db3: Unknown result type (might be due to invalid IL or missing references) //IL_0f5f: Unknown result type (might be due to invalid IL or missing references) //IL_0f64: Unknown result type (might be due to invalid IL or missing references) //IL_255b: Unknown result type (might be due to invalid IL or missing references) //IL_2560: Unknown result type (might be due to invalid IL or missing references) //IL_1de0: Unknown result type (might be due to invalid IL or missing references) //IL_1df0: Unknown result type (might be due to invalid IL or missing references) //IL_0f90: 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_0785: Unknown result type (might be due to invalid IL or missing references) //IL_258c: Unknown result type (might be due to invalid IL or missing references) //IL_2591: Unknown result type (might be due to invalid IL or missing references) //IL_1e1d: Unknown result type (might be due to invalid IL or missing references) //IL_1e2d: Unknown result type (might be due to invalid IL or missing references) //IL_0fe9: Unknown result type (might be due to invalid IL or missing references) //IL_0fee: Unknown result type (might be due to invalid IL or missing references) //IL_0fb3: Unknown result type (might be due to invalid IL or missing references) //IL_0fb8: 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_25af: Unknown result type (might be due to invalid IL or missing references) //IL_25b4: Unknown result type (might be due to invalid IL or missing references) //IL_1e5a: Unknown result type (might be due to invalid IL or missing references) //IL_1e6a: Unknown result type (might be due to invalid IL or missing references) //IL_100c: Unknown result type (might be due to invalid IL or missing references) //IL_1011: Unknown result type (might be due to invalid IL or missing references) //IL_2608: Unknown result type (might be due to invalid IL or missing references) //IL_260d: Unknown result type (might be due to invalid IL or missing references) //IL_1e97: Unknown result type (might be due to invalid IL or missing references) //IL_1ea7: Unknown result type (might be due to invalid IL or missing references) //IL_103d: Unknown result type (might be due to invalid IL or missing references) //IL_1042: Unknown result type (might be due to invalid IL or missing references) //IL_2639: Unknown result type (might be due to invalid IL or missing references) //IL_263e: Unknown result type (might be due to invalid IL or missing references) //IL_1ed4: Unknown result type (might be due to invalid IL or missing references) //IL_1ee4: Unknown result type (might be due to invalid IL or missing references) //IL_1096: Unknown result type (might be due to invalid IL or missing references) //IL_109b: 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_1065: Unknown result type (might be due to invalid IL or missing references) //IL_2692: Unknown result type (might be due to invalid IL or missing references) //IL_2697: Unknown result type (might be due to invalid IL or missing references) //IL_265c: Unknown result type (might be due to invalid IL or missing references) //IL_2661: 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_1f21: Unknown result type (might be due to invalid IL or missing references) //IL_10b9: Unknown result type (might be due to invalid IL or missing references) //IL_10be: Unknown result type (might be due to invalid IL or missing references) //IL_26b5: Unknown result type (might be due to invalid IL or missing references) //IL_26ba: Unknown result type (might be due to invalid IL or missing references) //IL_1f4e: Unknown result type (might be due to invalid IL or missing references) //IL_1f5e: Unknown result type (might be due to invalid IL or missing references) //IL_10ea: Unknown result type (might be due to invalid IL or missing references) //IL_10ef: Unknown result type (might be due to invalid IL or missing references) //IL_26e6: Unknown result type (might be due to invalid IL or missing references) //IL_26eb: Unknown result type (might be due to invalid IL or missing references) //IL_1f8b: Unknown result type (might be due to invalid IL or missing references) //IL_1f9b: Unknown result type (might be due to invalid IL or missing references) //IL_1143: 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_110d: Unknown result type (might be due to invalid IL or missing references) //IL_1112: Unknown result type (might be due to invalid IL or missing references) //IL_273f: Unknown result type (might be due to invalid IL or missing references) //IL_2744: Unknown result type (might be due to invalid IL or missing references) //IL_2709: Unknown result type (might be due to invalid IL or missing references) //IL_270e: Unknown result type (might be due to invalid IL or missing references) //IL_1fc8: Unknown result type (might be due to invalid IL or missing references) //IL_1fd8: Unknown result type (might be due to invalid IL or missing references) //IL_1166: Unknown result type (might be due to invalid IL or missing references) //IL_116b: Unknown result type (might be due to invalid IL or missing references) //IL_2762: Unknown result type (might be due to invalid IL or missing references) //IL_2767: Unknown result type (might be due to invalid IL or missing references) //IL_2005: Unknown result type (might be due to invalid IL or missing references) //IL_2015: Unknown result type (might be due to invalid IL or missing references) //IL_1197: Unknown result type (might be due to invalid IL or missing references) //IL_119c: Unknown result type (might be due to invalid IL or missing references) //IL_2793: Unknown result type (might be due to invalid IL or missing references) //IL_2798: Unknown result type (might be due to invalid IL or missing references) //IL_2042: Unknown result type (might be due to invalid IL or missing references) //IL_2052: Unknown result type (might be due to invalid IL or missing references) //IL_11f0: Unknown result type (might be due to invalid IL or missing references) //IL_11f5: Unknown result type (might be due to invalid IL or missing references) //IL_11ba: 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_27ec: Unknown result type (might be due to invalid IL or missing references) //IL_27f1: Unknown result type (might be due to invalid IL or missing references) //IL_27b6: Unknown result type (might be due to invalid IL or missing references) //IL_27bb: 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_208f: Unknown result type (might be due to invalid IL or missing references) //IL_1213: Unknown result type (might be due to invalid IL or missing references) //IL_1218: Unknown result type (might be due to invalid IL or missing references) //IL_280f: Unknown result type (might be due to invalid IL or missing references) //IL_2814: Unknown result type (might be due to invalid IL or missing references) //IL_20bc: Unknown result type (might be due to invalid IL or missing references) //IL_20cc: 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_2840: Unknown result type (might be due to invalid IL or missing references) //IL_2845: Unknown result type (might be due to invalid IL or missing references) //IL_20f9: 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_129d: Unknown result type (might be due to invalid IL or missing references) //IL_12a2: Unknown result type (might be due to invalid IL or missing references) //IL_1267: Unknown result type (might be due to invalid IL or missing references) //IL_126c: Unknown result type (might be due to invalid IL or missing references) //IL_2899: Unknown result type (might be due to invalid IL or missing references) //IL_289e: Unknown result type (might be due to invalid IL or missing references) //IL_2863: Unknown result type (might be due to invalid IL or missing references) //IL_2868: 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_2146: Unknown result type (might be due to invalid IL or missing references) //IL_12c0: Unknown result type (might be due to invalid IL or missing references) //IL_12c5: Unknown result type (might be due to invalid IL or missing references) //IL_28bc: Unknown result type (might be due to invalid IL or missing references) //IL_28c1: Unknown result type (might be due to invalid IL or missing references) //IL_2173: Unknown result type (might be due to invalid IL or missing references) //IL_2183: Unknown result type (might be due to invalid IL or missing references) //IL_12f1: Unknown result type (might be due to invalid IL or missing references) //IL_12f6: Unknown result type (might be due to invalid IL or missing references) //IL_28ed: Unknown result type (might be due to invalid IL or missing references) //IL_28f2: Unknown result type (might be due to invalid IL or missing references) //IL_21b0: 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_134a: Unknown result type (might be due to invalid IL or missing references) //IL_134f: Unknown result type (might be due to invalid IL or missing references) //IL_1314: Unknown result type (might be due to invalid IL or missing references) //IL_1319: Unknown result type (might be due to invalid IL or missing references) //IL_2946: Unknown result type (might be due to invalid IL or missing references) //IL_294b: Unknown result type (might be due to invalid IL or missing references) //IL_2910: Unknown result type (might be due to invalid IL or missing references) //IL_2915: Unknown result type (might be due to invalid IL or missing references) //IL_21ed: Unknown result type (might be due to invalid IL or missing references) //IL_21fd: 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_1372: Unknown result type (might be due to invalid IL or missing references) //IL_2969: Unknown result type (might be due to invalid IL or missing references) //IL_296e: Unknown result type (might be due to invalid IL or missing references) //IL_139e: Unknown result type (might be due to invalid IL or missing references) //IL_13a3: Unknown result type (might be due to invalid IL or missing references) //IL_299a: Unknown result type (might be due to invalid IL or missing references) //IL_299f: Unknown result type (might be due to invalid IL or missing references) //IL_13f7: Unknown result type (might be due to invalid IL or missing references) //IL_13fc: Unknown result type (might be due to invalid IL or missing references) //IL_13c1: Unknown result type (might be due to invalid IL or missing references) //IL_13c6: Unknown result type (might be due to invalid IL or missing references) //IL_29f3: Unknown result type (might be due to invalid IL or missing references) //IL_29f8: Unknown result type (might be due to invalid IL or missing references) //IL_29bd: Unknown result type (might be due to invalid IL or missing references) //IL_29c2: Unknown result type (might be due to invalid IL or missing references) //IL_141a: 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_2a16: Unknown result type (might be due to invalid IL or missing references) //IL_2a1b: Unknown result type (might be due to invalid IL or missing references) //IL_144b: Unknown result type (might be due to invalid IL or missing references) //IL_1450: Unknown result type (might be due to invalid IL or missing references) //IL_2a47: Unknown result type (might be due to invalid IL or missing references) //IL_2a4c: Unknown result type (might be due to invalid IL or missing references) //IL_14a4: Unknown result type (might be due to invalid IL or missing references) //IL_14a9: Unknown result type (might be due to invalid IL or missing references) //IL_146e: Unknown result type (might be due to invalid IL or missing references) //IL_1473: Unknown result type (might be due to invalid IL or missing references) //IL_2aa0: Unknown result type (might be due to invalid IL or missing references) //IL_2aa5: Unknown result type (might be due to invalid IL or missing references) //IL_2a6a: Unknown result type (might be due to invalid IL or missing references) //IL_2a6f: 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_14cc: 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_2ac8: Unknown result type (might be due to invalid IL or missing references) //IL_14f8: Unknown result type (might be due to invalid IL or missing references) //IL_14fd: Unknown result type (might be due to invalid IL or missing references) //IL_2af4: Unknown result type (might be due to invalid IL or missing references) //IL_2af9: Unknown result type (might be due to invalid IL or missing references) //IL_1551: Unknown result type (might be due to invalid IL or missing references) //IL_1556: Unknown result type (might be due to invalid IL or missing references) //IL_151b: Unknown result type (might be due to invalid IL or missing references) //IL_1520: Unknown result type (might be due to invalid IL or missing references) //IL_2b4d: Unknown result type (might be due to invalid IL or missing references) //IL_2b52: Unknown result type (might be due to invalid IL or missing references) //IL_2b17: Unknown result type (might be due to invalid IL or missing references) //IL_2b1c: 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_1579: 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_2b75: Unknown result type (might be due to invalid IL or missing references) //IL_15a5: Unknown result type (might be due to invalid IL or missing references) //IL_15aa: Unknown result type (might be due to invalid IL or missing references) //IL_2ba1: Unknown result type (might be due to invalid IL or missing references) //IL_2ba6: 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_1603: Unknown result type (might be due to invalid IL or missing references) //IL_15c8: Unknown result type (might be due to invalid IL or missing references) //IL_15cd: Unknown result type (might be due to invalid IL or missing references) //IL_2bfa: Unknown result type (might be due to invalid IL or missing references) //IL_2bff: Unknown result type (might be due to invalid IL or missing references) //IL_2bc4: Unknown result type (might be due to invalid IL or missing references) //IL_2bc9: Unknown result type (might be due to invalid IL or missing references) //IL_1621: Unknown result type (might be due to invalid IL or missing references) //IL_1626: Unknown result type (might be due to invalid IL or missing references) //IL_2c1d: Unknown result type (might be due to invalid IL or missing references) //IL_2c22: Unknown result type (might be due to invalid IL or missing references) //IL_1652: Unknown result type (might be due to invalid IL or missing references) //IL_1657: Unknown result type (might be due to invalid IL or missing references) //IL_2c4e: Unknown result type (might be due to invalid IL or missing references) //IL_2c53: Unknown result type (might be due to invalid IL or missing references) //IL_16ab: Unknown result type (might be due to invalid IL or missing references) //IL_16b0: Unknown result type (might be due to invalid IL or missing references) //IL_1675: Unknown result type (might be due to invalid IL or missing references) //IL_167a: Unknown result type (might be due to invalid IL or missing references) //IL_2ca7: Unknown result type (might be due to invalid IL or missing references) //IL_2cac: Unknown result type (might be due to invalid IL or missing references) //IL_2c71: Unknown result type (might be due to invalid IL or missing references) //IL_2c76: Unknown result type (might be due to invalid IL or missing references) //IL_16ce: Unknown result type (might be due to invalid IL or missing references) //IL_16d3: Unknown result type (might be due to invalid IL or missing references) //IL_2cca: Unknown result type (might be due to invalid IL or missing references) //IL_2ccf: Unknown result type (might be due to invalid IL or missing references) //IL_16ff: Unknown result type (might be due to invalid IL or missing references) //IL_1704: Unknown result type (might be due to invalid IL or missing references) //IL_2cfb: Unknown result type (might be due to invalid IL or missing references) //IL_2d00: Unknown result type (might be due to invalid IL or missing references) //IL_1758: Unknown result type (might be due to invalid IL or missing references) //IL_175d: Unknown result type (might be due to invalid IL or missing references) //IL_1722: Unknown result type (might be due to invalid IL or missing references) //IL_1727: Unknown result type (might be due to invalid IL or missing references) //IL_2d54: Unknown result type (might be due to invalid IL or missing references) //IL_2d59: Unknown result type (might be due to invalid IL or missing references) //IL_2d1e: Unknown result type (might be due to invalid IL or missing references) //IL_2d23: Unknown result type (might be due to invalid IL or missing references) //IL_177b: 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_2d77: Unknown result type (might be due to invalid IL or missing references) //IL_2d7c: Unknown result type (might be due to invalid IL or missing references) //IL_17ac: Unknown result type (might be due to invalid IL or missing references) //IL_17b1: Unknown result type (might be due to invalid IL or missing references) //IL_2da8: Unknown result type (might be due to invalid IL or missing references) //IL_2dad: Unknown result type (might be due to invalid IL or missing references) //IL_1805: Unknown result type (might be due to invalid IL or missing references) //IL_180a: Unknown result type (might be due to invalid IL or missing references) //IL_17cf: Unknown result type (might be due to invalid IL or missing references) //IL_17d4: Unknown result type (might be due to invalid IL or missing references) //IL_2e01: Unknown result type (might be due to invalid IL or missing references) //IL_2e06: Unknown result type (might be due to invalid IL or missing references) //IL_2dcb: Unknown result type (might be due to invalid IL or missing references) //IL_2dd0: Unknown result type (might be due to invalid IL or missing references) //IL_1828: Unknown result type (might be due to invalid IL or missing references) //IL_182d: Unknown result type (might be due to invalid IL or missing references) //IL_2e24: Unknown result type (might be due to invalid IL or missing references) //IL_2e29: 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_185e: Unknown result type (might be due to invalid IL or missing references) //IL_2e55: Unknown result type (might be due to invalid IL or missing references) //IL_2e5a: Unknown result type (might be due to invalid IL or missing references) //IL_18b2: Unknown result type (might be due to invalid IL or missing references) //IL_18b7: 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_1881: Unknown result type (might be due to invalid IL or missing references) //IL_2eae: Unknown result type (might be due to invalid IL or missing references) //IL_2eb3: Unknown result type (might be due to invalid IL or missing references) //IL_2e78: Unknown result type (might be due to invalid IL or missing references) //IL_2e7d: Unknown result type (might be due to invalid IL or missing references) //IL_18d5: Unknown result type (might be due to invalid IL or missing references) //IL_18da: Unknown result type (might be due to invalid IL or missing references) //IL_2ed1: Unknown result type (might be due to invalid IL or missing references) //IL_2ed6: Unknown result type (might be due to invalid IL or missing references) //IL_2f02: Unknown result type (might be due to invalid IL or missing references) //IL_2f07: Unknown result type (might be due to invalid IL or missing references) //IL_2f5b: Unknown result type (might be due to invalid IL or missing references) //IL_2f60: Unknown result type (might be due to invalid IL or missing references) //IL_2f25: Unknown result type (might be due to invalid IL or missing references) //IL_2f2a: Unknown result type (might be due to invalid IL or missing references) //IL_2f7e: Unknown result type (might be due to invalid IL or missing references) //IL_2f83: Unknown result type (might be due to invalid IL or missing references) beep.volume = volknob.transform.localEulerAngles.x / 180f; if (currentAI == null) { see1 = false; see2 = false; exist1 = false; exist2 = false; shot = false; locked = false; SAMRADAR = null; SAMRADARMain = null; Tracking.SetActive(false); tracking = false; Y.transform.localEulerAngles = new Vector3(0f, 0f, 0f); MainY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (currentAI != null) { if (currentAI.Count >= 1) { SAMRADARMain = GetGameObjectByDistanceOrder(((Component)this).gameObject.transform, currentAI); } if (currentAI.Count >= 2) { SAMRADAR = GetGameObjectByDistanceOrder(((Component)this).gameObject.transform, currentAI, 2); } if (currentAI.Count > 0) { if ((Object)(object)SAMRADARMain != (Object)null) { AxisLookAtY(MainY.transform, SAMRADARMain.transform.position, Vector3.forward); } else if ((Object)(object)SAMRADARMain == (Object)null) { 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 ((Object)(object)SAMRADARMain != (Object)null) { if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.gameObject.transform.position) > 80f) { } if ((Object)(object)SAMRADARMain.GetComponent() != (Object)null && (Object)(object)SAMRADARMain.GetComponent().S != (Object)null) { if ((int)SAMRADARMain.GetComponent().S.BodyState == 3) { see1 = false; exist1 = false; } if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { if (SAMRADARMain.GetComponent().S.GetIFF() == GM.CurrentPlayerBody.GetPlayerIFF()) { see1 = false; exist1 = false; } else if (SAMRADARMain.GetComponent().S.GetIFF() != GM.CurrentPlayerBody.GetPlayerIFF()) { if (SAMRADARMain.GetComponent().S.CanSeePlayer()) { see1 = true; exist1 = false; } else if (!SAMRADARMain.GetComponent().S.CanSeePlayer()) { see1 = false; exist1 = true; } } } else if ((Object)(object)GM.CurrentPlayerBody == (Object)null) { see1 = false; exist1 = false; } } if ((Object)(object)SAMRADAR != (Object)null) { if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADAR.gameObject.transform.position) > 80f) { } if ((Object)(object)SAMRADAR.GetComponent() != (Object)null && (Object)(object)SAMRADAR.GetComponent().S != (Object)null) { if ((int)SAMRADAR.GetComponent().S.BodyState == 3) { see2 = false; exist2 = false; } if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { if (SAMRADAR.GetComponent().S.GetIFF() == GM.CurrentPlayerBody.GetPlayerIFF()) { see2 = false; exist2 = false; } else if (SAMRADAR.GetComponent().S.GetIFF() != GM.CurrentPlayerBody.GetPlayerIFF()) { if (SAMRADAR.GetComponent().S.CanSeePlayer()) { see2 = true; exist2 = false; } else if (!SAMRADAR.GetComponent().S.CanSeePlayer()) { see2 = false; exist2 = true; } } } else if ((Object)(object)GM.CurrentPlayerBody == (Object)null) { see1 = false; exist1 = false; } } } } List list = new List(currentAI.Count); for (int i = 0; i < currentAI.Count; i++) { SosigLink item = currentAI[i]; if ((Object)(object)currentAI[i] == (Object)null) { list.Add(item); } } for (int j = 0; j < list.Count; j++) { currentAI.Remove(list[j]); Object.Destroy((Object)(object)list[j]); } for (int k = 0; k < currentAI.Count; k++) { if (!((Object)(object)currentAI[k] != (Object)null) || !(volknob.transform.localEulerAngles.x > 5f) || !Tracking.activeInHierarchy) { continue; } if ((Object)(object)GM.CurrentPlayerBody != (Object)null && Vector3.Distance(((Component)currentAI[k]).gameObject.transform.position, ((Component)this).gameObject.transform.position) > 2f && (Object)(object)GM.CurrentPlayerBody != (Object)null && Vector3.Distance(((Component)currentAI[k]).gameObject.transform.position, ((Component)this).gameObject.transform.position) < 10f && (int)currentAI[k].S.BodyState != 3 && (int)currentAI[k].S.BodyState != 2 && !currentAI[k].S.CanSeePlayer() && currentAI[k].S.GetIFF() != GM.CurrentPlayerBody.GetPlayerIFF()) { currentAI[k].S.ForceSetPathToPoint(((Component)this).gameObject.transform.position); currentAI[k].S.SetCurrentOrder((SosigOrder)10); currentAI[k].S.SetMovementState((SosigMovementState)2); } if ((Object)(object)GM.CurrentPlayerBody != (Object)null && Vector3.Distance(((Component)currentAI[k]).gameObject.transform.position, ((Component)this).gameObject.transform.position) < 1f && (int)currentAI[k].S.BodyState != 3 && (int)currentAI[k].S.BodyState != 2) { if (!currentAI[k].S.CanSeePlayer() && currentAI[k].S.GetIFF() != GM.CurrentPlayerBody.GetPlayerIFF()) { currentAI[k].S.SetCurrentOrder((SosigOrder)3); } if (currentAI[k].S.CanSeePlayer() && currentAI[k].S.GetIFF() != GM.CurrentPlayerBody.GetPlayerIFF()) { currentAI[k].S.SetCurrentOrder((SosigOrder)2); } } } } if (currentAI.Count < 1) { see1 = false; see2 = false; exist1 = false; exist2 = false; shot = false; locked = false; SAMRADAR = null; SAMRADARMain = null; Tracking.SetActive(false); tracking = false; Y.transform.localEulerAngles = new Vector3(0f, 0f, 0f); MainY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (currentAI.Count < 2) { see2 = false; exist2 = false; SAMRADAR = null; Y.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (currentAI.Count <= 0) { see1 = false; see2 = false; exist1 = false; exist2 = false; shot = false; locked = false; SAMRADAR = null; SAMRADARMain = null; Tracking.SetActive(false); tracking = false; Y.transform.localEulerAngles = new Vector3(0f, 0f, 0f); MainY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } if (see1 || see2) { shot = true; } if (!see1 && !see2) { shot = false; } if (exist1 || exist2) { if (!shot) { locked = true; } else if (shot) { locked = false; } } if (!exist1 && !exist2) { 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.SetActive(false); tracking = false; } if (shot) { UPnLOW.SetActive(true); cd -= Time.deltaTime; if (cd <= 0f) { cd = 0.15f; tracking = !tracking; } if ((Object)(object)SAMRADARMain != (Object)null) { if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 80f) { R1.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 80f) { R1.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 75f) { R2.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 75f) { R2.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 70f) { R3.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 70f) { R3.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 65f) { R4.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 65f) { R4.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 60f) { R5.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 60f) { R5.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 55f) { R6.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 55f) { R6.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 50f) { R7.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 50f) { R7.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 45f) { R8.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 45f) { R8.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 40f) { R9.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 40f) { R9.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 35f) { R10.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 35f) { R10.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 30f) { R11.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 30f) { R11.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 25f) { R12.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 25f) { R12.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 20f) { R13.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 20f) { R13.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 15f) { R14.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 15f) { R14.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 10f) { R15.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 10f) { R15.SetActive(false); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) <= 5f) { R16.SetActive(true); } if (Vector3.Distance(((Component)this).gameObject.transform.position, SAMRADARMain.transform.position) > 5f) { 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) { 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); } } 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 SnapToPointRigidbody : MonoBehaviour { public Transform snapTo; private Rigidbody body; public float snapTime = 2f; private float dropTimer; public void Start() { body = ((Component)this).GetComponent(); } public void Update() { //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_00cc: 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_0089: 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_0114: 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_013c: 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_0159: 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) body = ((Component)this).GetComponent(); if (!((Object)(object)body != (Object)null)) { return; } 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); } } } public class Bandage : FVRPhysicalObject { public Gauze gauze; public GameObject plate; public GameObject disref; public GameObject bandagegeo; public GameObject bandage; public GameObject rot; public int targloops = 20; public AudioEvent patch; public int lateloops; public CapsuleCollider col; public KillAfter ka; private void OnTriggerStay(Collider other) { //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_026e: 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_02b6: 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_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_0169: 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) if (((FVRInteractiveObject)this).m_isHeld && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && !((Component)other).gameObject.GetComponent().isClot && ((Component)other).gameObject.GetComponent().isPatched) { if (((FVRInteractiveObject)this).m_hand.Input.TriggerFloat > 0.5f) { gauze = ((Component)other).gameObject.GetComponent(); if ((Object)(object)gauze != (Object)null) { bandagegeo.SetActive(true); AxisLookAt(bandage.transform, ((Component)gauze).gameObject.transform.position, Vector3.forward); disref.transform.position = ((Component)gauze).gameObject.transform.position; plate.transform.localScale = new Vector3(1f, 1f, disref.transform.localPosition.z); if (lateloops != gauze.loops) { rot.transform.localEulerAngles = new Vector3(rot.transform.localEulerAngles.x + 4.5f, 0f, 0f); lateloops = gauze.loops; } gauze.bandage = ((Component)this).gameObject; if (gauze.loops >= targloops) { GM.CurrentPlayerBody.ActivatePower((PowerupType)0, (PowerUpIntensity)0, (PowerUpDuration)3, false, false, -1f); SM.PlayCoreSound((FVRPooledAudioType)41, patch, ((Component)this).gameObject.transform.position); ((Behaviour)ka).enabled = true; Object.Destroy((Object)(object)((Component)gauze).gameObject); } } } if (((FVRInteractiveObject)this).m_hand.Input.TriggerFloat <= 0.5f && (Object)(object)gauze != (Object)null) { SM.PlayCoreSound((FVRPooledAudioType)41, patch, ((Component)this).gameObject.transform.position); bandagegeo.SetActive(false); bandage.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); disref.transform.localPosition = new Vector3(0f, 0f, 0f); plate.transform.localScale = new Vector3(1f, 1f, 0f); gauze.bandage = null; lateloops = 0; gauze = null; } } if (!((FVRInteractiveObject)this).m_isHeld && (Object)(object)gauze != (Object)null) { SM.PlayCoreSound((FVRPooledAudioType)41, patch, ((Component)this).gameObject.transform.position); bandagegeo.SetActive(false); bandage.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); disref.transform.localPosition = new Vector3(0f, 0f, 0f); plate.transform.localScale = new Vector3(1f, 1f, 0f); gauze.bandage = null; lateloops = 0; gauze = null; } } private void OnTriggerExit(Collider other) { //IL_0047: 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_009c: 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_00e4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && (Object)(object)((Component)other).gameObject.GetComponent() == (Object)(object)gauze) { SM.PlayCoreSound((FVRPooledAudioType)41, patch, ((Component)this).gameObject.transform.position); bandagegeo.SetActive(false); bandage.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); disref.transform.localPosition = new Vector3(0f, 0f, 0f); plate.transform.localScale = new Vector3(1f, 1f, 0f); gauze.bandage = null; lateloops = 0; gauze = null; } } private void FixedUpdate() { //IL_0039: 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) if ((Object)(object)gauze == (Object)null) { bandagegeo.SetActive(false); bandage.transform.localEulerAngles = new Vector3(0f, 0f, 0f); rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); disref.transform.localPosition = new Vector3(0f, 0f, 0f); plate.transform.localScale = new Vector3(1f, 1f, 0f); lateloops = 0; } if (((FVRInteractiveObject)this).m_isHeld) { col.radius = 0.2f; col.height = 0.2f; } else if (((FVRInteractiveObject)this).m_isHeld) { col.radius = 0.02f; col.height = 0.1f; } } 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 Gauze : FVRPhysicalObject { public bool isPatched = false; public GameObject phys; public KillAfter ka; public Rigidbody rig; public AudioEvent patch; public GameObject bandage; public GameObject lookZ; public int loops; public bool looping = false; public float startloop; public float endloop; public bool isClot; public GameObject otherhand; private void Update() { //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_003d: 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_028c: 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_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_0234: 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) if (!isPatched && ((FVRInteractiveObject)this).m_isHeld && ((FVRInteractiveObject)this).m_hand.Input.TriggerFloat >= 0.5f && Vector3.Distance(((Component)this).gameObject.transform.position, ((Component)((FVRInteractiveObject)this).m_hand.OtherHand).transform.position) < 0.1f) { otherhand = ((Component)((FVRInteractiveObject)this).m_hand.OtherHand).gameObject; ((FVRInteractiveObject)this).ForceBreakInteraction(); rig.isKinematic = true; phys.SetActive(false); ((Behaviour)ka).enabled = true; ((FVRInteractiveObject)this).IsSimpleInteract = true; base.DistantGrabbable = false; base.UsesGravity = false; if (isClot) { GM.CurrentPlayerBody.ActivatePower((PowerupType)10, (PowerUpIntensity)2, (PowerUpDuration)0, false, false, -1f); } SM.PlayCoreSound((FVRPooledAudioType)41, patch, ((Component)this).gameObject.transform.position); isPatched = true; } if (isPatched && (Object)(object)otherhand != (Object)null) { ((Component)this).gameObject.transform.SetParent(otherhand.transform); ((Component)this).gameObject.transform.localEulerAngles = Vector3.zero; ((Component)this).gameObject.transform.localPosition = new Vector3(0f, 0.05f, -0.05f); } if ((Object)(object)bandage != (Object)null) { AxisLookAt(lookZ.transform, bandage.gameObject.transform.position, Vector3.up); if (!looping) { startloop = lookZ.transform.localEulerAngles.z; looping = true; } endloop = lookZ.transform.localEulerAngles.z; if (Mathf.Abs(endloop - startloop) >= 89f) { SM.PlayCoreSound((FVRPooledAudioType)41, patch, ((Component)this).gameObject.transform.position); loops++; startloop = endloop; } } else if ((Object)(object)bandage == (Object)null) { lookZ.transform.localEulerAngles = new Vector3(0f, 0f, 0f); loops = 0; looping = false; startloop = 0f; endloop = 0f; } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(0f, 0f, tr_self.localEulerAngles.z); } } public class IFAK : MonoBehaviour { public FVRPhysicalObject main; public Collider grabCol; public Collider detectCol; public FVRInteractiveObject grab1; public FVRInteractiveObject grab2; public FVRInteractiveObject grab3; public FVRInteractiveObject grab4; public Collider col1; public Collider col2; public Collider col3; public Collider col4; public string item1; public string item2; public string item3; public string item4; public FVRObject item1FVR; public FVRObject item2FVR; public FVRObject item3FVR; public FVRObject item4FVR; public int item1num; public int item2num; public int item3num; public int item4num; public int curitem1num; public int curitem2num; public int curitem3num; public int curitem4num; public GameObject[] item1Geo; public GameObject[] item2Geo; public GameObject[] item3Geo; public GameObject[] item4Geo; public GameObject Rot; private void Start() { } private void OnTriggerStay(Collider other) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (Rot.transform.localEulerAngles.x > 45f) { if (((Object)((Component)other).gameObject).name == item1 && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && curitem1num < item1num && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).m_isHeld && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).IsSimpleInteract) { curitem1num++; Object.Destroy((Object)(object)((Component)other).gameObject); } if (((Object)((Component)other).gameObject).name == item2 && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && curitem2num < item2num && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).m_isHeld && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).IsSimpleInteract) { curitem2num++; Object.Destroy((Object)(object)((Component)other).gameObject); } if (((Object)((Component)other).gameObject).name == item3 && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && curitem3num < item3num && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).m_isHeld && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).IsSimpleInteract) { curitem3num++; Object.Destroy((Object)(object)((Component)other).gameObject); } if (((Object)((Component)other).gameObject).name == item4 && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && curitem4num < item4num && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).m_isHeld && !((FVRInteractiveObject)((Component)other).gameObject.GetComponent()).IsSimpleInteract) { curitem4num++; Object.Destroy((Object)(object)((Component)other).gameObject); } } } private void FixedUpdate() { //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_0107: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_04d5: 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_0571: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)main).m_isHeld) { if (((FVRInteractiveObject)main).m_hand.Input.TriggerFloat > 0.5f) { grabCol.enabled = false; detectCol.enabled = true; Rot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else if ((double)((FVRInteractiveObject)main).m_hand.Input.TriggerFloat <= 0.5) { grabCol.enabled = true; detectCol.enabled = false; Rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else if (!((FVRInteractiveObject)main).m_isHeld) { Rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); grabCol.enabled = true; detectCol.enabled = false; } if (Rot.transform.localEulerAngles.x < 45f) { ((Behaviour)grab1).enabled = false; ((Behaviour)grab2).enabled = false; ((Behaviour)grab3).enabled = false; ((Behaviour)grab4).enabled = false; col1.enabled = false; col2.enabled = false; col3.enabled = false; col4.enabled = false; } else { if (!(Rot.transform.localEulerAngles.x > 45f)) { return; } if (curitem1num <= 0) { ((Behaviour)grab1).enabled = false; col1.enabled = false; } else if (curitem1num > 0) { ((Behaviour)grab1).enabled = true; col1.enabled = true; } if (curitem2num <= 0) { ((Behaviour)grab2).enabled = false; col2.enabled = false; } else if (curitem2num > 0) { ((Behaviour)grab2).enabled = true; col2.enabled = true; } if (curitem3num <= 0) { ((Behaviour)grab3).enabled = false; col3.enabled = false; } else if (curitem3num > 0) { ((Behaviour)grab3).enabled = true; col3.enabled = true; } if (curitem4num <= 0) { ((Behaviour)grab4).enabled = false; col4.enabled = false; } else if (curitem4num > 0) { ((Behaviour)grab4).enabled = true; col4.enabled = true; } for (int i = 0; i < curitem1num; i++) { item1Geo[i].SetActive(true); } for (int j = 0; j < curitem2num; j++) { item2Geo[j].SetActive(true); } for (int k = 0; k < curitem3num; k++) { item3Geo[k].SetActive(true); } for (int l = 0; l < curitem4num; l++) { item4Geo[l].SetActive(true); } for (int m = curitem1num; m < item1num; m++) { item1Geo[m].SetActive(false); } for (int n = curitem2num; n < item2num; n++) { item2Geo[n].SetActive(false); } for (int num = curitem3num; num < item3num; num++) { item3Geo[num].SetActive(false); } for (int num2 = curitem4num; num2 < item4num; num2++) { item4Geo[num2].SetActive(false); } if (grab1.m_isHeld) { FVRViveHand hand = grab1.m_hand; grab1.ForceBreakInteraction(); GameObject val = Object.Instantiate(((AnvilAsset)item1FVR).GetGameObject(), ((Component)hand).gameObject.transform.position, ((Component)hand).gameObject.transform.rotation); if ((Object)(object)val.GetComponent() != (Object)null) { hand.ForceSetInteractable((FVRInteractiveObject)(object)val.GetComponent()); ((FVRInteractiveObject)val.GetComponent()).BeginInteraction(hand); } curitem1num--; } if (grab2.m_isHeld) { FVRViveHand hand2 = grab2.m_hand; grab2.ForceBreakInteraction(); GameObject val2 = Object.Instantiate(((AnvilAsset)item2FVR).GetGameObject(), ((Component)hand2).gameObject.transform.position, ((Component)hand2).gameObject.transform.rotation); if ((Object)(object)val2.GetComponent() != (Object)null) { hand2.ForceSetInteractable((FVRInteractiveObject)(object)val2.GetComponent()); ((FVRInteractiveObject)val2.GetComponent()).BeginInteraction(hand2); } curitem2num--; } if (grab3.m_isHeld) { FVRViveHand hand3 = grab3.m_hand; grab3.ForceBreakInteraction(); GameObject val3 = Object.Instantiate(((AnvilAsset)item3FVR).GetGameObject(), ((Component)hand3).gameObject.transform.position, ((Component)hand3).gameObject.transform.rotation); if ((Object)(object)val3.GetComponent() != (Object)null) { hand3.ForceSetInteractable((FVRInteractiveObject)(object)val3.GetComponent()); ((FVRInteractiveObject)val3.GetComponent()).BeginInteraction(hand3); } curitem3num--; } if (grab4.m_isHeld) { FVRViveHand hand4 = grab4.m_hand; grab4.ForceBreakInteraction(); GameObject val4 = Object.Instantiate(((AnvilAsset)item4FVR).GetGameObject(), ((Component)hand4).gameObject.transform.position, ((Component)hand4).gameObject.transform.rotation); if ((Object)(object)val4.GetComponent() != (Object)null) { hand4.ForceSetInteractable((FVRInteractiveObject)(object)val4.GetComponent()); ((FVRInteractiveObject)val4.GetComponent()).BeginInteraction(hand4); } curitem4num--; } } } } public class IFAKCarrier : MonoBehaviour { public GameObject rot; private void Start() { } private void FixedUpdate() { //IL_0026: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00f4: 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_0133: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { if (Vector3.Distance(((Component)GM.CurrentPlayerBody.LeftHand).gameObject.transform.position, ((Component)this).gameObject.transform.position) <= 0.1f || Vector3.Distance(((Component)GM.CurrentPlayerBody.RightHand).gameObject.transform.position, ((Component)this).gameObject.transform.position) <= 0.1f) { rot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } if (Vector3.Distance(((Component)GM.CurrentPlayerBody.LeftHand).gameObject.transform.position, ((Component)this).gameObject.transform.position) > 0.1f && Vector3.Distance(((Component)GM.CurrentPlayerBody.RightHand).gameObject.transform.position, ((Component)this).gameObject.transform.position) > 0.1f) { rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } } public class ItemPackage : FVRPhysicalObject { public GameObject prefab; public FVRObject content; public AudioEvent bite; public AudioEvent spit; public float cd = 1f; public bool ka = false; private void Update() { //IL_0029: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0208: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: 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_00cb: 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_01e8: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)this).m_isHeld && (Object)(object)GM.CurrentPlayerBody != (Object)null && Vector3.Distance(((Component)this).gameObject.transform.position, ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position + ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.up * -0.2f) < 0.1f && !ka) { SM.PlayCoreSound((FVRPooledAudioType)41, bite, ((Component)this).gameObject.transform.position); FVRViveHand hand = ((FVRInteractiveObject)this).m_hand; ((FVRInteractiveObject)this).ForceBreakInteraction(); GameObject val = Object.Instantiate(((AnvilAsset)content).GetGameObject(), ((Component)hand).gameObject.transform.position, ((Component)hand).gameObject.transform.rotation); if ((Object)(object)val.GetComponent() != (Object)null) { hand.ForceSetInteractable((FVRInteractiveObject)(object)val.GetComponent()); ((FVRInteractiveObject)val.GetComponent()).BeginInteraction(hand); } ka = true; } if (!ka) { return; } cd -= 1f; if (!(cd <= 0f)) { return; } if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { GameObject val2 = Object.Instantiate(prefab, ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.position + ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.up * -0.2f, ((Component)GM.CurrentPlayerBody.Head).gameObject.transform.rotation); if ((Object)(object)val2.GetComponent() != (Object)null) { val2.GetComponent().AddRelativeForce(new Vector3(0f, 0f, 2.5f), (ForceMode)2); } } SM.PlayCoreSound((FVRPooledAudioType)41, spit, ((Component)this).gameObject.transform.position); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class LiveryToggle : MonoBehaviour { public Texture2D tex1; public Texture2D tex2; public Texture2D tex3; public Texture2D tex4; public Texture2D tex5; public Material mt1; public Material mt2; public Material mt3; public Material mt4; public Material mt5; public MeshRenderer[] renderers; public GameObject piece; private bool lv1 = true; private bool lv2 = false; private bool lv3 = false; private bool lv4 = false; private bool lv5 = false; private void Start() { renderers = ((Component)this).gameObject.GetComponentsInChildren(); } private void Livery1() { if (!lv1) { lv1 = true; lv2 = false; lv3 = false; lv4 = false; lv5 = false; MeshRenderer[] array = renderers; foreach (MeshRenderer val in array) { if ((Object)(object)((Renderer)val).material.mainTexture == (Object)(object)tex5) { ((Renderer)val).material = mt1; RendererExtensions.UpdateGIMaterials((Renderer)(object)val); } } } else if (!lv1) { } } private void Livery2() { if (!lv2) { lv1 = false; lv2 = true; lv3 = false; lv4 = false; lv5 = false; MeshRenderer[] array = renderers; foreach (MeshRenderer val in array) { if ((Object)(object)((Renderer)val).material.mainTexture == (Object)(object)tex1) { ((Renderer)val).material = mt2; RendererExtensions.UpdateGIMaterials((Renderer)(object)val); } } } else if (!lv2) { } } private void Livery3() { if (!lv3) { lv1 = false; lv2 = false; lv3 = true; lv4 = false; lv5 = false; MeshRenderer[] array = renderers; foreach (MeshRenderer val in array) { if ((Object)(object)((Renderer)val).material.mainTexture == (Object)(object)tex2) { ((Renderer)val).material = mt3; RendererExtensions.UpdateGIMaterials((Renderer)(object)val); } } } else if (!lv3) { } } private void Livery4() { if (!lv4) { lv1 = false; lv2 = false; lv3 = false; lv4 = true; lv5 = false; MeshRenderer[] array = renderers; foreach (MeshRenderer val in array) { if ((Object)(object)((Renderer)val).material.mainTexture == (Object)(object)tex3) { ((Renderer)val).material = mt4; RendererExtensions.UpdateGIMaterials((Renderer)(object)val); } } } else if (!lv4) { } } private void Livery5() { if (!lv5) { lv1 = false; lv2 = false; lv3 = false; lv4 = false; lv5 = true; MeshRenderer[] array = renderers; foreach (MeshRenderer val in array) { if ((Object)(object)((Renderer)val).material.mainTexture == (Object)(object)tex4) { ((Renderer)val).material = mt5; RendererExtensions.UpdateGIMaterials((Renderer)(object)val); } } } 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(); } } } public class Stim : FVRPhysicalObject { public KillAfter ka; public GameObject stimneedle; public GameObject torsoref; public AudioEvent inject; public GameObject rot; private void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0077: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: 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) if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { torsoref.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Torso).gameObject.transform.position.x, stimneedle.transform.position.y, ((Component)GM.CurrentPlayerBody.Torso).gameObject.transform.position.z); } if (((FVRInteractiveObject)this).m_isHeld) { if (((FVRInteractiveObject)this).m_hand.Input.TriggerFloat >= 0.5f) { stimneedle.transform.localPosition = new Vector3(0f, -0.1f, 0f); rot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); if (Vector3.Distance(torsoref.transform.position, stimneedle.transform.position) <= 0.25f) { ((FVRInteractiveObject)this).m_hand.m_buzztime = 1f; ((FVRInteractiveObject)this).IsSimpleInteract = true; base.DistantGrabbable = false; SM.PlayCoreSound((FVRPooledAudioType)41, inject, stimneedle.transform.position); GM.CurrentPlayerBody.ActivatePower((PowerupType)10, (PowerUpIntensity)1, (PowerUpDuration)1, false, false, -1f); ((FVRInteractiveObject)this).ForceBreakInteraction(); ((Behaviour)ka).enabled = true; } } else if (((FVRInteractiveObject)this).m_hand.Input.TriggerFloat < 0.5f) { rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); stimneedle.transform.localPosition = new Vector3(0f, 0f, 0f); } } else if (!((FVRInteractiveObject)this).m_isHeld) { rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class SlideWhistle : MonoBehaviour { public GameObject MouthPort; public FVRInteractiveObject Grab; public FVRPhysicalObject Flute; public Collider GrabCol; public Collider SlideCol; public FVRInteractiveObject Slide; public GameObject SlideGeo; public AudioSource Audio; public GameObject FluteGeo; public float lowpitch = 0.5f; public float highpitch = 2f; public bool blow; private void Update() { //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_0166: 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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)Flute).m_hand == (Object)null) { Audio.volume = 0f; if (Audio.isPlaying) { Audio.Stop(); } if ((Object)(object)Slide.m_hand != (Object)null) { Slide.ForceBreakInteraction(); } GrabCol.enabled = true; SlideCol.enabled = false; FluteGeo.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } else if ((Object)(object)((FVRInteractiveObject)Flute).m_hand != (Object)null) { Audio.volume = Mathf.Lerp(0f, 0.25f, ((FVRInteractiveObject)Flute).m_hand.Input.TriggerFloat); GrabCol.enabled = false; SlideCol.enabled = true; Audio.pitch = Mathf.Lerp(highpitch, lowpitch, SlideGeo.transform.localPosition.z); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, -0.1f, 0f); Vector3 val2 = ((Component)GM.CurrentMovementManager.Head).gameObject.transform.TransformPoint(val); AxisLookAt(FluteGeo.transform, val2, Vector3.forward); if (Vector3.Distance(MouthPort.transform.position, val2) < 0.1f) { if ((((FVRInteractiveObject)Flute).m_hand.Input.TriggerFloat > 0.05f || blow) && !Audio.isPlaying) { Audio.Play(); } if (((FVRInteractiveObject)Flute).m_hand.Input.TriggerFloat <= 0.05f && !blow && Audio.isPlaying) { Audio.Stop(); } } if (Vector3.Distance(MouthPort.transform.position, val2) >= 0.1f && Audio.isPlaying) { Audio.Stop(); } } if ((Object)(object)Grab.m_hand != (Object)null) { FVRViveHand hand = Grab.m_hand; Grab.ForceBreakInteraction(); hand.ForceSetInteractable((FVRInteractiveObject)(object)Flute); ((FVRInteractiveObject)Flute).BeginInteraction(hand); } } 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 void Blow() { blow = true; } public void UnBlow() { blow = false; } } public class TaserBattery : MonoBehaviour { public TaserGun gun; public float cd = 0.5f; private void OnTriggerStay(Collider other) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null && (Object)(object)((Component)other).gameObject.GetComponentInParent().S != (Object)null) { cd = 0.5f; gun.S = ((Component)other).gameObject.GetComponentInParent().S; } } private void Update() { if (cd > 0f) { cd -= Time.deltaTime; } else if (cd <= 0f) { gun.S = null; } } private void OnDisable() { cd = 0f; gun.S = null; } } public class TaserCartridge : FVRFireArmRound { public LineRenderer Lup; public LineRenderer Ldown; public Transform CurN1; public Transform CurN2; public Transform middleMuzzle; private void Update() { //IL_0031: 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_0086: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0126: 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) if (((FVRFireArmRound)this).IsSpent) { if ((Object)(object)CurN1 != (Object)null) { Lup.SetPosition(0, ((Component)middleMuzzle).transform.position); Lup.SetPosition(1, ((Component)CurN1).gameObject.transform.position); } else if ((Object)(object)CurN1 == (Object)null) { Lup.SetPosition(0, ((Component)middleMuzzle).transform.position); Lup.SetPosition(1, ((Component)middleMuzzle).transform.position); } if ((Object)(object)CurN2 != (Object)null) { Ldown.SetPosition(0, ((Component)middleMuzzle).transform.position); Ldown.SetPosition(1, ((Component)CurN2).gameObject.transform.position); } else if ((Object)(object)CurN2 == (Object)null) { Ldown.SetPosition(0, ((Component)middleMuzzle).transform.position); Ldown.SetPosition(1, ((Component)middleMuzzle).transform.position); } } } private void OnDestroy() { if ((Object)(object)((FVRInteractiveObject)this).m_hand != (Object)null) { ((FVRInteractiveObject)this).ForceBreakInteraction(); } if ((Object)(object)CurN1 != (Object)null) { Object.Destroy((Object)(object)((Component)CurN1).gameObject); } if ((Object)(object)CurN2 != (Object)null) { Object.Destroy((Object)(object)((Component)CurN2).gameObject); } } } public class TaserGun : FVRFireArm { public Transform muzzleUpper; public Transform muzzleLower; public Transform Trigger; public AR15HandleSightFlipper Safety; public FVRFireArmChamber Chamber; public FVRObject Needle; public Transform middleMuzzle; public TaserNeedle CurN1; public TaserNeedle CurN2; public LineRenderer Lup; public LineRenderer Ldown; public GameObject cf; public GameObject cuf; public GameObject phys; public GameObject particles; public Sosig S; public AudioSource StunBuzz; public GameObject Stun; public void TaserShock() { if ((Object)(object)S != (Object)null) { S.SetBodyState((SosigBodyState)2); S.SetCurrentOrder((SosigOrder)8); S.Stun(2.5f); } } private void Update() { //IL_002c: 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_04c3: 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_04fb: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_037b: 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_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: 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_03cb: 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_015f: 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_041b: 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_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Unknown result type (might be due to invalid IL or missing references) if (Safety.m_isLargeAperture) { ((Component)Trigger).transform.localPosition = new Vector3(0f, 0f, 0f); } else if (!Safety.m_isLargeAperture) { if ((Object)(object)((FVRInteractiveObject)this).m_hand != (Object)null) { ((Component)Trigger).transform.localPosition = new Vector3(0f, 0f, ((FVRInteractiveObject)this).m_hand.Input.TriggerFloat); } if ((Object)(object)((FVRInteractiveObject)this).m_hand == (Object)null) { ((Component)Trigger).transform.localPosition = new Vector3(0f, 0f, 0f); } if (Chamber.IsFull && !Chamber.IsSpent && Trigger.localPosition.z > 0.75f) { ((FVRFireArm)this).Fire(Chamber, middleMuzzle, true, 1f, -1f); Chamber.IsSpent = true; Chamber.m_round.m_isSpent = true; Object.Instantiate(particles, ((Component)middleMuzzle).transform.position, ((Component)middleMuzzle).transform.rotation); if ((Object)(object)CurN1 == (Object)null) { GameObject val = Object.Instantiate(((AnvilAsset)Needle).GetGameObject(), ((Component)muzzleUpper).transform.position, ((Component)muzzleUpper).transform.rotation); if ((Object)(object)val.GetComponent() != (Object)null) { CurN1 = val.GetComponent(); } if ((Object)(object)((Component)Chamber.GetRound()).gameObject.GetComponent() != (Object)null) { ((Component)Chamber.GetRound()).gameObject.GetComponent().CurN1 = ((Component)CurN1).transform; } } if ((Object)(object)CurN2 == (Object)null) { GameObject val2 = Object.Instantiate(((AnvilAsset)Needle).GetGameObject(), ((Component)muzzleLower).transform.position, ((Component)muzzleLower).transform.rotation); if ((Object)(object)val2.GetComponent() != (Object)null) { CurN2 = val2.GetComponent(); } if ((Object)(object)((Component)Chamber.GetRound()).gameObject.GetComponent() != (Object)null) { ((Component)Chamber.GetRound()).gameObject.GetComponent().CurN2 = ((Component)CurN2).transform; } } } } if (Chamber.IsFull) { phys.SetActive(true); if (Chamber.IsSpent) { cf.SetActive(true); cuf.SetActive(false); } else if (!Chamber.IsSpent) { cf.SetActive(false); cuf.SetActive(true); } if ((Object)(object)CurN1 != (Object)null) { Lup.SetPosition(0, ((Component)middleMuzzle).transform.position); Lup.SetPosition(1, ((Component)CurN1).gameObject.transform.position); } else if ((Object)(object)CurN1 == (Object)null) { Lup.SetPosition(0, ((Component)middleMuzzle).transform.position); Lup.SetPosition(1, ((Component)middleMuzzle).transform.position); } if ((Object)(object)CurN2 != (Object)null) { Ldown.SetPosition(0, ((Component)middleMuzzle).transform.position); Ldown.SetPosition(1, ((Component)CurN2).gameObject.transform.position); } else if ((Object)(object)CurN2 == (Object)null) { Ldown.SetPosition(0, ((Component)middleMuzzle).transform.position); Ldown.SetPosition(1, ((Component)middleMuzzle).transform.position); } } else if (!Chamber.IsFull) { phys.SetActive(false); cf.SetActive(false); cuf.SetActive(false); Lup.SetPosition(0, ((Component)middleMuzzle).transform.position); Lup.SetPosition(1, ((Component)middleMuzzle).transform.position); Ldown.SetPosition(0, ((Component)middleMuzzle).transform.position); Ldown.SetPosition(1, ((Component)middleMuzzle).transform.position); } if ((Object)(object)base.Magazine != (Object)null && !Chamber.IsFull && Trigger.localPosition.z > 0.75f && base.Magazine.FuelAmountLeft > 0f) { Stun.SetActive(true); if ((Object)(object)S != (Object)null) { TaserShock(); } StunBuzz.Play(); base.Magazine.DrainFuel(1f); } if ((Object)(object)base.Magazine == (Object)null && Chamber.IsFull && Trigger.localPosition.z <= 0.75f) { Stun.SetActive(false); } if (!((Object)(object)base.Magazine != (Object)null) || !((Object)(object)CurN1 != (Object)null) || !((Object)(object)CurN2 != (Object)null) || !Chamber.IsFull || !Chamber.IsSpent || !CurN1.isSosig || !CurN2.isSosig) { return; } if (base.Magazine.FuelAmountLeft > 0f) { CurN1.TaserShock(); CurN2.TaserShock(); base.Magazine.DrainFuel(1f); } else if (base.Magazine.FuelAmountLeft <= 0f) { if ((Object)(object)CurN1 != (Object)null) { CurN1 = null; } if ((Object)(object)CurN2 != (Object)null) { CurN2 = null; } Chamber.EjectRound(((Component)Chamber).transform.position, ((Component)Chamber).transform.forward * 2.5f, new Vector3(0f, 0f, 0f), false); } } } public class TaserNeedle : FVRPhysicalObject { public bool isContact; public bool isSosig; public Transform stickTar; public Rigidbody rig; public Sosig S; public AudioSource StunBuzz; public Collider phys; private void Start() { //IL_000d: 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) rig.AddForce(((Component)this).transform.forward * 10f, (ForceMode)2); } public void OnCollisionEnter(Collision collision) { if (!isContact) { if ((Object)(object)((Component)collision.collider).gameObject.GetComponentInParent() != (Object)null && (Object)(object)((Component)collision.collider).gameObject.GetComponentInParent().S != (Object)null) { S = ((Component)collision.collider).gameObject.GetComponentInParent().S; } if ((Object)(object)stickTar != (Object)null && (Object)(object)((Component)collision.collider).gameObject.GetComponent() == (Object)null && (Object)(object)((Component)collision.collider).gameObject.GetComponentInParent() == (Object)null) { ((Component)stickTar).transform.SetParent(((Component)collision.collider).gameObject.transform); isContact = true; phys.enabled = false; } } } public void Update() { //IL_004f: 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)S != (Object)null) { isSosig = true; } if (isContact && (Object)(object)stickTar != (Object)null) { ((Component)this).gameObject.transform.position = ((Component)stickTar).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)stickTar).transform.eulerAngles; rig.useGravity = false; rig.isKinematic = true; } if ((Object)(object)stickTar == (Object)null) { rig.useGravity = true; rig.isKinematic = false; phys.enabled = true; } } public void TaserShock() { if ((Object)(object)S != (Object)null) { S.SetBodyState((SosigBodyState)2); S.SetCurrentOrder((SosigOrder)8); S.Stun(2.5f); StunBuzz.Play(); } } } public class Forwardassistslap : MonoBehaviour { public ClosedBoltWeapon gun; public Vector3 velLinearWorld; public Transform slapdir; public bool Slamed = false; public GameObject assistGeo; public float forwardvalue; public float forref; public AudioEvent slap; private void FixedUpdate() { //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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { velLinearWorld = ((FVRInteractiveObject)gun).m_hand.OtherHand.Input.VelLinearWorld; if (!Slamed && Vector3.Distance(((FVRInteractiveObject)gun).m_hand.OtherHand.PalmTransform.position, slapdir.position) < 0.1f && Vector3.Angle(velLinearWorld, slapdir.forward) < 50f && ((Vector3)(ref velLinearWorld)).magnitude > 1.5f) { SM.PlayCoreSound((FVRPooledAudioType)41, slap, assistGeo.transform.position); 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; } } } public class SecondChargingHandleForClosedBolt : MonoBehaviour { public MultipleChargingHandleClosedBolt handle1; public ClosedBolt bolt; public float handle1ForwardValue; private void FixedUpdate() { if (bolt.m_isBoltLocked) { ((ClosedBoltHandle)handle1).Speed_Forward = 0f; } else if (!bolt.m_isBoltLocked) { ((ClosedBoltHandle)handle1).Speed_Forward = handle1ForwardValue; } } } }