using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using CustomTargets; using FistVR; using H3VRUtils.MonoScripts.VisualModifiers; using HarmonyLib; using JerryComponent; using OpenScripts2; using OtherLoader; using Popcron; using ToxicGasFramework; using UnityEditor; using UnityEngine; using UnityEngine.AI; using UnityEngine.PostProcessing; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; using visSpace; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace JerryComponent { public class Scale16muzzle : MonoBehaviour { public Suppressor muzzledevice; public GameObject muzzleinterface; public bool scaled = false; public bool magscaled = false; public bool clipscaled = false; public FVRFireArm firearm; public Vector3 scaleoriginal; public Vector3 magscaleoriginal; public Vector3 clipscaleoriginal; public FVRPhysicalObjectSize size; private void Start() { } private void Update() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)firearm == (Object)null || (Object)(object)((FVRFireArmAttachment)muzzledevice).curMount == (Object)null || (Object)(object)((FVRFireArmAttachment)muzzledevice).curMount.Parent == (Object)null || (Object)(object)firearm.Magazine == (Object)null || (Object)(object)firearm.Clip == (Object)null) { } if ((Object)(object)firearm != (Object)null && !scaled) { scaleoriginal = ((Component)firearm).gameObject.transform.localScale; size = ((FVRPhysicalObject)firearm).Size; scaled = true; } if ((Object)(object)firearm != (Object)null && !magscaled && (Object)(object)firearm.Magazine != (Object)null) { magscaleoriginal = ((Component)firearm.Magazine).gameObject.transform.localScale; magscaled = true; } if ((Object)(object)firearm != (Object)null && !clipscaled && (Object)(object)firearm.Clip != (Object)null) { clipscaleoriginal = ((Component)firearm.Clip).gameObject.transform.localScale; clipscaled = true; } if ((Object)(object)((FVRFireArmAttachment)muzzledevice).curMount != (Object)null && ((FVRFireArmAttachment)muzzledevice).curMount.AttachmentsList.Count > 0) { firearm = ((Component)((FVRFireArmAttachment)muzzledevice).curMount.Parent).GetComponent(); if ((Object)(object)firearm.Magazine == (Object)null) { magscaled = false; } if ((Object)(object)firearm.Clip == (Object)null) { clipscaled = false; } if (1f - 5f * (muzzledevice.CatchRot / 360f) / 6f <= 0f) { ((FVRPhysicalObject)firearm).Size = (FVRPhysicalObjectSize)0; } if (1f - 5f * (muzzledevice.CatchRot / 360f) / 6f > 0f) { ((FVRPhysicalObject)firearm).Size = size; } ((Component)firearm).gameObject.transform.localScale = scaleoriginal * (1f - 5f * (muzzledevice.CatchRot / 360f) / 6f); } if ((Object)(object)((FVRFireArmAttachment)muzzledevice).curMount != (Object)null && ((FVRFireArmAttachment)muzzledevice).curMount.AttachmentsList.Count < 1) { firearm = null; scaled = false; } } } } public class BottleSmash : MonoBehaviour { [ColorUsage(true, true, 0f, 8f, 0.125f, 3f)] public Color color; [SerializeField] [HideInInspector] private Color cachedColor; [SerializeField] [HideInInspector] private List registeredComponents; public GameObject Cork; public GameObject Liquid; public GameObject Glass; public GameObject Glass_Shattered; public GameObject Label; public float DespawnTime = 5f; public ParticleSystem Effect; public GameObject Splat; public LayerMask SplatMask; public float maxSplatDistance = 5f; public float shatterAtSpeed = 2f; public bool allowShattering = true; public bool onlyAllowShatterOnCollision = true; [SerializeField] [HideInInspector] private Vector3 previousPos; [SerializeField] [HideInInspector] private Vector3 previousVelocity; [SerializeField] [HideInInspector] private Vector3 randomRot; [SerializeField] [HideInInspector] private float _lastHitSpeed = 0f; private bool broken = false; private float collidedRecently = -1f; private void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) previousPos = ((Component)this).transform.position; } public void RandomizeColor() { //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) color = new Color((float)Random.Range(0, 1), (float)Random.Range(0, 1), (float)Random.Range(0, 1), 1f); } private void OnCollisionEnter(Collision collision) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) Vector3 impulse = collision.impulse; _lastHitSpeed = ((Vector3)(ref impulse)).magnitude; if (((Component)collision.transform).tag != "Liquid") { collidedRecently = 0.2f; } } public void AttemptCollision(Collision col) { OnCollisionEnter(col); } public void RegisterColorBase(ColorBase cb) { registeredComponents.Add(cb); } public void ChangedColor() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (!(cachedColor != color)) { return; } cachedColor = color; foreach (ColorBase registeredComponent in registeredComponents) { registeredComponent.Unify(); } } public Vector3 GetRandomRotation() { //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 randomRot; } public void RandomRotation() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_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) Vector3 val = Random.insideUnitSphere + Vector3.forward; randomRot = ((Vector3)(ref val)).normalized; } public void Smash() { //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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) broken = true; if ((Object)(object)Cork != (Object)null) { Cork.transform.parent = null; Cork.GetComponent().enabled = true; Cork.GetComponent().isKinematic = false; Object.Destroy((Object)(object)Cork.gameObject, DespawnTime); } if ((Object)(object)Liquid != (Object)null) { float num = 0f; Object.Destroy((Object)(object)Liquid.gameObject, num); } if ((Object)(object)Effect != (Object)null) { Effect.Play(); GameObject gameObject = ((Component)Effect).gameObject; MainModule main = Effect.main; MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime; Object.Destroy((Object)(object)gameObject, ((MinMaxCurve)(ref startLifetime)).constantMax); } if ((Object)(object)Label != (Object)null) { Object.Destroy((Object)(object)Label.gameObject); } if ((Object)(object)Glass != (Object)null) { Object.Destroy((Object)(object)Glass.gameObject); } if ((Object)(object)Glass_Shattered != (Object)null) { Glass_Shattered.SetActive(true); Glass_Shattered.transform.parent = null; Object.Destroy((Object)(object)Glass_Shattered, DespawnTime); } RaycastHit val = default(RaycastHit); if ((Object)(object)Splat != (Object)null && Physics.Raycast(((Component)this).transform.position, Vector3.down, ref val, maxSplatDistance, LayerMask.op_Implicit(SplatMask))) { GameObject val2 = Object.Instantiate(Splat); val2.transform.position = ((RaycastHit)(ref val)).point; } Object.Destroy((Object)(object)((Component)((Component)this).transform).gameObject, DespawnTime); } private void FixedUpdate() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) ChangedColor(); collidedRecently -= Time.deltaTime; Vector3 val = (((Component)this).transform.position - previousPos) / Time.fixedDeltaTime; if (((onlyAllowShatterOnCollision && collidedRecently >= 0f) | !onlyAllowShatterOnCollision) && allowShattering && (Vector3.Distance(val, previousVelocity) > shatterAtSpeed || _lastHitSpeed > shatterAtSpeed) && !broken) { Smash(); } _lastHitSpeed = 0f; previousVelocity = val; previousPos = ((Component)this).transform.position; } } public class ColorBase : MonoBehaviour { protected virtual void RegisterWithController() { } public virtual void Unify() { } } public class LiquidColor : ColorBase { public BottleSmash bottleSmash; private LiquidVolumeAnimator lva; public bool UpdateSurfaceColor = true; public bool UpdateColor = true; public bool UpdateSurfaceEmission = true; public bool UpdateEmission = true; private void Start() { lva = ((Component)this).GetComponent(); if ((Object)(object)bottleSmash == (Object)null) { bottleSmash = ((Component)this).GetComponentInParent(); } RegisterWithController(); } protected override void RegisterWithController() { bottleSmash.RegisterColorBase(this); } public override void Unify() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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) if (UpdateColor) { lva.mats[0].SetColor("_Color", bottleSmash.color); } if (UpdateEmission) { lva.mats[0].SetColor("_EmissionColor", bottleSmash.color); } if (UpdateSurfaceColor) { lva.mats[0].SetColor("_SColor", bottleSmash.color); } if (UpdateSurfaceEmission) { lva.mats[0].SetColor("_SEmissionColor", bottleSmash.color); } } } public class PS_Color : ColorBase { public BottleSmash bottleSmash; private ParticleSystem ps; private void Start() { ps = ((Component)this).GetComponent(); if ((Object)(object)bottleSmash == (Object)null) { bottleSmash = ((Component)this).GetComponentInParent(); } RegisterWithController(); } protected override void RegisterWithController() { bottleSmash.RegisterColorBase(this); } public override void Unify() { UpdateValues(); } public void UpdateValues() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) MainModule main = ps.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(bottleSmash.color); } } public class ParticleColor : ColorBase { public enum ColorID { _TintColor, _Color } public BottleSmash bottleSmash; private ParticleSystemRenderer ps; public ColorID colorType; private void Start() { ps = ((Component)this).GetComponent(); if ((Object)(object)bottleSmash == (Object)null) { bottleSmash = ((Component)this).GetComponentInParent(); } RegisterWithController(); } protected override void RegisterWithController() { bottleSmash.RegisterColorBase(this); } public override void Unify() { //IL_0031: 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) switch (colorType) { case ColorID._TintColor: ((Renderer)ps).material.SetColor("_TintColor", bottleSmash.color); break; case ColorID._Color: ((Renderer)ps).material.SetColor("_Color", bottleSmash.color); break; } } } public class ResetColors : MonoBehaviour { public LiquidVolumeAnimator LVA; public float timeout = 5f; private float tReset; public BottleSmash BS; public Color Color1; public Color Color2; private void Start() { tReset = timeout; } private void Update() { //IL_002a: 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_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_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) timeout -= Time.deltaTime; if (timeout <= 0f) { if (BS.color == Color1) { BS.color = Color2; } else { BS.color = Color1; } LVA.level = 1f; timeout = tReset; } } } public class DemoRotation : MonoBehaviour { private BottleSmash BS; public float rotSpeed = 30f; private void Start() { BS = ((Component)this).GetComponent(); } private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0015: 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_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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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_0055: 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_008b: 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_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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) Vector3 randomRotation = BS.GetRandomRotation(); Vector3 normalized = ((Vector3)(ref randomRotation)).normalized; if (normalized != Vector3.zero) { Vector3 randomRotation2 = BS.GetRandomRotation(); Vector3 normalized2 = ((Vector3)(ref randomRotation2)).normalized; Vector3 val = ((Component)BS).transform.up + Vector3.up; if (Vector3.Dot(normalized2, ((Vector3)(ref val)).normalized) < 0.98f) { Transform transform = ((Component)BS).transform; Quaternion rotation = ((Component)BS).transform.rotation; Vector3 randomRotation3 = BS.GetRandomRotation(); Vector3 val2 = ((Component)BS).transform.up + Vector3.up; transform.rotation = Quaternion.RotateTowards(rotation, Quaternion.LookRotation(randomRotation3, ((Vector3)(ref val2)).normalized), rotSpeed * Time.deltaTime); } } } } public class ForceTest : MonoBehaviour { public bool AddForce = false; public Vector3 force; private LiquidVolumeAnimator lva; private void Start() { lva = ((Component)this).GetComponent(); } private void Update() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (AddForce) { lva.AddForce(force); AddForce = false; } } } public class LiquidAbsorption : MonoBehaviour { public Color currentColor; public BottleSmash smashScript; public float particleValue = 0.02f; public LiquidVolumeAnimator LVA; private void Start() { if ((Object)(object)LVA == (Object)null) { LVA = ((Component)this).GetComponent(); } } private void OnParticleCollision(GameObject other) { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)other.transform.parent == (Object)(object)((Component)this).transform.parent) { return; } bool flag = false; if ((Object)(object)smashScript.Cork == (Object)null) { flag = true; } else if (!smashScript.Cork.activeSelf) { flag = true; } else if (!smashScript.Cork.GetComponent().isKinematic) { flag = true; } if (!flag) { return; } currentColor = smashScript.color; if (LVA.level < 1f - particleValue) { Color color = other.GetComponentInParent().color; if (LVA.level <= 1.4E-44f) { currentColor = color; } else { currentColor = Color.Lerp(currentColor, color, particleValue / LVA.level); } LVA.level += particleValue; smashScript.color = currentColor; } } private void Update() { //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) currentColor = smashScript.color; } } public class LiquidAbsorptionV2 : MonoBehaviour { public Color currentColor; public BottleSmash smashScript; public MeshLiquidEmission LiquidEmission; public LiquidVolumeAnimator LVA; private float particleValue = 1f; private void Start() { if ((Object)(object)LVA == (Object)null) { LVA = ((Component)this).GetComponent(); } } private void OnParticleCollision(GameObject other) { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)other.transform.parent == (Object)(object)((Component)this).transform.parent) { return; } bool flag = false; if ((Object)(object)smashScript.Cork == (Object)null) { flag = true; } else if (!smashScript.Cork.activeSelf) { flag = true; } else if (!smashScript.Cork.GetComponent().isKinematic) { flag = true; } float num = particleValue * (1f / LiquidEmission.volumeOfParticles); if (!flag) { return; } currentColor = smashScript.color; if (LVA.level < 1f - num) { Color color = other.GetComponentInParent().color; if (LVA.level <= 1.4E-44f) { currentColor = color; } else { currentColor = Color.Lerp(currentColor, color, num / LVA.level); } LVA.level += num; smashScript.color = currentColor; } } private void Update() { //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) currentColor = smashScript.color; } } public class LiquidPool : MonoBehaviour { public float minSize = 0.5f; public float maxSize = 1f; public float timeToComplete = 0.5f; private float randomSize; private float currentTime = 0f; private bool fadingOut = false; private MeshRenderer mr; private Material mat; private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = Vector3.zero; randomSize = Random.Range(minSize, maxSize); mr = ((Component)this).GetComponent(); mat = ((Renderer)mr).material; mat = Object.Instantiate(mat); ((Renderer)mr).material = mat; } private void Update() { //IL_00bf: 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_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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a8: Unknown result type (might be due to invalid IL or missing references) currentTime += Time.deltaTime * (float)((!fadingOut) ? 1 : (-1)); if (currentTime >= timeToComplete) { fadingOut = true; } if (fadingOut) { mat.color = new Color(mat.color.r, mat.color.g, mat.color.b, Mathf.Lerp(0f, 1f, currentTime / timeToComplete)); } else { ((Component)this).transform.localScale = Vector3.one * Mathf.Lerp(0f, randomSize, currentTime / timeToComplete); } if (fadingOut && currentTime <= 0f) { Object.Destroy((Object)(object)((Component)((Component)this).transform).gameObject); } } } [Serializable] public class LiquidVolumeAnimator : MonoBehaviour { [HideInInspector] [SerializeField] public Material[] mats; [Range(0f, 1f)] [SerializeField] public float level = 0.5f; private float finalLevel; public Vector2 minMaxBounds; [HideInInspector] [SerializeField] private MeshFilter mf; [HideInInspector] [SerializeField] private MeshRenderer mr; [HideInInspector] [SerializeField] private Mesh m; public bool DebugAnchor = false; public float debugSize = 1f; public float _anchorLength = 0.5f; [Range(0f, 1f)] public float dampening; [HideInInspector] [SerializeField] private Vector3 anchor; [HideInInspector] [SerializeField] private Vector3 anchorVelocity; [HideInInspector] [SerializeField] private Vector3 transformedPoint; [HideInInspector] [SerializeField] private Vector3 prevTransformedPoint; public bool calculateTextureProjection = true; public float TextureSize = 1f; public float TextureSizeScalar = 1f; public AnimationCurve texCurveSize = AnimationCurve.Linear(0f, 1f, 1f, 1f); private Quaternion previous; private float totalRotation = 0f; [HideInInspector] [SerializeField] private Vector3 TopLeft; [HideInInspector] [SerializeField] private Vector3 TopRight; [HideInInspector] [SerializeField] private Vector3 BottomLeft; [HideInInspector] [SerializeField] private Vector3 BottomRight; public Transform ExposedLiquidT; public Vector3 GravityDirection = Vector3.down; public bool normalizeGravityDirection = true; [HideInInspector] [SerializeField] private Vector3[] verts; private int shader_Key_localHeight; private int shader_Key_anchor; private int shader_Key_point; private int shader_Key_level; private float prvLevel = -1f; private Quaternion prevQ = Quaternion.identity; [HideInInspector] [SerializeField] private Vector3 cPos = Vector3.zero; public Vector3 finalAnchor; public Vector3 finalPoint; [HideInInspector] [SerializeField] private string[] shaderNames; private void OnDrawGizmosSelected() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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_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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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) float num = _anchorLength * Mathf.Max(new float[3] { ((Component)this).transform.lossyScale.x, ((Component)this).transform.lossyScale.y, ((Component)this).transform.lossyScale.z }); if (DebugAnchor) { cPos = ((Component)this).transform.position; Vector3 val = cPos - ((Component)this).transform.TransformDirection(Vector3.up) * num; if (anchor == Vector3.zero) { anchor = val; } CalculateSquare(anchor); Vector3 lossyScale = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(val, 0.25f * ((Vector3)(ref lossyScale)).magnitude * 0.1f * debugSize); Gizmos.DrawLine(cPos, val); Gizmos.color = Color.blue; Vector3 val2 = anchor; Vector3 lossyScale2 = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(val2, 0.25f * ((Vector3)(ref lossyScale2)).magnitude * 0.1f * debugSize); Gizmos.color = Color.red; Vector3 val3 = cPos; Vector3 val4 = val - cPos; Vector3 val5 = val3 - ((Vector3)(ref val4)).normalized * finalLevel; Vector3 lossyScale3 = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(val5, 0.1f * ((Vector3)(ref lossyScale3)).magnitude * 0.01f * debugSize); Gizmos.color = Color.yellow; Vector3 topLeft = TopLeft; Vector3 lossyScale4 = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(topLeft, 0.25f * ((Vector3)(ref lossyScale4)).magnitude * 0.01f * debugSize); Vector3 topRight = TopRight; Vector3 lossyScale5 = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(topRight, 0.25f * ((Vector3)(ref lossyScale5)).magnitude * 0.01f * debugSize); Vector3 bottomLeft = BottomLeft; Vector3 lossyScale6 = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(bottomLeft, 0.25f * ((Vector3)(ref lossyScale6)).magnitude * 0.01f * debugSize); Vector3 bottomRight = BottomRight; Vector3 lossyScale7 = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(bottomRight, 0.25f * ((Vector3)(ref lossyScale7)).magnitude * 0.01f * debugSize); Gizmos.color = Color.white; CalculateSquare(anchor); } } private void CalculateSquare(Vector3 anch) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_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_0156: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016f: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_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_018f: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) if (calculateTextureProjection) { Vector3 val = cPos; Vector3 val2 = anch - cPos; Vector3 val3 = val - ((Vector3)(ref val2)).normalized * finalLevel; Vector3 val4 = cPos; Vector3 val5 = anch - cPos; Vector3 val6 = val4 - ((Vector3)(ref val5)).normalized * finalLevel - anch; Vector3 normalized = ((Vector3)(ref val6)).normalized; Vector3 val7 = Quaternion.Euler(0f, totalRotation, 0f) * Vector3.right; Vector3 val8 = Vector3.Cross(val7, ((Vector3)(ref normalized)).normalized); Vector3 normalized2 = ((Vector3)(ref val8)).normalized; Vector3 val9 = Vector3.Cross(normalized2, normalized); Vector3 normalized3 = ((Vector3)(ref val9)).normalized; Vector3 val10 = Vector3.Cross(normalized3, normalized); normalized2 = ((Vector3)(ref val10)).normalized; float num = TextureSize * texCurveSize.Evaluate(Mathf.Clamp01(level)); Vector3 lossyScale = ((Component)this).transform.lossyScale; float num2 = num * ((Vector3)(ref lossyScale)).magnitude * 0.001f; TopLeft = normalized3 * num2 + normalized2 * num2 + val3; TopRight = normalized3 * num2 * -1f + normalized2 * num2 + val3; BottomLeft = normalized3 * num2 + normalized2 * num2 * -1f + val3; BottomRight = normalized3 * num2 * -1f - normalized2 * num2 + val3; } } private void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_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_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_008f: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: 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_01fd: Unknown result type (might be due to invalid IL or missing references) cPos = ((Component)this).transform.position; shader_Key_localHeight = Shader.PropertyToID("_localHeight"); shader_Key_anchor = Shader.PropertyToID("_anchor"); shader_Key_point = Shader.PropertyToID("_point"); shader_Key_level = Shader.PropertyToID("_level"); prevTransformedPoint = (transformedPoint = ((Component)this).transform.TransformDirection((!normalizeGravityDirection) ? GravityDirection : ((Vector3)(ref GravityDirection)).normalized)); anchor -= ((!normalizeGravityDirection) ? GravityDirection : ((Vector3)(ref GravityDirection)).normalized) * -1f * Time.deltaTime * (1f - dampening); ((Vector3)(ref anchor)).Normalize(); mr = ((Component)this).GetComponent(); mats = ((Renderer)mr).materials; shaderNames = new string[mats.Length]; for (int i = 0; i < mats.Length; i++) { mats[i] = Object.Instantiate(mats[i]); shaderNames[i] = ((Object)mats[i].shader).name; } mf = ((Component)this).GetComponent(); m = mf.sharedMesh; verts = (Vector3[])(object)new Vector3[m.vertices.Length]; verts = m.vertices; minMaxBounds.x = (minMaxBounds.y = verts[0].y); for (int j = 0; j < verts.Length; j++) { Vector3 val = ((Component)this).transform.TransformDirection(verts[j]); if (val.y > minMaxBounds.y) { minMaxBounds.y = val.y; } if (val.y < minMaxBounds.x) { minMaxBounds.x = val.y; } } ref Vector2 reference = ref minMaxBounds; reference.x -= cPos.y; ref Vector2 reference2 = ref minMaxBounds; reference2.y -= cPos.y; for (int k = 0; k < mats.Length; k++) { mats[k].SetFloat(shader_Key_localHeight, Mathf.Lerp(minMaxBounds.x, minMaxBounds.y, level)); } ((Renderer)mr).materials = mats; } public void AddForce(Vector3 force) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) anchorVelocity += force; } private void FixedUpdate() { //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_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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_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_00cb: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: 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_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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: 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: 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_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: 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_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: 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_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0442: 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_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: 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_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: 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_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: 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_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_071b: Unknown result type (might be due to invalid IL or missing references) //IL_0720: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0734: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: 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_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_0640: 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_0656: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_066d: 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_067b: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0802: Unknown result type (might be due to invalid IL or missing references) //IL_0779: Unknown result type (might be due to invalid IL or missing references) //IL_078e: Unknown result type (might be due to invalid IL or missing references) //IL_07a3: Unknown result type (might be due to invalid IL or missing references) //IL_07b8: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) cPos = ((Component)this).transform.position; float num = _anchorLength * Mathf.Max(new float[3] { ((Component)this).transform.lossyScale.x, ((Component)this).transform.lossyScale.y, ((Component)this).transform.lossyScale.z }); transformedPoint = ((Component)this).transform.TransformDirection((!normalizeGravityDirection) ? GravityDirection : ((Vector3)(ref GravityDirection)).normalized); anchor += anchorVelocity * (1f - dampening); Vector3 val = anchor; anchor -= ((!normalizeGravityDirection) ? GravityDirection : ((Vector3)(ref GravityDirection)).normalized) * -1f * Time.deltaTime * (1f - dampening); float num2 = Vector3.Distance(anchor, cPos); if (num2 > num) { Vector3 val2 = cPos; Vector3 val3 = anchor - cPos; anchor = val2 + ((Vector3)(ref val3)).normalized * num; } Vector3 val4 = anchor - val + (transformedPoint - prevTransformedPoint) * -1f * (1f / num) * Time.deltaTime; if (val4 == Vector3.zero && prvLevel == level && prevQ == ((Component)this).transform.rotation) { return; } anchorVelocity += val4; Matrix4x4 localToWorldMatrix = ((Component)this).transform.localToWorldMatrix; minMaxBounds.x = (minMaxBounds.y = ((Component)this).transform.TransformPoint(verts[0]).y); for (int i = 0; i < verts.Length; i++) { Vector3 val5 = ((Matrix4x4)(ref localToWorldMatrix)).MultiplyPoint(verts[i]); if (val5.y > minMaxBounds.y) { minMaxBounds.y = val5.y; } if (val5.y < minMaxBounds.x) { minMaxBounds.x = val5.y; } } ref Vector2 reference = ref minMaxBounds; reference.y -= cPos.y; ref Vector2 reference2 = ref minMaxBounds; reference2.x -= cPos.y; finalLevel = Mathf.Lerp(minMaxBounds.x, minMaxBounds.y, level); if (level <= 1.4E-44f) { anchor = Vector3.down * num + cPos; } Vector3 val6 = cPos; Vector3 val7 = anchor - cPos; finalPoint = val6 - ((Vector3)(ref val7)).normalized * finalLevel; for (int j = 0; j < mats.Length; j++) { mats[j].SetFloat(shader_Key_localHeight, Mathf.Lerp(minMaxBounds.x - 1.4E-44f, minMaxBounds.y + 1.4E-44f, level)); mats[j].SetVector(shader_Key_anchor, Vector4.op_Implicit(((Component)this).transform.InverseTransformPoint(anchor))); Material obj = mats[j]; int num3 = shader_Key_point; Transform transform = ((Component)this).transform; Vector3 val8 = cPos; Vector3 val9 = anchor - cPos; obj.SetVector(num3, Vector4.op_Implicit(transform.InverseTransformPoint(val8 - ((Vector3)(ref val9)).normalized * finalLevel))); mats[j].SetFloat(shader_Key_level, level - float.Epsilon); } finalAnchor = anchor; CalculateSquare(anchor); Quaternion val10 = Quaternion.LookRotation(previous * Vector3.right, Vector3.up); Vector3 val11 = val10 * Vector3.right; Quaternion val12 = Quaternion.LookRotation(((Component)this).transform.rotation * Vector3.right, Vector3.up); float num4 = Quaternion.Angle(val10, val12) * (float)((!(Vector3.Dot(val11, val12 * Vector3.forward) < 0f)) ? 1 : (-1)); float num5 = num4; if (Mathf.Abs(num5) > 0.05f) { totalRotation += num5; } if (totalRotation > 360f) { totalRotation -= 360f; } else if (totalRotation < 0f) { totalRotation += 360f; } if ((Object)(object)ExposedLiquidT != (Object)null) { Transform exposedLiquidT = ExposedLiquidT; Vector3 val13 = cPos; Vector3 val14 = anchor - cPos; exposedLiquidT.position = val13 - ((Vector3)(ref val14)).normalized * finalLevel; Transform exposedLiquidT2 = ExposedLiquidT; Vector3 val15 = Vector3.one * texCurveSize.Evaluate(Mathf.Clamp01(level)); Vector3 lossyScale = ((Component)this).transform.lossyScale; exposedLiquidT2.localScale = val15 * ((Vector3)(ref lossyScale)).magnitude * 0.001f * TextureSize * TextureSizeScalar; Transform exposedLiquidT3 = ExposedLiquidT; Vector3 val16 = finalPoint - finalAnchor; exposedLiquidT3.up = ((Vector3)(ref val16)).normalized; } prevTransformedPoint = transformedPoint; previous = ((Component)this).transform.rotation; Vector4 val17 = Vector4.op_Implicit(((Component)this).transform.InverseTransformPoint(TopLeft)); Vector4 val18 = Vector4.op_Implicit(((Component)this).transform.InverseTransformPoint(TopRight)); Vector4 val19 = Vector4.op_Implicit(((Component)this).transform.InverseTransformPoint(BottomLeft)); Vector4 val20 = Vector4.op_Implicit(((Component)this).transform.InverseTransformPoint(BottomRight)); Transform transform2 = ((Component)this).transform; Vector3 val21 = cPos; Vector3 val22 = anchor - cPos; Vector4 val23 = Vector4.op_Implicit(transform2.InverseTransformPoint(val21 - ((Vector3)(ref val22)).normalized * finalLevel)); for (int k = 0; k < mats.Length; k++) { if (shaderNames[k].Contains("_Texture")) { mats[k].SetVector("_TL", val17); mats[k].SetVector("_TR", val18); mats[k].SetVector("_BL", val19); mats[k].SetVector("_BR", val20); mats[k].SetVector("_CENTER", val23); } } prvLevel = level; prevQ = ((Component)this).transform.rotation; } } public class MeshLiquidEmission : MonoBehaviour { [Serializable] private class BVertex { public Vector3 p; public Vector3 n; public bool b; } [HideInInspector] [SerializeField] private MeshFilter r; public LiquidVolumeAnimator LVA; [HideInInspector] [SerializeField] private int[] calculatedTriangles; [HideInInspector] [SerializeField] private BVertex[] calculatedVerts; public ParticleSystem system; private float particlesToEmit = 0f; public float emissionSpeed = 0f; private Mesh m; [HideInInspector] [SerializeField] private int[] tris; [HideInInspector] [SerializeField] private Vector3[] verts; [HideInInspector] [SerializeField] private Vector3[] norms; public bool debug = false; public float debugScale = 1f; public bool CullNullNormals = false; public Rigidbody Cork; public float volumeOfParticles = 70f; public bool emitting = true; public BottleSmash bottleSmash; public float angleSpeedScalar = 1f; private int CVOB = 0; private void Start() { r = ((Component)this).GetComponent(); m = r.mesh; calculatedVerts = new BVertex[m.vertexCount * 6]; for (int i = 0; i < calculatedVerts.Length; i++) { calculatedVerts[i] = new BVertex(); } verts = m.vertices; tris = m.triangles; norms = m.normals; } private bool LinePlaneIntersection(Vector3 p0, Vector3 p1, Vector3 planePoint, Vector3 planeNormal, out Vector3 coordinate) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) Vector3 val = p1 - p0; coordinate = Vector3.zero; float num = Vector3.Dot(((Vector3)(ref planeNormal)).normalized, val); if (Mathf.Abs(num) > float.Epsilon) { Vector3 val2 = p0 - planePoint; float num2 = Vector3.Dot(((Vector3)(ref planeNormal)).normalized, val2) * -1f / num; val *= num2; coordinate = p0 + val; return true; } return false; } private void OnDrawGizmos() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if (debug && calculatedVerts != null) { for (int i = 0; i < calculatedVerts.Length && calculatedVerts[i].b; i++) { Vector3 val = ((Component)this).transform.TransformPoint(calculatedVerts[i].p); Vector3 lossyScale = ((Component)this).transform.lossyScale; Gizmos.DrawSphere(val, 0.01f * ((Vector3)(ref lossyScale)).magnitude * debugScale); } } } private void SetDual(int under1, int under2, int above, ref Vector3 dir, ref Vector3 lpos, ref int currentVOB, ref Vector3 tmpV) { //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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_0076: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) calculatedVerts[currentVOB].p = verts[under1]; calculatedVerts[currentVOB].n = norms[under1]; calculatedVerts[currentVOB].b = true; LinePlaneIntersection(verts[under1], verts[above], lpos, dir * -1f, out tmpV); calculatedVerts[currentVOB + 1].p = tmpV; BVertex obj = calculatedVerts[currentVOB + 1]; Vector3 val = norms[under1]; Vector3 val2 = norms[above]; Vector3 val3 = tmpV - verts[under1]; float magnitude = ((Vector3)(ref val3)).magnitude; Vector3 val4 = verts[under1] - verts[above]; obj.n = Vector3.Lerp(val, val2, magnitude / ((Vector3)(ref val4)).magnitude); calculatedVerts[currentVOB + 1].b = true; calculatedVerts[currentVOB + 2].p = verts[under2]; calculatedVerts[currentVOB + 2].n = norms[under2]; calculatedVerts[currentVOB + 2].b = true; calculatedVerts[currentVOB + 3].p = verts[under2]; calculatedVerts[currentVOB + 3].n = norms[under2]; calculatedVerts[currentVOB + 3].b = true; calculatedVerts[currentVOB + 4].p = tmpV; calculatedVerts[currentVOB + 4].n = calculatedVerts[currentVOB + 1].n; calculatedVerts[currentVOB + 4].b = true; LinePlaneIntersection(verts[under2], verts[above], lpos, dir * -1f, out tmpV); calculatedVerts[currentVOB + 5].p = tmpV; BVertex obj2 = calculatedVerts[currentVOB + 5]; Vector3 val5 = norms[under2]; Vector3 val6 = norms[above]; Vector3 val7 = tmpV - verts[under2]; float magnitude2 = ((Vector3)(ref val7)).magnitude; Vector3 val8 = verts[under2] - verts[above]; obj2.n = Vector3.Lerp(val5, val6, magnitude2 / ((Vector3)(ref val8)).magnitude); calculatedVerts[currentVOB + 5].b = true; } private void SetDualInverted(int under1, int above1, int above2, ref Vector3 dir, ref Vector3 lpos, ref int currentVOB, ref Vector3 tmpV) { //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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_0076: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_0170: 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_0181: 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_01a1: 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_01cf: 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) calculatedVerts[currentVOB].p = verts[under1]; calculatedVerts[currentVOB].n = norms[under1]; calculatedVerts[currentVOB].b = true; LinePlaneIntersection(verts[under1], verts[above1], lpos, dir * -1f, out tmpV); calculatedVerts[currentVOB + 1].p = tmpV; BVertex obj = calculatedVerts[currentVOB + 1]; Vector3 val = norms[under1]; Vector3 val2 = norms[above1]; Vector3 val3 = tmpV - verts[under1]; float magnitude = ((Vector3)(ref val3)).magnitude; Vector3 val4 = verts[under1] - verts[above1]; obj.n = Vector3.Lerp(val, val2, magnitude / ((Vector3)(ref val4)).magnitude); calculatedVerts[currentVOB + 1].b = true; LinePlaneIntersection(verts[under1], verts[above2], lpos, dir * -1f, out tmpV); calculatedVerts[currentVOB + 2].p = tmpV; BVertex obj2 = calculatedVerts[currentVOB + 2]; Vector3 val5 = norms[under1]; Vector3 val6 = norms[above2]; Vector3 val7 = tmpV - verts[under1]; float magnitude2 = ((Vector3)(ref val7)).magnitude; Vector3 val8 = verts[under1] - verts[above2]; obj2.n = Vector3.Lerp(val5, val6, magnitude2 / ((Vector3)(ref val8)).magnitude); calculatedVerts[currentVOB + 2].b = true; } private void CalculateTrianglesToEmitFrom(int[] tris, Vector3[] verts) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_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_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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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_00c8: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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) Vector3 val = LVA.finalAnchor - LVA.finalPoint; Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 lpos = ((Component)this).transform.InverseTransformPoint(LVA.finalPoint); Vector3 val2 = ((Component)this).transform.InverseTransformDirection(normalized); normalized = ((Vector3)(ref val2)).normalized; int currentVOB = 0; Vector3 tmpV = Vector3.zero; for (int i = 2; i < tris.Length; i += 3) { int num = tris[i - 2]; int num2 = tris[i - 1]; int num3 = tris[i]; Vector3 val3 = verts[num]; Vector3 val4 = verts[num2]; Vector3 val5 = verts[num3]; Vector3 val6 = val3 - lpos; bool flag = Vector3.Dot(normalized, val6) >= 0f; Vector3 val7 = val4 - lpos; bool flag2 = Vector3.Dot(normalized, val7) >= 0f; Vector3 val8 = val5 - lpos; bool flag3 = Vector3.Dot(normalized, val8) >= 0f; if (flag3 && flag2 && flag) { calculatedVerts[currentVOB].p = val3; calculatedVerts[currentVOB].n = norms[num]; calculatedVerts[currentVOB].b = true; calculatedVerts[currentVOB + 1].p = val4; calculatedVerts[currentVOB + 1].n = norms[num2]; calculatedVerts[currentVOB + 1].b = true; calculatedVerts[currentVOB + 2].p = val5; calculatedVerts[currentVOB + 2].n = norms[num2]; calculatedVerts[currentVOB + 2].b = true; currentVOB += 3; } else { if (!flag3 && !flag2 && !flag) { continue; } bool flag4 = false; if (flag && flag2) { SetDual(num, num2, num3, ref normalized, ref lpos, ref currentVOB, ref tmpV); currentVOB += 6; flag4 = true; } if (flag && flag3) { SetDual(num, num3, num2, ref normalized, ref lpos, ref currentVOB, ref tmpV); currentVOB += 6; flag4 = true; } if (flag2 && flag3) { SetDual(num3, num2, num, ref normalized, ref lpos, ref currentVOB, ref tmpV); currentVOB += 6; flag4 = true; } if (!flag4) { if (flag) { SetDualInverted(num, num2, num3, ref normalized, ref lpos, ref currentVOB, ref tmpV); currentVOB += 3; } else if (flag2) { SetDualInverted(num2, num, num3, ref normalized, ref lpos, ref currentVOB, ref tmpV); currentVOB += 3; } else if (flag3) { SetDualInverted(num3, num2, num, ref normalized, ref lpos, ref currentVOB, ref tmpV); currentVOB += 3; } } } } if (currentVOB < calculatedVerts.Length) { calculatedVerts[currentVOB].b = false; } CVOB = currentVOB; } private float GetPS_StartSpeed() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected I4, but got Unknown //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_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_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_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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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) MainModule main = system.main; MinMaxCurve startSpeed = ((MainModule)(ref main)).startSpeed; ParticleSystemCurveMode mode = ((MinMaxCurve)(ref startSpeed)).mode; switch ((int)mode) { case 3: { MainModule main5 = system.main; MinMaxCurve startSpeed5 = ((MainModule)(ref main5)).startSpeed; float constantMin = ((MinMaxCurve)(ref startSpeed5)).constantMin; MainModule main6 = system.main; MinMaxCurve startSpeed6 = ((MainModule)(ref main6)).startSpeed; return Random.Range(constantMin, ((MinMaxCurve)(ref startSpeed6)).constantMax); } case 0: { MainModule main4 = system.main; MinMaxCurve startSpeed4 = ((MainModule)(ref main4)).startSpeed; return ((MinMaxCurve)(ref startSpeed4)).constant; } case 1: { MainModule main3 = system.main; MinMaxCurve startSpeed3 = ((MainModule)(ref main3)).startSpeed; return ((MinMaxCurve)(ref startSpeed3)).Evaluate(Random.value); } case 2: { MainModule main2 = system.main; MinMaxCurve startSpeed2 = ((MainModule)(ref main2)).startSpeed; return ((MinMaxCurve)(ref startSpeed2)).Evaluate(Random.value); } default: return 0f; } } private bool EmitFromSubmesh() { //IL_002a: 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_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_004d: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_0095: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_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_015d: 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_00d2: 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_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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: 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_011f: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) int num = Random.Range(0, CVOB / 3 - 1); num *= 3; float value = Random.value; float value2 = Random.value; Vector3 val = Vector3.Lerp(calculatedVerts[num].p, calculatedVerts[num + 1].p, value); Vector3 val2 = Vector3.Lerp(calculatedVerts[num].n, calculatedVerts[num + 1].n, value); Vector3 normalized = ((Vector3)(ref val2)).normalized; val = Vector3.Lerp(val, calculatedVerts[num + 2].p, value2); Vector3 val3 = Vector3.Lerp(normalized, calculatedVerts[num + 2].n, value2); normalized = ((Vector3)(ref val3)).normalized; EmitParams val4 = default(EmitParams); float num2 = 1f; if ((Object)(object)bottleSmash != (Object)null) { Vector3 val5 = ((Component)this).transform.TransformDirection(normalized); Vector3 normalized2 = ((Vector3)(ref val5)).normalized; Vector3 val6 = LVA.finalAnchor - LVA.finalPoint; num2 = (1f + Vector3.Dot(((Vector3)(ref val6)).normalized, normalized2)) / 2f; ((EmitParams)(ref val4)).velocity = normalized2 * GetPS_StartSpeed() * num2 * angleSpeedScalar; } else { Vector3 val7 = ((Component)this).transform.TransformDirection(normalized); ((EmitParams)(ref val4)).velocity = ((Vector3)(ref val7)).normalized * GetPS_StartSpeed(); } ((EmitParams)(ref val4)).position = ((Component)this).transform.TransformPoint(val); if (((EmitParams)(ref val4)).velocity == Vector3.zero && CullNullNormals) { return false; } particlesToEmit -= 1f; if ((Object)(object)Cork != (Object)null) { if (Cork.isKinematic && volumeOfParticles > 0f) { LVA.level = Mathf.Clamp01((volumeOfParticles * LVA.level - 1f) / volumeOfParticles); } } else if (volumeOfParticles > 0f) { LVA.level = Mathf.Clamp01((volumeOfParticles * LVA.level - 1f) / volumeOfParticles); } system.Emit(val4, 1); return true; } private void Update() { if (!emitting || (Object)(object)Cork != (Object)null || LVA.level <= 0f) { return; } CalculateTrianglesToEmitFrom(tris, verts); particlesToEmit += emissionSpeed * Time.deltaTime; if (calculatedVerts.Length == 0) { particlesToEmit = 0f; } else if (!calculatedVerts[0].b) { particlesToEmit = 0f; } int num = 10; int num2 = num; while (particlesToEmit > 0f && (GetPS_StartSpeed() > 0f || !CullNullNormals)) { num2 = ((!EmitFromSubmesh()) ? (num2 - 1) : num); if (num2 <= 0) { break; } } } } public class ConveyImpacts : MonoBehaviour { public GhostPhysics _physics; private void OnCollisionEnter(Collision collision) { _physics.SendCollision(collision); } } public class GhostPhysics : MonoBehaviour { private BottleSmash _smash; private Transform _ghost; public GameObject _ghostObject; public bool _redirectSelection = false; [Header("Reference")] public Transform _externalTransform; private void Start() { //IL_002f: 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_0065: Unknown result type (might be due to invalid IL or missing references) _smash = ((Component)this).GetComponent(); _ghost = Object.Instantiate(_ghostObject).transform; _ghost.position = ((Component)this).transform.position; _ghost.rotation = ((Component)this).transform.rotation; _ghost.localScale = _smash.Glass.transform.localScale; _externalTransform = _ghost; MeshCollider component = ((Component)_ghost).gameObject.GetComponent(); component.sharedMesh = _smash.Glass.GetComponent().sharedMesh; ((Component)_ghost).GetComponent()._physics = this; } private void OnDestroy() { if ((Object)(object)_ghost != (Object)null) { Object.Destroy((Object)(object)((Component)_ghost).gameObject); } } public void SendCollision(Collision col) { if ((Object)(object)_smash != (Object)null) { _smash.AttemptCollision(col); } } public Transform GetController() { return _ghost; } private void Update() { //IL_001f: 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) if ((Object)(object)_ghost != (Object)null) { ((Component)this).transform.position = _ghost.position; ((Component)this).transform.rotation = _ghost.rotation; } if (_redirectSelection && (Object)(object)Selection.activeTransform == (Object)(object)((Component)this).transform) { Selection.activeTransform = _ghost; } } } public class PickUpPotion : MonoBehaviour { private GameObject Obj; private Rigidbody rObj; private float dist; private float d; public float offsetValue = 1f; private Vector2 beginDist; private void Start() { } private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: 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_0075: 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) Ray val = Camera.main.ScreenPointToRay(Input.mousePosition); if (Input.GetMouseButtonDown(0) && (Object)(object)Obj == (Object)null) { RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2) && ((Component)((RaycastHit)(ref val2)).transform).gameObject.tag == "Potion") { dist = ((RaycastHit)(ref val2)).distance; beginDist = Vector2.op_Implicit(Input.mousePosition); Obj = ((Component)((RaycastHit)(ref val2)).transform).gameObject; rObj = Obj.GetComponent(); } } else if ((Object)(object)Obj != (Object)null && Input.GetMouseButtonDown(0)) { rObj.isKinematic = false; rObj.useGravity = true; rObj = null; Obj = null; } if ((Object)(object)Obj != (Object)null) { Vector2 val3 = beginDist - Vector2.op_Implicit(Input.mousePosition); ((Vector2)(ref val3))..ctor(val3.x / (beginDist.x / 2f), val3.y / (beginDist.y / 2f)); d = ((Vector2)(ref val3)).magnitude; Transform transform = Obj.transform; Vector3 origin = ((Ray)(ref val)).origin; Vector3 direction = ((Ray)(ref val)).direction; Vector3 val4 = origin + ((Vector3)(ref direction)).normalized * dist; Vector3 direction2 = ((Ray)(ref val)).direction; transform.position = val4 + ((Vector3)(ref direction2)).normalized * d * -1f * offsetValue; } } } public class PourLiquid : MonoBehaviour { public float rateOfFlow = 1f; public BottleSmash smashScript; public LiquidVolumeAnimator liquid; public Transform controllingTransform; public ParticleSystem pouringParticleSystem; public float volumeOfParticles = 70f; private Rigidbody corkRB; private void Start() { if ((Object)(object)smashScript != (Object)null && (Object)(object)smashScript.Cork != (Object)null) { corkRB = smashScript.Cork.GetComponent(); } } private void Update() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)corkRB != (Object)null && (corkRB.isKinematic || !((Component)corkRB).gameObject.activeInHierarchy)) { return; } Vector3 up = controllingTransform.up; Vector3 val = liquid.finalPoint - liquid.finalAnchor; float num = Vector3.Dot(up, ((Vector3)(ref val)).normalized); float num2 = (num + 1f) / 2f; float num3 = 0f; if (num2 < liquid.level) { num3 = (liquid.level - num2) * rateOfFlow; liquid.level = Mathf.Lerp(liquid.level, num2, Time.deltaTime * rateOfFlow); } if (num <= 0f) { if (liquid.level > float.Epsilon) { num3 = liquid.level; } liquid.level = Mathf.Lerp(liquid.level, 0f, Time.deltaTime * rateOfFlow); } if (!((Object)(object)pouringParticleSystem != (Object)null)) { return; } EmissionModule emission = pouringParticleSystem.emission; MinMaxCurve rateOverTime = ((EmissionModule)(ref emission)).rateOverTime; ((MinMaxCurve)(ref rateOverTime)).constant = volumeOfParticles * num3; EmissionModule emission2 = pouringParticleSystem.emission; ((EmissionModule)(ref emission2)).rateOverTime = rateOverTime; if (num3 > 0f) { if (!pouringParticleSystem.isEmitting) { pouringParticleSystem.Play(); } } else { pouringParticleSystem.Stop(false, (ParticleSystemStopBehavior)1); } } } public class Reset : MonoBehaviour { public void ResetScene() { SceneManager.LoadScene(0); } } public class Flicker : MonoBehaviour { public float MaxReduction; public float MaxIncrease; public float RateDamping; public float Strength; public bool StopFlickering; private Light _lightSource; private float _baseIntensity; private bool _flickering; public void Reset() { MaxReduction = 0.2f; MaxIncrease = 0.2f; RateDamping = 0.1f; Strength = 300f; } public void Start() { _lightSource = ((Component)this).GetComponent(); if ((Object)(object)_lightSource == (Object)null) { Debug.LogError((object)"Flicker script must have a Light Component on the same GameObject."); return; } _baseIntensity = _lightSource.intensity; ((MonoBehaviour)this).StartCoroutine(DoFlicker()); } private void Update() { if (!StopFlickering && !_flickering) { ((MonoBehaviour)this).StartCoroutine(DoFlicker()); } } private IEnumerator DoFlicker() { _flickering = true; while (!StopFlickering) { _lightSource.intensity = Mathf.Lerp(_lightSource.intensity, Random.Range(_baseIntensity - MaxReduction, _baseIntensity + MaxIncrease), Strength * Time.deltaTime); yield return (object)new WaitForSeconds(RateDamping); } _flickering = false; } } namespace JerryComponent { public class SlingHoster : MonoBehaviour { public FVRPhysicalObject mainobj; public WaggleJoint joint1; public GameObject geo1; public GameObject geo2; public WaggleJoint joint2; private void Start() { } private void Update() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainobj.m_quickbeltSlot != (Object)null && !((FVRInteractiveObject)mainobj).m_isHeld) { ((Behaviour)joint1).enabled = true; ((Behaviour)joint2).enabled = true; return; } ((Behaviour)joint1).enabled = false; ((Behaviour)joint2).enabled = false; geo1.transform.localEulerAngles = new Vector3(270f, 0f, 0f); geo2.transform.localEulerAngles = new Vector3(270f, 0f, 0f); } } public class meleewithhealth : MonoBehaviour { public meleewithhealth nextmwh; public FVRPhysicalObject melee; public bool spawnblade = false; public GameObject brokenBlade; public Transform bladeBreakPos; public float totalHealth = 100f; public GameObject Prefab; public bool havenext = true; public GameObject nextPrefab; public float damX; public float damY; public float damZ; private bool broke = false; public void Awake() { } public void OnCollisionEnter(Collision col) { totalHealth -= Random.Range(1f, 2f); } private void Update() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (Prefab.activeInHierarchy) { melee.MP.BaseDamageBCP = new Vector3(damX, damY, damZ); melee.MP.HighDamageBCP = new Vector3(damX, damY, damZ); } if (totalHealth > 0f) { Prefab.SetActive(true); nextPrefab.SetActive(false); ((Behaviour)nextmwh).enabled = false; } else if (totalHealth < 0f) { totalHealth = 0f; } else if (totalHealth == 0f) { if (havenext) { Prefab.SetActive(false); nextPrefab.SetActive(true); ((Behaviour)nextmwh).enabled = true; } if (spawnblade && !broke) { Object.Instantiate(brokenBlade, ((Component)bladeBreakPos).transform.position, ((Component)bladeBreakPos).transform.rotation); broke = true; } ((Behaviour)this).enabled = false; } } } public class Syringe : FVRFireArmAttachment { public enum CartridgeState { Whole, BitOpen, Jammed } public List Rends; public CartridgeState CState; public int numPowderChunksLeft = 20; public AudioEvent AudEvent_Bite; public AudioEvent AudEvent_Tap; public Transform PowderSpawnPoint; public GameObject PowderPrefab; public GameObject BitPart; public AudioEvent AudEvent_Spit; public GameObject Splode; [NonSerialized] public bool m_isDestroyed; [NonSerialized] public float m_tickDownToSpit = 0.2f; [NonSerialized] public bool m_tickingDownToSpit; [NonSerialized] public float timeSinceSpawn = 1f; public PowerupType put; public PowerUpIntensity pui; public PowerUpDuration pud; public AudioEvent AudEvent_DIng; public FVRPhysicalObject PenObject; public bool isAlreadyInHeadRange = false; public bool isUsed = false; public KillAfter ka; public void SetRenderer(CartridgeState s) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 for (int i = 0; i < Rends.Count; i++) { if ((int)s == i) { Rends[i].enabled = true; } else { Rends[i].enabled = false; } } } public override void Awake() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((FVRFireArmAttachment)this).Awake(); SetRenderer(CState); } public override void UpdateInteraction(FVRViveHand hand) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) ((FVRFireArmAttachment)this).UpdateInteraction(hand); if (((FVRInteractiveObject)this).m_hasTriggeredUpSinceBegin) { float num = Vector3.Angle(-((Component)this).transform.forward, Vector3.up); } if ((int)CState == 0) { Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (Vector3.Distance(((Component)this).transform.position, val) < 0.15f) { SM.PlayGenericSound(AudEvent_Bite, ((Component)this).transform.position); CState = (CartridgeState)1; SetRenderer(CState); m_tickingDownToSpit = true; m_tickDownToSpit = Random.Range(0.3f, 0.6f); } } } public override void FVRUpdate() { //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Invalid comparison between Unknown and I4 //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) ((FVRPhysicalObject)this).FVRUpdate(); if (timeSinceSpawn < 1f) { timeSinceSpawn += Time.deltaTime; } if (m_tickingDownToSpit) { m_tickDownToSpit -= Time.deltaTime; if (m_tickDownToSpit <= 0f) { m_tickingDownToSpit = false; Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; SM.PlayGenericSound(AudEvent_Spit, val); GameObject val2 = Object.Instantiate(BitPart, val, Random.rotation); Rigidbody component = val2.GetComponent(); component.velocity = GM.CurrentPlayerBody.Head.forward * Random.Range(2f, 4f) + Random.onUnitSphere; component.angularVelocity = Random.onUnitSphere * Random.Range(1f, 5f); } } if ((int)CState == 1) { float num = Vector3.Angle(-((Component)this).transform.forward, Vector3.up); if (num > 120f && numPowderChunksLeft > 0 && timeSinceSpawn > 0.04f) { numPowderChunksLeft--; timeSinceSpawn = 0f; Object.Instantiate(PowderPrefab, PowderSpawnPoint.position, Random.rotation); } } } private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Invalid comparison between Unknown and I4 float num = Vector3.Distance(((Component)this).transform.position, ((Component)GM.CurrentPlayerBody.Head).transform.position + Vector3.up * -0.1f); if ((double)num >= 0.19) { isAlreadyInHeadRange = false; } if ((double)num < 0.15) { if (!isAlreadyInHeadRange && (int)CState == 1 && !isUsed) { PowerUp(((FVRInteractiveObject)PenObject).m_hand); Console.Write("Yummy"); isUsed = true; } isAlreadyInHeadRange = true; } } public void PowerUp(FVRViveHand hand) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) SM.PlayCoreSound((FVRPooledAudioType)10, AudEvent_DIng, ((Component)this).transform.position); GM.CurrentSceneSettings.OnPowerupUse(put); GM.CurrentPlayerBody.ActivatePower(put, pui, pud, false, false, -1f); ((Behaviour)ka).enabled = true; } } public class Syringe2 : FVRFireArmAttachment { public enum CartridgeState { Whole, BitOpen, Jammed } public List Rends; public CartridgeState CState; public int numPowderChunksLeft = 20; public AudioEvent AudEvent_Bite; public AudioEvent AudEvent_Tap; public Transform PowderSpawnPoint; public GameObject PowderPrefab; public GameObject BitPart; public AudioEvent AudEvent_Spit; public GameObject Splode; [NonSerialized] public bool m_isDestroyed; [NonSerialized] public float m_tickDownToSpit = 0.2f; [NonSerialized] public bool m_tickingDownToSpit; [NonSerialized] public float timeSinceSpawn = 1f; public PowerupType put; public PowerUpIntensity pui; public PowerUpDuration pud; public AudioEvent AudEvent_DIng; public FVRPhysicalObject PenObject; public bool isAlreadyInHeadRange = false; public bool isUsed = false; public KillAfter ka; public Transform needletip; public void SetRenderer(CartridgeState s) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 for (int i = 0; i < Rends.Count; i++) { if ((int)s == i) { Rends[i].enabled = true; } else { Rends[i].enabled = false; } } } public override void Awake() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((FVRFireArmAttachment)this).Awake(); SetRenderer(CState); } public override void UpdateInteraction(FVRViveHand hand) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) ((FVRFireArmAttachment)this).UpdateInteraction(hand); if (((FVRInteractiveObject)this).m_hasTriggeredUpSinceBegin) { float num = Vector3.Angle(-((Component)this).transform.forward, Vector3.up); } if ((int)CState == 0) { Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (Vector3.Distance(((Component)this).transform.position, val) < 0.15f) { SM.PlayGenericSound(AudEvent_Bite, ((Component)this).transform.position); CState = (CartridgeState)1; SetRenderer(CState); m_tickingDownToSpit = true; m_tickDownToSpit = Random.Range(0.3f, 0.6f); } } } public override void FVRUpdate() { //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Invalid comparison between Unknown and I4 //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) ((FVRPhysicalObject)this).FVRUpdate(); if (timeSinceSpawn < 1f) { timeSinceSpawn += Time.deltaTime; } if (m_tickingDownToSpit) { m_tickDownToSpit -= Time.deltaTime; if (m_tickDownToSpit <= 0f) { m_tickingDownToSpit = false; Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; SM.PlayGenericSound(AudEvent_Spit, val); GameObject val2 = Object.Instantiate(BitPart, val, Random.rotation); Rigidbody component = val2.GetComponent(); component.velocity = GM.CurrentPlayerBody.Head.forward * Random.Range(2f, 4f) + Random.onUnitSphere; component.angularVelocity = Random.onUnitSphere * Random.Range(1f, 5f); } } if ((int)CState == 1) { float num = Vector3.Angle(-((Component)this).transform.forward, Vector3.up); if (num > 120f && numPowderChunksLeft > 0 && timeSinceSpawn > 0.04f) { numPowderChunksLeft--; timeSinceSpawn = 0f; Object.Instantiate(PowderPrefab, PowderSpawnPoint.position, Random.rotation); } } } private void Update() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Invalid comparison between Unknown and I4 //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Invalid comparison between Unknown and I4 if ((Object)(object)((FVRInteractiveObject)PenObject).m_hand != (Object)null && ((Object)((FVRInteractiveObject)PenObject).m_hand).name == "Controller (left)") { float num = Vector3.Distance(needletip.position, ((Component)GM.CurrentPlayerBody.RightHand).transform.position); if ((double)num >= 0.07500000298023224) { isAlreadyInHeadRange = false; } if ((double)num < 0.05000000074505806) { if (!isAlreadyInHeadRange && (int)CState == 1 && !isUsed) { PowerUp(((FVRInteractiveObject)PenObject).m_hand); Console.Write("Oof"); isUsed = true; } isAlreadyInHeadRange = true; } } if (!((Object)(object)((FVRInteractiveObject)PenObject).m_hand != (Object)null) || !(((Object)((FVRInteractiveObject)PenObject).m_hand).name == "Controller (right)")) { return; } float num2 = Vector3.Distance(needletip.position, ((Component)GM.CurrentPlayerBody.LeftHand).transform.position); if ((double)num2 >= 0.07500000298023224) { isAlreadyInHeadRange = false; } if ((double)num2 < 0.07500000298023224) { if (!isAlreadyInHeadRange && (int)CState == 1 && !isUsed) { PowerUp(((FVRInteractiveObject)PenObject).m_hand); Console.Write("Oof"); isUsed = true; } isAlreadyInHeadRange = true; } } public void PowerUp(FVRViveHand hand) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) SM.PlayCoreSound((FVRPooledAudioType)10, AudEvent_DIng, ((Component)this).transform.position); GM.CurrentSceneSettings.OnPowerupUse(put); GM.CurrentPlayerBody.ActivatePower(put, pui, pud, false, false, -1f); ((Behaviour)ka).enabled = true; } } public class gunpodtrigger : MonoBehaviour { public FVRInteractiveObject obj; public GameObject trigger; private void Start() { } private void Update() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj.m_hand != (Object)null) { if (obj.m_hand.Input.TriggerPressed) { trigger.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class An94Burst : MonoBehaviour { public ClosedBoltWeapon An94; public bool isFullAuto = false; public bool isRecoil = false; public bool triggerpulled = false; public bool one = false; public bool two = false; public FVRFireArmRecoilProfile norecoil; public FVRFireArmRecoilProfile hasrecoil; public bool preload = false; public Transform fakeLockPoint; public GameObject fakebullet; public bool fired = false; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)An94) { if (!one && !fired) { one = true; isRecoil = true; fired = true; } else if (one && !fired) { two = true; isFullAuto = true; fired = 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: 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_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_022d: 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_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_0379: 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_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) if (An94.m_triggerFloat > 0.8f) { triggerpulled = true; } else if (An94.m_triggerFloat < 0.8f) { triggerpulled = false; } if (isFullAuto) { An94.Bolt.Speed_Forward = 1.5f; An94.Bolt.Speed_Rearward = -2f; An94.Bolt.SpringStiffness = 50f; } else if (!isFullAuto) { An94.Bolt.Speed_Forward = 5.5f; An94.Bolt.Speed_Rearward = -7.5f; An94.Bolt.SpringStiffness = 500f; } if (isRecoil) { ((FVRFireArm)An94).RecoilProfile = hasrecoil; } else if (!isRecoil) { ((FVRFireArm)An94).RecoilProfile = norecoil; } if (fired && ((Component)An94.Bolt).gameObject.transform.localPosition.z < ((Component)fakeLockPoint).transform.localPosition.z) { fired = false; } if (!triggerpulled) { one = false; two = false; isRecoil = false; isFullAuto = false; } if ((Object)(object)((FVRFireArm)An94).Magazine != (Object)null) { if (!preload && ((FVRFireArm)An94).Magazine.m_numRounds > 0 && ((Component)An94.Bolt).gameObject.transform.localPosition.z >= An94.Bolt.Point_Bolt_SafetyLock.localPosition.z && ((Component)An94.Bolt).gameObject.transform.localPosition.z < An94.Bolt.Point_Bolt_Forward.localPosition.z) { preload = true; fakebullet.SetActive(true); } if (preload && ((Component)An94.Bolt).gameObject.transform.localPosition.z <= An94.Bolt.Point_Bolt_LockPoint.localPosition.z && ((Component)An94.Bolt).gameObject.transform.localPosition.z > An94.Bolt.Point_Bolt_Rear.localPosition.z) { preload = false; } if (!preload && ((Component)An94.Bolt).gameObject.transform.localPosition.z <= An94.Bolt.Point_Bolt_SafetyLock.localPosition.z && ((Component)An94.Bolt).gameObject.transform.localPosition.z > An94.Bolt.Point_Bolt_LockPoint.localPosition.z) { fakebullet.SetActive(false); } if (((FVRFireArm)An94).Magazine.m_numRounds <= 0) { preload = false; fakebullet.SetActive(false); } } else if ((Object)(object)((FVRFireArm)An94).Magazine == (Object)null) { preload = false; fakebullet.SetActive(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 AlyxBulletHopper : MonoBehaviour { public FVRFireArmAttachment AttachmentBase; public List curClasses; public int HopperCapacity = 10; public int curNumber = 0; public Handgun Gun; public FVRFireArmMagazine Mag; public MeshRenderer indicator; public Material m0; public Material m1; public Material m2; public Material m3; public Material m4; public Material m5; public Material m6; public Material m7; public Material m8; public Material m9; public Material m10; public float grabcd = 0f; public float cd = 0.1f; public bool chamber = false; public FireArmRoundClass curClass; public Animator AnimG; public Animator AnimS; public float ScrollValue; public float ScrollSpeed; public GameObject bullet1; public GameObject bullet2; public GameObject ind; public AudioEvent clip; public AudioEvent full; public bool isFull = false; public bool isLoading = false; public GameObject geo; private void Start() { } private void Update() { //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: 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_0649: 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_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)AttachmentBase != (Object)null) { if ((Object)(object)AttachmentBase.curMount == (Object)null) { Gun = null; Mag = null; ind.SetActive(false); } if ((Object)(object)AttachmentBase.curMount != (Object)null && (Object)(object)((Component)AttachmentBase.curMount.MyObject).gameObject.GetComponent() != (Object)null) { ind.SetActive(true); Gun = ((Component)AttachmentBase.curMount.MyObject).gameObject.GetComponent(); } } if ((Object)(object)AttachmentBase == (Object)null || (Object)(object)Gun == (Object)null || (Object)(object)Mag == (Object)null) { } if (curNumber == 0) { ((Renderer)indicator).material = m0; } if (curNumber == 1) { ((Renderer)indicator).material = m1; } if (curNumber == 2) { ((Renderer)indicator).material = m2; } if (curNumber == 3) { ((Renderer)indicator).material = m3; } if (curNumber == 4) { ((Renderer)indicator).material = m4; } if (curNumber == 5) { ((Renderer)indicator).material = m5; } if (curNumber == 6) { ((Renderer)indicator).material = m6; } if (curNumber == 7) { ((Renderer)indicator).material = m7; } if (curNumber == 8) { ((Renderer)indicator).material = m8; } if (curNumber == 9) { ((Renderer)indicator).material = m9; } if (curNumber == 10) { ((Renderer)indicator).material = m10; } if (curNumber >= HopperCapacity && !isFull) { SM.PlayCoreSound((FVRPooledAudioType)41, full, ((Component)this).transform.position); isFull = true; } else if (curNumber < HopperCapacity) { isFull = false; } curNumber = Mathf.Clamp(curNumber, 0, HopperCapacity); ScrollValue = (float)curNumber * 0.1f; ScrollValue = Mathf.Clamp(ScrollValue, 0f, 1f); AnimS.SetFloat("Blend", ScrollValue); if ((Object)(object)Gun != (Object)null) { if ((Object)(object)((FVRFireArm)Gun).Magazine != (Object)null) { Mag = ((FVRFireArm)Gun).Magazine; } else if ((Object)(object)((FVRFireArm)Gun).Magazine == (Object)null && (Object)(object)Mag != (Object)null) { Mag = null; } if (Gun.HasTiltingBarrel) { geo.transform.localEulerAngles = new Vector3(0f - ((Component)Gun.Barrel).transform.localEulerAngles.x, 0f, 0f); } else if (!Gun.HasTiltingBarrel) { geo.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)Mag != (Object)null && Mag.m_numRounds <= 0) { if (curNumber <= 0 && Gun.Chamber.IsFull) { Gun.DropSlideRelease(); } if (curNumber > 0) { if (Gun.Chamber.IsFull) { Gun.DropSlideRelease(); } if (!Gun.Chamber.IsFull && Gun.Slide.m_slideZ_current < Gun.Slide.m_slideZ_lock) { curNumber--; chamber = true; SM.PlayCoreSound((FVRPooledAudioType)41, clip, ((Component)this).transform.position); AnimG.SetTrigger("Load"); } if (chamber) { Gun.Chamber.Autochamber(curClasses[curNumber]); } } } if (Gun.Slide.m_slideZ_current > Gun.Slide.m_slideZ_forward || Gun.Chamber.IsFull) { chamber = false; } } else if ((Object)(object)Gun == (Object)null) { geo.transform.localEulerAngles = new Vector3(0f, 0f, 0f); Mag = null; } if ((Object)(object)Mag != (Object)null && Gun.IsSlideLockUp && (Object)(object)((FVRInteractiveObject)Gun.Slide).m_hand == (Object)null && Mag.m_numRounds > 0 && curNumber < HopperCapacity && Mag.LoadedRounds[0] != null) { grabcd -= Time.deltaTime; if (grabcd <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, clip, ((Component)this).transform.position); AnimG.SetTrigger("Grab"); curClass = Mag.LoadedRounds[0].LR_Class; Mag.RemoveRound(0); curNumber++; curClasses[curNumber] = curClass; grabcd = cd; } } if (curNumber <= 0) { bullet1.SetActive(false); bullet2.SetActive(false); } else if (curNumber > 0) { bullet1.SetActive(true); bullet2.SetActive(true); } } } public class AlyxBulletHopper2 : MonoBehaviour { public FVRFireArmAttachment AttachmentBase; public List curClasses; public int HopperCapacity = 10; public int curNumber = 0; public Handgun Gun; public FVRFireArmMagazine Mag; public MeshRenderer indicator; public Material m0; public Material m1; public Material m2; public Material m3; public Material m4; public Material m5; public Material m6; public Material m7; public Material m8; public Material m9; public Material m10; public GameObject ind1; public GameObject ind2; public GameObject ind3; public GameObject ind4; public GameObject ind5; public GameObject ind6; public GameObject ind7; public GameObject ind8; public GameObject ind9; public GameObject ind10; public GameObject chamb; public GameObject empty; public float magnum = 0f; public float magspeed = 0f; public float grabcd = 0f; public float cd = 0.1f; public bool chamber = false; public FireArmRoundClass curClass; public Animator AnimG; public Animator AnimS; public float ScrollValue; public float ScrollSpeed; public GameObject bullet1; public GameObject bullet2; public GameObject ind; public AudioEvent clip; public AudioEvent full; public bool isFull = false; public bool isLoading = false; public GameObject geo; private void Start() { } private void Update() { //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0cee: Unknown result type (might be due to invalid IL or missing references) //IL_0aef: Unknown result type (might be due to invalid IL or missing references) //IL_0af4: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b42: Unknown result type (might be due to invalid IL or missing references) //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0e07: Unknown result type (might be due to invalid IL or missing references) //IL_0e0c: Unknown result type (might be due to invalid IL or missing references) //IL_0e39: Unknown result type (might be due to invalid IL or missing references) //IL_0c6b: Unknown result type (might be due to invalid IL or missing references) //IL_0c2c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)AttachmentBase != (Object)null) { if ((Object)(object)AttachmentBase.curMount == (Object)null) { Gun = null; Mag = null; ind.SetActive(false); } if ((Object)(object)AttachmentBase.curMount != (Object)null && (Object)(object)((Component)AttachmentBase.curMount.MyObject).gameObject.GetComponent() != (Object)null) { ind.SetActive(true); Gun = ((Component)AttachmentBase.curMount.MyObject).gameObject.GetComponent(); } } if ((Object)(object)AttachmentBase == (Object)null || (Object)(object)Gun == (Object)null || (Object)(object)Mag == (Object)null) { } if (curNumber == 0) { ((Renderer)indicator).material = m0; } if (curNumber == 1) { ((Renderer)indicator).material = m1; } if (curNumber == 2) { ((Renderer)indicator).material = m2; } if (curNumber == 3) { ((Renderer)indicator).material = m3; } if (curNumber == 4) { ((Renderer)indicator).material = m4; } if (curNumber == 5) { ((Renderer)indicator).material = m5; } if (curNumber == 6) { ((Renderer)indicator).material = m6; } if (curNumber == 7) { ((Renderer)indicator).material = m7; } if (curNumber == 8) { ((Renderer)indicator).material = m8; } if (curNumber == 9) { ((Renderer)indicator).material = m9; } if (curNumber == 10) { ((Renderer)indicator).material = m10; } if (magnum <= 0.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 1.5 && magnum > 0.5f) { ind1.SetActive(true); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 2.5 && magnum > 1.5f) { ind1.SetActive(false); ind2.SetActive(true); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 3.5 && magnum > 2.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(true); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 4.5 && magnum > 3.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(true); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 5.5 && magnum > 4.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(true); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 6.5 && magnum > 5.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(true); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 7.5 && magnum > 6.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(true); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 8.5 && magnum > 7.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(true); ind9.SetActive(false); ind10.SetActive(false); } if ((double)magnum <= 9.5 && magnum > 8.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(true); ind10.SetActive(false); } if (magnum > 9.5f) { ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(true); } if (curNumber >= HopperCapacity && !isFull) { SM.PlayCoreSound((FVRPooledAudioType)41, full, ((Component)this).transform.position); isFull = true; } else if (curNumber < HopperCapacity) { isFull = false; } curNumber = Mathf.Clamp(curNumber, 0, HopperCapacity); ScrollValue = (float)curNumber * 0.1f; ScrollValue = Mathf.Clamp(ScrollValue, 0f, 1f); AnimS.SetFloat("Blend", ScrollValue); if ((Object)(object)Gun != (Object)null) { if (Gun.Chamber.IsFull) { chamb.SetActive(true); empty.SetActive(false); } else if (!Gun.Chamber.IsFull) { chamb.SetActive(false); empty.SetActive(true); } if ((Object)(object)((FVRFireArm)Gun).Magazine != (Object)null) { Mag = ((FVRFireArm)Gun).Magazine; magnum = Mathf.SmoothDamp(magnum, (float)((FVRFireArm)Gun).Magazine.m_numRounds, ref magspeed, 0.1f); } else if ((Object)(object)((FVRFireArm)Gun).Magazine == (Object)null) { if ((Object)(object)Mag != (Object)null) { Mag = null; } magnum = Mathf.SmoothDamp(magnum, 0f, ref magspeed, 0.1f); } if (Gun.HasTiltingBarrel) { geo.transform.localEulerAngles = new Vector3(0f - ((Component)Gun.Barrel).transform.localEulerAngles.x, 0f, 0f); } else if (!Gun.HasTiltingBarrel) { geo.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)Mag != (Object)null && Mag.m_numRounds <= 0) { if (curNumber <= 0 && Gun.Chamber.IsFull) { Gun.DropSlideRelease(); } if (curNumber > 0) { if (Gun.Chamber.IsFull) { Gun.DropSlideRelease(); } if (!Gun.Chamber.IsFull && Gun.Slide.m_slideZ_current < Gun.Slide.m_slideZ_lock) { curNumber--; chamber = true; SM.PlayCoreSound((FVRPooledAudioType)41, clip, ((Component)this).transform.position); AnimG.SetTrigger("Load"); } if (chamber) { Gun.Chamber.Autochamber(curClasses[curNumber]); } } } if (Gun.Slide.m_slideZ_current > Gun.Slide.m_slideZ_forward || Gun.Chamber.IsFull) { chamber = false; } } else if ((Object)(object)Gun == (Object)null) { geo.transform.localEulerAngles = new Vector3(0f, 0f, 0f); Mag = null; magnum = Mathf.SmoothDamp(magnum, 0f, ref magspeed, 0.1f); chamb.SetActive(false); empty.SetActive(false); } if ((Object)(object)Mag != (Object)null && Gun.IsSlideLockUp && (Object)(object)((FVRInteractiveObject)Gun.Slide).m_hand == (Object)null && Mag.m_numRounds > 0 && curNumber < HopperCapacity && Mag.LoadedRounds[0] != null) { grabcd -= Time.deltaTime; if (grabcd <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, clip, ((Component)this).transform.position); AnimG.SetTrigger("Grab"); curClass = Mag.LoadedRounds[0].LR_Class; Mag.RemoveRound(0); curNumber++; curClasses[curNumber] = curClass; grabcd = cd; } } if (curNumber <= 0) { bullet1.SetActive(false); bullet2.SetActive(false); } else if (curNumber > 0) { bullet1.SetActive(true); bullet2.SetActive(true); } } } public class MagIndicator : MonoBehaviour { public FVRFireArmMagazine mag; public GameObject ind0; public GameObject ind1; public GameObject ind2; public GameObject ind3; public GameObject ind4; public GameObject ind5; public GameObject ind6; public GameObject ind7; public GameObject ind8; public GameObject ind9; public GameObject ind10; private void Start() { } private void Update() { if (mag.m_numRounds >= 10) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(true); } if (mag.m_numRounds == 9) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(true); ind10.SetActive(false); } if (mag.m_numRounds == 8) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(true); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 7) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(true); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 6) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(true); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 5) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(true); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 4) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(true); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 3) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(true); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 2) { ind0.SetActive(false); ind1.SetActive(false); ind2.SetActive(true); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 1) { ind0.SetActive(false); ind1.SetActive(true); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } if (mag.m_numRounds == 0) { ind0.SetActive(true); ind1.SetActive(false); ind2.SetActive(false); ind3.SetActive(false); ind4.SetActive(false); ind5.SetActive(false); ind6.SetActive(false); ind7.SetActive(false); ind8.SetActive(false); ind9.SetActive(false); ind10.SetActive(false); } } } public class Bugle : MonoBehaviour { public FVRPhysicalObject mainobj; public AudioSource intake; public AudioSource bugle; public GameObject mouthpos; public bool ready = false; public bool intaking = false; private void FixedUpdate() { //IL_0073: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) if (ready) { if (intake.isPlaying) { intake.Stop(); } ((Component)bugle).gameObject.SetActive(true); } else if (!ready) { ((Component)bugle).gameObject.SetActive(false); } if (Vector3.Distance(((Component)GM.CurrentMovementManager.Head).gameObject.transform.position, mouthpos.transform.position) > 0.25f) { ((Component)intake).gameObject.SetActive(false); if (bugle.isPlaying) { bugle.Stop(); } if (intake.isPlaying) { intake.Stop(); } intaking = false; ready = false; } else { if (!(Vector3.Distance(((Component)GM.CurrentMovementManager.Head).gameObject.transform.position, mouthpos.transform.position) <= 0.25f)) { return; } if (((FVRInteractiveObject)mainobj).m_isHeld) { ((Component)intake).gameObject.SetActive(true); if (((FVRInteractiveObject)mainobj).m_hand.Input.TriggerFloat >= 0.8f) { if (!intaking) { intake.Play(); intaking = true; } if (intaking && !intake.isPlaying) { ready = true; } } else if (((FVRInteractiveObject)mainobj).m_hand.Input.TriggerFloat < 0.8f) { if (intake.isPlaying) { intake.Stop(); } if (!bugle.isPlaying && ready) { intaking = false; GM.CurrentPlayerBody.ActivatePower((PowerupType)6, (PowerUpIntensity)1, (PowerUpDuration)1, false, false, -1f); GM.CurrentPlayerBody.ActivatePower((PowerupType)3, (PowerUpIntensity)1, (PowerUpDuration)2, false, false, -1f); GM.CurrentPlayerBody.ActivatePower((PowerupType)1, (PowerUpIntensity)0, (PowerUpDuration)0, false, false, -1f); GM.CurrentPlayerBody.ActivatePower((PowerupType)10, (PowerUpIntensity)2, (PowerUpDuration)2, false, false, -1f); ready = false; } } } else if (!((FVRInteractiveObject)mainobj).m_isHeld) { ((Component)intake).gameObject.SetActive(false); intaking = false; ready = false; if (bugle.isPlaying) { bugle.Stop(); } if (intake.isPlaying) { intake.Stop(); } } } } } public class AttachableClosedBoltWeaponBoltRelease : MonoBehaviour { public AttachableClosedBolt bolt; public AttachableClosedBoltWeapon weapon; public bool buttonpressed = false; public void Update() { if ((Object)(object)((FVRInteractiveObject)((AttachableFirearm)weapon).Interface).m_hand != (Object)null && ((FVRInteractiveObject)((AttachableFirearm)weapon).Interface).m_hand.IsInStreamlinedMode) { if (((FVRInteractiveObject)((AttachableFirearm)weapon).Interface).m_hand.Input.BYButtonPressed) { if (bolt.m_isBoltLocked) { weapon.IsBoltReleaseButtonHeld = true; } else if (!bolt.m_isBoltLocked && !buttonpressed) { weapon.ToggleFireSelector(); buttonpressed = true; } } else if (!((FVRInteractiveObject)((AttachableFirearm)weapon).Interface).m_hand.Input.BYButtonPressed) { if (bolt.m_isBoltLocked) { weapon.IsBoltReleaseButtonHeld = false; } buttonpressed = false; } } if (weapon.HasBoltReleaseButton && weapon.IsBoltReleaseButtonHeld) { bolt.ReleaseBolt(); } } } public class control_component : MonoBehaviour { public GameObject Comp; public GameObject Comp2; public GameObject Rot; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (Rot.transform.localEulerAngles.x >= 45f) { Comp.SetActive(false); Comp2.SetActive(true); } else { Comp.SetActive(true); Comp2.SetActive(false); } } } public class controll_component : MonoBehaviour { public GameObject Comp; public GameObject Rot; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (Rot.transform.localEulerAngles.y > 10f && Rot.transform.localEulerAngles.y < -10f) { Comp.SetActive(false); } else { Comp.SetActive(true); } } } public class BallisticGel : MonoBehaviour, IFVRDamageable { public bool canStop = false; public Rigidbody thisrig; public bool isShot = false; public float c = 0.1f; public float force; public Collider coldet; public Vector3 max; public Vector3 min; public float mult = 0.1f; public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_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) if ((int)dam.Class == 1 && !isShot) { force = dam.Dam_TotalKinetic * mult; thisrig.AddForce(dam.strikeDir * force, (ForceMode)1); if (canStop) { isShot = true; } } } private void Start() { isShot = false; } private void Update() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_0340: 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_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0408: 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_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) if (isShot) { if (c > 0f) { c -= Time.deltaTime; } else if (c <= 0f) { thisrig.isKinematic = true; } } else if (!isShot) { thisrig.isKinematic = false; } ((Component)thisrig).gameObject.transform.localPosition = new Vector3(Mathf.Clamp(((Component)thisrig).gameObject.transform.localPosition.x, min.x, max.x), Mathf.Clamp(((Component)thisrig).gameObject.transform.localPosition.y, min.y, max.y), Mathf.Clamp(((Component)thisrig).gameObject.transform.localPosition.z, min.z, max.z)); if (((Component)thisrig).gameObject.transform.localPosition.x > max.x) { ((Component)thisrig).gameObject.transform.localPosition = new Vector3(max.x, ((Component)thisrig).gameObject.transform.localPosition.y, ((Component)thisrig).gameObject.transform.localPosition.z); } else if (((Component)thisrig).gameObject.transform.localPosition.x < min.x) { ((Component)thisrig).gameObject.transform.localPosition = new Vector3(min.x, ((Component)thisrig).gameObject.transform.localPosition.y, ((Component)thisrig).gameObject.transform.localPosition.z); } if (((Component)thisrig).gameObject.transform.localPosition.y > max.y) { ((Component)thisrig).gameObject.transform.localPosition = new Vector3(((Component)thisrig).gameObject.transform.localPosition.x, max.y, ((Component)thisrig).gameObject.transform.localPosition.z); } else if (((Component)thisrig).gameObject.transform.localPosition.y < min.y) { ((Component)thisrig).gameObject.transform.localPosition = new Vector3(((Component)thisrig).gameObject.transform.localPosition.x, min.y, ((Component)thisrig).gameObject.transform.localPosition.z); } if (((Component)thisrig).gameObject.transform.localPosition.z > max.z) { ((Component)thisrig).gameObject.transform.localPosition = new Vector3(((Component)thisrig).gameObject.transform.localPosition.x, ((Component)thisrig).gameObject.transform.localPosition.y, max.z); } else if (((Component)thisrig).gameObject.transform.localPosition.z < min.z) { ((Component)thisrig).gameObject.transform.localPosition = new Vector3(((Component)thisrig).gameObject.transform.localPosition.x, ((Component)thisrig).gameObject.transform.localPosition.y, min.z); } } } public class BallisticGelMain : MonoBehaviour { public bool isShot = false; public Collider cols; public List gels; public Collider detect; private void OnTriggerExit(Collider other) { if ((Object)(object)other == (Object)(object)cols && isShot) { ((Component)other).gameObject.GetComponent().isKinematic = true; detect.enabled = false; } } private void Start() { } private void Update() { if ((Object)(object)cols == (Object)null) { } if (!isShot) { for (int i = 0; i < gels.Count; i++) { ((Behaviour)gels[i]).enabled = true; } } else if (isShot) { for (int j = 0; j < gels.Count; j++) { ((Behaviour)gels[j]).enabled = false; } } } } public class M112C4 : MonoBehaviour { public GameObject C4explosion; public GameObject C4explode; public Transform exppos; public GameObject MainObj; public bool shouldIgoBoom = false; public GameObject fuze; public StickyObj stkobj; public Transform mainpos; private void Start() { } private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c1: 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) ((Component)this).gameObject.transform.position = ((Component)mainpos).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)mainpos).transform.eulerAngles; if (!((Object)(object)fuze == (Object)null) && (Object)(object)fuze != (Object)null) { stkobj.fuzed = true; } if (shouldIgoBoom) { Object.Instantiate(C4explode, ((Component)exppos).transform.position, ((Component)exppos).transform.rotation); Object.Instantiate(C4explosion, ((Component)exppos).transform.position, ((Component)exppos).transform.rotation); Object.Destroy((Object)(object)MainObj); Object.Destroy((Object)(object)((Component)this).gameObject); shouldIgoBoom = false; } } } public class M114Fuze : MonoBehaviour { public GameObject clickbase; public GameObject safety; public GameObject ring; public GameObject ringpos; public bool pulledring = false; public Transform mainpos; public GameObject fuzeinsertrot; public GameObject FuzeExplosion; public GameObject FuzeExplode; public Transform exppos; public M112C4 C4; public GameObject fakepoint; public GameObject aud; public bool immaBlowUP = false; public GameObject mainobj; public Collider col; public Collider grabcol; public Rigidbody mainrig; public FVRPhysicalObject mainphys; public bool imstickedin = false; private void Start() { aud.SetActive(false); fakepoint.SetActive(false); } private void OnTriggerEnter(Collider other) { if (!imstickedin && (Object)(object)mainphys.m_quickbeltSlot == (Object)null && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { C4 = ((Component)other).gameObject.GetComponent(); imstickedin = true; } } private void Update() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_024a: 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_028a: 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_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)clickbase == (Object)null) { } if (safety.transform.localEulerAngles.x > 50f && (Object)(object)clickbase != (Object)null) { Object.Destroy((Object)(object)clickbase); } ((Component)this).gameObject.transform.position = mainpos.position; ((Component)this).gameObject.transform.eulerAngles = mainpos.eulerAngles; if (!imstickedin && safety.transform.localEulerAngles.x > 45f) { if (!pulledring) { Object.Instantiate(ring, ringpos.transform.position, ringpos.transform.rotation); pulledring = true; } if (immaBlowUP && (Object)(object)mainphys.m_quickbeltSlot == (Object)null) { Object.Instantiate(FuzeExplode, ((Component)exppos).transform.position, ((Component)exppos).transform.rotation); Object.Instantiate(FuzeExplosion, ((Component)exppos).transform.position, ((Component)exppos).transform.rotation); Object.Destroy((Object)(object)mainobj); Object.Destroy((Object)(object)((Component)this).gameObject); immaBlowUP = false; } } if ((Object)(object)C4 != (Object)null && imstickedin) { col.enabled = false; grabcol.enabled = false; ((FVRInteractiveObject)mainphys).EndInteractionDistance = 0f; ((FVRInteractiveObject)mainphys).EndInteractionIfDistant = true; mainphys.DistantGrabbable = false; ((FVRInteractiveObject)mainphys).ForceBreakInteraction(); ((FVRInteractiveObject)mainphys).m_hand = null; fakepoint.SetActive(true); fakepoint.transform.SetParent(((Component)C4).transform); fakepoint.transform.localEulerAngles = new Vector3(0f, 0f, 0f); mainobj.transform.position = fakepoint.transform.position; mainobj.transform.eulerAngles = fakepoint.transform.eulerAngles; fuzeinsertrot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); C4.fuze = ((Component)this).gameObject; mainrig.useGravity = false; mainphys.UsesGravity = false; aud.SetActive(true); if (safety.transform.localEulerAngles.x > 45f) { if (!pulledring) { Object.Instantiate(ring, ringpos.transform.position, ringpos.transform.rotation); pulledring = true; } if (immaBlowUP && (Object)(object)mainphys.m_quickbeltSlot == (Object)null) { C4.shouldIgoBoom = true; Object.Destroy((Object)(object)mainobj); Object.Destroy((Object)(object)((Component)this).gameObject); } } } else if (imstickedin && (Object)(object)C4 == (Object)null) { Object.Instantiate(FuzeExplode, ((Component)exppos).transform.position, ((Component)exppos).transform.rotation); Object.Instantiate(FuzeExplosion, ((Component)exppos).transform.position, ((Component)exppos).transform.rotation); Object.Destroy((Object)(object)mainobj); Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class M57Ignitor : MonoBehaviour { public List C4s; public GameObject Rotpiece; public GameObject Trigger; public GameObject triggerpiece; public float Timer = 0f; public int clickedtimes = 0; public bool Firstclick = false; public bool Secondclick = false; public bool clicked = false; public GameObject mainobj; private void Start() { } private void OnTriggerEnter(Collider other) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { C4s.Add(((Component)other).gameObject.GetComponent()); } } private void OnTriggerExit(Collider other) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { C4s.Remove(((Component)other).gameObject.GetComponent()); } } private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_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) ((Component)this).gameObject.transform.position = mainobj.transform.position; ((Component)this).gameObject.transform.eulerAngles = mainobj.transform.eulerAngles; if (Rotpiece.transform.localEulerAngles.x > 20f && Rotpiece.transform.localEulerAngles.x < 30f) { Trigger.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else if (Rotpiece.transform.localEulerAngles.x < 20f || Rotpiece.transform.localEulerAngles.x > 30f) { Trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (triggerpiece.transform.localEulerAngles.z < 5f) { clicked = false; Secondclick = false; } else if (triggerpiece.transform.localEulerAngles.z > 20f && !clicked) { clickedtimes++; clicked = true; } if (clickedtimes >= 2) { if (C4s.Capacity >= 1) { for (int i = 0; i < C4s.Count; i++) { if (C4s[i].safety.transform.localEulerAngles.x > 45f) { C4s[i].immaBlowUP = true; } } } clickedtimes = 0; } if (clickedtimes > 0) { Timer += Time.deltaTime; if (Timer > 1f) { Timer = 0f; clickedtimes = 0; } } if (clickedtimes != 0) { return; } for (int j = 0; j < C4s.Count; j++) { if ((Object)(object)C4s[j] == (Object)null) { C4s.Remove(C4s[j]); } } } } public class StickyObj : MonoBehaviour { public Rigidbody thisrig; public GameObject mainobj; public Transform mainpos; public Rigidbody mainrig; public Collider col; public Collider grabcol; public GameObject phys; public bool fuzed = false; public GameObject fakepoint; public FVRPhysicalObject mainphys; public GameObject[] objs; private void Start() { fakepoint.SetActive(false); } private void OnCollisionEnter(Collision collision) { if (fuzed) { fakepoint.SetActive(true); fakepoint.transform.SetParent(((Component)collision.collider).gameObject.transform); ((FVRInteractiveObject)mainphys).m_hand = null; } } private void Update() { //IL_0068: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)fakepoint == (Object)null) { for (int i = 0; i < objs.Length; i++) { Object.Destroy((Object)(object)objs[i]); } Object.Destroy((Object)(object)mainobj); Object.Destroy((Object)(object)((Component)this).gameObject); } ((Component)this).gameObject.transform.position = ((Component)mainpos).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)mainpos).transform.eulerAngles; if (fakepoint.activeInHierarchy) { ((FVRInteractiveObject)mainphys).EndInteractionDistance = 0f; ((FVRInteractiveObject)mainphys).EndInteractionIfDistant = true; mainphys.DistantGrabbable = false; ((FVRInteractiveObject)mainphys).ForceBreakInteraction(); mainobj.transform.position = fakepoint.transform.position; mainobj.transform.eulerAngles = fakepoint.transform.eulerAngles; mainrig.useGravity = false; mainphys.UsesGravity = false; col.enabled = false; } else if (!fakepoint.activeInHierarchy) { mainrig.useGravity = true; mainphys.UsesGravity = true; if (!fuzed) { phys.SetActive(true); col.enabled = false; } else if (fuzed) { phys.SetActive(false); col.enabled = true; grabcol.enabled = false; mainphys.DistantGrabbable = false; } } } } } public class CameraController : MonoBehaviour { public GameObject mTarget; public Vector3 mDistance; public float mSpeed = 5f; private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) ((Component)((Component)this).GetComponent()).transform.LookAt(mTarget.transform.position); ((Component)((Component)this).GetComponent()).transform.position = ((Component)((Component)this).GetComponent()).transform.position + mSpeed * Time.deltaTime * (mTarget.transform.position + mDistance - ((Component)((Component)this).GetComponent()).transform.position); } } public class IdleUpdate : StateMachineBehaviour { private float mIdleRayCast = 0.5f; public override void OnStateEnter(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) { ((Component)animator).GetComponent().DisablePlant((AvatarIKGoal)0, 2f); ((Component)animator).GetComponent().DisablePlant((AvatarIKGoal)1, 2f); } public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { FootPlacementData footPlacementData = ((Component)animator).GetComponents()[0]; FootPlacementData footPlacementData2 = ((Component)animator).GetComponents()[1]; if ((Object)(object)footPlacementData != (Object)null) { if (((AnimatorStateInfo)(ref stateInfo)).normalizedTime > 0.25f) { footPlacementData.mExtraRayDistanceCheck = mIdleRayCast; } else { footPlacementData.mExtraRayDistanceCheck = 0f; } } if ((Object)(object)footPlacementData2 != (Object)null) { if (((AnimatorStateInfo)(ref stateInfo)).normalizedTime > 0.25f) { footPlacementData2.mExtraRayDistanceCheck = mIdleRayCast; } else { footPlacementData2.mExtraRayDistanceCheck = 0f; } } } } public class InputController : MonoBehaviour { public float Speed = 4f; public float TurnSpeed = 1f; public Camera mCam; protected Vector3 mLeftVec = new Vector3(-1f, 0f, 0f); protected Vector3 mFwdVec = new Vector3(0f, 0f, 1f); protected Vector3 mGOFwdVec = new Vector3(0f, 0f, 1f); protected Animator mAnim; protected float mTimePassed = 0f; protected int mMove = Animator.StringToHash("move"); protected int mSpeed = Animator.StringToHash("speed"); protected bool mMecFPActive = true; protected GUIStyle mStyle; private void Start() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) mStyle = new GUIStyle(); mAnim = ((Component)this).GetComponent(); mStyle.normal.textColor = new Color(0.5f, 0f, 0.75f, 1f); mStyle.fontSize = 20; } private void OnGUI() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) GUI.Label(new Rect(0f, 0f, 100f, 100f), "Use W, A, S, D to move around\nPress R to activate/deactivate Mec Foot Placer\nHold L to run", mStyle); } private void Update() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) Animator obj = mAnim; AnimatorStateInfo currentAnimatorStateInfo = mAnim.GetCurrentAnimatorStateInfo(0); float normalizedTime = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime; AnimatorStateInfo currentAnimatorStateInfo2 = mAnim.GetCurrentAnimatorStateInfo(0); obj.SetFloat("time", normalizedTime - Mathf.Floor(((AnimatorStateInfo)(ref currentAnimatorStateInfo2)).normalizedTime)); if (!Input.anyKey) { float @float = mAnim.GetFloat(mSpeed); @float -= 1.5f * Time.deltaTime; if (@float < 0f) { @float = 0f; mAnim.SetBool(mMove, false); } mAnim.SetFloat(mSpeed, @float); return; } bool flag = false; Vector3 val = ((Component)mCam).transform.rotation * mFwdVec; val.y = 0f; Vector3 val2 = ((Component)mCam).transform.rotation * mLeftVec; val2.y = 0f; mGOFwdVec = ((Component)this).gameObject.transform.rotation * new Vector3(0f, 0f, 1f); Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(0f, 0f, 0f); float num = 1f; float num2 = 0f; if (Input.GetKey((KeyCode)97)) { val3 += val2; flag = true; } if (Input.GetKey((KeyCode)100)) { val3 -= val2; flag = true; } if (Input.GetKey((KeyCode)119)) { val3 += val; flag = true; } if (Input.GetKey((KeyCode)115)) { val3 -= val; flag = true; } if (Input.GetKey((KeyCode)108)) { float float2 = mAnim.GetFloat(mSpeed); if (flag) { float2 += Time.deltaTime; if (float2 > 1f) { float2 = 1f; } } else { float2 -= 2f * Time.deltaTime; if (float2 < 0f) { float2 = 0f; } } mAnim.SetFloat(mSpeed, float2); } else { float float3 = mAnim.GetFloat(mSpeed); float3 -= Time.deltaTime; if (float3 < 0f) { float3 = 0f; } mAnim.SetFloat(mSpeed, float3); } if (Input.GetKey((KeyCode)281) && mTimePassed > 0.1f) { Time.timeScale -= 0.1f; if (Time.timeScale < 0f) { Time.timeScale = 0f; } mTimePassed = 0f; Debug.Log((object)Time.timeScale); } if (Input.GetKey((KeyCode)280) && mTimePassed > 0.1f) { Time.timeScale += 0.1f; mTimePassed = 0f; Debug.Log((object)Time.timeScale); } if (Input.GetKeyDown((KeyCode)114)) { mMecFPActive = !mMecFPActive; ((Component)this).GetComponent().SetActive((AvatarIKGoal)0, mMecFPActive); ((Component)this).GetComponent().SetActive((AvatarIKGoal)1, mMecFPActive); } if (flag) { num = Vector3.Cross(mGOFwdVec, val3).y; if (num != 0f) { num /= Mathf.Abs(num); } num2 = Vector3.Angle(mGOFwdVec, val3); num2 *= TurnSpeed * Time.deltaTime; ((Component)this).gameObject.transform.Rotate(new Vector3(0f, num, 0f), num2, (Space)0); mAnim.SetBool(mMove, true); } else if (mAnim.GetFloat("speed") <= 0f) { mAnim.SetBool(mMove, false); } mTimePassed += Time.deltaTime; } } public class LocomotionUpdate : StateMachineBehaviour { public override void OnStateEnter(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) { ((Component)animator).GetComponent().EnablePlant((AvatarIKGoal)0, 2f); ((Component)animator).GetComponent().EnablePlant((AvatarIKGoal)1, 2f); } public override void OnStateUpdate(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) { float @float = animator.GetFloat("speed"); float num = ((AnimatorStateInfo)(ref animatorStateInfo)).normalizedTime - Mathf.Floor(((AnimatorStateInfo)(ref animatorStateInfo)).normalizedTime); float num2 = 0.5f - 0.25f * @float; FootPlacementData[] components = ((Component)animator).GetComponents(); FootPlacementData footPlacementData = null; for (byte b = 0; b < components.Length; b++) { switch (components[b].mFootID) { case FootPlacementData.LimbID.LEFT_FOOT: footPlacementData = components[b]; if ((double)num > 0.5 && num < 0.5f + num2) { footPlacementData.mExtraRayDistanceCheck = 0.7f; } else { footPlacementData.mExtraRayDistanceCheck = -0.2f; } break; case FootPlacementData.LimbID.RIGHT_FOOT: footPlacementData = components[b]; if (num < num2) { footPlacementData.mExtraRayDistanceCheck = 0.7f; } else { footPlacementData.mExtraRayDistanceCheck = -0.2f; } break; case FootPlacementData.LimbID.LEFT_HAND: footPlacementData = components[b]; break; case FootPlacementData.LimbID.RIGHT_HAND: footPlacementData = components[b]; break; } footPlacementData.mTransitionTime = 0.15f - 0.1f * @float; } } } public class PelvisSet : StateMachineBehaviour { public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { ((Component)animator).GetComponent().mAdjustPelvisVertically = true; } } public class PelvisUnset : StateMachineBehaviour { public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { ((Component)animator).GetComponent().mAdjustPelvisVertically = false; } } public class FootPlacementData : MonoBehaviour { public enum LimbID { LEFT_FOOT, RIGHT_FOOT, LEFT_HAND, RIGHT_HAND } public enum Target { FOOT, TOE, HEEL } public LimbID mFootID = LimbID.LEFT_FOOT; public bool mPlantFoot = true; public Vector3 mForwardVector = new Vector3(0f, 0f, 1f); public Vector3 mIKHintOffset = new Vector3(0f, 0f, 0f); public Vector3 mUpVector = new Vector3(0f, 1f, 0f); public float mFootOffsetDist = 0.5f; public float mFootLength = 0.22f; public float mFootHalfWidth = 0.05f; public float mFootHeight = 0.1f; public float mFootRotationLimit = 45f; public float mTransitionTime = 0.2f; public float mExtraRayDistanceCheck = 0f; public bool mSetExtraRaydistanceCheckAutomatically = false; public float mErrorThreshold = 0.05f; public float mExtraRayDistanceCheckMin = 0f; public float mExtraRayDistanceCheckMax = 2f; protected bool mFootPlantIsOnTransition = false; protected float mFootPlantBlendSpeed; protected Vector3 mTargetPos = new Vector3(0f, 0f, 0f); protected Vector3 mTargetToePos = new Vector3(0f, 0f, 0f); protected Vector3 mTargetHeelPos = new Vector3(0f, 0f, 0f); protected Vector3 mRotatedFwdVec; protected Vector3 mRotatedIKHintOffset; protected float mTargetFootWeight = 0f; protected float mCurrentFootWeight = 0f; protected float mGoalBlendSpeed = 0f; protected float mPlantBlendFactor = 0f; private Vector3 mFootPlantedPos; private Quaternion mFootPlantedRot; private bool mFootPlanted = false; private Vector3 mPreviousFootPos = Vector3.zero; public void SetTargetPos(Target target, Vector3 target_pos) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) switch (target) { case Target.FOOT: mTargetPos = target_pos; break; case Target.TOE: mTargetToePos = target_pos; break; case Target.HEEL: mTargetHeelPos = target_pos; break; } } public Vector3 GetTargetPos(Target target) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) return (Vector3)(target switch { Target.FOOT => mTargetPos, Target.TOE => mTargetToePos, Target.HEEL => mTargetHeelPos, _ => Vector3.zero, }); } public void CalculateRotatedFwdVec() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) AvatarIKGoal val = (AvatarIKGoal)0; switch (mFootID) { case LimbID.RIGHT_FOOT: val = (AvatarIKGoal)1; break; case LimbID.LEFT_HAND: val = (AvatarIKGoal)2; break; case LimbID.RIGHT_HAND: val = (AvatarIKGoal)3; break; } float num = 0f; Quaternion iKRotation = ((Component)this).GetComponent().GetIKRotation(val); num = ((Quaternion)(ref iKRotation)).eulerAngles.y * (float)Math.PI / 180f; Quaternion val2 = default(Quaternion); ((Quaternion)(ref val2))..ctor(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f)); if (mFootPlanted && mPlantFoot) { num = ((Quaternion)(ref mFootPlantedRot)).eulerAngles.y * (float)Math.PI / 180f; val2 = Quaternion.Slerp(val2, new Quaternion(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f)), mPlantBlendFactor); } mRotatedFwdVec = val2 * ((Vector3)(ref mForwardVector)).normalized; } public Vector3 GetRotatedFwdVec() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mRotatedFwdVec; } public void CalculateRotatedIKHint() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = ((Component)this).transform.rotation; float num = ((Quaternion)(ref rotation)).eulerAngles.y * (float)Math.PI / 180f; Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(0f, Mathf.Sin(num * 0.5f), 0f, Mathf.Cos(num * 0.5f)); mRotatedIKHintOffset = val * mIKHintOffset; } public Vector3 GetRotatedIKHint() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mRotatedIKHintOffset; } public void SetTargetFootWeight(float weight) { mTargetFootWeight = weight; } public float GetTargetFootWeight() { return mTargetFootWeight; } public void SetCurrentFootWeight(float weight) { mCurrentFootWeight = weight; } public float GetCurrentFootWeight() { return mCurrentFootWeight; } public void SetGoalBlendSpeed(float speed) { mGoalBlendSpeed = speed; } public float GetGoalBlendSpeed() { return mGoalBlendSpeed; } public float GetPlantBlendFactor() { return mPlantBlendFactor; } public void SetPlantBlendFactor(float factor) { mPlantBlendFactor = factor; } public void EnablePlantBlend(float blend_speed) { mFootPlantBlendSpeed = Mathf.Abs(blend_speed); mFootPlantIsOnTransition = true; } public void DisablePlantBlend(float blend_speed) { mFootPlantBlendSpeed = 0f - Mathf.Abs(blend_speed); mFootPlantIsOnTransition = true; } public float GetFootPlantBlendSpeed() { return mFootPlantBlendSpeed; } public void PlantBlendTransitionEnded() { mFootPlantIsOnTransition = false; } public bool IsPlantOnTransition() { return mFootPlantIsOnTransition; } public void SetFootPlanted(bool planted) { mFootPlanted = planted; } public bool GetFootPlanted() { return mFootPlanted; } public void SetPlantedPos(Vector3 planted_pos) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) mFootPlantedPos = planted_pos; } public Vector3 GetPlantedPos() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mFootPlantedPos; } public void SetPlantedRot(Quaternion planted_rot) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) mFootPlantedRot = planted_rot; } public Quaternion GetPlantedRot() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mFootPlantedRot; } private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) Animator component = ((Component)this).GetComponent(); if (!((Object)(object)component == (Object)null)) { HumanBodyBones val = (HumanBodyBones)5; switch (mFootID) { case LimbID.RIGHT_FOOT: val = (HumanBodyBones)6; break; case LimbID.RIGHT_HAND: val = (HumanBodyBones)18; break; case LimbID.LEFT_HAND: val = (HumanBodyBones)17; break; } mPreviousFootPos = component.GetBoneTransform(val).position; } } protected bool IsErrorHigh(HumanBodyBones bone, Vector3 current_position, Vector3 previous_pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) Vector3 val = previous_pos - current_position; float magnitude = ((Vector3)(ref val)).magnitude; float num = mErrorThreshold; if (Time.deltaTime < 0.033f) { num = mErrorThreshold * 30f * Time.deltaTime; } if (magnitude > num) { return true; } return false; } private void OnAnimatorIK() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if (!mSetExtraRaydistanceCheckAutomatically) { return; } Animator component = ((Component)this).GetComponent(); if (!((Object)(object)component == (Object)null)) { HumanBodyBones val = (HumanBodyBones)5; switch (mFootID) { case LimbID.RIGHT_FOOT: val = (HumanBodyBones)6; break; case LimbID.RIGHT_HAND: val = (HumanBodyBones)18; break; case LimbID.LEFT_HAND: val = (HumanBodyBones)17; break; } if (IsErrorHigh(val, component.GetBoneTransform(val).position, mPreviousFootPos)) { mExtraRayDistanceCheck = mExtraRayDistanceCheckMin; } else { mExtraRayDistanceCheck = mExtraRayDistanceCheckMax; } mPreviousFootPos = component.GetBoneTransform(val).position; } } } public class MecFootPlacer : MonoBehaviour { public bool mAdjustPelvisVertically = false; public bool mDampPelvis = false; public float mMaxLegLength = 1f; public float mMinLegLength = 0.2f; public float mPelvisAdjustmentSpeed = 1f; public string[] mLayersToIgnore; protected FootPlacementData mLeftFoot = null; protected FootPlacementData mRightFoot = null; protected FootPlacementData mLeftHand = null; protected FootPlacementData mRightHand = null; protected Animator mAnim; protected LayerMask mLayerMask = LayerMask.op_Implicit(-1); private const float mEpsilon = 0.005f; private float mCurrentRootVertError = 0f; private float mTargetRootVertError = 0f; private float mCurrentPelvisSpeed = 0f; private Vector3 mLeftFootContact_Ontransition_Disable; private Vector3 mLeftToeContact_Ontransition_Disable; private Vector3 mLeftHeelContact_Ontransition_Disable; private Vector3 mRightFootContact_Ontransition_Disable; private Vector3 mRightToeContact_Ontransition_Disable; private Vector3 mRightHeelContact_Ontransition_Disable; private Vector3 mLeftHandContact_Ontransition_Disable; private Vector3 mLeftHandToeContact_Ontransition_Disable; private Vector3 mLeftHandHeelContact_Ontransition_Disable; private Vector3 mRightHandContact_Ontransition_Disable; private Vector3 mRightHandToeContact_Ontransition_Disable; private Vector3 mRightHandHeelContact_Ontransition_Disable; private bool mRootPosLeftRightFoot = false; private bool mLeftFootActive = true; private bool mRightFootActive = true; private bool mLeftHandActive = true; private bool mRightHandActive = true; public void SetActive(AvatarIKGoal foot_id, bool active) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Invalid comparison between Unknown and I4 //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if ((int)foot_id == 0) { if ((Object)(object)mLeftFoot == (Object)null) { return; } if (active && !mLeftFootActive) { ResetIKParams(foot_id); } mLeftFootActive = active; } if ((int)foot_id == 1) { if ((Object)(object)mRightFoot == (Object)null) { return; } if (active && !mRightFootActive) { ResetIKParams(foot_id); } mRightFootActive = active; } if ((int)foot_id == 2) { if ((Object)(object)mRightHand == (Object)null) { return; } if (active && !mLeftHandActive) { ResetIKParams(foot_id); } mLeftHandActive = active; } if ((int)foot_id == 3 && !((Object)(object)mRightHand == (Object)null)) { if (active && !mRightHandActive) { ResetIKParams(foot_id); } mRightHandActive = active; } } public bool IsActive(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Invalid comparison between Unknown and I4 if ((int)foot_id == 0) { return mLeftFootActive; } if ((int)foot_id == 1) { return mRightFootActive; } if ((int)foot_id == 2) { return mLeftHandActive; } if ((int)foot_id == 3) { return mRightHandActive; } return false; } public void SetLayerMask(LayerMask layer_mask) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) mLayerMask = layer_mask; } public LayerMask GetLayerMask() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return mLayerMask; } public float GetPlantBlendWeight(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; default: return -1f; } return footPlacementData.GetPlantBlendFactor(); } public void SetPlantBlendWeight(AvatarIKGoal foot_id, float weight) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } footPlacementData.SetPlantBlendFactor(weight); } public void EnablePlant(AvatarIKGoal foot_id, float blend_speed) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } footPlacementData.EnablePlantBlend(blend_speed); } public void DisablePlant(AvatarIKGoal foot_id, float blend_speed) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } footPlacementData.DisablePlantBlend(blend_speed); } private void ResetIKParams(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Invalid comparison between Unknown and I4 //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Invalid comparison between Unknown and I4 //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) if ((int)foot_id == 0) { Vector3 position = mAnim.GetBoneTransform((HumanBodyBones)5).position; mLeftFoot.SetTargetFootWeight(0f); mLeftFoot.SetCurrentFootWeight(0f); mLeftFoot.SetGoalBlendSpeed(0f); mLeftFoot.SetFootPlanted(planted: false); mLeftFootContact_Ontransition_Disable = position; mLeftToeContact_Ontransition_Disable = mLeftFoot.mUpVector * mLeftFoot.mFootOffsetDist + mLeftFoot.GetRotatedFwdVec() * mLeftFoot.mFootLength; mLeftHeelContact_Ontransition_Disable = position + new Quaternion(0f, 0.7071f, 0f, 0.7071f) * mLeftFoot.GetRotatedFwdVec() * mLeftFoot.mFootHalfWidth; } if ((int)foot_id == 1) { Vector3 position2 = mAnim.GetBoneTransform((HumanBodyBones)6).position; mRightFoot.SetTargetFootWeight(0f); mRightFoot.SetCurrentFootWeight(0f); mRightFoot.SetGoalBlendSpeed(0f); mRightFoot.SetFootPlanted(planted: false); mRightFootContact_Ontransition_Disable = position2; mRightToeContact_Ontransition_Disable = mRightFoot.mUpVector * mRightFoot.mFootOffsetDist + mRightFoot.GetRotatedFwdVec() * mRightFoot.mFootLength; mRightHeelContact_Ontransition_Disable = position2 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mRightFoot.GetRotatedFwdVec() * mRightFoot.mFootHalfWidth; } if ((int)foot_id == 2) { Vector3 position3 = mAnim.GetBoneTransform((HumanBodyBones)17).position; mLeftHand.SetTargetFootWeight(0f); mLeftHand.SetCurrentFootWeight(0f); mLeftHand.SetGoalBlendSpeed(0f); mLeftHand.SetFootPlanted(planted: false); mLeftHandContact_Ontransition_Disable = position3; mLeftHandToeContact_Ontransition_Disable = mLeftHand.mUpVector * mLeftHand.mFootOffsetDist + mLeftHand.GetRotatedFwdVec() * mLeftHand.mFootLength; mLeftHandHeelContact_Ontransition_Disable = position3 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mLeftHand.GetRotatedFwdVec() * mLeftHand.mFootHalfWidth; } if ((int)foot_id == 3) { Vector3 position4 = mAnim.GetBoneTransform((HumanBodyBones)18).position; mRightHand.SetTargetFootWeight(0f); mRightHand.SetCurrentFootWeight(0f); mRightHand.SetGoalBlendSpeed(0f); mRightHand.SetFootPlanted(planted: false); mRightHandContact_Ontransition_Disable = position4; mRightHandToeContact_Ontransition_Disable = mRightHand.mUpVector * mRightHand.mFootOffsetDist + mRightHand.GetRotatedFwdVec() * mRightHand.mFootLength; mRightHandHeelContact_Ontransition_Disable = position4 + new Quaternion(0f, 0.7017f, 0f, 0.7071f) * mRightHand.GetRotatedFwdVec() * mRightHand.mFootHalfWidth; } } protected void SetIKWeight(AvatarIKGoal foot_id, float target_weight, float transition_time) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown switch ((int)foot_id) { case 0: if (Mathf.Abs(target_weight - mLeftFoot.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mLeftFoot.SetGoalBlendSpeed((target_weight - mLeftFoot.GetCurrentFootWeight()) / transition_time); } else { mLeftFoot.SetGoalBlendSpeed(0.1f); mLeftFoot.SetCurrentFootWeight(target_weight); } } mLeftFoot.SetTargetFootWeight(target_weight); break; case 1: if (Mathf.Abs(target_weight - mRightFoot.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mRightFoot.SetGoalBlendSpeed((target_weight - mRightFoot.GetCurrentFootWeight()) / transition_time); } else { mRightFoot.SetGoalBlendSpeed(0.1f); mRightFoot.SetCurrentFootWeight(target_weight); } } mRightFoot.SetTargetFootWeight(target_weight); break; case 2: if (Mathf.Abs(target_weight - mLeftHand.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mLeftHand.SetGoalBlendSpeed((target_weight - mLeftHand.GetCurrentFootWeight()) / transition_time); } else { mLeftHand.SetGoalBlendSpeed(0.1f); mLeftHand.SetCurrentFootWeight(target_weight); } } mLeftHand.SetTargetFootWeight(target_weight); break; case 3: if (Mathf.Abs(target_weight - mRightHand.GetTargetFootWeight()) > 0.005f) { if (transition_time != 0f) { mRightHand.SetGoalBlendSpeed((target_weight - mRightHand.GetCurrentFootWeight()) / transition_time); } else { mRightHand.SetGoalBlendSpeed(0.1f); mRightHand.SetCurrentFootWeight(target_weight); } } mRightHand.SetTargetFootWeight(target_weight); break; } } protected void CalculateIKGoalWeights(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } float num = Mathf.Sign(footPlacementData.GetTargetFootWeight() - footPlacementData.GetCurrentFootWeight()); footPlacementData.SetCurrentFootWeight(footPlacementData.GetCurrentFootWeight() + footPlacementData.GetGoalBlendSpeed() * Time.deltaTime); if (num * Mathf.Sign(footPlacementData.GetTargetFootWeight() - footPlacementData.GetCurrentFootWeight()) < 1f || Mathf.Abs(footPlacementData.GetCurrentFootWeight() - footPlacementData.GetTargetFootWeight()) < 0.005f) { footPlacementData.SetCurrentFootWeight(footPlacementData.GetTargetFootWeight()); } else if (footPlacementData.GetCurrentFootWeight() > 1f || footPlacementData.GetCurrentFootWeight() < 0f) { footPlacementData.SetCurrentFootWeight(Mathf.Clamp(footPlacementData.GetTargetFootWeight(), 0f, 1f)); } } protected void CheckForLimits(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } Vector3 zero = Vector3.zero; Vector3 rotatedFwdVec = footPlacementData.GetRotatedFwdVec(); if (Vector3.Angle(rotatedFwdVec, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE)) > footPlacementData.mFootRotationLimit) { zero = footPlacementData.mUpVector * footPlacementData.mFootLength * Mathf.Tan(footPlacementData.mFootRotationLimit * ((float)Math.PI / 180f)); if (Vector3.Angle(footPlacementData.mUpVector, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE)) > 90f) { zero = -zero; } footPlacementData.SetTargetPos(FootPlacementData.Target.TOE, rotatedFwdVec * footPlacementData.mFootLength + zero); } Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(0f, 0.7071f, 0f, 0.7071f); if (Vector3.Angle(val * rotatedFwdVec, footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL)) > footPlacementData.mFootRotationLimit) { zero = footPlacementData.mUpVector * footPlacementData.mFootHalfWidth * Mathf.Tan(footPlacementData.mFootRotationLimit * ((float)Math.PI / 180f)); if (Vector3.Angle(footPlacementData.mUpVector, footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL)) > 90f) { zero = -zero; } footPlacementData.SetTargetPos(FootPlacementData.Target.HEEL, val * rotatedFwdVec * footPlacementData.mFootHalfWidth + zero); } } protected void UpdateFootPlantBlendWeights(AvatarIKGoal foot_id) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } if (!footPlacementData.IsPlantOnTransition()) { return; } footPlacementData.SetPlantBlendFactor(footPlacementData.GetPlantBlendFactor() + footPlacementData.GetFootPlantBlendSpeed() * Time.deltaTime); if (footPlacementData.GetFootPlantBlendSpeed() > 0f) { if (footPlacementData.GetPlantBlendFactor() > 1f) { footPlacementData.SetPlantBlendFactor(1f); footPlacementData.PlantBlendTransitionEnded(); } } else if (footPlacementData.GetPlantBlendFactor() < 0f) { footPlacementData.SetPlantBlendFactor(0f); footPlacementData.PlantBlendTransitionEnded(); } } protected void FindContactPoints(AvatarIKGoal foot_id) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected I4, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected I4, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected I4, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Expected I4, but got Unknown //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Expected I4, but got Unknown //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Expected I4, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_066a: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Expected I4, but got Unknown //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) Vector3 iKPosition = mAnim.GetIKPosition(foot_id); bool flag = true; FootPlacementData footPlacementData; switch ((int)foot_id) { default: return; case 0: footPlacementData = mLeftFoot; break; case 1: footPlacementData = mRightFoot; break; case 2: footPlacementData = mLeftHand; break; case 3: footPlacementData = mRightHand; break; } RaycastHit val = default(RaycastHit); if (Physics.Raycast(iKPosition + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootHeight + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { SetIKWeight(foot_id, 1f, footPlacementData.mTransitionTime); Vector3 val2 = ((RaycastHit)(ref val)).point; if (footPlacementData.mPlantFoot && footPlacementData.GetFootPlanted() && Physics.Raycast(footPlacementData.GetPlantedPos() + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootHeight + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { val2 = Vector3.Lerp(val2, ((RaycastHit)(ref val)).point, footPlacementData.GetPlantBlendFactor()); } footPlacementData.SetTargetPos(FootPlacementData.Target.FOOT, val2); switch ((int)foot_id) { case 0: mLeftFootContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; case 1: mRightFootContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; case 2: mLeftHandContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; case 3: mRightHandContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT); break; } flag = true; } else { SetIKWeight(foot_id, 0f, footPlacementData.mTransitionTime); footPlacementData.SetTargetPos(FootPlacementData.Target.FOOT, Vector3.Lerp(iKPosition, (Vector3)((int)foot_id switch { 0 => mLeftFootContact_Ontransition_Disable, 1 => mRightFootContact_Ontransition_Disable, 2 => mLeftHandContact_Ontransition_Disable, 3 => mRightHandContact_Ontransition_Disable, _ => Vector3.zero, }), footPlacementData.GetCurrentFootWeight())); flag = false; } if (Physics.Raycast(iKPosition + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist + footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootLength, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)) && flag) { Vector3 val3 = ((RaycastHit)(ref val)).point; if (footPlacementData.mPlantFoot && footPlacementData.GetFootPlanted() && Physics.Raycast(footPlacementData.GetPlantedPos() + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist + footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootLength, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { val3 = Vector3.Lerp(val3, ((RaycastHit)(ref val)).point, footPlacementData.GetPlantBlendFactor()); } footPlacementData.SetTargetPos(FootPlacementData.Target.TOE, val3 - footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT)); switch ((int)foot_id) { case 0: mLeftToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; case 1: mRightToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; case 2: mLeftHandToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; case 3: mRightHandToeContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.TOE); break; } } else { Vector3 val4 = (Vector3)((int)foot_id switch { 0 => mLeftToeContact_Ontransition_Disable, 1 => mRightToeContact_Ontransition_Disable, 2 => mLeftHandToeContact_Ontransition_Disable, 3 => mRightHandToeContact_Ontransition_Disable, _ => Vector3.zero, }); footPlacementData.SetTargetPos(FootPlacementData.Target.TOE, Vector3.Slerp(footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootLength, val4, footPlacementData.GetCurrentFootWeight())); } Quaternion val5 = default(Quaternion); ((Quaternion)(ref val5))..ctor(0f, 0.7071f, 0f, 0.7071f); Vector3 val6 = iKPosition + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist; Vector3 val7 = val5 * footPlacementData.GetRotatedFwdVec(); if (Physics.Raycast(val6 + ((Vector3)(ref val7)).normalized * footPlacementData.mFootHalfWidth, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask)) && flag) { Vector3 val8 = ((RaycastHit)(ref val)).point; if (footPlacementData.mPlantFoot && footPlacementData.GetFootPlanted()) { Vector3 val9 = footPlacementData.GetPlantedPos() + footPlacementData.mUpVector * footPlacementData.mFootOffsetDist; Vector3 val10 = val5 * footPlacementData.GetRotatedFwdVec(); if (Physics.Raycast(val9 + ((Vector3)(ref val10)).normalized * footPlacementData.mFootHalfWidth, -footPlacementData.mUpVector, ref val, footPlacementData.mFootOffsetDist + footPlacementData.mFootLength + footPlacementData.mExtraRayDistanceCheck, LayerMask.op_Implicit(mLayerMask))) { val8 = Vector3.Lerp(val8, ((RaycastHit)(ref val)).point, footPlacementData.GetPlantBlendFactor()); } } footPlacementData.SetTargetPos(FootPlacementData.Target.HEEL, val8 - footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT)); switch ((int)foot_id) { case 0: mLeftHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; case 1: mRightHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; case 2: mLeftHandHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; case 3: mRightHeelContact_Ontransition_Disable = footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL); break; default: { Vector3 val4 = Vector3.zero; break; } } } else { Vector3 val4 = (Vector3)((int)foot_id switch { 0 => mLeftHeelContact_Ontransition_Disable, 1 => mRightHeelContact_Ontransition_Disable, 2 => mLeftHandHeelContact_Ontransition_Disable, 3 => mRightHandHeelContact_Ontransition_Disable, _ => Vector3.zero, }); footPlacementData.SetTargetPos(FootPlacementData.Target.HEEL, Vector3.Slerp(val5 * footPlacementData.GetRotatedFwdVec() * footPlacementData.mFootHalfWidth, val4, footPlacementData.GetCurrentFootWeight())); } } protected void RootPositioningCheck() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) AnimateRootVertError(); if (mAdjustPelvisVertically) { Vector3 val = mAnim.GetBoneTransform((HumanBodyBones)2).position - mAnim.GetIKPosition((AvatarIKGoal)1); float magnitude = ((Vector3)(ref val)).magnitude; FootPlacementData footPlacementData = mRightFoot; mRootPosLeftRightFoot = true; Vector3 val2 = mAnim.GetBoneTransform((HumanBodyBones)1).position - mAnim.GetIKPosition((AvatarIKGoal)0); float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude; Vector3 val3 = mAnim.GetBoneTransform((HumanBodyBones)2).position - mAnim.GetIKPosition((AvatarIKGoal)1); if (sqrMagnitude > ((Vector3)(ref val3)).sqrMagnitude) { Vector3 val4 = mAnim.GetBoneTransform((HumanBodyBones)1).position - mAnim.GetIKPosition((AvatarIKGoal)0); magnitude = ((Vector3)(ref val4)).magnitude; footPlacementData = mLeftFoot; mRootPosLeftRightFoot = false; } if (magnitude > mMaxLegLength) { mTargetRootVertError = magnitude - mMaxLegLength; float num = 0f; float num2 = 0f; Vector3 val5 = mAnim.GetBoneTransform((HumanBodyBones)1).position - (mAnim.GetIKPosition((AvatarIKGoal)0) + mLeftFoot.mUpVector * mTargetRootVertError); float magnitude2 = ((Vector3)(ref val5)).magnitude; if (magnitude2 < mMinLegLength) { num = mMinLegLength - magnitude2; } Vector3 val6 = mAnim.GetBoneTransform((HumanBodyBones)2).position - (mAnim.GetIKPosition((AvatarIKGoal)1) + mLeftFoot.mUpVector * mTargetRootVertError); magnitude2 = ((Vector3)(ref val6)).magnitude; if (magnitude2 < mMinLegLength) { num2 = mMinLegLength - magnitude2; } if (num2 != 0f || num != 0f) { if (num2 > num) { mTargetRootVertError -= num2; } else { mTargetRootVertError -= num; } } } else { mTargetRootVertError = 0f; mCurrentPelvisSpeed = 0f; } mAnim.SetIKPosition((AvatarIKGoal)0, mAnim.GetIKPosition((AvatarIKGoal)0) + footPlacementData.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)1, mAnim.GetIKPosition((AvatarIKGoal)1) + footPlacementData.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)2, mAnim.GetIKPosition((AvatarIKGoal)2) + footPlacementData.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)3, mAnim.GetIKPosition((AvatarIKGoal)3) + footPlacementData.mUpVector * mCurrentRootVertError); return; } mTargetRootVertError = 0f; mCurrentPelvisSpeed = 0f; if (Mathf.Abs(mCurrentRootVertError) >= 0.005f) { if (mRootPosLeftRightFoot) { mAnim.SetIKPosition((AvatarIKGoal)0, mAnim.GetIKPosition((AvatarIKGoal)0) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)1, mAnim.GetIKPosition((AvatarIKGoal)1) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)2, mAnim.GetIKPosition((AvatarIKGoal)2) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)3, mAnim.GetIKPosition((AvatarIKGoal)3) + mRightFoot.mUpVector * mCurrentRootVertError); } else { mAnim.SetIKPosition((AvatarIKGoal)0, mAnim.GetIKPosition((AvatarIKGoal)0) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)1, mAnim.GetIKPosition((AvatarIKGoal)1) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)2, mAnim.GetIKPosition((AvatarIKGoal)2) + mRightFoot.mUpVector * mCurrentRootVertError); mAnim.SetIKPosition((AvatarIKGoal)3, mAnim.GetIKPosition((AvatarIKGoal)3) + mRightFoot.mUpVector * mCurrentRootVertError); } } } protected void AnimateRootVertError() { float num = Mathf.Abs(mCurrentRootVertError - mTargetRootVertError); if (num < 0.005f) { mCurrentRootVertError = mTargetRootVertError; mCurrentPelvisSpeed = 0f; return; } float num2 = Mathf.Sign(mTargetRootVertError - mCurrentRootVertError); if (mDampPelvis) { if (num < mTargetRootVertError * 0.3f) { mCurrentPelvisSpeed -= mPelvisAdjustmentSpeed * Time.deltaTime; if (mCurrentPelvisSpeed < mPelvisAdjustmentSpeed * 0.5f) { mCurrentPelvisSpeed = mPelvisAdjustmentSpeed * 0.5f; } mCurrentRootVertError += num2 * mCurrentPelvisSpeed * Time.deltaTime; } else { mCurrentRootVertError += num2 * mPelvisAdjustmentSpeed * Time.deltaTime; } } else { mCurrentRootVertError += num2 * mPelvisAdjustmentSpeed * Time.deltaTime; mCurrentPelvisSpeed = 0f; } if (Mathf.Sign(mTargetRootVertError - mCurrentRootVertError) * num2 <= 0f) { mCurrentRootVertError = mTargetRootVertError; } } public void FootPlacement(AvatarIKGoal foot_id) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected I4, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Invalid comparison between Unknown and I4 //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) FootPlacementData footPlacementData = null; switch ((int)foot_id) { default: return; case 0: if (!mLeftFootActive) { return; } footPlacementData = mLeftFoot; break; case 1: if (!mRightFootActive) { return; } footPlacementData = mRightFoot; break; case 2: if (!mLeftHandActive) { return; } footPlacementData = mLeftHand; break; case 3: if (!mRightHandActive) { return; } footPlacementData = mRightHand; break; } ((Vector3)(ref footPlacementData.mUpVector)).Normalize(); ((Vector3)(ref footPlacementData.mForwardVector)).Normalize(); footPlacementData.CalculateRotatedIKHint(); footPlacementData.CalculateRotatedFwdVec(); footPlacementData.SetTargetPos(FootPlacementData.Target.FOOT, mAnim.GetIKPosition(foot_id)); UpdateFootPlantBlendWeights(foot_id); FindContactPoints(foot_id); CheckForLimits(foot_id); CalculateIKGoalWeights(foot_id); mAnim.SetIKRotationWeight(foot_id, footPlacementData.GetCurrentFootWeight()); float num = Vector3.Angle(footPlacementData.GetRotatedFwdVec(), footPlacementData.mForwardVector); Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(0f, 0.7071f, 0f, 0.7071f); Quaternion val2 = Quaternion.FromToRotation(footPlacementData.mForwardVector, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE)); Vector3 eulerAngles = ((Quaternion)(ref val2)).eulerAngles; eulerAngles.z = 0f; Quaternion val3 = Quaternion.Euler(eulerAngles); if ((num > 90f && num < 180f) || (num > 270f && num < 360f)) { Quaternion val4 = Quaternion.FromToRotation(footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL), val * footPlacementData.GetRotatedFwdVec()); eulerAngles = ((Quaternion)(ref val4)).eulerAngles; } else { Quaternion val5 = Quaternion.FromToRotation(val * footPlacementData.GetRotatedFwdVec(), footPlacementData.GetTargetPos(FootPlacementData.Target.HEEL)); eulerAngles = ((Quaternion)(ref val5)).eulerAngles; } eulerAngles.x = 0f; eulerAngles.y = 0f; val3 *= Quaternion.Euler(eulerAngles); mAnim.SetIKRotation(foot_id, val3); Vector3 zero = Vector3.zero; if ((int)foot_id == 0) { zero = mAnim.GetBoneTransform((HumanBodyBones)3).position - mAnim.GetIKPosition((AvatarIKGoal)0); mAnim.SetIKHintPositionWeight((AvatarIKHint)0, footPlacementData.GetCurrentFootWeight()); mAnim.SetIKHintPosition((AvatarIKHint)0, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE) + footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT) + footPlacementData.GetRotatedIKHint() + zero); } if ((int)foot_id == 1) { zero = mAnim.GetBoneTransform((HumanBodyBones)4).position - mAnim.GetBoneTransform((HumanBodyBones)6).position; mAnim.SetIKHintPositionWeight((AvatarIKHint)1, footPlacementData.GetCurrentFootWeight()); mAnim.SetIKHintPosition((AvatarIKHint)1, footPlacementData.GetTargetPos(FootPlacementData.Target.TOE) + footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT) + footPlacementData.GetRotatedIKHint() + zero); } Vector3 val6 = footPlacementData.GetTargetPos(FootPlacementData.Target.FOOT) + footPlacementData.mUpVector * footPlacementData.mFootHeight; mAnim.SetIKPositionWeight(foot_id, footPlacementData.GetCurrentFootWeight()); mAnim.SetIKPosition(foot_id, val6); if (footPlacementData.GetCurrentFootWeight() <= 0f) { footPlacementData.SetFootPlanted(planted: false); } else if (footPlacementData.mPlantFoot && !footPlacementData.GetFootPlanted() && Mathf.Abs(footPlacementData.GetTargetFootWeight() - footPlacementData.GetCurrentFootWeight()) < 0.005f) { footPlacementData.SetPlantedPos(mAnim.GetIKPosition(foot_id)); footPlacementData.SetPlantedRot(mAnim.GetIKRotation(foot_id)); footPlacementData.SetFootPlanted(planted: true); } } private void UpdateLayerMask() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) for (byte b = 0; b < mLayersToIgnore.Length; b++) { int num = LayerMask.NameToLayer(mLayersToIgnore[b]); if (num != -1) { mLayerMask = LayerMask.op_Implicit(LayerMask.op_Implicit(mLayerMask) & ~Mathf.RoundToInt(Mathf.Pow(2f, (float)num))); } } } private void Start() { mAnim = ((Component)this).GetComponent(); bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; FootPlacementData[] components = ((Component)this).GetComponents(); for (byte b = 0; b < components.Length; b++) { switch (components[b].mFootID) { case FootPlacementData.LimbID.LEFT_FOOT: flag = true; mLeftFoot = components[b]; break; case FootPlacementData.LimbID.RIGHT_FOOT: flag2 = true; mRightFoot = components[b]; break; case FootPlacementData.LimbID.RIGHT_HAND: flag4 = true; mLeftHand = components[b]; break; case FootPlacementData.LimbID.LEFT_HAND: flag3 = true; mRightHand = components[b]; break; } if (flag && flag2 && flag3 && flag4) { break; } } } private void OnAnimatorIK() { UpdateLayerMask(); if ((Object)(object)mLeftFoot != (Object)null) { FootPlacement((AvatarIKGoal)0); } if ((Object)(object)mRightFoot != (Object)null) { FootPlacement((AvatarIKGoal)1); } if ((Object)(object)mLeftHand != (Object)null) { FootPlacement((AvatarIKGoal)2); } if ((Object)(object)mRightHand != (Object)null) { FootPlacement((AvatarIKGoal)3); } RootPositioningCheck(); } private void LateUpdate() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (mCurrentRootVertError != 0f) { if (mRootPosLeftRightFoot) { Transform boneTransform = mAnim.GetBoneTransform((HumanBodyBones)0); boneTransform.position -= mRightFoot.mUpVector * mCurrentRootVertError; } else { Transform boneTransform2 = mAnim.GetBoneTransform((HumanBodyBones)0); boneTransform2.position -= mLeftFoot.mUpVector * mCurrentRootVertError; } } } } namespace JerryComponent { public class EnableWhenSloted : MonoBehaviour { public FVRPhysicalObject mainObj; public GameObject objectToEnable; public Transform MT; private void Start() { } private void Update() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainObj.m_quickbeltSlot != (Object)null) { if (mainObj.m_quickbeltSlot.IsPlayer) { objectToEnable.transform.position = MT.position; objectToEnable.transform.eulerAngles = MT.eulerAngles; } else if (!mainObj.m_quickbeltSlot.IsPlayer) { objectToEnable.transform.localPosition = new Vector3(0f, 0f, 0f); objectToEnable.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } objectToEnable.SetActive(true); } else if ((Object)(object)mainObj.m_quickbeltSlot == (Object)null) { objectToEnable.SetActive(false); } } } public class ComTacHeadset : MonoBehaviour { public AudioEvent[] ade; public GameObject powerswitch; public float limit; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 100f; public float alfIncRate = 100f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.75f; private bool isHeaded = false; public GameObject on; public GameObject off; public GameObject whole; private AudioSource[] ac; private AudioClip[] aclip; public float rmsVal; public float dbVal; private const int QSamples = 1024; private const float RefValue = 0.1f; private float[] _samples; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); } private void Start() { _samples = new float[1024]; } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "HeadsetSensor") { isHeaded = true; } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "HeadsetSensor") { isHeaded = false; } } private void Update() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) ac = Resources.FindObjectsOfTypeAll(typeof(AudioSource)) as AudioSource[]; if (isHeaded) { whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } if (!isHeaded) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } } public class FollowHeadOnSloted : MonoBehaviour { public FVRPhysicalObject mainObj; public GameObject staticGEO; public GameObject movingGEO; private void Start() { } private void Update() { if ((Object)(object)mainObj.m_quickbeltSlot != (Object)null) { if (mainObj.QuickbeltSlot.IsPlayer) { staticGEO.SetActive(false); movingGEO.SetActive(true); } else { staticGEO.SetActive(true); movingGEO.SetActive(false); } } else if ((Object)(object)mainObj.m_quickbeltSlot == (Object)null) { staticGEO.SetActive(true); movingGEO.SetActive(false); } } } public class FollowHeadOnSlotedAttach : MonoBehaviour { public FVRFireArmAttachment mainObj; public GameObject staticGEO; public GameObject movingGEO; private void Start() { } private void Update() { if ((Object)(object)((FVRPhysicalObject)mainObj).m_quickbeltSlot != (Object)null) { if (((FVRPhysicalObject)mainObj).QuickbeltSlot.IsPlayer) { staticGEO.SetActive(false); movingGEO.SetActive(true); } else { staticGEO.SetActive(true); movingGEO.SetActive(false); } } else if ((Object)(object)((FVRPhysicalObject)mainObj).m_quickbeltSlot == (Object)null) { staticGEO.SetActive(true); movingGEO.SetActive(false); } } } public class TacEarPro : MonoBehaviour { public GameObject powerswitch; public FVRPhysicalObject mainOBJ; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 200f; public float alfHalfMin = 400f; public float alfIncRate = 10f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.5f; public GameObject on; public GameObject off; public GameObject whole; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void OnSosigGunFired(SosigWeapon sosigWeapon) { alf.cutoffFrequency = alfHalfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent += new SosiggunFired(OnSosigGunFired); } private void Update() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainOBJ.m_quickbeltSlot != (Object)null) { whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } if ((Object)(object)mainOBJ.m_quickbeltSlot == (Object)null) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent -= new SosiggunFired(OnSosigGunFired); } } public class TacEarPro2 : MonoBehaviour { public GameObject powerswitch; public FVRFireArmAttachment mainOBJ; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 200f; public float alfHalfMin = 400f; public float alfIncRate = 10f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.5f; public GameObject on; public GameObject off; public GameObject whole; public Transform PlugPort; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void OnSosigGunFired(SosigWeapon sosigWeapon) { alf.cutoffFrequency = alfHalfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent += new SosiggunFired(OnSosigGunFired); } private void Denoise() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } private void Update() { if ((Object)(object)mainOBJ.curMount != (Object)null) { if ((Object)(object)mainOBJ.curMount.MyObject.m_quickbeltSlot != (Object)null) { Denoise(); } else { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot != (Object)null) { Denoise(); } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot == (Object)null && (Object)(object)mainOBJ.curMount == (Object)null) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent -= new SosiggunFired(OnSosigGunFired); } } public class TacEarPro3 : MonoBehaviour { public GameObject powerswitch; public FVRFireArmAttachment mainOBJ; public AudioLowPassFilter alf; public float alfMax = 10000f; public float alfMin = 200f; public float alfHalfMin = 400f; public float alfIncRate = 10f; public float soundvolumeNorm = 1f; public float soundvolumeInc = 1.5f; public GameObject on; public GameObject off; public GameObject whole; private void OnShotFired(FVRFireArm firearm) { alf.cutoffFrequency = alfMin; } private void OnSosigGunFired(SosigWeapon sosigWeapon) { alf.cutoffFrequency = alfHalfMin; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent += new SosiggunFired(OnSosigGunFired); } private void Denoise() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) whole.SetActive(true); if (powerswitch.transform.localEulerAngles.x >= 45f) { on.SetActive(true); off.SetActive(false); AudioListener.volume = soundvolumeInc; if (alf.cutoffFrequency != alfMax) { AudioLowPassFilter obj = alf; obj.cutoffFrequency += alfIncRate; } if (alf.cutoffFrequency > alfMax) { alf.cutoffFrequency = alfMax; } } if (powerswitch.transform.localEulerAngles.x < 45f) { on.SetActive(false); off.SetActive(true); AudioListener.volume = soundvolumeNorm; } } private void Update() { if ((Object)(object)mainOBJ.curMount != (Object)null) { if (((Object)mainOBJ.curMount).name == "PodCase") { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } else { Denoise(); } } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot != (Object)null) { Denoise(); } if ((Object)(object)((FVRPhysicalObject)mainOBJ).m_quickbeltSlot == (Object)null && (Object)(object)mainOBJ.curMount == (Object)null) { whole.SetActive(false); AudioListener.volume = soundvolumeNorm; } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); GM.CurrentSceneSettings.SosiggunFiredEvent -= new SosiggunFired(OnSosigGunFired); } } public class ChangeLiveries : MonoBehaviour { public MeshRenderer rend; public MeshRenderer rend2; public GameObject bead; public Material m1; public Material m2; public Material m3; public Material m4; private void Start() { ((Renderer)rend).material = m1; } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) if (bead.transform.localPosition.x < 0.5f) { ((Renderer)rend).material = m1; ((Renderer)rend2).material = m1; } else if (bead.transform.localPosition.x > 0.5f && bead.transform.localPosition.x < 1.5f) { ((Renderer)rend).material = m2; ((Renderer)rend2).material = m2; } else if (bead.transform.localPosition.x > 1.5f && bead.transform.localPosition.x < 2.5f) { ((Renderer)rend).material = m3; ((Renderer)rend2).material = m3; } else if (bead.transform.localPosition.x > 2.5f && bead.transform.localPosition.x < 3.5f) { ((Renderer)rend).material = m4; ((Renderer)rend2).material = m4; } } } public class enableanddisable : MonoBehaviour { public GameObject enable; public GameObject disable; private void Start() { } private void Update() { if (disable.activeInHierarchy) { enable.SetActive(false); } else { enable.SetActive(true); } } } public class BowForward : MonoBehaviour { public Slingshot SS; public Transform muzzle; private void Start() { } private void Update() { //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) if ((Object)(object)SS.m_slungObject != (Object)null) { AxisLookAt(((Component)SS.m_slungObject).gameObject.transform, muzzle.position, Vector3.forward); } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } } public class CBLauncher : MonoBehaviour { public Slingshot SS; public GameObject switchstable; public GameObject normal; public GameObject he; public GameObject grapple; public GameObject typeSwitch; public bool typeSwitched = false; public float typenumber = 4f; public FVRPhysicalObject main; public GameObject disablepiece; public FVRFireArmAttachmentMount mount; public FVRInteractiveObject slidingpiece; public FVRFireArmAttachment arrow = null; public float power = 0f; public bool isPulled = false; public bool shoot = false; public Transform fore; public Transform foretip; public float speed; public float stringpower; public float powerthreshod = 5000f; public AudioEvent audioshoot; public bool transferedcontrol = false; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_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_060e: 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_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Unknown result type (might be due to invalid IL or missing references) //IL_06bc: Unknown result type (might be due to invalid IL or missing references) if (switchstable.transform.localEulerAngles.x > 45f) { main.MoveIntensity = 0.1f; main.RotIntensity = 0.05f; } if (switchstable.transform.localEulerAngles.x < 45f) { main.MoveIntensity = 0.5f; main.RotIntensity = 0.5f; } if (typenumber == 1f) { normal.SetActive(true); he.SetActive(false); grapple.SetActive(false); if ((Object)(object)SS.m_slungObject != (Object)null && (Object)(object)((Component)SS.m_slungObject).GetComponent() != (Object)null) { ((Component)SS.m_slungObject).GetComponent().isInSlung = true; ((Component)((FVRFireArmAttachment)((Component)SS.m_slungObject).GetComponent()).AttachmentInterface).transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } if (typenumber == 2f) { normal.SetActive(false); he.SetActive(true); grapple.SetActive(false); if ((Object)(object)SS.m_slungObject != (Object)null && (Object)(object)((Component)SS.m_slungObject).GetComponent() != (Object)null) { ((Component)SS.m_slungObject).GetComponent().isInSlung = true; ((Component)((FVRFireArmAttachment)((Component)SS.m_slungObject).GetComponent()).AttachmentInterface).transform.localEulerAngles = new Vector3(45f, 0f, 0f); } } if (typenumber == 3f) { normal.SetActive(false); he.SetActive(false); grapple.SetActive(true); if ((Object)(object)SS.m_slungObject != (Object)null && (Object)(object)((Component)SS.m_slungObject).GetComponent() != (Object)null) { ((Component)SS.m_slungObject).GetComponent().isInSlung = true; ((Component)((FVRFireArmAttachment)((Component)SS.m_slungObject).GetComponent()).AttachmentInterface).transform.localEulerAngles = new Vector3(90f, 0f, 0f); } } if (typenumber > 2f) { typenumber = 1f; } if (typeSwitch.transform.localEulerAngles.x > 45f && !typeSwitched) { typenumber += 1f; typeSwitched = true; } if (typeSwitch.transform.localEulerAngles.x < 45f) { typeSwitched = false; } if (disablepiece.activeInHierarchy && ((FVRInteractiveObject)main).IsHeld && !transferedcontrol) { FVRViveHand otherHand = ((FVRInteractiveObject)main).m_hand.OtherHand; if ((Object)(object)otherHand.CurrentInteractable != (Object)null) { otherHand.m_currentInteractable.EndInteraction(otherHand); otherHand.CurrentInteractable = slidingpiece; slidingpiece.BeginInteraction(otherHand); transferedcontrol = true; } } if (!slidingpiece.IsHeld) { ((FVRInteractiveObject)main).UseGripRotInterp = true; float num = speed * Time.deltaTime; ((Component)slidingpiece).transform.localPosition = Vector3.MoveTowards(((Component)slidingpiece).transform.localPosition, fore.localPosition, num); } if (((Component)slidingpiece).transform.localPosition.z < 0f) { ((Component)slidingpiece).transform.localPosition = new Vector3(0f, 0f, 0f); } if (((Component)slidingpiece).transform.localPosition.z > 0.255f) { ((Component)slidingpiece).transform.localPosition = new Vector3(0f, 0f, 0.255f); } if (((Component)slidingpiece).transform.localPosition.z < 0.2f && mount.AttachmentsList.Count > 0) { isPulled = true; shoot = false; if (slidingpiece.IsHeld) { power = powerthreshod * ((0.255f - ((Component)slidingpiece).transform.localPosition.z) / 0.255f); } } if ((Object)(object)arrow == (Object)null || mount.AttachmentsList == null) { } if (mount.AttachmentsList.Count > 0) { arrow = mount.AttachmentsList[0]; } if (!(((Component)slidingpiece).transform.localPosition.z > 0.24f)) { return; } if (mount.AttachmentsList.Count > 0) { shoot = true; if (!slidingpiece.IsHeld && isPulled && (Object)(object)arrow != (Object)null && shoot) { SM.PlayCoreSoundDelayedOverrides((FVRPooledAudioType)10, audioshoot, ((Component)this).transform.position, new Vector2(1f, 1f), new Vector2(1f, 1.5f), 0f); arrow.DetachFromMount(); mount.DeRegisterAttachment(arrow); mount.EnableOnHover.SetActive(false); Rigidbody component = ((Component)arrow).gameObject.GetComponent(); Vector3 val = ((Component)component).transform.position - foretip.position; component.AddForceAtPosition(val * power * -1f, ((Component)foretip).transform.position); arrow = null; shoot = false; isPulled = false; power = 0f; transferedcontrol = false; } } if (slidingpiece.IsHeld || mount.AttachmentsList.Count <= 0) { isPulled = false; shoot = false; } } } public class HEseaker : MonoBehaviour { public MultipleUseArrow arrow; private void OnTriggerEnter(Collider other) { if (((Component)other).gameObject.layer == LayerMask.NameToLayer("AgentBody")) { arrow.Explode(); } } private void Update() { } } public class IgnoreLayer : MonoBehaviour { public Rigidbody rigid; public Transform center; private void Start() { } private void Update() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) rigid.centerOfMass = center.localPosition; } } public class MultipleUseArrow : MuzzleBrake { public GameObject[] SpawnOnDestruction; public GameObject main; public GameObject laddersight; public bool isMounted = false; public bool isGrap; public bool m_hasExploded = false; public GameObject tlight; public bool isInSlung = false; public GameObject knots; public bool isHEact = false; public GameObject RopeLengthPrefab; public Transform RopePoint; public GameObject BundledRope; public GameObject FakeKnot; public GameObject FakeRopeLength; public bool m_isRopeFree; public bool m_hasBeenThrown; public bool m_hasLanded; public List finalRopePoints = new List(); public Vector3 currentRopePoint; public List m_ropeLengths = new List(); public LayerMask LM_Grapple; public RaycastHit m_hit; public bool IsRopeFree => m_isRopeFree; public void Update() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) if (!isInSlung) { Vector3 velocity = ((FVRPhysicalObject)this).RootRigidbody.velocity; if (((Vector3)(ref velocity)).magnitude > 45f && tlight.activeInHierarchy) { isHEact = true; } if (isHEact) { Vector3 velocity2 = ((FVRPhysicalObject)this).RootRigidbody.velocity; if (((Vector3)(ref velocity2)).magnitude < 40f) { Explode(); } } } if (isInSlung) { isMounted = true; if (knots.activeInHierarchy) { m_isRopeFree = true; } if (!knots.activeInHierarchy) { ClearRopeLengths(); m_isRopeFree = false; } m_hasBeenThrown = false; } if (laddersight.transform.localEulerAngles.x == 0f) { isGrap = false; knots.SetActive(false); tlight.SetActive(false); } if (laddersight.transform.localEulerAngles.x > 25f && laddersight.transform.localEulerAngles.x < 65f) { isGrap = true; knots.SetActive(false); tlight.SetActive(true); } if (laddersight.transform.localEulerAngles.x == 90f) { isGrap = false; knots.SetActive(true); tlight.SetActive(false); } } public override void BeginInteraction(FVRViveHand hand) { m_isRopeFree = false; ClearRopeLengths(); ((FVRPhysicalObject)this).RootRigidbody.isKinematic = false; ((FVRFireArmAttachment)this).BeginInteraction(hand); } public override void EndInteractionIntoInventorySlot(FVRViveHand hand, FVRQuickBeltSlot slot) { m_isRopeFree = false; ClearRopeLengths(); ((FVRPhysicalObject)this).EndInteractionIntoInventorySlot(hand, slot); } public override void EndInteraction(FVRViveHand hand) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) ((FVRFireArmAttachment)this).EndInteraction(hand); FakeRopeLength.SetActive(false); if (m_isRopeFree) { m_hasBeenThrown = true; m_hasLanded = false; finalRopePoints.Add(currentRopePoint); } } public void ClearRopeLengths() { BundledRope.SetActive(true); FakeKnot.SetActive(false); m_hasBeenThrown = false; m_hasLanded = false; finalRopePoints.Clear(); if (m_ropeLengths.Count > 0) { for (int num = m_ropeLengths.Count - 1; num >= 0; num--) { Object.Destroy((Object)(object)m_ropeLengths[num]); } m_ropeLengths.Clear(); } } public void FreeRope() { m_isRopeFree = true; BundledRope.SetActive(false); FakeKnot.SetActive(true); } public override void FVRUpdate() { //IL_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_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_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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) ((FVRPhysicalObject)this).FVRUpdate(); Vector3 velocity = ((FVRPhysicalObject)this).RootRigidbody.velocity; if (((Vector3)(ref velocity)).magnitude > 25f && !isInSlung && isMounted) { m_isRopeFree = true; m_hasBeenThrown = true; } if (laddersight.transform.localEulerAngles.x != 90f) { return; } if (IsRopeFree && !m_hasBeenThrown) { FakeRopeLength.SetActive(true); FakeRopeLength.transform.rotation = Quaternion.LookRotation(-Vector3.up, ((Component)this).transform.up); if (Physics.Raycast(RopePoint.position, -Vector3.up, ref m_hit, 200f, LayerMask.op_Implicit(LM_Grapple))) { FakeRopeLength.transform.localScale = new Vector3(1f, 1f, ((RaycastHit)(ref m_hit)).distance); currentRopePoint = ((RaycastHit)(ref m_hit)).point; } else { FakeRopeLength.transform.localScale = new Vector3(1f, 1f, 200f); currentRopePoint = FakeRopeLength.transform.position + -Vector3.up * 200f; } } for (int i = 0; i < finalRopePoints.Count; i++) { if (i < finalRopePoints.Count - 1) { Debug.DrawLine(finalRopePoints[i], finalRopePoints[i + 1], Color.yellow); } } } public void LateUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) if (laddersight.transform.localEulerAngles.x != 90f || !IsRopeFree || !m_hasBeenThrown || m_hasLanded) { return; } Vector3 position = RopePoint.position; Vector3 val = currentRopePoint - position; if (Physics.Raycast(position, ((Vector3)(ref val)).normalized, ref m_hit, ((Vector3)(ref val)).magnitude, LayerMask.op_Implicit(LM_Grapple))) { Vector3 val2 = ((RaycastHit)(ref m_hit)).point + ((RaycastHit)(ref m_hit)).normal * 0.025f; Vector3 val3 = val2 - currentRopePoint; GameObject val4 = Object.Instantiate(RopeLengthPrefab, val2, Quaternion.LookRotation(-val3, Vector3.up)); val4.transform.localScale = new Vector3(1f, 1f, ((Vector3)(ref val3)).magnitude); FVRHandGrabPoint val5 = null; if (m_ropeLengths.Count > 0) { val5 = m_ropeLengths[m_ropeLengths.Count - 1].GetComponent(); } FVRHandGrabPoint component = val4.GetComponent(); m_ropeLengths.Add(val4); if ((Object)(object)val5 != (Object)null && (Object)(object)component != (Object)null) { val5.ConnectedGrabPoint_Base = component; component.ConnectedGrabPoint_End = val5; } FakeRopeLength.SetActive(false); finalRopePoints.Add(val2); currentRopePoint = val2; } else { FakeRopeLength.transform.rotation = Quaternion.LookRotation(val, Vector3.up); FakeRopeLength.transform.localScale = new Vector3(1f, 1f, ((Vector3)(ref val)).magnitude); FakeRopeLength.SetActive(true); } } public void Explode() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (!m_hasExploded) { m_hasExploded = true; for (int i = 0; i < SpawnOnDestruction.Length; i++) { Object.Instantiate(SpawnOnDestruction[i], ((Component)this).transform.position, ((Component)this).transform.rotation); } Object.Destroy((Object)(object)((Component)this).gameObject); } } public override void OnCollisionEnter(Collision col) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) ((FVRPhysicalObject)this).OnCollisionEnter(col); if (laddersight.transform.localEulerAngles.x == 90f && IsRopeFree && m_hasBeenThrown && !m_hasLanded && (Object)(object)col.rigidbody == (Object)null && ((Component)col.transform).gameObject.layer == LayerMask.NameToLayer("Environment")) { m_hasLanded = true; isMounted = false; ((FVRPhysicalObject)this).RootRigidbody.isKinematic = true; Vector3 val = RopePoint.position - currentRopePoint; GameObject val2 = Object.Instantiate(RopeLengthPrefab, RopePoint.position, Quaternion.LookRotation(-val, Vector3.up)); val2.transform.localScale = new Vector3(1f, 1f, ((Vector3)(ref val)).magnitude); FVRHandGrabPoint val3 = null; if (m_ropeLengths.Count > 0) { val3 = m_ropeLengths[m_ropeLengths.Count - 1].GetComponent(); } FVRHandGrabPoint component = val2.GetComponent(); m_ropeLengths.Add(val2); if ((Object)(object)val3 != (Object)null && (Object)(object)component != (Object)null) { val3.ConnectedGrabPoint_Base = component; component.ConnectedGrabPoint_End = val3; } currentRopePoint = RopePoint.position; finalRopePoints.Add(currentRopePoint); FakeRopeLength.SetActive(false); } } } public class AddScope : MonoBehaviour { public Camera cam; public Shader shad; public MeshRenderer mr1; public int reticlesizeX = 1024; public int reticlesizeY = 1024; private void Start() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown RenderTexture val = new RenderTexture(reticlesizeX, reticlesizeY, 16, (RenderTextureFormat)0); val.Create(); cam.targetTexture = val; Material val2 = new Material(shad); val2.SetTexture("_ReticleTex", (Texture)(object)val); val2.SetTexture("_ZoomTex", (Texture)(object)val); val2.SetFloat("_ReticleDistance", 0f); val2.SetFloat("_VignetteSmoothness", 0f); val2.SetFloat("_VignetteRadius", 0f); ((Renderer)mr1).material = val2; } } public class CornerShot : MonoBehaviour { public Handgun gun; public FVRFireArm main; public FVRAlternateGrip grip; public GameObject griprot; public GameObject handrot; public GameObject frontrot; public GameObject frontrotgeo; public GameObject rottarget; public GameObject triggerpost; public AR15HandleSightFlipper powerknob; public GameObject fixpos; public Collider col; public GameObject trigger; public bool triggerreset = true; public float duration = 1.5f; public Camera cam; public AR15HandleSightRaiser zoompiece; private float elapsedTime = 0f; public bool buttonpressed = false; private void OnTriggerEnter(Collider other) { if (!powerknob.m_isLargeAperture && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { gun = ((Component)other).gameObject.GetComponent(); } } 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 OnShotFired(FVRFireArm firearm) { if ((Object)(object)gun != (Object)null && (Object)(object)firearm == (Object)(object)gun) { main.Recoil(false, true, true, (FVRFireArmRecoilProfile)null, 1f); } } private void Update() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0224: 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_023a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: 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_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_0a67: Unknown result type (might be due to invalid IL or missing references) //IL_0a8b: Unknown result type (might be due to invalid IL or missing references) //IL_0aaf: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Invalid comparison between Unknown and I4 //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Invalid comparison between Unknown and I4 //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_08f1: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Invalid comparison between Unknown and I4 //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) cam.fieldOfView = 70f - 60f * ((Component)zoompiece.SightPiece).transform.localPosition.y; if (powerknob.m_isLargeAperture) { if ((Object)(object)gun != (Object)null) { ((Component)gun).gameObject.GetComponent().isKinematic = false; ((FVRInteractiveObject)gun).SetAllCollidersToLayer(false, "Default"); ((Component)gun).gameObject.GetComponent().enabled = true; gun = null; } col.enabled = false; } else if (!powerknob.m_isLargeAperture) { if ((Object)(object)gun != (Object)null) { ((Component)gun).gameObject.GetComponent().isKinematic = true; ((FVRInteractiveObject)gun).SetAllCollidersToLayer(false, "Interactable"); ((Component)gun).gameObject.GetComponent().enabled = false; if ((Object)(object)((FVRFireArm)gun).Magazine != (Object)null) { ((FVRInteractiveObject)((FVRFireArm)gun).Magazine).SetAllCollidersToLayer(false, "Interactable"); } col.enabled = false; ((Component)gun).gameObject.transform.position = fixpos.transform.position; ((Component)gun).gameObject.transform.rotation = fixpos.transform.rotation; } else if ((Object)(object)gun == (Object)null) { col.enabled = true; } } elapsedTime += Time.deltaTime; float num = Mathf.Clamp01(elapsedTime / duration); AxisLookAt(frontrot.transform, rottarget.transform.position, Vector3.forward); frontrotgeo.gameObject.transform.localRotation = Quaternion.Slerp(frontrotgeo.gameObject.transform.localRotation, frontrot.transform.localRotation, num); if (frontrot.transform.localEulerAngles.y > 90f && frontrot.transform.localEulerAngles.y < 180f) { frontrot.transform.localEulerAngles = new Vector3(0f, 90f, 0f); } if (frontrotgeo.transform.localEulerAngles.y > 90f && frontrotgeo.transform.localEulerAngles.y < 180f) { frontrotgeo.transform.localEulerAngles = new Vector3(0f, 90f, 0f); } if (frontrot.transform.localEulerAngles.y < 360f && frontrot.transform.localEulerAngles.y > 180f) { frontrot.transform.localEulerAngles = new Vector3(0f, 360f, 0f); } if (frontrotgeo.transform.localEulerAngles.y < 360f && frontrotgeo.transform.localEulerAngles.y > 180f) { frontrotgeo.transform.localEulerAngles = new Vector3(0f, 360f, 0f); } if (((FVRInteractiveObject)main).m_isHeld) { trigger.transform.localEulerAngles = new Vector3(15f * ((FVRInteractiveObject)main).m_hand.Input.TriggerFloat, 0f, 0f); triggerpost.transform.localPosition = new Vector3(0f, 0.005f * ((FVRInteractiveObject)main).m_hand.Input.TriggerFloat, 0f); if ((Object)(object)gun != (Object)null) { if (((int)gun.FireSelectorModes[gun.FireSelectorModeIndex].ModeType == 2 || (int)gun.FireSelectorModes[gun.FireSelectorModeIndex].ModeType == 4) && gun.HasTriggerReset && gun.m_triggerFloat > 0.75f && !gun.IsSafetyEngaged) { gun.Fire(); } if ((int)gun.FireSelectorModes[gun.FireSelectorModeIndex].ModeType == 1) { if (gun.HasTriggerReset && gun.m_triggerFloat > 0.75f && triggerreset && !gun.IsSafetyEngaged) { gun.Fire(); triggerreset = false; } if (gun.m_triggerFloat <= 0.25f) { triggerreset = true; } } if (((FVRInteractiveObject)main).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)main).m_hand.Input.AXButtonPressed && (Object)(object)((FVRFireArm)gun).Magazine != (Object)null && !((FVRFireArm)gun).Magazine.IsIntegrated) { ((FVRInteractiveObject)((FVRFireArm)gun).Magazine).SetAllCollidersToLayer(false, "Default"); gun.ReleaseMag(); } if (!((FVRInteractiveObject)main).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)main).m_hand.Input.TouchpadAxes.y < -0.9f && (Object)(object)((FVRFireArm)gun).Magazine != (Object)null && !((FVRFireArm)gun).Magazine.IsIntegrated) { ((FVRInteractiveObject)((FVRFireArm)gun).Magazine).SetAllCollidersToLayer(false, "Default"); gun.ReleaseMag(); } if (((FVRInteractiveObject)main).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)main).m_hand.Input.BYButtonPressed && !buttonpressed) { if (gun.HasSafety && !gun.HasFireSelector) { gun.ToggleSafety(); } if (gun.HasFireSelector) { gun.CycleFireSelector(); } buttonpressed = true; } if (((FVRInteractiveObject)main).m_hand.IsInStreamlinedMode && !((FVRInteractiveObject)main).m_hand.Input.BYButtonPressed) { buttonpressed = false; } if (!((FVRInteractiveObject)main).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)main).m_hand.Input.TouchpadAxes.y > 0.9f && !buttonpressed) { if (gun.HasSafety && !gun.HasFireSelector) { gun.ToggleSafety(); } if (gun.HasFireSelector) { gun.CycleFireSelector(); } buttonpressed = true; } if (!((FVRInteractiveObject)main).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)main).m_hand.Input.TouchpadAxes.y <= 0.9f) { buttonpressed = false; } gun.m_triggerFloat = ((FVRInteractiveObject)main).m_hand.Input.TriggerFloat; } if (((FVRInteractiveObject)grip).m_isHeld) { if (((FVRInteractiveObject)grip).m_hand.Input.TriggerFloat > 0.75f) { griprot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); handrot.transform.rotation = ((Component)((FVRInteractiveObject)grip).m_hand).gameObject.transform.rotation; } else if (((FVRInteractiveObject)grip).m_hand.Input.TriggerFloat <= 0.75f) { if (((FVRInteractiveObject)grip).m_hand.Input.BYButtonPressed && ((FVRInteractiveObject)grip).m_hand.IsInStreamlinedMode) { handrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (((FVRInteractiveObject)grip).m_hand.Input.TouchpadAxes.y >= 0.9f && !((FVRInteractiveObject)grip).m_hand.IsInStreamlinedMode) { handrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } griprot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else if (!((FVRInteractiveObject)grip).m_isHeld) { griprot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else if (!((FVRInteractiveObject)main).IsHeld) { trigger.transform.localEulerAngles = new Vector3(0f, 0f, 0f); triggerpost.transform.localPosition = new Vector3(0f, 0f, 0f); griprot.transform.localEulerAngles = new Vector3(0f, 0f, 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, 0f); } private void OnDestroy() { //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 Lookat : MonoBehaviour { public GameObject mark; public Transform nearestAI; public SosigLink[] currentAI = null; public GameObject lookAtObj; public LAPD2019Laser laser; public float distanceNearest = 0f; public Transform player; private Vector3 velocity; private void Update() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 1000f) { laser.TurnOff(); mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)nearestAI != (Object)null) { laser.TurnOn(); mark.SetActive(true); mark.transform.position = Vector3.SmoothDamp(mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.1f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); } currentAI = Object.FindObjectsOfType(); AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI != null) { nearestAI = GetNearestGameObject(player, currentAI); } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } public Transform GetNearestGameObject(Transform player, SosigLink[] objects) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Length > 0) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Length; i++) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).transform; } } } return val; } } public class Lookat2 : MonoBehaviour { public GameObject mark; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public LAPD2019Laser laser; public float distanceNearest = 0f; public Transform player; private Vector3 velocity; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void Update() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 2500f) { laser.TurnOff(); mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)nearestAI != (Object)null) { laser.TurnOn(); mark.SetActive(true); mark.transform.position = Vector3.SmoothDamp(mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.1f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI == null) { return; } for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null) { currentAI.Remove(currentAI[i]); } } nearestAI = GetNearestGameObject(player, currentAI); } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } public Transform GetNearestGameObject(Transform player, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; i++) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).transform; } } } return val; } } } public class QBslotSpawn : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class QBslotToPlayer : MonoBehaviour { public FVRQuickBeltSlot slot1; private void Start() { } private void Update() { if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { if (GM.CurrentPlayerBody.QBSlots_Added.Contains(slot1)) { GM.CurrentPlayerBody.QBSlots_Added.Remove(slot1); } if (!GM.CurrentPlayerBody.QBSlots_Internal.Contains(slot1)) { GM.CurrentPlayerBody.QBSlots_Internal.Add(slot1); Debug.Log((object)"slotadded"); } } } private void OnDestroy() { if (GM.CurrentPlayerBody.QBSlots_Internal.Contains(slot1)) { GM.CurrentPlayerBody.QBSlots_Internal.Remove(slot1); } } } public class Slotarea : MonoBehaviour { public GameObject parent; private void OnTriggerStay(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if (!((Object)(object)component != (Object)null) || !((Object)(object)gameObject != (Object)(object)parent) || (int)component.QBSlotType != 0 || ((FVRInteractiveObject)component).m_isHeld || !((Object)(object)component.m_quickbeltSlot == (Object)null)) { return; } float num = Vector3.Distance(((Component)component).transform.position, ((Component)GM.CurrentPlayerBody.LeftHand).transform.position); float num2 = Vector3.Distance(((Component)component).transform.position, ((Component)GM.CurrentPlayerBody.RightHand).transform.position); if (num < 0.25f || num2 < 0.25f) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = false; component2.isKinematic = true; } } } private void OnTriggerExit(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && (int)component.QBSlotType == 0 && ((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = true; component2.isKinematic = false; } } } } public class Slotarea1 : MonoBehaviour { public GameObject parent; private void OnTriggerStay(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && (int)component.QBSlotType == 0 && !((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = false; component2.isKinematic = true; } } } private void OnTriggerExit(Collider other) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)other).gameObject; FVRPhysicalObject component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)gameObject != (Object)(object)parent && (int)component.QBSlotType == 0 && ((FVRInteractiveObject)component).m_isHeld && (Object)(object)component.m_quickbeltSlot == (Object)null) { Rigidbody component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { gameObject.transform.SetParent(parent.transform); component2.useGravity = true; component2.isKinematic = false; } } } } } public class Rotate : MonoBehaviour { public bool Up = false; public bool Forward = true; public bool Right = false; public float Speed = 0.025f; private void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (Up) { ((Component)this).transform.Rotate(Vector3.up, Speed); } if (Forward) { ((Component)this).transform.Rotate(Vector3.forward, Speed); } if (Right) { ((Component)this).transform.Rotate(Vector3.right, Speed); } } } namespace JerryComponent { public class DiceD20 : MonoBehaviour { public List Points; public GameObject Down; public GameObject PointBase; public int num = 0; public bool stay = true; public bool counted = false; public Vector3 curpos; public Vector3 lastpos; public float speed = 0f; private void Start() { } private void Update() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_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_005f: 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_00d3: Unknown result type (might be due to invalid IL or missing references) curpos = ((Component)this).gameObject.transform.position; speed = Vector3.Magnitude(curpos - lastpos) / Time.deltaTime; lastpos = curpos; Down.transform.eulerAngles = new Vector3(0f, 0f, 0f); if (speed > 0.1f) { num = 0; stay = false; } else { if (!(speed < 0.1f) || stay) { return; } for (int i = 0; i < Points.Count; i++) { if (Vector3.Distance(PointBase.transform.position, Points[i].transform.position) <= 0.0035f) { num = i + 1; stay = true; } } } } } public class DiceTower : MonoBehaviour { public AR15HandleSightFlipper nextNum; public AR15HandleSightFlipper prewNum; public AR15HandleSightFlipper clearbutt; public AudioEvent click; public GameObject fuzesound; public GameObject explode; public bool GoKaboom = false; public float fuze = 2.5f; public int score = 0; public int setNum = 1; public List Dices; public float setcd = 2.5f; public float cd = 2.5f; public bool hasNewDice = false; public Text curScore; public Text tarScore; public Transform plate; public void OnTriggerEnter(Collider other) { if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { Dices.Add(((Component)other).gameObject.GetComponent()); hasNewDice = true; cd = setcd; } } private void NumUp() { if (setNum < 100) { setNum++; } } private void NumDn() { if (setNum > 1) { setNum--; } } private void ClearNum() { score = 0; } private void Update() { //IL_0025: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) if (!nextNum.m_isLargeAperture) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); NumUp(); nextNum.m_isLargeAperture = true; } if (!prewNum.m_isLargeAperture) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); NumDn(); prewNum.m_isLargeAperture = true; } if (!clearbutt.m_isLargeAperture) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); ClearNum(); clearbutt.m_isLargeAperture = true; } tarScore.text = setNum.ToString(); curScore.text = score.ToString(); if (hasNewDice) { cd -= Time.deltaTime; if (cd < 0f) { hasNewDice = false; cd = 0f; } } if (!hasNewDice && Dices.Count > 0) { foreach (DiceD20 dix in Dices) { if (dix.stay && !dix.counted) { score += dix.num; dix.counted = true; } } } if (Dices.Count > 0) { for (int i = 0; i < Dices.Count; i++) { if (Vector3.Distance(((Component)Dices[i]).gameObject.transform.position, plate.position) > 0.15f && Dices.Contains(Dices[i])) { Dices[i].counted = false; Dices.RemoveAt(i); } } } if (score >= setNum) { GoKaboom = true; } else if (score < setNum) { GoKaboom = false; } if (GoKaboom) { fuzesound.SetActive(true); fuze -= Time.deltaTime; if (fuze < 0f) { Object.Instantiate(explode, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); GoKaboom = false; fuze = 2.5f; score = 0; } } else if (!GoKaboom) { fuzesound.SetActive(false); } if (score > 100) { score = 100; } } } public class RandomLoot : MonoBehaviour { public bool big = false; public float countdown = 2f; public int type; public int amont; public Transform point; public GameObject rot; public int min = 0; public int max = 1; public float timer = 2f; public GameObject audiolooting; public bool isalreadylooted = false; public bool isinrange = false; private void Start() { if (!big) { type = Random.Range(1, 5); } else if (big) { type = Random.Range(1, 7); } if (type == 1) { amont = Random.Range(0, 5); } if (type == 2) { amont = Random.Range(0, 5); } if (type == 3) { amont = Random.Range(0, 2); } if (type == 4) { amont = Random.Range(0, 2); } if (type == 5) { amont = Random.Range(0, 5); } if (type == 6) { amont = Random.Range(0, 30); } if (type == 7) { amont = Random.Range(0, 3); } } private void Update() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_0790: Expected O, but got Unknown //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0aa5: Unknown result type (might be due to invalid IL or missing references) //IL_0aac: Expected O, but got Unknown //IL_0dc0: Unknown result type (might be due to invalid IL or missing references) //IL_0dfd: Unknown result type (might be due to invalid IL or missing references) //IL_0e04: Expected O, but got Unknown //IL_0e69: Unknown result type (might be due to invalid IL or missing references) //IL_0ea6: Unknown result type (might be due to invalid IL or missing references) //IL_0ead: Expected O, but got Unknown //IL_0f58: 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).transform.position, ((Component)this).gameObject.transform.position) <= 1f || Vector3.Distance(((Component)GM.CurrentPlayerBody.RightHand).transform.position, ((Component)this).gameObject.transform.position) <= 1f) { isinrange = true; } else if (Vector3.Distance(((Component)GM.CurrentPlayerBody.LeftHand).transform.position, ((Component)this).gameObject.transform.position) > 1f && Vector3.Distance(((Component)GM.CurrentPlayerBody.RightHand).transform.position, ((Component)this).gameObject.transform.position) > 1f) { isinrange = false; } } if (countdown > 0f) { countdown -= Time.deltaTime; } else if (countdown <= 0f) { countdown = 0f; } if (!(rot.transform.localEulerAngles.x >= 45f)) { return; } if (countdown > 0f) { isalreadylooted = true; } if (isalreadylooted) { return; } if (!isinrange) { audiolooting.SetActive(false); timer = 2f; } else { if (!isinrange) { return; } if (amont > 0) { audiolooting.SetActive(true); timer -= Time.deltaTime; if (timer < 0f) { if (type == 1) { ItemSpawnerV2 val = new ItemSpawnerV2(); ItemSpawnerID[] array = (ItemSpawnerID[])(object)new ItemSpawnerID[3]; array[0] = IM.GetSpawnerID("EFT BeefCan"); array[1] = IM.GetSpawnerID("EFT MRE"); array[2] = IM.GetSpawnerID("EFT Kolbasa"); array[3] = IM.GetSpawnerID("EFT WatterBottle"); array[4] = IM.GetSpawnerID("EFT JuiceBox Green"); array[5] = IM.GetSpawnerID("EFT JuiceBox Red"); array[6] = IM.GetSpawnerID("EFT JuiceBox Yellow"); AnvilManager.Run(val.SpawnItemsToRayPoint(array[Random.Range(0, 7)], ((Component)point).transform.position)); Object.Destroy((Object)(object)val); amont--; timer = 2f; } if (type == 2) { ItemSpawnerV2 val2 = new ItemSpawnerV2(); ItemSpawnerID[] array2 = (ItemSpawnerID[])(object)new ItemSpawnerID[3]; array2[0] = IM.GetSpawnerID("Med_Analgin"); array2[1] = IM.GetSpawnerID("Med_Bandage"); array2[2] = IM.GetSpawnerID("Med_CAT"); array2[3] = IM.GetSpawnerID("Med_CMSK"); array2[4] = IM.GetSpawnerID("Med_GoldenStar"); array2[5] = IM.GetSpawnerID("Med_Propital"); array2[6] = IM.GetSpawnerID("AI2 Medkit"); AnvilManager.Run(val2.SpawnItemsToRayPoint(array2[Random.Range(0, 7)], ((Component)point).transform.position)); Object.Destroy((Object)(object)val2); amont--; timer = 2f; } if (type == 6) { ItemSpawnerV2 val3 = new ItemSpawnerV2(); ItemSpawnerID[] array3 = (ItemSpawnerID[])(object)new ItemSpawnerID[3]; array3[0] = IM.GetSpawnerID("MagazineAK12"); array3[1] = IM.GetSpawnerID("AKS74U"); array3[2] = IM.GetSpawnerID("AKM"); array3[3] = IM.GetSpawnerID("MagazineStanagUSGI30rnd"); array3[4] = IM.GetSpawnerID("AKS74UTactical"); array3[5] = IM.GetSpawnerID("RailAdapterRussianToPicatinny"); array3[6] = IM.GetSpawnerID("MagazineStanagUSGI10rnd"); array3[7] = IM.GetSpawnerID("MagazineAKMDrum"); array3[8] = IM.GetSpawnerID("MagazineDragonuv"); array3[9] = IM.GetSpawnerID("MagazineAKMTactical"); array3[10] = IM.GetSpawnerID("MagazineStanagUSGI25rnd"); array3[11] = IM.GetSpawnerID("AKForeShark"); array3[12] = IM.GetSpawnerID("MosinM1891"); array3[13] = IM.GetSpawnerID("H416"); array3[14] = IM.GetSpawnerID("762x54mmRStripperClip"); array3[15] = IM.GetSpawnerID("MagazineASVal20Rnd"); array3[16] = IM.GetSpawnerID("MagazineAKMTactical20rnd"); array3[17] = IM.GetSpawnerID("ASVAL"); array3[18] = IM.GetSpawnerID("MagazineAKS74U2"); array3[19] = IM.GetSpawnerID("Dragonuv"); array3[20] = IM.GetSpawnerID("MagazineAKM"); array3[21] = IM.GetSpawnerID("MagazineStanagUSGI5rnd"); array3[22] = IM.GetSpawnerID("MagazineStanagSM60rnd"); array3[23] = IM.GetSpawnerID("AK74N"); array3[24] = IM.GetSpawnerID("AKForeRomanian"); array3[25] = IM.GetSpawnerID("MagazineAKMTactical10rnd"); array3[26] = IM.GetSpawnerID("MagazineRPK"); array3[27] = IM.GetSpawnerID("Mosin91_30"); array3[28] = IM.GetSpawnerID("MagazineVSSVintorez10rnd"); array3[29] = IM.GetSpawnerID("SV98"); array3[30] = IM.GetSpawnerID("RPK"); array3[31] = IM.GetSpawnerID("MagazineAK74_20rnd"); array3[32] = IM.GetSpawnerID("MagazineSV98"); array3[33] = IM.GetSpawnerID("MagazineStanagPDDrum60rnd"); array3[34] = IM.GetSpawnerID("ScopeMosinPU"); array3[35] = IM.GetSpawnerID("MosinM38"); array3[36] = IM.GetSpawnerID("MagazineStanagUSGI30rndCustom"); array3[37] = IM.GetSpawnerID("FaTactical"); array3[38] = IM.GetSpawnerID("MagazineAK74N"); array3[39] = IM.GetSpawnerID("MagazineAKMHeirloom"); array3[40] = IM.GetSpawnerID("SR3M"); array3[41] = IM.GetSpawnerID("MagazineAK74Drum"); array3[42] = IM.GetSpawnerID("MagazineStanagUSGI20rnd"); array3[43] = IM.GetSpawnerID("AKMTactical"); array3[44] = IM.GetSpawnerID("Fal"); array3[45] = IM.GetSpawnerID("MagazineAKS74U"); array3[46] = IM.GetSpawnerID("MagazineAK74_10rnd"); array3[47] = IM.GetSpawnerID("Magazine_Stanag_PM_30rnd"); array3[48] = IM.GetSpawnerID("FalPara"); array3[49] = IM.GetSpawnerID("VSSVintorez"); array3[50] = IM.GetSpawnerID("MagazineFal20rnd"); array3[51] = IM.GetSpawnerID("M16"); array3[52] = IM.GetSpawnerID("M4A1Block2CQBR"); array3[53] = IM.GetSpawnerID("Mk18Mod0"); array3[54] = IM.GetSpawnerID("IZh18_12g"); array3[55] = IM.GetSpawnerID("KS23"); array3[56] = IM.GetSpawnerID("I37Classic"); array3[57] = IM.GetSpawnerID("M2ThreeGun"); array3[58] = IM.GetSpawnerID("Saiga12k"); array3[59] = IM.GetSpawnerID("MagazineSaiga12k20rnd"); array3[60] = IM.GetSpawnerID("MagazineSaiga12k12rnd"); array3[61] = IM.GetSpawnerID("Toz106"); array3[62] = IM.GetSpawnerID("MagazineToz106"); AnvilManager.Run(val3.SpawnItemsToRayPoint(array3[Random.Range(0, 63)], ((Component)point).transform.position)); Object.Destroy((Object)(object)val3); amont--; timer = 2f; } if (type == 7) { ItemSpawnerV2 val4 = new ItemSpawnerV2(); ItemSpawnerID[] array4 = (ItemSpawnerID[])(object)new ItemSpawnerID[3]; array4[0] = IM.GetSpawnerID("FTW.TankHelmet.helmet"); array4[1] = IM.GetSpawnerID("FTW.EXFILShieldB.helmet"); array4[2] = IM.GetSpawnerID("FTW.FASTAirsoft.helmetTan"); array4[3] = IM.GetSpawnerID("FTW.FastShield.attachment"); array4[4] = IM.GetSpawnerID("FTW.FastPic.attachment"); array4[5] = IM.GetSpawnerID("FTW.HeavyTrooper.attachment"); array4[6] = IM.GetSpawnerID("FTW.RysT.helmet"); array4[7] = IM.GetSpawnerID("FTW.RysTMask.helmet"); array4[8] = IM.GetSpawnerID("FTW.helmet.LSHZMask"); array4[9] = IM.GetSpawnerID("FTW.FastEars.attachment"); array4[10] = IM.GetSpawnerID("FTW.TC800.helmet"); array4[11] = IM.GetSpawnerID("FTW.Helmet.Jason"); array4[12] = IM.GetSpawnerID("ftw.altynmask.helmet"); array4[13] = IM.GetSpawnerID("FTW.EXFILShieldT.helmet"); array4[14] = IM.GetSpawnerID("FTW.SLAPPPlate.attachement"); array4[15] = IM.GetSpawnerID("FTW.FastVisor.attachment"); array4[16] = IM.GetSpawnerID("FTW.HeavyTrooper.attachmentB"); array4[17] = IM.GetSpawnerID("FTW.Caiman.helmet"); array4[18] = IM.GetSpawnerID("FTW.FAST.helmet"); array4[19] = IM.GetSpawnerID("FTW.EXFILt.helmet"); array4[20] = IM.GetSpawnerID("FTW.ZshShield.helmet"); array4[21] = IM.GetSpawnerID("FTW.HeavyTrooper.attachmentWolfe"); array4[22] = IM.GetSpawnerID("ftw.Airframe.helmet"); array4[23] = IM.GetSpawnerID("FTW.Kiver.helmet"); array4[24] = IM.GetSpawnerID("FTW.HeavyTrooper.attachmentT"); array4[25] = IM.GetSpawnerID("ftw.Bastion.helmet"); array4[26] = IM.GetSpawnerID("ftw.Bastionshield.helmet"); array4[27] = IM.GetSpawnerID("FTW.helmet.LSHZAventail"); array4[28] = IM.GetSpawnerID("FTW.FastEars.attachmentTan"); array4[29] = IM.GetSpawnerID("ftw.altyn.helmet"); array4[30] = IM.GetSpawnerID("FTW.EXFILEars.helmetB"); array4[31] = IM.GetSpawnerID("FTW.CaimanShield.helmet"); array4[32] = IM.GetSpawnerID("FTW.KiverShield.helmet"); array4[33] = IM.GetSpawnerID("FTW.FASTTan.helmet"); array4[34] = IM.GetSpawnerID("FTW.UNHelmet.helmet"); array4[35] = IM.GetSpawnerID("FTW.EXFILt.helmetTan"); array4[36] = IM.GetSpawnerID("FTW.FastMandible.attachment"); array4[37] = IM.GetSpawnerID("FTW.ZSH.helmet"); array4[38] = IM.GetSpawnerID("FTW.CaimanMandible.helmet"); array4[39] = IM.GetSpawnerID("FTW.CaimanFixedVisor.helmet"); array4[40] = IM.GetSpawnerID("FTW.Ushanka.helmet"); array4[41] = IM.GetSpawnerID("FTW.Helmet.Ronin"); array4[42] = IM.GetSpawnerID("FTW.EXFILEars.helmet"); array4[43] = IM.GetSpawnerID("ftw.Airframe.helmetEars"); array4[44] = IM.GetSpawnerID("FTW.HeavyTrooper.attachmentBT"); array4[45] = IM.GetSpawnerID("ftw.Airframe.helmetChops"); array4[46] = IM.GetSpawnerID("FTW.helmet.LSHZ"); AnvilManager.Run(val4.SpawnItemsToRayPoint(array4[Random.Range(0, 47)], ((Component)point).transform.position)); Object.Destroy((Object)(object)val4); amont--; timer = 2f; } if (type == 5) { ItemSpawnerV2 val5 = new ItemSpawnerV2(); ItemSpawnerID[] array5 = (ItemSpawnerID[])(object)new ItemSpawnerID[3]; array5[0] = IM.GetSpawnerID("TacticalFlashlight"); array5[1] = IM.GetSpawnerID("KlashLight"); array5[2] = IM.GetSpawnerID("CompactFlashlight2"); array5[3] = IM.GetSpawnerID("AKForeB10"); array5[4] = IM.GetSpawnerID("ForegripLarge"); array5[5] = IM.GetSpawnerID("ForegripLDAG"); array5[6] = IM.GetSpawnerID("ForegripMVG"); array5[7] = IM.GetSpawnerID("ForegripOffset"); array5[8] = IM.GetSpawnerID("ForegripRKO"); array5[9] = IM.GetSpawnerID("ForegripShift"); array5[10] = IM.GetSpawnerID("ForegripValk"); array5[11] = IM.GetSpawnerID("ForegripZG106"); array5[12] = IM.GetSpawnerID("HandstopKAG"); array5[13] = IM.GetSpawnerID("H416IronsFront"); array5[14] = IM.GetSpawnerID("H416IronsRear"); array5[15] = IM.GetSpawnerID("CantedSightsFront"); array5[16] = IM.GetSpawnerID("CantedSightsRear"); array5[17] = IM.GetSpawnerID("ANPEQ15"); array5[18] = IM.GetSpawnerID("TacticalLaser2"); array5[19] = IM.GetSpawnerID("Perst3Laser"); array5[20] = IM.GetSpawnerID("MuzzleBrakeCobra"); array5[21] = IM.GetSpawnerID("MuzzleBrakeCharon"); array5[22] = IM.GetSpawnerID("MuzzleBrakeOrbit"); array5[23] = IM.GetSpawnerID("MuzzleBrakeTruepoint"); array5[24] = IM.GetSpawnerID("RailRiserTall"); array5[25] = IM.GetSpawnerID("RailRiserShort"); array5[26] = IM.GetSpawnerID("RailRiserMed"); array5[27] = IM.GetSpawnerID("ReflexEG1"); array5[28] = IM.GetSpawnerID("ReflexOKP7OSA"); array5[29] = IM.GetSpawnerID("ReflexPK01VS"); array5[30] = IM.GetSpawnerID("ReflexPK120"); array5[31] = IM.GetSpawnerID("ReflexHolosightLong"); array5[32] = IM.GetSpawnerID("ReflexHolosightShort"); array5[33] = IM.GetSpawnerID("MagnifierPSO1"); array5[34] = IM.GetSpawnerID("T12Scope"); array5[35] = IM.GetSpawnerID("ScopeVRZ_6_36x56mmBronze"); array5[36] = IM.GetSpawnerID("ScopeVRZ_6_36x56mmBlack"); array5[37] = IM.GetSpawnerID("ScopeHAMComboScope4x24"); array5[38] = IM.GetSpawnerID("MagnifierGhostDRFDE"); array5[39] = IM.GetSpawnerID("MagnifierGhostDR"); array5[40] = IM.GetSpawnerID("ScopeEVU110x28mm"); array5[41] = IM.GetSpawnerID("ScopeAcog4x32"); array5[42] = IM.GetSpawnerID("ScopePVS30"); array5[43] = IM.GetSpawnerID("ScopePVS14"); array5[44] = IM.GetSpawnerID("SuppressorPBS4"); array5[45] = IM.GetSpawnerID("SuppressorPBS1"); array5[46] = IM.GetSpawnerID("SuppressorCorded"); array5[47] = IM.GetSpawnerID("SuppressorCordedTan"); array5[48] = IM.GetSpawnerID("SuppressorWrapped"); array5[49] = IM.GetSpawnerID("SuppressorSalvo"); array5[50] = IM.GetSpawnerID("AttachableBipodH"); AnvilManager.Run(val5.SpawnItemsToRayPoint(array5[Random.Range(0, 51)], ((Component)point).transform.position)); Object.Destroy((Object)(object)val5); amont--; timer = 2f; } if (type == 4) { ItemSpawnerV2 val6 = new ItemSpawnerV2(); ItemSpawnerID[] array6 = (ItemSpawnerID[])(object)new ItemSpawnerID[3]; array6[0] = IM.GetSpawnerID("PinnedGrenadeRG5"); array6[1] = IM.GetSpawnerID("PinnedGrenadeRGN"); array6[2] = IM.GetSpawnerID("PinnedGrenadeRGO"); array6[3] = IM.GetSpawnerID("PinnedGrenadeM67"); array6[4] = IM.GetSpawnerID("F-1 Russia (Remastered)"); AnvilManager.Run(val6.SpawnItemsToRayPoint(array6[Random.Range(0, 5)], ((Component)point).transform.position)); Object.Destroy((Object)(object)val6); amont--; timer = 2f; } if (type == 3) { ItemSpawnerV2 val7 = new ItemSpawnerV2(); ItemSpawnerID[] array7 = (ItemSpawnerID[])(object)new ItemSpawnerID[3]; array7[0] = IM.GetSpawnerID("545x39mmCartridgeAP"); array7[1] = IM.GetSpawnerID("556x45mmCartridgeAP"); array7[2] = IM.GetSpawnerID("762x54mmRCartridgeAP"); array7[3] = IM.GetSpawnerID("9x39mmCartridgeAP"); array7[4] = IM.GetSpawnerID("762x51mmCartridgeAP"); array7[5] = IM.GetSpawnerID("762x39mmCartridgeAP"); array7[6] = IM.GetSpawnerID("12GaugeShell00Buckshot"); array7[4] = IM.GetSpawnerID("23x75mmR_Buckshot"); array7[5] = IM.GetSpawnerID("23x75mmR_Flash"); array7[6] = IM.GetSpawnerID("12GaugeShellDragonsBreath"); AnvilManager.Run(val7.SpawnItemsToRayPoint(array7[Random.Range(0, 6)], ((Component)point).transform.position)); Object.Destroy((Object)(object)val7); amont--; timer = 2f; } } } else if (amont <= 0) { audiolooting.SetActive(false); } } } } public class BeefCan : MonoBehaviour { public float dry = 0f; public GameObject thisStuff; public float refill = 100f; public GameObject ringMani; public GameObject ring; public GameObject lidRing; public GameObject canLid; public GameObject beef; public AudioSource canEat; public AudioSource canOpen; public HungryAndThirsty hAt; public bool isEated = false; public bool isCanOpened = false; private void Start() { hAt = Object.FindObjectOfType(); } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) if (ring.transform.localEulerAngles.z >= 85f) { ringMani.SetActive(false); if (!isCanOpened) { canOpen.Play(); isCanOpened = true; } } if (canLid.transform.localEulerAngles.x < 60f) { lidRing.SetActive(true); } if (canLid.transform.localEulerAngles.x >= 60f) { lidRing.SetActive(false); } if (!(canLid.transform.localEulerAngles.x > 45f)) { return; } Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (!(Vector3.Distance(((Component)this).transform.position, val) <= 0.2f)) { return; } if (!isEated) { canEat.Play(); if ((Object)(object)hAt != (Object)null) { hAt.levelOfHungry += refill; hAt.levelOfThirsty -= dry; } if ((Object)(object)hAt == (Object)null) { } isEated = true; } if (isEated) { beef.SetActive(false); thisStuff.SetActive(false); } } } public class BeefCan2 : MonoBehaviour { public GameObject main; public GameObject spooncol; public Collider spoongrabcol; public FVRPhysicalObject spoonhold; public float dry = 0f; public GameObject thisStuff; public float refill = 100f; public GameObject ringMani; public GameObject ring; public GameObject lidRing; public GameObject canLid; public GameObject beef; public AudioSource canEat; public AudioSource canOpen; public HungryAndThirsty hAt; public bool isEated = false; public bool isCanOpened = false; public GameObject spoonholder; public GameObject spoon; public GameObject stewpiece; public GameObject spoontip; public GameObject stew1; public GameObject stew2; public GameObject stew3; public GameObject stew4; public float remain = 4f; public bool stewed = false; public Collider col; public Vector3 velsp = Vector3.zero; public Vector3 velsp2 = Vector3.zero; private void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) spoonholder.transform.localEulerAngles = new Vector3(0f, 0f, 0f); hAt = Object.FindObjectOfType(); stewpiece.SetActive(false); remain = 4f; col.enabled = true; spoongrabcol.enabled = true; } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "SpoonTip" && !stewed) { stewed = true; remain -= 1f; } } private void Update() { //IL_0038: 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_00cb: 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_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: 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_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_041c: 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_043a: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)spoonhold).m_hand != (Object)null) { spoon.transform.position = ((Component)((FVRInteractiveObject)spoonhold).m_hand).gameObject.transform.position; spoon.transform.eulerAngles = ((Component)((FVRInteractiveObject)spoonhold).m_hand).gameObject.transform.eulerAngles; spoontip.SetActive(true); } else if ((Object)(object)((FVRInteractiveObject)spoonhold).m_hand == (Object)null) { if (remain > 0f || stewed) { spoon.transform.localPosition = new Vector3(0f, 0f, 0f); spoon.transform.localEulerAngles = new Vector3(0f, 0f, 0f); spoontip.SetActive(false); } else if (remain <= 0f && !stewed) { spooncol.SetActive(false); spoongrabcol.enabled = false; spoonholder.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } if (stewed) { stewpiece.SetActive(true); } else if (!stewed) { stewpiece.SetActive(false); } if (remain <= 0f) { col.enabled = false; stew1.SetActive(false); stew2.SetActive(false); stew3.SetActive(false); stew4.SetActive(false); } else if (remain == 4f) { col.enabled = true; stew1.SetActive(true); stew2.SetActive(true); stew3.SetActive(true); stew4.SetActive(true); } else if (remain == 3f) { col.enabled = true; stew1.SetActive(false); stew2.SetActive(true); stew3.SetActive(true); stew4.SetActive(true); } else if (remain == 2f) { col.enabled = true; stew1.SetActive(false); stew2.SetActive(false); stew3.SetActive(true); stew4.SetActive(true); } else if (remain == 1f) { col.enabled = true; stew1.SetActive(false); stew2.SetActive(false); stew3.SetActive(false); stew4.SetActive(true); } if (ring.transform.localEulerAngles.z >= 85f) { ringMani.SetActive(false); if (!isCanOpened) { canOpen.Play(); isCanOpened = true; } } if (canLid.transform.localEulerAngles.x < 60f) { lidRing.SetActive(true); } else if (canLid.transform.localEulerAngles.x >= 60f) { lidRing.SetActive(false); } if (!(canLid.transform.localEulerAngles.x > 45f)) { return; } Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (remain > 0f) { spoonholder.transform.localEulerAngles = new Vector3(45f, 0f, 0f); } if (Vector3.Distance(spoontip.transform.position, val) <= 0.2f) { if (!isEated && stewed) { canEat.Play(); if ((Object)(object)hAt != (Object)null) { hAt.levelOfHungry += refill; hAt.levelOfThirsty -= dry; } else if (!((Object)(object)hAt == (Object)null)) { } isEated = true; stewed = false; } if (!isEated) { } } else if (Vector3.Distance(spoontip.transform.position, val) > 0.2f && isEated && !stewed) { isEated = false; } } } public class BottleCap : MuzzleDeviceInterface { [NonSerialized] public Suppressor tempSup; [NonSerialized] public Vector3 lastHandForward = Vector3.zero; [NonSerialized] public Vector3 lastMountForward = Vector3.zero; public override void Awake() { ((FVRFireArmAttachmentInterface)this).Awake(); ref Suppressor reference = ref tempSup; FVRFireArmAttachment attachment = ((FVRFireArmAttachmentInterface)this).Attachment; reference = (Suppressor)(object)((attachment is Suppressor) ? attachment : null); } public override void OnAttach() { ref Suppressor reference = ref tempSup; FVRFireArmAttachment attachment = ((FVRFireArmAttachmentInterface)this).Attachment; reference = (Suppressor)(object)((attachment is Suppressor) ? attachment : null); AttachableFirearm val = null; if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.AmIOnAnAttachableFirearm(ref val)) { val.RegisterSuppressor(tempSup); } else if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent is FVRFireArm) { FVRPhysicalObject parent = ((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent; FVRFireArm val2 = (FVRFireArm)(object)((parent is FVRFireArm) ? parent : null); val2.RegisterSuppressor(tempSup); } ((MuzzleDeviceInterface)this).OnAttach(); } public override void OnDetach() { AttachableFirearm val = null; if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.AmIOnAnAttachableFirearm(ref val)) { val.RegisterSuppressor((Suppressor)null); } else if (((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent != null) { FVRPhysicalObject parent = ((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent; } ((MuzzleDeviceInterface)this).OnDetach(); } public override void BeginInteraction(FVRViveHand hand) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).BeginInteraction(hand); lastHandForward = ((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Up; lastMountForward = ((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount).transform.up; } public override void UpdateInteraction(FVRViveHand hand) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) ((FVRFireArmAttachmentInterface)this).UpdateInteraction(hand); if (((FVRInteractiveObject)this).IsHeld) { ((Component)((FVRFireArmAttachmentInterface)this).Attachment).transform.localEulerAngles = new Vector3(0f, 0f, tempSup.CatchRot); } if (tempSup.CatchRot > 5f) { ((FVRFireArmAttachmentInterface)this).IsLocked = true; return; } ((FVRFireArmAttachmentInterface)this).IsLocked = false; Vector3 closestValidPoint = ((FVRInteractiveObject)this).GetClosestValidPoint(((FVRFireArmAttachmentInterface)this).Attachment.curMount.Point_Front.position, ((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().MyObject).transform.position, ((Component)this).transform.position); if (Vector3.Distance(((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Pos, closestValidPoint) > 0.08f) { ((FVRInteractiveObject)this).EndInteraction(hand); hand.ForceSetInteractable((FVRInteractiveObject)(object)((FVRFireArmAttachmentInterface)this).Attachment); ((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment).BeginInteraction(hand); } } public override void FVRFixedUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)this).IsHeld) { float catchRot = tempSup.CatchRot; Vector3 val = Vector3.ProjectOnPlane(((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Up, ((Component)this).transform.forward); Vector3 val2 = Vector3.ProjectOnPlane(lastHandForward, ((Component)this).transform.forward); float num = Mathf.Atan2(Vector3.Dot(((Component)this).transform.forward, Vector3.Cross(val, val2)), Vector3.Dot(val, val2)) * 57.29578f; Suppressor obj = tempSup; obj.CatchRot -= num; Vector3 val3 = Vector3.ProjectOnPlane(((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount).transform.up, ((Component)this).transform.forward); Vector3 val4 = Vector3.ProjectOnPlane(lastMountForward, ((Component)this).transform.forward); num = Mathf.Atan2(Vector3.Dot(((Component)this).transform.forward, Vector3.Cross(val3, val4)), Vector3.Dot(val3, val4)) * 57.29578f; Suppressor obj2 = tempSup; obj2.CatchRot += num; tempSup.CatchRot = Mathf.Clamp(tempSup.CatchRot, 0f, 360f); tempSup.CatchRotDeltaAdd(Mathf.Abs(tempSup.CatchRot - catchRot)); lastHandForward = ((HandInput)(ref ((FVRInteractiveObject)this).m_hand.Input)).Up; lastMountForward = ((Component)((FVRFireArmAttachmentInterface)this).Attachment.curMount).transform.up; } ((FVRInteractiveObject)this).FVRFixedUpdate(); } } public class HungryAndThirsty : MonoBehaviour { public GameObject textsRot; public TextMesh textH; public TextMesh textT; public float levelOfThirsty = 100f; public float levelOfHungry = 100f; public bool isHealed = false; public float valueDropRate = 0.005f; public float valueDropRate1 = 0.005f; public float valueDropRate2 = 0.001f; public PowerupType put; public PowerUpIntensity pui; public PowerUpDuration pud; public PowerupType put2; public PowerUpIntensity pui2; public PowerUpDuration pud2; public PowerupType put3; public PowerUpIntensity pui3; public PowerUpDuration pud3; public FVRPlayerBody pb; public GameObject hungryStomach; public GameObject heartBeat; private void OnPlayerHit(float percentOfLife) { levelOfHungry -= Random.Range(1, 5); levelOfThirsty -= Random.Range(1, 5); } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.PlayerTookDamageEvent += new PlayerTookDamage(OnPlayerHit); } private void Start() { } public void PowerUp(FVRPlayerBody fVRPlayerBody) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) GM.CurrentSceneSettings.OnPowerupUse(put); GM.CurrentPlayerBody.ActivatePower(put, pui, pud, false, false, -1f); GM.CurrentPlayerBody.ActivatePower(put2, pui2, pud2, false, false, -1f); GM.CurrentPlayerBody.ActivatePower(put3, pui3, pud3, false, false, -1f); } private void Update() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_0099: 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) pb = GM.CurrentPlayerBody; textH.text = "H:" + (int)levelOfHungry; textT.text = "T:" + (int)levelOfThirsty; Vector3 position = ((Component)GM.CurrentPlayerBody.LeftHand).transform.position; if (Vector3.Distance(((Component)this).transform.position, position) <= 0.15f) { textsRot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else if (Vector3.Distance(((Component)this).transform.position, position) > 0.15f) { textsRot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)pb != (Object)null) { if (pb.Health <= 0f) { pb.KillPlayer(true); levelOfHungry = 100f; levelOfThirsty = 100f; } if (GM.CurrentSceneSettings.DoesDamageGetRegistered) { levelOfHungry -= valueDropRate; levelOfThirsty -= valueDropRate; } else if (!GM.CurrentSceneSettings.DoesDamageGetRegistered) { levelOfHungry = 100f; levelOfThirsty = 100f; } if (levelOfThirsty > 100f) { levelOfThirsty = 100f; } else if (levelOfThirsty < 0f) { levelOfThirsty = 0f; } if (levelOfHungry > 100f) { levelOfHungry = 100f; } else if (levelOfHungry < 0f) { levelOfHungry = 0f; } if ((levelOfThirsty >= 90f) & (levelOfHungry >= 90f)) { hungryStomach.SetActive(false); heartBeat.SetActive(false); valueDropRate = valueDropRate1; if (!isHealed) { PowerUp(pb); isHealed = true; } } if (levelOfHungry < 90f || levelOfThirsty < 90f) { valueDropRate = valueDropRate2; isHealed = false; } if (levelOfHungry < 10f) { hungryStomach.SetActive(true); isHealed = false; } if (levelOfThirsty < 10f) { heartBeat.SetActive(true); isHealed = false; } if (levelOfThirsty <= 0f) { valueDropRate = valueDropRate2; pb.Health -= 0.1f; heartBeat.SetActive(true); isHealed = false; } if (levelOfHungry <= 0f) { valueDropRate = valueDropRate2; pb.Health -= 0.1f; hungryStomach.SetActive(true); isHealed = false; } if (levelOfHungry > 0f) { hungryStomach.SetActive(false); } if (levelOfThirsty > 0f) { heartBeat.SetActive(false); } if (levelOfHungry > 10f) { hungryStomach.SetActive(false); } if (levelOfThirsty > 10f) { heartBeat.SetActive(false); } } else if (!((Object)(object)pb == (Object)null)) { } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.PlayerTookDamageEvent -= new PlayerTookDamage(OnPlayerHit); } } public class Kolbasa : MonoBehaviour { public Transform bite1; public Transform bite2; public float dry = 5f; public CapsuleCollider col; public float refill = 20f; public GameObject kolbasa1; public GameObject kolbasa2; public GameObject kolbasa3; public AudioSource canEat; public HungryAndThirsty hAt; public bool isEated = false; public float eattime = 2f; private void Start() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) col.height = 0.4f; col.center = new Vector3(0f, 0f, 0.15f); hAt = Object.FindObjectOfType(); kolbasa1.SetActive(true); kolbasa2.SetActive(false); kolbasa3.SetActive(false); } private void Update() { //IL_0010: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_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_0311: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (eattime == 2f) { col.height = 0.4f; col.center = new Vector3(0f, 0f, 0.15f); kolbasa1.SetActive(true); kolbasa2.SetActive(false); kolbasa3.SetActive(false); if (Vector3.Distance(bite1.position, val) >= 0.4f) { isEated = false; } else if (Vector3.Distance(bite1.position, val) <= 0.2f && !isEated && eattime > 0f) { canEat.Play(); if ((Object)(object)hAt != (Object)null) { hAt.levelOfHungry += refill; hAt.levelOfThirsty -= dry; } if ((Object)(object)hAt == (Object)null) { } isEated = true; eattime -= 1f; } } else if (eattime == 1f) { col.height = 0.25f; col.center = new Vector3(0f, 0f, 0.1f); kolbasa1.SetActive(false); kolbasa2.SetActive(true); kolbasa3.SetActive(false); if (Vector3.Distance(bite2.position, val) >= 0.4f) { isEated = false; } else if (Vector3.Distance(bite2.position, val) <= 0.2f && !isEated && eattime > 0f) { canEat.Play(); if ((Object)(object)hAt != (Object)null) { hAt.levelOfHungry += refill; hAt.levelOfThirsty -= dry; } if ((Object)(object)hAt == (Object)null) { } isEated = true; eattime -= 1f; } } else if (eattime <= 0f) { col.height = 0.15f; col.center = new Vector3(0f, 0f, 0.05f); kolbasa1.SetActive(false); kolbasa2.SetActive(false); kolbasa3.SetActive(true); } } } public class WaterBottle : MonoBehaviour { public LiquidVolumeAnimator LVA; public FVRPhysicalObject mainobj; public GameObject thisStuff; public ParticleSystem psWater; public HungryAndThirsty hAt; public Transform bottleMuzzle; public FVRPhysicalObject thisOBJ; public GameObject dis; public Rigidbody watterBottle; public float lquidLeft = 100f; public AudioEvent audEvent_Shake; public GameObject audioPour; public GameObject audioDrink; public bool isShaked = false; public GameObject weightInWater; private void Start() { hAt = Object.FindObjectOfType(); } private void Update() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) LVA.level = 0.009f * lquidLeft; if (weightInWater.transform.localPosition.z < 0.08f) { isShaked = false; } else if (weightInWater.transform.localPosition.z > 0.08f) { if (!isShaked) { if (lquidLeft > 0f) { if ((Object)(object)((FVRInteractiveObject)mainobj).m_hand != (Object)null) { SM.PlayCoreSound((FVRPooledAudioType)10, audEvent_Shake, ((Component)this).transform.position); } } else if (!(lquidLeft <= 0f)) { } isShaked = true; } else if (!isShaked) { } } if (!dis.activeInHierarchy) { psWater.Stop(); audioPour.SetActive(false); audioDrink.SetActive(false); } if (!dis.activeInHierarchy) { return; } Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (weightInWater.transform.localPosition.z < 0.05f) { psWater.Stop(); audioPour.SetActive(false); audioDrink.SetActive(false); } else { if (!(weightInWater.transform.localPosition.z >= 0.05f)) { return; } if (Vector3.Distance(bottleMuzzle.position, val) <= 0.25f) { if (lquidLeft > 0f) { lquidLeft -= 0.5f; audioDrink.SetActive(true); if ((Object)(object)hAt != (Object)null) { hAt.levelOfThirsty += 1f; } else if (!((Object)(object)hAt == (Object)null)) { } } else if (lquidLeft <= 0f) { audioDrink.SetActive(false); ((Component)LVA).gameObject.SetActive(false); thisStuff.SetActive(false); } } else if (Vector3.Distance(bottleMuzzle.position, val) > 0.25f) { if (lquidLeft > 0f) { lquidLeft -= 1f; psWater.Play(); audioPour.SetActive(true); } else if (lquidLeft <= 0f) { psWater.Stop(); audioPour.SetActive(false); ((Component)LVA).gameObject.SetActive(false); thisStuff.SetActive(false); } } } } } public class deleterig : MonoBehaviour { public GameObject rig1; public GameObject rig2; public GameObject rig3; public GameObject rig4; private void Start() { } private void Update() { } private void OnDestroy() { Object.Destroy((Object)(object)rig1); Object.Destroy((Object)(object)rig2); Object.Destroy((Object)(object)rig3); Object.Destroy((Object)(object)rig4); } } public class SnapToPointRigidbody : MonoBehaviour { public Transform snapTo; [NonSerialized] private Rigidbody body; public float snapTime = 2f; [NonSerialized] private float dropTimer; public void Start() { body = ((Component)this).GetComponent(); } public void FixedUpdate() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) dropTimer += Time.deltaTime / (snapTime / 2f); body.isKinematic = dropTimer > 1f; if (dropTimer > 1f) { ((Component)this).transform.position = snapTo.position; ((Component)this).transform.rotation = snapTo.rotation; } else { float num = Mathf.Pow(35f, dropTimer); body.velocity = Vector3.Lerp(body.velocity, Vector3.zero, Time.fixedDeltaTime * 4f); if (body.useGravity) { body.AddForce(-Physics.gravity); } ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, snapTo.position, Time.fixedDeltaTime * num * 3f); ((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, snapTo.rotation, Time.fixedDeltaTime * num * 2f); } if ((Object)(object)snapTo == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class RangeFinderChamberTrigger : MonoBehaviour { public Text rangedisplay; public LayerMask lm; public FVRInteractiveObject grip; public FVRFireArmChamber chamber; public float range; public bool ranging = false; public AudioEvent bip; public AudioEvent bip2; public Transform aperture; private void Start() { range = 1000f; rangedisplay.text = "999"; } private void FixedUpdate() { //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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) if (!grip.IsHeld) { return; } if (grip.m_hand.IsInStreamlinedMode) { if (grip.m_hand.Input.AXButtonPressed) { if (!ranging) { SM.PlayCoreSound((FVRPooledAudioType)41, bip, ((Component)this).transform.position); ranging = true; } Ray val = default(Ray); ((Ray)(ref val))..ctor(aperture.position, aperture.forward); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2, 1500f, LayerMask.op_Implicit(lm))) { if (((RaycastHit)(ref val2)).distance >= 1000f) { rangedisplay.text = "999"; range = 1000f; } else if (((RaycastHit)(ref val2)).distance < 1000f) { rangedisplay.text = ((int)((RaycastHit)(ref val2)).distance).ToString(); range = ((RaycastHit)(ref val2)).distance + 0.5f; } } else if (!Physics.Raycast(val, ref val2)) { rangedisplay.text = "999"; range = 1000f; } } else if (!grip.m_hand.Input.BYButtonPressed && ranging) { ranging = false; if (chamber.IsFull && !chamber.IsSpent) { chamber.m_round.BallisticProjectilePrefab.GetComponent().MaxRange = range; } SM.PlayCoreSound((FVRPooledAudioType)41, bip2, ((Component)this).transform.position); } } else { if (grip.m_hand.IsInStreamlinedMode) { return; } if (grip.m_hand.Input.TouchpadAxes.y <= -0.75f) { if (!ranging) { SM.PlayCoreSound((FVRPooledAudioType)41, bip, ((Component)this).transform.position); ranging = true; } Ray val3 = default(Ray); ((Ray)(ref val3))..ctor(aperture.position, aperture.forward); RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(val3, ref val4, 1500f, LayerMask.op_Implicit(lm))) { if (((RaycastHit)(ref val4)).distance >= 1000f) { rangedisplay.text = "999"; range = 1000f; } else if (((RaycastHit)(ref val4)).distance < 1000f) { rangedisplay.text = ((int)((RaycastHit)(ref val4)).distance).ToString(); range = ((RaycastHit)(ref val4)).distance + 0.5f; } } else if (!Physics.Raycast(val3, ref val4)) { rangedisplay.text = "999"; range = 1000f; } } else if (grip.m_hand.Input.TouchpadAxes.y < 0.75f && ranging) { ranging = false; if (chamber.IsFull && !chamber.IsSpent) { chamber.m_round.BallisticProjectilePrefab.GetComponent().MaxRange = range; } SM.PlayCoreSound((FVRPooledAudioType)41, bip2, ((Component)this).transform.position); } } } } public class UZRGMfuze : MonoBehaviour { public FVRObject plug; public GameObject Fuzerot; public GameObject Plugrot; public FVRFireArmAttachmentMount mount; public string fuzename; public string plugname; public Collider col; public FVRObject realnade; public FVRPhysicalObject thisobj; public bool snaped = false; public bool snapedplug = false; private void Start() { //IL_0056: 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) if (mount.HasAttachmentsOnIt()) { FVRFireArmAttachment val = mount.AttachmentsList[0]; val.DetachFromMount(); Object.Destroy((Object)(object)((Component)val).gameObject); } GameObject val2 = Object.Instantiate(((AnvilAsset)plug).GetGameObject(), ((Component)mount.Point_Front).gameObject.transform.position, ((Component)mount.Point_Front).gameObject.transform.rotation); if ((Object)(object)val2.GetComponent() != (Object)null) { ((FVRFireArmAttachment)val2.GetComponent()).AttachToMount(mount, false); val2.GetComponent().CatchRot = 360f; } } private void Update() { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0239: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) if (!mount.HasAttachmentsOnIt()) { col.enabled = true; } else { if (!mount.HasAttachmentsOnIt()) { return; } col.enabled = false; if (mount.AttachmentsList.Count <= 0 || !((Object)(object)mount.AttachmentsList[0] != (Object)null)) { return; } if (((Object)((Component)mount.AttachmentsList[0]).gameObject).name == plugname) { FVRFireArmAttachment val = mount.AttachmentsList[0]; FVRFireArmAttachmentInterface attachmentInterface = mount.AttachmentsList[0].AttachmentInterface; Plugrot.transform.eulerAngles = ((Component)val).gameObject.transform.eulerAngles; if (Plugrot.transform.localEulerAngles.z > 90f && Plugrot.transform.localEulerAngles.z < 315f) { snapedplug = true; } if (Plugrot.transform.localEulerAngles.z < 90f && Plugrot.transform.localEulerAngles.z > 0f && snapedplug) { if (((FVRInteractiveObject)attachmentInterface).m_isHeld) { ((FVRInteractiveObject)attachmentInterface).ForceBreakInteraction(); } ((Behaviour)val.AttachmentInterface).enabled = false; mount.AttachmentsList.Remove(val); Object.Destroy((Object)(object)((Component)val).gameObject); Object.Instantiate(((AnvilAsset)plug).GetGameObject(), ((Component)mount.Point_Front).transform.position, ((Component)mount.Point_Front).transform.rotation); } } if (!(((Object)((Component)mount.AttachmentsList[0]).gameObject).name == fuzename)) { return; } if (Fuzerot.transform.localEulerAngles.z > 45f && Fuzerot.transform.localEulerAngles.z < 315f) { snaped = true; } Fuzerot.transform.eulerAngles = ((Component)mount.AttachmentsList[0]).gameObject.transform.eulerAngles; if (Fuzerot.transform.localEulerAngles.z < 360f && Fuzerot.transform.localEulerAngles.z > 357.5f && snaped) { mount.AttachmentsList[0].DisableOnAttached.SetActive(false); GameObject val2 = Object.Instantiate(((AnvilAsset)realnade).GetGameObject(), ((Component)thisobj).gameObject.transform.position, ((Component)thisobj).gameObject.transform.rotation); if (((FVRInteractiveObject)thisobj).m_isHeld) { FVRViveHand hand = ((FVRInteractiveObject)thisobj).m_hand; ((FVRInteractiveObject)thisobj).ForceBreakInteraction(); if ((Object)(object)val2.gameObject.GetComponent() != (Object)null) { hand.ForceSetInteractable((FVRInteractiveObject)(object)val2.gameObject.GetComponent()); ((FVRInteractiveObject)val2.gameObject.GetComponent()).BeginInteraction(hand); } } Object.Destroy((Object)(object)((Component)this).gameObject); } if (!snaped || Fuzerot.transform.localEulerAngles.z < 357.5f) { mount.AttachmentsList[0].DisableOnAttached.SetActive(true); } } } } public class ChargingCrank : FVRInteractiveObject { public enum Mode { Translation, Rotation, Folding } public enum E_State { Open, Mid, Closed } public Mode MovementMode; public Axis MovementAxis; public Transform Root; public Transform ObjectToMove; public float LowerLimit; public float UpperLimit; public bool SnapsToEndStops = true; public float LimitWiggleRoom = 0.02f; public AudioEvent CloseSounds; public AudioEvent OpenSounds; public AudioEvent BeginInteractionSounds; public AudioEvent EndInteractionSounds; public E_State State; private E_State _lastState; public float _currentPositionValue; private Vector3 _origPos; private Vector3 _lastHandPlane; private Vector3 _lastHandPos; private Quaternion _lastHandRot; private bool _debug; public bool IsOpen => (int)State == 0; public bool IsClosed => (int)State == 2; public bool IsMid => (int)State == 1; public override void Start() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).Start(); _origPos = ObjectToMove.localPosition; } public override void BeginInteraction(FVRViveHand hand) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Invalid comparison between Unknown and I4 //IL_00b6: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0034: Invalid comparison between Unknown and I4 //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).BeginInteraction(hand); SM.PlayGenericSound(BeginInteractionSounds, ObjectToMove.position); Axis movementAxis = MovementAxis; if ((int)movementAxis != 0) { if ((int)movementAxis != 1) { if ((int)movementAxis == 2) { _lastHandPlane = Vector3.ProjectOnPlane(((Component)hand).transform.forward, -Root.up); } } else { _lastHandPlane = Vector3.ProjectOnPlane(((Component)hand).transform.up, Root.forward); } } else { _lastHandPlane = Vector3.ProjectOnPlane(((Component)hand).transform.up, Root.right); } if ((int)MovementMode == 0) { _lastHandPos = ((FVRInteractiveObject)this).m_handPos; } else if ((int)MovementMode == 1) { _lastHandRot = ((FVRInteractiveObject)this).m_handRot; } } public override void UpdateInteraction(FVRViveHand hand) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 //IL_004c: 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_001e: Invalid comparison between Unknown and I4 //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Invalid comparison between Unknown and I4 //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_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) ((FVRInteractiveObject)this).UpdateInteraction(hand); Mode movementMode = MovementMode; if ((int)movementMode != 0) { if ((int)movementMode != 1) { if ((int)movementMode == 2) { FoldingMode(hand); } } else { RotationModeQuaternion(hand); } } else { TranslationMode(); } if ((int)MovementMode == 0) { _lastHandPos = ((FVRInteractiveObject)this).m_handPos; } else if ((int)MovementMode == 1) { _lastHandRot = ((FVRInteractiveObject)this).m_handRot; } } public override void EndInteraction(FVRViveHand hand) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).EndInteraction(hand); SM.PlayGenericSound(EndInteractionSounds, ObjectToMove.position); } public void TranslationMode() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Root.InverseTransformPoint(((FVRInteractiveObject)this).m_handPos); Vector3 val2 = Root.InverseTransformPoint(_lastHandPos); Vector3 val3 = val - val2; float axisValue = UnityEngineExtensions.GetAxisValue(val3, MovementAxis); float axisValue2 = UnityEngineExtensions.GetAxisValue(ObjectToMove.localPosition, MovementAxis); _currentPositionValue = Mathf.Clamp(axisValue2 + axisValue, LowerLimit, UpperLimit); if (SnapsToEndStops && Mathf.Abs(_currentPositionValue - LowerLimit) < LimitWiggleRoom) { _currentPositionValue = LowerLimit; } else if (SnapsToEndStops && Mathf.Abs(_currentPositionValue - UpperLimit) < LimitWiggleRoom) { _currentPositionValue = UpperLimit; } UnityEngineExtensions.ModifyLocalPositionAxisValue(ObjectToMove, MovementAxis, _currentPositionValue); float lerp = Mathf.InverseLerp(LowerLimit, UpperLimit, _currentPositionValue); CheckSound(lerp); } public void RotationMode(FVRViveHand hand) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_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_000e: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_007d: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00e6: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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_011e: 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_014b: 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_001d: Invalid comparison between Unknown and I4 //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_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_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; Axis movementAxis = MovementAxis; if ((int)movementAxis != 0) { if ((int)movementAxis != 1) { if ((int)movementAxis == 2) { val = Vector3.ProjectOnPlane(((Component)base.m_hand).transform.up, -((Component)this).transform.forward); Vector3 val2 = Vector3.ProjectOnPlane(_lastHandPlane, -((Component)this).transform.forward); _currentPositionValue = Mathf.Atan2(Vector3.Dot(-((Component)this).transform.forward, Vector3.Cross(val, val2)), Vector3.Dot(val, val2)) * 57.29578f; ObjectToMove.localEulerAngles = new Vector3(0f, 0f, _currentPositionValue); } } else { val = Vector3.ProjectOnPlane(((Component)base.m_hand).transform.forward, ((Component)this).transform.up); Vector3 val3 = Vector3.ProjectOnPlane(_lastHandPlane, -((Component)this).transform.up); _currentPositionValue = Mathf.Atan2(Vector3.Dot(-((Component)this).transform.up, Vector3.Cross(val, val3)), Vector3.Dot(val, val3)) * 57.29578f; ObjectToMove.localEulerAngles = new Vector3(0f, _currentPositionValue, 0f); } } else { val = Vector3.ProjectOnPlane(((Component)base.m_hand).transform.up, -((Component)this).transform.right); Vector3 val4 = Vector3.ProjectOnPlane(_lastHandPlane, -((Component)this).transform.right); _currentPositionValue = Mathf.Atan2(Vector3.Dot(-((Component)this).transform.right, Vector3.Cross(val, val4)), Vector3.Dot(val, val4)) * 57.29578f; ObjectToMove.localEulerAngles = new Vector3(_currentPositionValue, 0f, 0f); } _lastHandPlane = val; float lerp = Mathf.InverseLerp(LowerLimit, UpperLimit, _currentPositionValue); CheckSound(lerp); } public void RotationModeQuaternion(FVRViveHand hand) { //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_0019: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_00a8: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) Quaternion handRot = ((FVRInteractiveObject)this).m_handRot; Quaternion val = handRot * Quaternion.Inverse(_lastHandRot); float num = default(float); Vector3 val2 = default(Vector3); ((Quaternion)(ref val)).ToAngleAxis(ref num, ref val2); if (((Vector3)(ref val2)).magnitude != 0f && num != 0f) { if (num >= 180f) { num -= 180f; } else if (num <= -180f) { num += 180f; } val2 = Root.InverseTransformDirection(val2); float axisValue = UnityEngineExtensions.GetAxisValue(val2, MovementAxis); if (_debug) { Gizmos.Line(((Component)ObjectToMove).transform.position, ((Component)ObjectToMove).transform.position + val2 * 0.1f * num, (Color?)Color.magenta, false); } float num2 = axisValue * num; if (Mathf.Abs(num2) > 90f) { Debug.Log((object)("DeltaAngle: " + num2)); } _currentPositionValue = Mathf.Clamp(_currentPositionValue + num2, LowerLimit, UpperLimit); UnityEngineExtensions.ModifyLocalRotationAxisValue(ObjectToMove, MovementAxis, _currentPositionValue); if (Mathf.Abs(_currentPositionValue - UpperLimit) <= LimitWiggleRoom) { _currentPositionValue = UpperLimit; UnityEngineExtensions.ModifyLocalRotationAxisValue(ObjectToMove, MovementAxis, UpperLimit); } else if (Mathf.Abs(_currentPositionValue - LowerLimit) <= LimitWiggleRoom) { _currentPositionValue = LowerLimit; UnityEngineExtensions.ModifyLocalRotationAxisValue(ObjectToMove, MovementAxis, LowerLimit); } float lerp = Mathf.InverseLerp(LowerLimit, UpperLimit, _currentPositionValue); CheckSound(lerp); } } private void FoldingMode(FVRViveHand hand) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00cd: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Invalid comparison between Unknown and I4 //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_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_011c: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((FVRInteractiveObject)this).m_handPos - Root.position; Vector3 val2 = default(Vector3); Vector3 val3 = val2; Axis movementAxis = MovementAxis; if ((int)movementAxis != 0) { if ((int)movementAxis != 1) { if ((int)movementAxis == 2) { val3 = ((Component)Root).transform.up; Vector3 val4 = Vector3.ProjectOnPlane(val, Root.forward); val = ((Vector3)(ref val4)).normalized; _currentPositionValue = Mathf.Atan2(Vector3.Dot(Root.forward, Vector3.Cross(val3, val)), Vector3.Dot(val3, val)) * 57.29578f; } } else { val3 = -((Component)Root).transform.forward; Vector3 val5 = Vector3.ProjectOnPlane(val, Root.up); val = ((Vector3)(ref val5)).normalized; _currentPositionValue = Mathf.Atan2(Vector3.Dot(Root.up, Vector3.Cross(val3, val)), Vector3.Dot(val3, val)) * 57.29578f; } } else { val3 = -((Component)Root).transform.forward; val2 = Vector3.ProjectOnPlane(val, Root.right); val = ((Vector3)(ref val2)).normalized; _currentPositionValue = Mathf.Atan2(Vector3.Dot(Root.right, Vector3.Cross(val3, val)), Vector3.Dot(val3, val)) * 57.29578f; } if (_debug) { Gizmos.Line(Root.position, ((FVRInteractiveObject)this).m_handPos, (Color?)Color.magenta, false); Gizmos.Line(Root.position, val3, (Color?)Color.green, false); Gizmos.Line(Root.position, val, (Color?)Color.red, false); Gizmos.Line(Root.position, Vector3.Cross(val3, val), (Color?)Color.blue, false); } if (Mathf.Abs(_currentPositionValue - LowerLimit) < 5f) { _currentPositionValue = LowerLimit; } if (Mathf.Abs(_currentPositionValue - UpperLimit) < 5f) { _currentPositionValue = UpperLimit; } if (_currentPositionValue >= LowerLimit && _currentPositionValue <= UpperLimit) { ObjectToMove.localRotation = OpenScripts2_BasePlugin.GetTargetQuaternionFromAxis(_currentPositionValue, MovementAxis); float lerp = Mathf.InverseLerp(LowerLimit, UpperLimit, _currentPositionValue); CheckSound(lerp); } } private void CheckSound(float lerp) { //IL_0010: 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_0030: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Invalid comparison between Unknown and I4 //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Invalid comparison between Unknown and I4 //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (lerp < LimitWiggleRoom) { State = (E_State)0; } else if (lerp > 1f - LimitWiggleRoom) { State = (E_State)2; } else { State = (E_State)1; } if ((int)State == 0 && (int)_lastState != 0) { SM.PlayGenericSound(OpenSounds, ObjectToMove.position); } if ((int)State == 2 && (int)_lastState != 2) { SM.PlayGenericSound(CloseSounds, ObjectToMove.position); } _lastState = State; } } public class G11Handle : FVRInteractiveObject { public ClosedBoltWeapon Weapon; public Transform RotPiece; public AudioEvent HandleCrank; [NonSerialized] public float m_curRot; [NonSerialized] public Vector3 lastHandForward = Vector3.zero; public override void BeginInteraction(FVRViveHand hand) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((FVRInteractiveObject)this).BeginInteraction(hand); 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 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_01d0: 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_01dc: 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_017d: 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_01a5: 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; base.m_hand.EndInteractionIfHeld((FVRInteractiveObject)(object)this); ((FVRInteractiveObject)this).ForceBreakInteraction(); Weapon.Bolt.SnapToRear(); if (Weapon.Chamber.IsFull) { Weapon.Chamber.EjectRound(((Component)Weapon.RoundPos_Ejection).transform.position, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), true); } } else { RotPiece.localEulerAngles = new Vector3(0f, 0f, 0f - m_curRot); } lastHandForward = val; } ((FVRInteractiveObject)this).FVRFixedUpdate(); } } public class G11HyperBurst : MonoBehaviour { public AR15HandleSightFlipper slowmo; public OpenBoltReceiver G11; public bool isFullAuto = false; public bool triggerpulled = false; public bool isrear = false; public bool one = false; public bool two = false; public bool three = false; public bool four = false; public bool five = false; public FVRFireArmRecoilProfile norecoil; public FVRFireArmRecoilProfile hasrecoil; public GameObject GearF; public GameObject GearR; public GameObject LeverR; public GameObject LeverF; public GameObject RefPF; public GameObject RefPR; public GameObject PF; public GameObject PR; public GameObject pfb; public GameObject prb; public GameObject EjectPort; public GameObject ChargingWheel; public GameObject wholeF; public GameObject wholeR; public bool eject = false; public G11RecoilingSystem recoil; private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) RefPF.transform.position = pfb.transform.position; RefPR.transform.position = prb.transform.position; LeverF.transform.LookAt(PF.transform.position); LeverR.transform.LookAt(PR.transform.position); LeverF.transform.localEulerAngles = new Vector3(0f, LeverF.transform.localEulerAngles.y, 0f); LeverR.transform.localEulerAngles = new Vector3(0f, LeverR.transform.localEulerAngles.y, 0f); wholeF.transform.localEulerAngles = new Vector3(0f, 0f, 0f - ChargingWheel.transform.localEulerAngles.z); wholeR.transform.localEulerAngles = new Vector3(0f, 0f, 0f - ChargingWheel.transform.localEulerAngles.z); EjectPort.transform.localEulerAngles = new Vector3(0f, ChargingWheel.transform.localEulerAngles.z, 0f); } private void FixedUpdate() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: 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_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: 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_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06dd: Unknown result type (might be due to invalid IL or missing references) if (G11.FireSelectorModeIndex == 2) { if (!slowmo.m_isLargeAperture) { G11.FireSelector_Modes[2].ModeType = (FireSelectorModeType)4; } else if (slowmo.m_isLargeAperture) { G11.FireSelector_Modes[2].ModeType = (FireSelectorModeType)3; } } if (G11.FireSelectorModeIndex == 3 || G11.FireSelectorModeIndex == 1) { three = true; isFullAuto = true; } if (((Component)G11.Bolt).gameObject.transform.localPosition.z > G11.Bolt.Point_Bolt_LockPoint.localPosition.z) { eject = false; } else if (((Component)G11.Bolt).gameObject.transform.localPosition.z < G11.Bolt.Point_Bolt_LockPoint.localPosition.z && ((Component)G11.Bolt).gameObject.transform.localPosition.z > G11.Bolt.Point_Bolt_Rear.localPosition.z && !eject) { eject = true; } if (((Component)G11.Bolt).gameObject.transform.localEulerAngles.z <= G11.Bolt.Point_Bolt_Rear.localEulerAngles.z + 0.01f && eject) { G11.Chamber.EjectRound(((Component)G11.RoundPos_Ejection).transform.position, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), false); eject = false; } if (G11.m_triggerFloat > 0.8f) { triggerpulled = true; } else if (G11.m_triggerFloat < 0.8f) { triggerpulled = false; } if (isFullAuto) { if (!slowmo.m_isLargeAperture) { recoil.CurveSpeed = 2.5f; G11.Bolt.BoltSpeed_Forward = 0.5f; G11.Bolt.BoltSpeed_Rearward = -0.5f; G11.Bolt.BoltSpringStiffness = 0.5f; ((FVRFireArm)G11).RecoilProfile = hasrecoil; } else if (slowmo.m_isLargeAperture) { recoil.CurveSpeed = 5f; G11.Bolt.BoltSpeed_Forward = 1f; G11.Bolt.BoltSpeed_Rearward = -1f; G11.Bolt.BoltSpringStiffness = 25f; ((FVRFireArm)G11).RecoilProfile = hasrecoil; } } else if (!isFullAuto) { if (!slowmo.m_isLargeAperture) { recoil.CurveSpeed = 2.5f; G11.Bolt.BoltSpeed_Forward = 1f; G11.Bolt.BoltSpeed_Rearward = -2f; G11.Bolt.BoltSpringStiffness = 5f; ((FVRFireArm)G11).RecoilProfile = norecoil; } else if (slowmo.m_isLargeAperture) { recoil.CurveSpeed = 5f; G11.Bolt.BoltSpeed_Forward = 100f; G11.Bolt.BoltSpeed_Rearward = -150f; G11.Bolt.BoltSpringStiffness = 1000f; ((FVRFireArm)G11).RecoilProfile = hasrecoil; } } if (triggerpulled && !isFullAuto && !slowmo.m_isLargeAperture) { if (((Component)G11.Bolt).gameObject.transform.localPosition.z < G11.Bolt.Point_Bolt_LockPoint.localPosition.z && !one && !two && !three && !four && !five) { one = true; } if (((Component)G11.Bolt).gameObject.transform.localPosition.z > G11.Bolt.Point_Bolt_LockPoint.localPosition.z && one && !two && !three && !four && !five) { two = true; } if (((Component)G11.Bolt).gameObject.transform.localPosition.z < G11.Bolt.Point_Bolt_LockPoint.localPosition.z && one && two && !three && !four && !five) { three = true; } if (((Component)G11.Bolt).gameObject.transform.localPosition.z > G11.Bolt.Point_Bolt_LockPoint.localPosition.z && one && two && three && !four && !five) { four = true; } if (((Component)G11.Bolt).gameObject.transform.localPosition.z < G11.Bolt.Point_Bolt_LockPoint.localPosition.z && one && two && three && four && !five) { five = true; } if (four) { isFullAuto = true; } } if (G11.m_isSeerEngaged) { if (G11.FireSelectorModeIndex == 2 && four) { ((FVRFireArm)G11).Recoil(false, false, false, (FVRFireArmRecoilProfile)null, 1f); four = false; } one = false; two = false; three = false; four = false; five = false; isFullAuto = false; } } } public class G11HyperBurstCBW : MonoBehaviour { public AR15HandleSightFlipper slowmo; public ClosedBoltWeapon G11; public bool isFullAuto = false; public bool triggerpulled = false; public bool isrear = false; public bool one = false; public bool two = false; public bool three = false; public bool four = false; public FVRFireArmRecoilProfile norecoil; public FVRFireArmRecoilProfile hasrecoil; public GameObject GearF; public GameObject GearR; public GameObject LeverR; public GameObject LeverF; public GameObject RefPF; public GameObject RefPR; public GameObject PF; public GameObject PR; public GameObject pfb; public GameObject prb; public GameObject EjectPort; public GameObject ChargingWheel; public GameObject wholeF; public GameObject wholeR; public bool eject = false; public GameObject Barrel; public bool rotated = false; public bool isHyper = false; public G11Handle chargingwheel; private float Z; public float cd; public Vector3 refz; public float Zpos; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)G11) { if (slowmo.m_isLargeAperture) { cd = 0.05f; } else if (!slowmo.m_isLargeAperture) { cd = 0.25f; } } } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); } private void Start() { //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) Z = ChargingWheel.transform.localEulerAngles.z; } private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: 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_0425: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) RefPF.transform.position = pfb.transform.position; RefPR.transform.position = prb.transform.position; LeverF.transform.LookAt(PF.transform.position); LeverR.transform.LookAt(PR.transform.position); LeverF.transform.localEulerAngles = new Vector3(0f, LeverF.transform.localEulerAngles.y, 0f); LeverR.transform.localEulerAngles = new Vector3(0f, LeverR.transform.localEulerAngles.y, 0f); wholeF.transform.localEulerAngles = new Vector3(0f, 0f, ChargingWheel.transform.localEulerAngles.z); wholeR.transform.localEulerAngles = new Vector3(0f, 0f, ChargingWheel.transform.localEulerAngles.z); EjectPort.transform.localEulerAngles = new Vector3(0f, 0f - ChargingWheel.transform.localEulerAngles.z, 0f); if (Barrel.transform.localPosition.z < -0.12f) { Barrel.transform.localPosition = new Vector3(0f, 0f, -0.12f); } if (Barrel.transform.localPosition.z > 0f) { Barrel.transform.localPosition = new Vector3(0f, 0f, 0f); } if (Zpos > 0f) { Zpos = 0f; } if (Zpos < -0.12f) { Zpos = -0.12f; } if (slowmo.m_isLargeAperture) { if (cd > 0f) { cd -= Time.deltaTime; if (Zpos > -0.12f) { Zpos -= 5f * Time.deltaTime; } Barrel.transform.localPosition = Vector3.SmoothDamp(Barrel.transform.localPosition, new Vector3(0f, 0f, Zpos), ref refz, 0.05f, 10f); } else if (cd <= 0f) { if (Zpos < 0f) { Zpos += 2.5f * Time.deltaTime; } Barrel.transform.localPosition = Vector3.SmoothDamp(Barrel.transform.localPosition, new Vector3(0f, 0f, Zpos), ref refz, 0.05f, 10f); } } else { if (slowmo.m_isLargeAperture) { return; } if (cd > 0f) { cd -= Time.deltaTime; if (Zpos > -0.12f) { Zpos -= 1f * Time.deltaTime; } Barrel.transform.localPosition = Vector3.SmoothDamp(Barrel.transform.localPosition, new Vector3(0f, 0f, Zpos), ref refz, 0.25f, 2.5f); } else if (cd <= 0f) { if (Zpos < 0f) { Zpos += 0.5f * Time.deltaTime; } Barrel.transform.localPosition = Vector3.SmoothDamp(Barrel.transform.localPosition, new Vector3(0f, 0f, Zpos), ref refz, 0.25f, 2.5f); } } } private void FixedUpdate() { //IL_0032: 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_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0376: 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_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) if (G11.FireSelectorModeIndex == 2) { if (!slowmo.m_isLargeAperture) { G11.FireSelector_Modes[2].ModeType = (FireSelectorModeType)2; } else if (slowmo.m_isLargeAperture) { G11.FireSelector_Modes[2].ModeType = (FireSelectorModeType)4; } } if (G11.FireSelectorModeIndex == 3 || G11.FireSelectorModeIndex == 1) { four = true; isFullAuto = true; isHyper = false; } if (G11.FireSelectorModeIndex == 2 && !isHyper) { four = false; isFullAuto = false; isHyper = true; } if (G11.m_triggerFloat > 0.8f) { triggerpulled = true; } else if (G11.m_triggerFloat < 0.8f) { triggerpulled = false; } if (isFullAuto) { if (!slowmo.m_isLargeAperture) { G11.Bolt.Speed_Forward = 0.5f; G11.Bolt.Speed_Rearward = -0.5f; G11.Bolt.SpringStiffness = 0.5f; ((FVRFireArm)G11).RecoilProfile = norecoil; } else if (slowmo.m_isLargeAperture) { G11.Bolt.Speed_Forward = 1f; G11.Bolt.Speed_Rearward = -1f; G11.Bolt.SpringStiffness = 25f; ((FVRFireArm)G11).RecoilProfile = hasrecoil; } } else if (!isFullAuto) { if (!slowmo.m_isLargeAperture) { G11.Bolt.Speed_Forward = 1f; G11.Bolt.Speed_Rearward = -2f; G11.Bolt.SpringStiffness = 5f; ((FVRFireArm)G11).RecoilProfile = norecoil; } else if (slowmo.m_isLargeAperture) { G11.Bolt.Speed_Forward = 100f; G11.Bolt.Speed_Rearward = -150f; G11.Bolt.SpringStiffness = 1000f; ((FVRFireArm)G11).RecoilProfile = hasrecoil; } } if (triggerpulled && !isFullAuto && !slowmo.m_isLargeAperture) { if (((Component)G11.Bolt).gameObject.transform.localPosition.z < G11.Bolt.Point_Bolt_LockPoint.localPosition.z && !one && !two && !three && !four) { one = true; } if (((Component)G11.Bolt).gameObject.transform.localPosition.z > G11.Bolt.Point_Bolt_LockPoint.localPosition.z && one && !two && !three && !four) { two = true; } if (((Component)G11.Bolt).gameObject.transform.localPosition.z < G11.Bolt.Point_Bolt_LockPoint.localPosition.z && one && two && !three && !four) { three = true; } if (three) { isFullAuto = true; } } if (isFullAuto && one && two && three && ((Component)G11.Bolt).gameObject.transform.localPosition.z < G11.Bolt.Point_Bolt_LockPoint.localPosition.z) { one = false; two = false; three = false; isFullAuto = 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 TiltingBarrel : MonoBehaviour { public Transform targ; public Transform barrelRoot; 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_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } private void Update() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) AxisLookAt(barrelRoot, targ.position, Vector3.forward); } } public class BS1 : MonoBehaviour { public FVRFireArmAttachment Attachment; public BoltActionRifle bbb1; public SimpleLauncher bb1; public AttachableForegrip grip; public AR15HandleSightFlipper safety; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)bbb1 && bb1.Chamber.IsFull && !bb1.Chamber.IsSpent) { bb1.Fire(); } } 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 FixedUpdate() { //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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) if ((Object)(object)Attachment.curMount != (Object)null && (Object)(object)((Component)Attachment.curMount.MyObject).gameObject.GetComponentInChildren() != (Object)null) { ((Component)grip).gameObject.SetActive(true); if (((FVRInteractiveObject)((Component)Attachment.curMount.MyObject).gameObject.GetComponentInChildren()).m_isHeld && !safety.m_isLargeAperture) { ((Component)bbb1.Trigger_Display).gameObject.transform.localEulerAngles = new Vector3(((FVRInteractiveObject)((Component)Attachment.curMount.MyObject).gameObject.GetComponentInChildren()).m_hand.Input.TriggerFloat * 15f, 0f, 0f); if (((FVRInteractiveObject)((Component)Attachment.curMount.MyObject).gameObject.GetComponentInChildren()).m_hand.Input.TriggerFloat > bbb1.TriggerFiringThreshold) { bbb1.DropHammer(); } } else if (!((FVRInteractiveObject)grip).m_isHeld || safety.m_isLargeAperture) { ((Component)bbb1.Trigger_Display).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } if (!((Object)(object)Attachment.curMount == (Object)null)) { return; } ((Component)grip).gameObject.SetActive(false); if (((FVRInteractiveObject)Attachment).m_isHeld && !safety.m_isLargeAperture) { ((Component)bbb1.Trigger_Display).gameObject.transform.localEulerAngles = new Vector3(((FVRInteractiveObject)Attachment).m_hand.Input.TriggerFloat * 15f, 0f, 0f); if (((FVRInteractiveObject)Attachment).m_hand.Input.TriggerFloat > bbb1.TriggerFiringThreshold) { bbb1.DropHammer(); } } else if (!((FVRInteractiveObject)Attachment).m_isHeld || safety.m_isLargeAperture) { ((Component)bbb1.Trigger_Display).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } } public class magphys : MonoBehaviour { public FVRFireArmMagazine mag; public GameObject phys; private void FixedUpdate() { if ((Object)(object)mag.FireArm == (Object)null) { phys.SetActive(true); } else if ((Object)(object)mag.FireArm != (Object)null) { phys.SetActive(false); } } } public class BetterCharcoal : FVRPhysicalObject, IFVRDamageable { public enum RendererState { UnburnedNoFluid, UnburnedWet, Burning, BurntOut } private EmissionModule Emission; private MinMaxCurve Rate; public bool IsFluided; public bool IsOnFire; public ParticleSystem FireSystem; [NonSerialized] [HideInInspector] public float m_fuelLeft = 1f; [NonSerialized] [HideInInspector] public float m_fuelBurnDownTime = 0.005f; public RendererState State; public Renderer Rend_Unburned_Unfluided; public Renderer Rend_Unburned_Fluided; public Renderer Rend_Burning; public Renderer Rend_BurntOut; [NonSerialized] [HideInInspector] public float m_timeTilFireCheck = 1f; public LayerMask LM_DamMask; public AudioEvent AudEvent_Ignite; [NonSerialized] [HideInInspector] public bool m_isPSystemBurning; public Transform burnpos; public Transform burnrot; public AudioSource burnsound; public override void Start() { burnsound.Stop(); burnsound.volume = 0f; ((FVRInteractiveObject)this).Start(); m_fuelBurnDownTime = Random.Range(m_fuelBurnDownTime * 1f, m_fuelBurnDownTime * 1.2f); } public void SetRendererState(RendererState s) { //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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 if (State == s) { return; } if ((int)s != 1) { if ((int)s != 2) { if ((int)s == 3) { Rend_Unburned_Unfluided.enabled = false; Rend_Unburned_Fluided.enabled = false; Rend_Burning.enabled = false; Rend_BurntOut.enabled = true; } } else { Rend_Unburned_Unfluided.enabled = false; Rend_Unburned_Fluided.enabled = false; Rend_Burning.enabled = true; Rend_BurntOut.enabled = false; } } else { Rend_Unburned_Unfluided.enabled = false; Rend_Unburned_Fluided.enabled = true; Rend_Burning.enabled = false; Rend_BurntOut.enabled = false; } } public override void FVRUpdate() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) ((Component)burnrot).transform.eulerAngles = new Vector3(0f, 0f, 0f); if (IsOnFire) { if (burnsound.volume < 0.25f) { AudioSource obj = burnsound; obj.volume += 0.1f * Time.deltaTime; } else if (burnsound.volume > 0.25f) { burnsound.volume = 0.25f; } } else if (!IsOnFire) { if (burnsound.volume > 0f) { AudioSource obj2 = burnsound; obj2.volume -= 0.075f * Time.deltaTime; } else if (burnsound.volume < 0f) { burnsound.volume = 0f; burnsound.Stop(); } } ((FVRPhysicalObject)this).FVRUpdate(); if (IsOnFire) { m_fuelLeft -= Time.deltaTime * m_fuelBurnDownTime; if (m_timeTilFireCheck > 0f) { m_timeTilFireCheck -= Time.deltaTime; } else { m_timeTilFireCheck = Random.Range(1f, 1.5f); DamageBubble(); } if (m_fuelLeft < 0.1f) { SetRendererState((RendererState)3); } if (m_fuelLeft <= 0f) { PutOut(); } } } public void DamageBubble() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0144: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) Collider[] array = Physics.OverlapCapsule(((Component)burnrot).transform.position, ((Component)burnpos).transform.position, 0.15f, LayerMask.op_Implicit(LM_DamMask), (QueryTriggerInteraction)2); List list = new List(); if (array.Length > 0) { for (int i = 0; i < array.Length; i++) { IFVRDamageable component = ((Component)array[i]).gameObject.GetComponent(); if (component != null && !list.Contains(component)) { list.Add(component); } FVRIgnitable component2 = ((Component)((Component)array[i]).transform).gameObject.GetComponent(); if ((Object)(object)component2 == (Object)null && (Object)(object)array[i].attachedRigidbody != (Object)null) { ((Component)array[i].attachedRigidbody).gameObject.GetComponent(); } if ((Object)(object)component2 != (Object)null) { FXM.Ignite(component2, 1f); } } } if (list.Count <= 0) { return; } for (int num = list.Count - 1; num >= 0; num--) { if ((Object)(MonoBehaviour)list[num] != (Object)null) { Damage val = new Damage(); val.Dam_Thermal = 50f; val.Dam_TotalEnergetic = 50f; val.Class = (DamageClass)2; val.damageSize = 0.1f; val.hitNormal = Random.onUnitSphere; val.point = ((Component)this).transform.position; val.strikeDir = -val.hitNormal; list[num].Damage(val); } } } public void FluidMe() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) IsFluided = true; if ((int)State == 0) { SetRendererState((RendererState)1); } } public void OnParticleCollision(GameObject other) { if (!IsFluided && other.CompareTag("LighterFluid")) { FluidMe(); } } public void Ignite() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (!IsOnFire && IsFluided && !(m_fuelLeft <= 0f)) { IsOnFire = true; SetRendererState((RendererState)2); FireSystem.Play(); SM.PlayGenericSound(AudEvent_Ignite, ((Component)this).transform.position); burnsound.Play(); } } public void PutOut() { IsOnFire = false; m_fuelLeft = 0f; SetRendererState((RendererState)3); FireSystem.Stop(); } public void Damage(Damage d) { if (d.Dam_Thermal > 0f) { Ignite(); } if (d.Dam_TotalKinetic > 500f && m_fuelLeft < 0.25f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class guitarreset : MonoBehaviour { public AudioSource song; public GameObject rot; private bool is45 = false; private void Start() { } private void over45() { if (is45) { song.Stop(); } is45 = false; } private void under45() { if (!is45) { song.Play(); song.Pause(); } is45 = true; } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (rot.transform.localEulerAngles.x > 45f) { over45(); } if (rot.transform.localEulerAngles.x < 45f) { under45(); } } } public class guitarscript : MonoBehaviour { public GameObject reset; public AudioSource song; public GameObject resetvolume; private bool slaponce; private void Start() { } private void OnTriggerEnter(Collider other) { slaponce = true; } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) if (reset.transform.localEulerAngles.x > 15f) { resetvolume.SetActive(true); resetvolume.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (resetvolume.transform.localEulerAngles.x > 25f) { resetvolume.transform.localEulerAngles = new Vector3(25f, 0f, 0f); resetvolume.SetActive(false); } } if (reset.transform.localEulerAngles.x < 15f) { resetvolume.SetActive(false); resetvolume.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (reset.transform.localEulerAngles.x < 25f) { song.UnPause(); } if (reset.transform.localEulerAngles.x > 25f) { reset.transform.localEulerAngles = new Vector3(25f, 0f, 0f); } if (reset.transform.localEulerAngles.x >= 25f) { song.Pause(); } song.volume = 1f - resetvolume.transform.localEulerAngles.x * 0.04f; if (slaponce) { reset.transform.localEulerAngles = new Vector3(0f, 0f, 0f); slaponce = false; } } } } public class EagleGunRun : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class WaterBottleHealing : MonoBehaviour { public LiquidVolumeAnimator LVA; public FVRFireArmAttachment Lid; public GameObject lidbase; public FVRFireArmAttachmentMount Mount; [NonSerialized] public Rigidbody lidrig; public Rigidbody lidbaserig; [NonSerialized] public SpringJoint sj; public FVRPhysicalObject mainobj; public GameObject thisStuff; public ParticleSystem psWater; public Transform bottleMuzzle; public FVRPhysicalObject thisOBJ; public GameObject dis; public Rigidbody watterBottle; public float lquidLeft = 1000f; public float maxlquid = 1000f; public AudioEvent audEvent_Shake; public GameObject audioPour; public GameObject audioDrink; public bool isShaked = false; public bool isInfinite = false; public bool hasSling = true; public bool canrecover = false; public GameObject weightInWater; private void Start() { lquidLeft = maxlquid; Mount.RegisterAttachment(Lid); Lid.AttachToMount(Mount, false); } private void FixedUpdate() { //IL_0227: 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_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_01a2: 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_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0379: 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_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) if (canrecover && Mount.HasAttachmentsOnIt()) { if (lquidLeft < maxlquid) { lquidLeft += 10f * Time.deltaTime; } else if (lquidLeft > maxlquid) { lquidLeft = maxlquid; } } if (lquidLeft > 0f) { ((Component)LVA).gameObject.SetActive(true); } LVA.level = 0.9f * (lquidLeft / maxlquid); ((Component)Lid).gameObject.transform.SetParent(lidbase.transform); if (hasSling) { if ((Object)(object)Lid.curMount == (Object)null && (Object)(object)((Component)Lid).gameObject.GetComponent() != (Object)null && (Object)(object)((Component)Lid).gameObject.GetComponent() == (Object)null && dis.activeInHierarchy) { sj = ((Component)Lid).gameObject.AddComponent(); } if ((Object)(object)sj != (Object)null) { ((Joint)sj).connectedBody = lidbaserig; sj.spring = 100f; ((Joint)sj).autoConfigureConnectedAnchor = false; ((Joint)sj).connectedAnchor = new Vector3(0f, 0f, 0f); sj.maxDistance = 0.1f; sj.tolerance = 0.025f; if ((Object)(object)Lid.curMount != (Object)null || (Object)(object)((Component)Lid).gameObject.GetComponent() == (Object)null || !dis.activeInHierarchy) { Object.Destroy((Object)(object)sj); } } } if (weightInWater.transform.localPosition.z < 0.08f) { isShaked = false; } else if (weightInWater.transform.localPosition.z > 0.08f) { if (!isShaked) { if (lquidLeft > 0f) { if ((Object)(object)((FVRInteractiveObject)mainobj).m_hand != (Object)null) { SM.PlayCoreSound((FVRPooledAudioType)10, audEvent_Shake, ((Component)this).transform.position); } } else if (!(lquidLeft <= 0f)) { } isShaked = true; } else if (!isShaked) { } } if (!dis.activeInHierarchy) { psWater.Stop(); audioPour.SetActive(false); audioDrink.SetActive(false); } if (!dis.activeInHierarchy) { return; } Vector3 val = ((Component)GM.CurrentPlayerBody.Head).transform.position + ((Component)GM.CurrentPlayerBody.Head).transform.up * -0.2f; if (weightInWater.transform.localPosition.z < 0.05f) { psWater.Stop(); audioPour.SetActive(false); audioDrink.SetActive(false); } else { if (!(weightInWater.transform.localPosition.z >= 0.05f)) { return; } if (Vector3.Distance(bottleMuzzle.position, val) <= 0.25f) { if (lquidLeft > 0f) { if (!isInfinite) { lquidLeft -= 0.5f; } audioDrink.SetActive(true); if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { if (GM.CurrentPlayerBody.Health < GM.CurrentPlayerBody.m_startingHealth) { FVRPlayerBody currentPlayerBody = GM.CurrentPlayerBody; currentPlayerBody.Health += 1000f * Time.deltaTime; } else if (GM.CurrentPlayerBody.Health > GM.CurrentPlayerBody.m_startingHealth) { GM.CurrentPlayerBody.Health = GM.CurrentPlayerBody.m_startingHealth; } } } else if (lquidLeft <= 0f) { audioDrink.SetActive(false); ((Component)LVA).gameObject.SetActive(false); } } else { if (!(Vector3.Distance(bottleMuzzle.position, val) > 0.25f)) { return; } audioDrink.SetActive(false); if (lquidLeft > 0f) { if (!isInfinite) { lquidLeft -= 1f; } psWater.Play(); audioPour.SetActive(true); } else if (lquidLeft <= 0f) { psWater.Stop(); audioPour.SetActive(false); ((Component)LVA).gameObject.SetActive(false); } } } } } public class HealthSpray : MonoBehaviour { public HairsprayCan spray; public float muzzleAngleLimit = 30f; public float healthRecoverPerFrame = 1f; public float maxRange = 0.5f; private Vector3 muzzlepos; public GameObject lookatHead; public GameObject lookatOffHand; private void Start() { } private void Update() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)GM.CurrentPlayerBody.Head).gameObject != (Object)null) { AxisLookAt(lookatHead.transform, ((Component)GM.CurrentPlayerBody.Head).transform.position, Vector3.forward); } if ((Object)(object)((FVRInteractiveObject)spray).m_hand != (Object)null) { AxisLookAt(lookatOffHand.transform, ((Component)((FVRInteractiveObject)spray).m_hand.OtherHand).gameObject.transform.position, Vector3.forward); } if (spray.m_isSpraying) { if (Vector3.Angle(((Component)spray.Muzzle).transform.InverseTransformVector(((Component)this).transform.forward), lookatHead.transform.InverseTransformVector(((Component)this).transform.forward)) < muzzleAngleLimit) { if (Vector3.Distance(((Component)spray.Muzzle).transform.position, ((Component)GM.CurrentPlayerBody.Head).transform.position) < maxRange) { GM.CurrentPlayerBody.Health = GM.CurrentPlayerBody.Health + healthRecoverPerFrame; } } else if (Vector3.Angle(((Component)spray.Muzzle).transform.InverseTransformVector(((Component)this).transform.forward), lookatOffHand.transform.InverseTransformVector(((Component)this).transform.forward)) < muzzleAngleLimit && Vector3.Distance(((Component)spray.Muzzle).transform.position, ((Component)((FVRInteractiveObject)spray).m_hand.OtherHand).gameObject.transform.position) < maxRange) { GM.CurrentPlayerBody.Health = GM.CurrentPlayerBody.Health + healthRecoverPerFrame; } } if (GM.CurrentPlayerBody.Health > (float)GM.CurrentPlayerBody.GetMaxHealthPlayerRaw()) { GM.CurrentPlayerBody.Health = GM.CurrentPlayerBody.GetMaxHealthPlayerRaw(); } } 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) 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; } } } public class RagdollAdd : MonoBehaviour { private void Start() { } private void Update() { } } namespace JerryComponent { public class ChangeMag : MonoBehaviour { public FVRFireArmMagazine[] mags; public FVRFireArm gun; public GameObject selector; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) if (selector.transform.localEulerAngles.x >= 0f && selector.transform.localEulerAngles.x <= 2f) { gun.Magazine = mags[1]; } if (selector.transform.localEulerAngles.x >= 37f && selector.transform.localEulerAngles.x <= 39f) { gun.Magazine = mags[2]; } if (selector.transform.localEulerAngles.x >= 74f && selector.transform.localEulerAngles.x <= 76f) { gun.Magazine = mags[3]; } } } public class IRlaserpoint : MonoBehaviour { public GameObject IRpoint; public LayerMask lm; private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); Physics.Raycast(((Component)this).transform.localPosition, ((Component)this).transform.forward, ref val, (float)LayerMask.op_Implicit(lm)); if (Vector3.Distance(((Component)GM.CurrentPlayerBody.Head).transform.position, ((RaycastHit)(ref val)).point) <= 5000f) { Object.Instantiate(IRpoint, ((RaycastHit)(ref val)).point, new Quaternion(0f, 0f, 0f, 0f)); Object.Destroy((Object)(object)((Component)this).gameObject); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Update() { } } } [RequireComponent(typeof(Rigidbody))] public class ForceOnStart : MonoBehaviour { [SerializeField] private Vector3 force; [SerializeField] private Vector3 relativeForce; private void Start() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) Rigidbody component = ((Component)this).GetComponent(); component.AddForce(force); component.AddRelativeForce(relativeForce); } } public class GameObjectByButton : MonoBehaviour { [SerializeField] private KeyCode key; [SerializeField] private GameObject target; private void Update() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(key)) { bool activeSelf = target.activeSelf; activeSelf = !activeSelf; target.SetActive(activeSelf); } } } namespace JerryComponent { public class AKRecoilspring : MonoBehaviour { public FVRFireArmAttachment att; public WaggleJoint wag1; public WaggleJoint wag2; private void Start() { } private void FixedUpdate() { if ((Object)(object)att.curMount == (Object)null) { wag1.angleLimitLeft = 2f; wag2.angleLimitLeft = 2f; wag1.angleLimitRight = 2f; wag2.angleLimitRight = 2f; } else if ((Object)(object)att.curMount != (Object)null) { wag1.angleLimitRight = 0f; wag2.angleLimitRight = 0f; wag1.angleLimitLeft = 0f; wag2.angleLimitLeft = 0f; } } } public class AKS74NDis : MonoBehaviour { public FVRFireArmAttachmentMount DustCover; public FVRFireArmAttachmentMount RecoilSpring; public FVRFireArmAttachmentMount Bolt; public FVRFireArmAttachmentMount HandGuard; public bool isHGed = false; public AR15HandleSightFlipper flipper; public Collider DCC; public Collider RSC; public Collider BC; public Collider HGC; public GameObject Hammer; public ManipulateObject HammerMani; public bool ishammerready = false; public ClosedBolt closedbolt; public ClosedBoltWeapon gun; public Collider boltbrab; public MagFold selector; public GameObject HandGuardLatch; public AudioEvent click; public bool clicked = false; public FVRFireArmAttachment bolthead; public FVRFireArmAttachment bolt; private void Start() { gun.m_isHammerCocked = true; } private void FixedUpdate() { //IL_0038: 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_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_0676: 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_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_081c: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Unknown result type (might be due to invalid IL or missing references) if (gun.m_isHammerCocked) { ((Behaviour)HammerMani).enabled = false; Hammer.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ishammerready = true; } else if (!gun.m_isHammerCocked) { if (ishammerready) { Hammer.transform.localEulerAngles = new Vector3(90f, 0f, 0f); ishammerready = false; } ((Behaviour)HammerMani).enabled = true; } if (HandGuard.HasAttachmentsOnIt() && !isHGed) { flipper.m_isLargeAperture = false; isHGed = true; } else if (!HandGuard.HasAttachmentsOnIt()) { isHGed = false; } if (Bolt.HasAttachmentsOnIt() && (Object)(object)bolthead == (Object)null && (Object)(object)bolt == (Object)null) { bolt = Bolt.AttachmentsList[0]; if (((FVRPhysicalObject)Bolt.AttachmentsList[0]).AttachmentsList.Count > 0) { bolthead = ((FVRPhysicalObject)Bolt.AttachmentsList[0]).AttachmentsList[0]; ((FVRPhysicalObject)gun).AttachmentsList.Add(bolthead); } } else if (!Bolt.HasAttachmentsOnIt() && (Object)(object)bolthead != (Object)null && (Object)(object)bolt != (Object)null) { if ((Object)(object)bolthead.curMount != (Object)null) { bolthead.DetachFromMount(); bolthead.AttachToMount(((FVRPhysicalObject)bolt).AttachmentMounts[0], false); } bolthead = null; if ((Object)(object)bolt.curMount != (Object)null) { bolt.DetachFromMount(); } bolt = null; } if (DustCover.HasAttachmentsOnIt()) { if (RecoilSpring.HasAttachmentsOnIt()) { ((FVRInteractiveObject)RecoilSpring.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(false); } if (Bolt.HasAttachmentsOnIt()) { ((FVRInteractiveObject)Bolt.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(false); } ((Behaviour)RecoilSpring).enabled = false; RSC.enabled = false; ((Behaviour)Bolt).enabled = false; BC.enabled = false; } else if (!DustCover.HasAttachmentsOnIt() && Bolt.HasAttachmentsOnIt()) { if (RecoilSpring.HasAttachmentsOnIt()) { ((FVRInteractiveObject)RecoilSpring.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(true); } ((Behaviour)RecoilSpring).enabled = true; RSC.enabled = true; } if (!((FVRInteractiveObject)selector).m_isHeld) { if (((Component)selector).gameObject.transform.localEulerAngles.y <= 54f) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); clicked = true; } ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 48f, 0f); gun.m_fireSelectorMode = 2; } else if (((Component)selector).gameObject.transform.localEulerAngles.y > 54f && ((Component)selector).gameObject.transform.localEulerAngles.y <= 64f) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); clicked = true; } ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 60f, 0f); gun.m_fireSelectorMode = 1; } else if (((Component)selector).gameObject.transform.localEulerAngles.y > 64f) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); clicked = true; } ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 68f, 0f); gun.m_fireSelectorMode = 0; } } else if (((FVRInteractiveObject)selector).IsHeld) { clicked = false; } if (Bolt.HasAttachmentsOnIt()) { if (!RecoilSpring.HasAttachmentsOnIt()) { ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 68f, 0f); } boltbrab.enabled = true; ((Behaviour)HandGuard).enabled = false; HGC.enabled = false; if (HandGuard.HasAttachmentsOnIt()) { ((FVRInteractiveObject)HandGuard.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(false); } ((Behaviour)RecoilSpring).enabled = true; RSC.enabled = true; } else if (!Bolt.HasAttachmentsOnIt()) { ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 68f, 0f); if (HandGuardLatch.transform.localEulerAngles.x > 45f) { if (HandGuard.HasAttachmentsOnIt()) { ((FVRInteractiveObject)HandGuard.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(true); } ((Behaviour)HandGuard).enabled = true; HGC.enabled = true; } else if (HandGuardLatch.transform.localEulerAngles.x < 45f) { if (HandGuard.HasAttachmentsOnIt()) { ((FVRInteractiveObject)HandGuard.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(false); } ((Behaviour)HandGuard).enabled = false; HGC.enabled = false; } ((Behaviour)RecoilSpring).enabled = false; RSC.enabled = false; boltbrab.enabled = false; } if (RecoilSpring.HasAttachmentsOnIt()) { if (Bolt.HasAttachmentsOnIt()) { ((FVRInteractiveObject)Bolt.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(false); } closedbolt.Speed_Forward = 2f; closedbolt.SpringStiffness = 200f; } else if (!RecoilSpring.HasAttachmentsOnIt()) { closedbolt.Speed_Forward = 0f; closedbolt.SpringStiffness = 0f; } if (((Component)Bolt).transform.localPosition.z > 0.1f) { ((Behaviour)Bolt).enabled = false; if (Bolt.HasAttachmentsOnIt()) { ((FVRInteractiveObject)Bolt.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(false); } BC.enabled = false; } else if (((Component)Bolt).transform.localPosition.z <= 0.1f) { ((Behaviour)Bolt).enabled = true; if (Bolt.HasAttachmentsOnIt()) { ((FVRInteractiveObject)Bolt.AttachmentsList[0].AttachmentInterface).GameObject.SetActive(true); } BC.enabled = true; } } } public class AKbolt : MonoBehaviour { public FVRFireArmAttachmentMount mount; public FVRFireArmAttachment att; public ManipulateObject Trans; public ManipulateObject Rots; public ManipulateObject TransB; public ManipulateObject RotsB; public GameObject boltHolder; public bool Detached = false; public GameObject BoltRef; private void Start() { } private void FixedUpdate() { //IL_0089: 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_00d8: 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) if ((Object)(object)att.curMount == (Object)null) { if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } ((Behaviour)Trans).enabled = false; ((Behaviour)Rots).enabled = false; if (!Detached) { boltHolder.transform.localEulerAngles = new Vector3(0f, 0f, 30f); boltHolder.transform.localPosition = new Vector3(0f, 0f, 0.0002f); Detached = true; BoltRef.transform.localPosition = new Vector3(0f, 0f, 0.19f); } ((Behaviour)TransB).enabled = true; ((Behaviour)RotsB).enabled = true; } else if ((Object)(object)att.curMount != (Object)null) { if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } if ((Object)(object)((Component)att.curMount.Parent).gameObject.GetComponent() != (Object)null) { ((Behaviour)TransB).enabled = false; ((Behaviour)RotsB).enabled = false; ((Behaviour)Trans).enabled = true; ((Behaviour)Rots).enabled = true; BoltRef.transform.localPosition = ((Component)((Component)att.curMount.Parent).gameObject.GetComponent().Bolt).gameObject.transform.localPosition; } Detached = false; } } } public class ChamberEmpty : MonoBehaviour { public FVRFireArmChamber chamber; public Transform ejectpos; public FVRFireArmAttachmentMount BoltMount; public Collider col; private void FixedUpdate() { //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) if (!BoltMount.HasAttachmentsOnIt()) { if (chamber.IsFull) { chamber.EjectRound(ejectpos.position, Vector3.zero, Vector3.zero, false); } col.enabled = false; } else if (BoltMount.HasAttachmentsOnIt()) { col.enabled = true; } } } public class MagFold : FVRInteractiveObject { public enum StockPos { Closed, Mid, Open } public Transform Root; public Transform Stock; public float rotAngle; public float MinRot; public float MaxRot; public StockPos m_curPos; public StockPos m_lastPos; public bool isMinClosed = true; public FVRFireArm FireArm; public override void UpdateInteraction(FVRViveHand hand) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Invalid comparison between Unknown and I4 //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Invalid comparison between Unknown and I4 //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) ((FVRInteractiveObject)this).UpdateInteraction(hand); Vector3 val = ((HandInput)(ref hand.Input)).Pos - Root.position; Vector3 val2 = Vector3.ProjectOnPlane(val, Root.up); val = ((Vector3)(ref val2)).normalized; Vector3 val3 = -((Component)Root).transform.forward; rotAngle = Mathf.Atan2(Vector3.Dot(Root.up, Vector3.Cross(val3, val)), Vector3.Dot(val3, val)) * 57.29578f; if (Mathf.Abs(rotAngle - MinRot) < 5f) { rotAngle = MinRot; } if (Mathf.Abs(rotAngle - MaxRot) < 5f) { rotAngle = MaxRot; } if (!(rotAngle >= MinRot) || !(rotAngle <= MaxRot)) { return; } Stock.localEulerAngles = new Vector3(0f, rotAngle, 0f); float num = Mathf.InverseLerp(MinRot, MaxRot, rotAngle); if (isMinClosed) { if (num < 0.02f) { m_curPos = (StockPos)0; } else if (num > 0.9f) { m_curPos = (StockPos)2; } else { m_curPos = (StockPos)1; } } else if (num < 0.1f) { m_curPos = (StockPos)2; } else if (num > 0.98f) { m_curPos = (StockPos)0; } else { m_curPos = (StockPos)1; } if ((int)m_curPos == 2 && (int)m_lastPos != 2) { FireArm.PlayAudioEvent((FirearmAudioEventType)30, 1f); } if ((int)m_curPos == 0 && (int)m_lastPos != 0) { FireArm.PlayAudioEvent((FirearmAudioEventType)31, 1f); } m_lastPos = m_curPos; } } public class MuzzleFlashandEjectSmoke : MonoBehaviour { public GameObject flash; public GameObject smoke; public Transform muzzle; public Transform eject; public FVRFireArm gun; private void Start() { //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(Shot); } private void Update() { } private void Shot(FVRFireArm gunthis) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gunthis == (Object)(object)gun) { Object.Instantiate(flash, ((Component)muzzle).transform.position, ((Component)muzzle).transform.rotation); Object.Instantiate(smoke, ((Component)eject).transform.position, ((Component)eject).transform.rotation); } } 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(Shot); } } } public class RollAndLock : MonoBehaviour { public FVRFireArmRecoilProfile hold; public FVRFireArmRecoilProfile unhold; public Transform MagazinePoint; public Transform MagazinePivot; public float lowerlimit; public float upperlimit; private HingeJoint Joint; public float eject; public float lockangle; public bool magejectonmag; private bool locked = false; private bool isPhysRel = false; public Collider[] colliders; public ClosedBoltWeapon Gun; public GameObject GunRig; [NonSerialized] public FVRFireArmMagazine Magazine; public GameObject maglatch; public Collider col; private void Update() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)Gun).transform.InverseTransformPoint(MagazinePoint.position); Vector3 val2 = ((Component)Gun).transform.InverseTransformPoint(MagazinePivot.position); if ((Object)(object)Magazine != (Object)null) { if (((FVRInteractiveObject)Magazine).IsHeld) { ((FVRFireArm)Gun).RecoilProfile = hold; } else if (!((FVRInteractiveObject)Magazine).IsHeld) { ((FVRFireArm)Gun).RecoilProfile = unhold; } if (Quaternion.Angle(MagazinePoint.rotation, ((Component)Magazine).transform.rotation) < lockangle && !locked) { JointLimits limits = default(JointLimits); ((JointLimits)(ref limits)).max = lowerlimit; ((JointLimits)(ref limits)).min = lowerlimit; Joint.limits = limits; locked = true; if ((Object)(object)((FVRFireArm)Gun).Magazine == (Object)null) { ((FVRFireArm)Gun).LoadMag(Magazine); Magazine.FireArm = (FVRFireArm)(object)Gun; } } if ((Object)(object)((FVRInteractiveObject)Gun).m_hand != (Object)null && (Object)(object)((FVRInteractiveObject)Magazine).m_hand != (Object)null) { if (locked && !((FVRInteractiveObject)Magazine).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)Magazine).m_hand.Input.TouchpadSouthPressed) { locked = false; JointLimits limits2 = default(JointLimits); ((JointLimits)(ref limits2)).max = upperlimit; ((JointLimits)(ref limits2)).min = lowerlimit; if ((Object)(object)Joint != (Object)null) { Joint.limits = limits2; Object.Destroy((Object)(object)Joint); } Collider[] array = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val3 in array) { Collider[] array2 = colliders; foreach (Collider val4 in array2) { Physics.IgnoreCollision(val4, val3, false); } } if ((Object)(object)((FVRFireArm)Gun).Magazine != (Object)null) { ((FVRFireArm)Gun).EjectMag(false); Magazine = null; } } if (locked && ((FVRInteractiveObject)Magazine).m_hand.IsInStreamlinedMode && ((FVRInteractiveObject)Magazine).m_hand.Input.AXButtonPressed) { locked = false; JointLimits limits3 = default(JointLimits); ((JointLimits)(ref limits3)).max = upperlimit; ((JointLimits)(ref limits3)).min = lowerlimit; if ((Object)(object)Joint != (Object)null) { Joint.limits = limits3; Object.Destroy((Object)(object)Joint); } Collider[] array3 = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val5 in array3) { Collider[] array4 = colliders; foreach (Collider val6 in array4) { Physics.IgnoreCollision(val6, val5, false); } } if ((Object)(object)((FVRFireArm)Gun).Magazine != (Object)null) { ((FVRFireArm)Gun).EjectMag(false); Magazine = null; } } } if ((Object)(object)((FVRInteractiveObject)Gun).m_hand != (Object)null && (Object)(object)((FVRInteractiveObject)Gun).m_hand.OtherHand.m_currentInteractable != (Object)null && (Object)(object)((Component)((FVRInteractiveObject)Gun).m_hand.OtherHand.m_currentInteractable).gameObject.GetComponent() != (Object)null && maglatch.transform.localEulerAngles.x > 180f && maglatch.transform.localEulerAngles.x < 335f) { locked = false; JointLimits limits4 = default(JointLimits); ((JointLimits)(ref limits4)).max = upperlimit; ((JointLimits)(ref limits4)).min = lowerlimit; if ((Object)(object)Joint != (Object)null) { Joint.limits = limits4; Object.Destroy((Object)(object)Joint); } Collider[] array5 = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val7 in array5) { Collider[] array6 = colliders; foreach (Collider val8 in array6) { Physics.IgnoreCollision(val8, val7, false); } } if ((Object)(object)((FVRFireArm)Gun).Magazine != (Object)null) { ((FVRFireArm)Gun).EjectMag(false); Magazine = null; } } if (locked) { ((Component)Magazine).gameObject.transform.position = ((Component)MagazinePoint).transform.position; ((Component)Magazine).gameObject.transform.rotation = ((Component)MagazinePoint).transform.rotation; } } else if ((Object)(object)Magazine == (Object)null) { ((FVRFireArm)Gun).RecoilProfile = unhold; } } public void OnTriggerStay(Collider other) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((Component)other).GetComponent() != (Object)null) || !((Object)(object)((FVRInteractiveObject)((Component)other).GetComponent().Magazine).m_hand != (Object)null)) { return; } Transform transform = new GameObject().transform; transform.rotation = ((Component)((Component)other).GetComponent().Magazine).gameObject.transform.rotation; transform.parent = MagazinePoint; Vector3 val = ((Component)Gun).transform.InverseTransformPoint(MagazinePoint.position); Vector3 val2 = ((Component)Gun).transform.InverseTransformPoint(MagazinePivot.position); Joint = ((Component)Gun).gameObject.AddComponent(); ((Joint)Joint).autoConfigureConnectedAnchor = false; JointLimits limits = default(JointLimits); ((JointLimits)(ref limits)).max = upperlimit; ((JointLimits)(ref limits)).min = lowerlimit; Joint.limits = limits; ((Joint)Joint).anchor = val2; Joint.useLimits = true; ((Joint)Joint).connectedAnchor = val2 - val; ((Component)((Component)other).GetComponent().Magazine).transform.rotation = MagazinePoint.rotation; ((Joint)Joint).axis = ((Component)Gun).transform.InverseTransformDirection(MagazinePoint.right); ((Joint)Joint).connectedBody = ((Component)((Component)other).GetComponent().Magazine).GetComponent(); Magazine = ((Component)other).GetComponent().Magazine; ((Component)((Component)other).GetComponent().Magazine).transform.rotation = transform.rotation; Object.Destroy((Object)(object)((Component)transform).gameObject); Collider[] array = ((FVRInteractiveObject)Magazine).m_colliders; foreach (Collider val3 in array) { Collider[] array2 = colliders; foreach (Collider val4 in array2) { Physics.IgnoreCollision(val4, val3, true); } } } } namespace JerryComponent { public class ScopeCreate : MonoBehaviour { public GameObject SlideRot; public GameObject SlideRot2; public Camera Cam1; public Camera Cam2; public MeshRenderer Rend; private RenderTexture rt1; private RenderTexture rt2; private Material mt1; private Material mt2; public MeshRenderer mr1; public MeshRenderer mr2; public Shader sd; private void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown rt1 = new RenderTexture(2048, 2048, 16, (RenderTextureFormat)0); rt1.Create(); Cam1.targetTexture = rt1; mt1 = new Material(sd); mt1.SetTexture("_ReticleTex", (Texture)(object)rt1); mt1.SetFloat("_ReticleScale", 20f); mt1.SetFloat("_ReticleDistance", 30f); mt1.SetTexture("_ZoomTex", (Texture)(object)rt1); mt1.SetFloat("_ZoomScale", 1f); mt1.SetFloat("_VignetteRadius", 0f); mt1.SetFloat("_VignetteSmoothness", 0f); mt1.SetFloat("_VignetteAlpha", 0f); mt1.SetFloat("_CameraDistance", 1f); ((Renderer)mr1).material = mt1; rt2 = new RenderTexture(2048, 2048, 16, (RenderTextureFormat)0); rt2.Create(); Cam2.targetTexture = rt2; mt2 = new Material(sd); mt2.SetTexture("_ReticleTex", (Texture)(object)rt2); mt2.SetFloat("_ReticleScale", 20f); mt2.SetFloat("_ReticleDistance", 3.3f); mt2.SetTexture("_ZoomTex", (Texture)(object)rt2); mt2.SetFloat("_ZoomScale", 1f); mt2.SetFloat("_VignetteRadius", 1.331f); mt2.SetFloat("_VignetteSmoothness", 0.945f); mt2.SetFloat("_VignetteAlpha", 0f); mt2.SetFloat("_CameraDistance", 0f); ((Renderer)mr2).material = mt2; } private void Update() { } } public class IsMag : MonoBehaviour { public FVRFireArm gun; public GameObject isMag; public GameObject whole; private void Start() { } private void Update() { //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gun.Magazine == (Object)null) { if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { if ((Object)(object)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable != (Object)null) { if ((Object)(object)((Component)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable).gameObject.GetComponent() != (Object)null) { whole.SetActive(true); if (((Component)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable).gameObject.GetComponent().m_capacity > 45) { isMag.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else if (((Component)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable).gameObject.GetComponent().m_capacity <= 45) { isMag.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else if ((Object)(object)((Component)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable).gameObject.GetComponent() == (Object)null) { whole.SetActive(false); } } else if ((Object)(object)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable == (Object)null) { whole.SetActive(false); } } else if ((Object)(object)((FVRInteractiveObject)gun).m_hand == (Object)null) { whole.SetActive(false); } } else if (!((Object)(object)gun.Magazine != (Object)null)) { } } } public class ProgressivetriggerforOB : MonoBehaviour { public OpenBoltReceiver gun; private void FixedUpdate() { if (gun.m_fireSelectorMode != 0) { if (gun.m_triggerFloat > 0.1f && gun.m_triggerFloat <= 0.75f) { gun.m_fireSelectorMode = 1; gun.UpdateControls(); } if (gun.m_triggerFloat > 0.75f && gun.m_triggerFloat <= 1f) { gun.m_hasTriggerCycled = false; gun.m_fireSelectorMode = 2; gun.UpdateControls(); } } } } public class barrelc : MonoBehaviour { public FVRFireArmAttachmentMount mount; public GameObject plate; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (plate.transform.localEulerAngles.y < 45f) { if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(true); } } else if (mount.HasAttachmentsOnIt()) { ((Component)mount.AttachmentsList[0].AttachmentInterface).gameObject.SetActive(false); } } } public class barrelchange : MonoBehaviour { public OpenBoltReceiver gun; public FVRFireArmAttachmentMount mount; private void Start() { } private void Update() { if (mount.HasAttachmentsOnIt()) { if (!(((Object)((Component)mount.AttachmentsList[0]).gameObject).name == "MG3Barrel(Clone)")) { gun.m_fireSelectorMode = 0; } } else { gun.m_fireSelectorMode = 0; } } } public class MP9Case : AttachableForegrip { public FVRFireArmAttachmentMount casemount; public FVRFireArmAttachment casehandle; public GameObject trigger; public float cd = 1f; private void FixedUpdate() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRFireArmAttachmentInterface)this).Attachment.curMount == (Object)null) { ((Component)casemount).gameObject.SetActive(false); } else { if (!((Object)(object)((FVRFireArmAttachmentInterface)this).Attachment.curMount != (Object)null)) { return; } ((Component)casemount).gameObject.SetActive(true); if ((Object)(object)((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject).m_hand != (Object)null) { trigger.transform.localPosition = new Vector3(0f, 0.005f * ((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject).m_hand.Input.TriggerFloat, 0f); if (((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject).m_hand.Input.TriggerFloat >= 0.9f) { cd -= Time.deltaTime; if (cd <= 0f) { cd = 0f; if (casemount.HasAttachmentsOnIt()) { casemount.AttachmentsList[0].DetachFromMount(); FVRViveHand hand = ((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject).m_hand; ((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject).ForceBreakInteraction(); hand.ForceSetInteractable((FVRInteractiveObject)(object)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject); } } } else if (((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject).m_hand.Input.TriggerFloat < 0.9f) { cd = 1f; } } else if ((Object)(object)((FVRInteractiveObject)((FVRFireArmAttachmentInterface)this).Attachment.curMount.MyObject).m_hand == (Object)null) { trigger.transform.localPosition = new Vector3(0f, 0f, 0f); cd = 1f; } } } } } namespace JerryAr.G19X_Dual { [BepInPlugin("JerryAr.G19X_Dual", "G19X_Dual", "1.2.0")] [BepInProcess("h3vr.exe")] [Description("Built with MeatKit")] [BepInDependency("h3vr.otherloader", "1.3.0")] public class G19X_DualPlugin : 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.G19X_Dual"); OtherLoader.RegisterDirectLoad(BasePath, "JerryAr.G19X_Dual", "", "", "473139584475616c", ""); } } } namespace JerryComponent { public class GrabToEnable : FVRInteractiveObject { public GameObject OBJtoEnable; public GameObject OBJtoEnable2; private void FixedUpdate() { if (base.m_isHeld) { OBJtoEnable.SetActive(true); OBJtoEnable2.SetActive(true); } else if (!base.m_isHeld) { OBJtoEnable.SetActive(false); OBJtoEnable2.SetActive(false); } } } public class UpgradeCol : MonoBehaviour, IFVRDamageable { public UpgradeSentry sentry; private void Start() { } public void Damage(Damage d) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Invalid comparison between Unknown and I4 if (d.Source_IFF == GM.CurrentPlayerBody.m_playerIFF && (int)d.Class == 3 && sentry.cd <= 0f) { sentry.life += 250f; sentry.levelup += Random.Range(400, 500); sentry.cd = 1.5f; sentry.cannonnum += 250f; sentry.lmgLnum += 250f; sentry.lmgRnum += 250f; sentry.lmgLnum2 += 250f; sentry.lmgRnum2 += 250f; sentry.rocketnum += 5f; } if (d.Source_IFF != GM.CurrentPlayerBody.m_playerIFF || (int)d.Class != 3) { sentry.life -= Random.Range(250, 400); } } } public class UpgradeSentry : MonoBehaviour, IFVRDamageable { public Rigidbody main; public Collider col; public bool selfdestroy = false; public float sdcd = 0f; public GameObject whole; [NonSerialized] public GameObject laserMark; public bool bypassed = false; public float BPCD = 2f; public LaserLight laser1; public LaserLight laser2; public LaserLight laser3; public Transform lv1height; public Transform lv2height; public Transform lv3height; public GameObject heightholder; public float levelup = 0f; public float cd = 1.5f; public GameObject Level1; public GameObject Level1Geo; public GameObject Level2; public GameObject Level2Geo; public GameObject Level3; public GameObject Level3Geo; public bool sp1 = false; public bool sp2 = false; public bool sp3 = false; public float life = 5000f; public int curlevel = 0; public Animator ani1; public float a1ref; public Animator ani2; public float a2ref; public Animator ani3; public float a3ref; public GameObject HX; public GameObject HY; public HingeJoint HX1; public HingeJoint HY1; public HingeJoint HX2; public HingeJoint HY2; public HingeJoint HX3; public HingeJoint HY3; [NonSerialized] public SosigLink sosigLink; public Transform FireArm; public Transform FireArm1; public Transform FireArm2; public Transform FireArm3; public LayerMask LatchingMask; public LayerMask BlockingMask; public GameObject sightX; public GameObject sightY; public GameObject sightX1; public GameObject sightY1; public GameObject sightX2; public GameObject sightY2; public GameObject sightX3; public GameObject sightY3; public bool fire = false; public float refx; public float refy; public float refx1; public float refy1; public float refx2; public float refy2; public float refx3; public float refy3; public float cannonnum = 500f; public float cannoncd = 0.25f; public FVRFireArm cannon; public FVRFireArmChamber cannonC; public float lmgLnum = 1000f; public float lmgLcd = 0.1f; public float lmgRnum = 1000f; public float lmgRcd = 0.1f; public FVRFireArm lmgL; public FVRFireArm lmgR; public FVRFireArmChamber lmgLC; public FVRFireArmChamber lmgRC; public float lmgLnum2 = 1000f; public float lmgLcd2 = 0.1f; public float lmgRnum2 = 1000f; public float lmgRcd2 = 0.1f; public FVRFireArm lmgL2; public FVRFireArm lmgR2; public FVRFireArmChamber lmgLC2; public FVRFireArmChamber lmgRC2; public float rocketnum = 10f; public float rocketcd = 5f; public FVRFireArm rocket1; public FVRFireArm rocket2; public FVRFireArm rocket3; public FVRFireArm rocket4; public FVRFireArmChamber rocket1C; public FVRFireArmChamber rocket2C; public FVRFireArmChamber rocket3C; public FVRFireArmChamber rocket4C; public Transform cannonmuzzle; public Transform lmgLmuzzle; public Transform lmgRmuzzle; public Transform lmgLmuzzle2; public Transform lmgRmuzzle2; public Transform rocket1muzzle; public Transform rocket2muzzle; public Transform rocket3muzzle; public Transform rocket4muzzle; public GameObject gibs1; public GameObject gibs2; public GameObject gibs3; public GameObject gibs4; public GameObject explosion; public bool search = false; public float waitcenter = 2f; public float cdupgrade = 13f; public AudioEvent death; public GameObject alert; public GameObject toolbox; public AudioEvent shotgun; public AudioEvent shotrocket; public AudioEvent click; public Animator anit1; public Animator anit2; public Animator anit3; public Animator anit11; public Animator anit22; public Animator anit33; public float cd1 = 1f; public float cd2 = 0.25f; public float cd3 = 0.25f; public GameObject Rev1; public GameObject Rev2; public GameObject Rev3; public GameObject Rev11; public GameObject Rev22; public GameObject Rev33; public FVRPhysicalObject maingrab; public bool grabbed1 = false; public bool grabbed2 = false; public bool grabbed3 = false; public GameObject toolboxGeo; public AIEntity ai1; public AIEntity ai2; public AIEntity ai3; [NonSerialized] public MF_TeamManager TMM; public LayerMask LM; public GameObject laserdetect; public float Idle = 0f; public bool reverse = false; public AudioSource build1; public float b1ref; public AudioSource build2; public float b2ref; public AudioSource build3; public float b3ref; public void Damage(Damage d) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Invalid comparison between Unknown and I4 //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_023d: 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_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) if (d.Source_IFF == GM.CurrentPlayerBody.m_playerIFF && (int)d.Class == 3) { if ((Level1.activeInHierarchy || Level2.activeInHierarchy || Level3.activeInHierarchy || toolbox.activeInHierarchy) && cd <= 0f) { life += 250f; levelup += Random.Range(400, 500); cd = 1.5f; cannonnum += 250f; lmgLnum += 250f; lmgRnum += 250f; lmgLnum2 += 250f; lmgRnum2 += 250f; rocketnum += 5f; } if (!Level1.activeInHierarchy && !Level2.activeInHierarchy && !Level3.activeInHierarchy) { cd = 1.5f; } } if ((d.Source_IFF != GM.CurrentPlayerBody.m_playerIFF || (int)d.Class != 3) && curlevel >= 1) { life -= Random.Range(250, 400); if (life <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, death, ((Component)this).gameObject.transform.position); Object.Instantiate(gibs1, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); Object.Instantiate(gibs2, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); Object.Instantiate(gibs3, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); Object.Instantiate(gibs4, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); Object.Instantiate(explosion, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void Start() { if ((Object)(object)Object.FindObjectOfType() != (Object)null) { TMM = Object.FindObjectOfType(); ai1.IFFCode = TMM.IFFsRed[0]; ai2.IFFCode = TMM.IFFsRed[0]; ai3.IFFCode = TMM.IFFsRed[0]; } else if ((Object)(object)Object.FindObjectOfType() == (Object)null) { ai1.IFFCode = 0; ai2.IFFCode = 0; ai3.IFFCode = 0; } } private void FixedUpdate() { //IL_087f: Unknown result type (might be due to invalid IL or missing references) //IL_08a8: Unknown result type (might be due to invalid IL or missing references) //IL_091a: Unknown result type (might be due to invalid IL or missing references) //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Unknown result type (might be due to invalid IL or missing references) //IL_09de: Unknown result type (might be due to invalid IL or missing references) //IL_18b0: Unknown result type (might be due to invalid IL or missing references) //IL_18b5: Unknown result type (might be due to invalid IL or missing references) //IL_18db: Unknown result type (might be due to invalid IL or missing references) //IL_18e0: Unknown result type (might be due to invalid IL or missing references) //IL_18f5: Unknown result type (might be due to invalid IL or missing references) //IL_18fa: Unknown result type (might be due to invalid IL or missing references) //IL_15bf: Unknown result type (might be due to invalid IL or missing references) //IL_15c4: Unknown result type (might be due to invalid IL or missing references) //IL_15ea: Unknown result type (might be due to invalid IL or missing references) //IL_15ef: Unknown result type (might be due to invalid IL or missing references) //IL_1604: Unknown result type (might be due to invalid IL or missing references) //IL_1609: Unknown result type (might be due to invalid IL or missing references) //IL_1986: Unknown result type (might be due to invalid IL or missing references) //IL_198b: Unknown result type (might be due to invalid IL or missing references) //IL_1918: Unknown result type (might be due to invalid IL or missing references) //IL_191d: Unknown result type (might be due to invalid IL or missing references) //IL_1695: Unknown result type (might be due to invalid IL or missing references) //IL_169a: Unknown result type (might be due to invalid IL or missing references) //IL_1627: Unknown result type (might be due to invalid IL or missing references) //IL_162c: Unknown result type (might be due to invalid IL or missing references) //IL_1417: Unknown result type (might be due to invalid IL or missing references) //IL_141c: Unknown result type (might be due to invalid IL or missing references) //IL_1435: Unknown result type (might be due to invalid IL or missing references) //IL_1a12: Unknown result type (might be due to invalid IL or missing references) //IL_1a17: Unknown result type (might be due to invalid IL or missing references) //IL_19a9: Unknown result type (might be due to invalid IL or missing references) //IL_19ae: Unknown result type (might be due to invalid IL or missing references) //IL_194c: Unknown result type (might be due to invalid IL or missing references) //IL_1951: Unknown result type (might be due to invalid IL or missing references) //IL_196b: Unknown result type (might be due to invalid IL or missing references) //IL_1721: Unknown result type (might be due to invalid IL or missing references) //IL_1726: Unknown result type (might be due to invalid IL or missing references) //IL_16b8: Unknown result type (might be due to invalid IL or missing references) //IL_16bd: Unknown result type (might be due to invalid IL or missing references) //IL_165b: Unknown result type (might be due to invalid IL or missing references) //IL_1660: 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_14a0: Unknown result type (might be due to invalid IL or missing references) //IL_14a5: Unknown result type (might be due to invalid IL or missing references) //IL_146c: Unknown result type (might be due to invalid IL or missing references) //IL_1471: Unknown result type (might be due to invalid IL or missing references) //IL_148a: Unknown result type (might be due to invalid IL or missing references) //IL_1c89: Unknown result type (might be due to invalid IL or missing references) //IL_1c9e: Unknown result type (might be due to invalid IL or missing references) //IL_1cbb: Unknown result type (might be due to invalid IL or missing references) //IL_1aa3: Unknown result type (might be due to invalid IL or missing references) //IL_1aa8: Unknown result type (might be due to invalid IL or missing references) //IL_1a35: Unknown result type (might be due to invalid IL or missing references) //IL_1a3a: Unknown result type (might be due to invalid IL or missing references) //IL_19dd: Unknown result type (might be due to invalid IL or missing references) //IL_19e2: Unknown result type (might be due to invalid IL or missing references) //IL_19fc: Unknown result type (might be due to invalid IL or missing references) //IL_17b2: Unknown result type (might be due to invalid IL or missing references) //IL_17b7: Unknown result type (might be due to invalid IL or missing references) //IL_1744: Unknown result type (might be due to invalid IL or missing references) //IL_1749: Unknown result type (might be due to invalid IL or missing references) //IL_16ec: Unknown result type (might be due to invalid IL or missing references) //IL_16f1: Unknown result type (might be due to invalid IL or missing references) //IL_170b: Unknown result type (might be due to invalid IL or missing references) //IL_14ed: Unknown result type (might be due to invalid IL or missing references) //IL_14f2: Unknown result type (might be due to invalid IL or missing references) //IL_14c2: 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_1dcb: 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_1dfd: Unknown result type (might be due to invalid IL or missing references) //IL_1d4a: Unknown result type (might be due to invalid IL or missing references) //IL_1ac6: Unknown result type (might be due to invalid IL or missing references) //IL_1acb: Unknown result type (might be due to invalid IL or missing references) //IL_1a64: Unknown result type (might be due to invalid IL or missing references) //IL_1a69: Unknown result type (might be due to invalid IL or missing references) //IL_1a88: Unknown result type (might be due to invalid IL or missing references) //IL_17d5: Unknown result type (might be due to invalid IL or missing references) //IL_17da: Unknown result type (might be due to invalid IL or missing references) //IL_1773: Unknown result type (might be due to invalid IL or missing references) //IL_1778: Unknown result type (might be due to invalid IL or missing references) //IL_1797: Unknown result type (might be due to invalid IL or missing references) //IL_1547: Unknown result type (might be due to invalid IL or missing references) //IL_154c: 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_1510: Unknown result type (might be due to invalid IL or missing references) //IL_1515: Unknown result type (might be due to invalid IL or missing references) //IL_201d: Unknown result type (might be due to invalid IL or missing references) //IL_2032: Unknown result type (might be due to invalid IL or missing references) //IL_204f: Unknown result type (might be due to invalid IL or missing references) //IL_1e8c: Unknown result type (might be due to invalid IL or missing references) //IL_1af5: Unknown result type (might be due to invalid IL or missing references) //IL_1afa: Unknown result type (might be due to invalid IL or missing references) //IL_1b19: Unknown result type (might be due to invalid IL or missing references) //IL_1804: Unknown result type (might be due to invalid IL or missing references) //IL_1809: Unknown result type (might be due to invalid IL or missing references) //IL_1828: Unknown result type (might be due to invalid IL or missing references) //IL_2784: Unknown result type (might be due to invalid IL or missing references) //IL_27a8: Unknown result type (might be due to invalid IL or missing references) //IL_27cc: Unknown result type (might be due to invalid IL or missing references) //IL_27f0: Unknown result type (might be due to invalid IL or missing references) //IL_2810: Unknown result type (might be due to invalid IL or missing references) //IL_2815: Unknown result type (might be due to invalid IL or missing references) //IL_283d: Unknown result type (might be due to invalid IL or missing references) //IL_2849: Unknown result type (might be due to invalid IL or missing references) //IL_2873: Unknown result type (might be due to invalid IL or missing references) //IL_2875: Unknown result type (might be due to invalid IL or missing references) //IL_287d: Unknown result type (might be due to invalid IL or missing references) //IL_288a: Unknown result type (might be due to invalid IL or missing references) //IL_2897: Unknown result type (might be due to invalid IL or missing references) //IL_28a0: Unknown result type (might be due to invalid IL or missing references) //IL_28ca: Unknown result type (might be due to invalid IL or missing references) //IL_28cc: Unknown result type (might be due to invalid IL or missing references) //IL_28d4: Unknown result type (might be due to invalid IL or missing references) //IL_28e1: Unknown result type (might be due to invalid IL or missing references) //IL_28ee: Unknown result type (might be due to invalid IL or missing references) //IL_290f: Unknown result type (might be due to invalid IL or missing references) //IL_2933: Unknown result type (might be due to invalid IL or missing references) //IL_2957: Unknown result type (might be due to invalid IL or missing references) //IL_297b: Unknown result type (might be due to invalid IL or missing references) //IL_29a7: Unknown result type (might be due to invalid IL or missing references) //IL_29ac: Unknown result type (might be due to invalid IL or missing references) //IL_29cf: Unknown result type (might be due to invalid IL or missing references) //IL_20de: Unknown result type (might be due to invalid IL or missing references) //IL_1edb: Unknown result type (might be due to invalid IL or missing references) //IL_1ef0: Unknown result type (might be due to invalid IL or missing references) //IL_1f0d: Unknown result type (might be due to invalid IL or missing references) //IL_2da9: Unknown result type (might be due to invalid IL or missing references) //IL_2dba: Unknown result type (might be due to invalid IL or missing references) //IL_2dbf: Unknown result type (might be due to invalid IL or missing references) //IL_2210: Unknown result type (might be due to invalid IL or missing references) //IL_2220: Unknown result type (might be due to invalid IL or missing references) //IL_2235: Unknown result type (might be due to invalid IL or missing references) //IL_2240: Unknown result type (might be due to invalid IL or missing references) //IL_212d: Unknown result type (might be due to invalid IL or missing references) //IL_2142: Unknown result type (might be due to invalid IL or missing references) //IL_215f: Unknown result type (might be due to invalid IL or missing references) //IL_1f9c: Unknown result type (might be due to invalid IL or missing references) //IL_3255: Unknown result type (might be due to invalid IL or missing references) //IL_3266: Unknown result type (might be due to invalid IL or missing references) //IL_326b: Unknown result type (might be due to invalid IL or missing references) //IL_2a9e: Unknown result type (might be due to invalid IL or missing references) //IL_2ac2: Unknown result type (might be due to invalid IL or missing references) //IL_2ae6: Unknown result type (might be due to invalid IL or missing references) //IL_2b0a: Unknown result type (might be due to invalid IL or missing references) //IL_2b2a: Unknown result type (might be due to invalid IL or missing references) //IL_2b2f: Unknown result type (might be due to invalid IL or missing references) //IL_2b57: Unknown result type (might be due to invalid IL or missing references) //IL_2b63: Unknown result type (might be due to invalid IL or missing references) //IL_2b8d: Unknown result type (might be due to invalid IL or missing references) //IL_2b8f: Unknown result type (might be due to invalid IL or missing references) //IL_2b97: Unknown result type (might be due to invalid IL or missing references) //IL_2ba4: Unknown result type (might be due to invalid IL or missing references) //IL_2bb1: Unknown result type (might be due to invalid IL or missing references) //IL_2bba: Unknown result type (might be due to invalid IL or missing references) //IL_2be4: Unknown result type (might be due to invalid IL or missing references) //IL_2be6: Unknown result type (might be due to invalid IL or missing references) //IL_2bee: Unknown result type (might be due to invalid IL or missing references) //IL_2bfb: Unknown result type (might be due to invalid IL or missing references) //IL_2c08: Unknown result type (might be due to invalid IL or missing references) //IL_2c29: Unknown result type (might be due to invalid IL or missing references) //IL_2c4d: 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_2c95: Unknown result type (might be due to invalid IL or missing references) //IL_2cc1: Unknown result type (might be due to invalid IL or missing references) //IL_2cc6: Unknown result type (might be due to invalid IL or missing references) //IL_2ce9: Unknown result type (might be due to invalid IL or missing references) //IL_21ee: Unknown result type (might be due to invalid IL or missing references) //IL_36f5: Unknown result type (might be due to invalid IL or missing references) //IL_3706: Unknown result type (might be due to invalid IL or missing references) //IL_370b: Unknown result type (might be due to invalid IL or missing references) //IL_2eaf: Unknown result type (might be due to invalid IL or missing references) //IL_2eb4: Unknown result type (might be due to invalid IL or missing references) //IL_22a3: Unknown result type (might be due to invalid IL or missing references) //IL_22b8: Unknown result type (might be due to invalid IL or missing references) //IL_22d5: Unknown result type (might be due to invalid IL or missing references) //IL_2322: Unknown result type (might be due to invalid IL or missing references) //IL_2337: 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_23a1: Unknown result type (might be due to invalid IL or missing references) //IL_23b6: Unknown result type (might be due to invalid IL or missing references) //IL_23d3: Unknown result type (might be due to invalid IL or missing references) //IL_2420: Unknown result type (might be due to invalid IL or missing references) //IL_2435: Unknown result type (might be due to invalid IL or missing references) //IL_2452: Unknown result type (might be due to invalid IL or missing references) //IL_334f: Unknown result type (might be due to invalid IL or missing references) //IL_3354: Unknown result type (might be due to invalid IL or missing references) //IL_2f48: Unknown result type (might be due to invalid IL or missing references) //IL_2f4d: Unknown result type (might be due to invalid IL or missing references) //IL_2ed2: Unknown result type (might be due to invalid IL or missing references) //IL_2ed7: Unknown result type (might be due to invalid IL or missing references) //IL_37ef: Unknown result type (might be due to invalid IL or missing references) //IL_37f4: Unknown result type (might be due to invalid IL or missing references) //IL_33e8: Unknown result type (might be due to invalid IL or missing references) //IL_33ed: Unknown result type (might be due to invalid IL or missing references) //IL_3372: Unknown result type (might be due to invalid IL or missing references) //IL_3377: Unknown result type (might be due to invalid IL or missing references) //IL_2fe7: Unknown result type (might be due to invalid IL or missing references) //IL_2fec: Unknown result type (might be due to invalid IL or missing references) //IL_2f6b: Unknown result type (might be due to invalid IL or missing references) //IL_2f70: Unknown result type (might be due to invalid IL or missing references) //IL_2eed: Unknown result type (might be due to invalid IL or missing references) //IL_2f18: Unknown result type (might be due to invalid IL or missing references) //IL_2f1d: Unknown result type (might be due to invalid IL or missing references) //IL_2f2b: Unknown result type (might be due to invalid IL or missing references) //IL_2f2d: Unknown result type (might be due to invalid IL or missing references) //IL_2f35: Unknown result type (might be due to invalid IL or missing references) //IL_3888: Unknown result type (might be due to invalid IL or missing references) //IL_388d: Unknown result type (might be due to invalid IL or missing references) //IL_3812: Unknown result type (might be due to invalid IL or missing references) //IL_3817: Unknown result type (might be due to invalid IL or missing references) //IL_3487: Unknown result type (might be due to invalid IL or missing references) //IL_348c: Unknown result type (might be due to invalid IL or missing references) //IL_340b: Unknown result type (might be due to invalid IL or missing references) //IL_3410: Unknown result type (might be due to invalid IL or missing references) //IL_338d: Unknown result type (might be due to invalid IL or missing references) //IL_33b8: Unknown result type (might be due to invalid IL or missing references) //IL_33bd: Unknown result type (might be due to invalid IL or missing references) //IL_33cb: Unknown result type (might be due to invalid IL or missing references) //IL_33cd: Unknown result type (might be due to invalid IL or missing references) //IL_33d5: Unknown result type (might be due to invalid IL or missing references) //IL_3163: Unknown result type (might be due to invalid IL or missing references) //IL_3173: Unknown result type (might be due to invalid IL or missing references) //IL_3183: Unknown result type (might be due to invalid IL or missing references) //IL_3188: Unknown result type (might be due to invalid IL or missing references) //IL_3080: Unknown result type (might be due to invalid IL or missing references) //IL_3085: Unknown result type (might be due to invalid IL or missing references) //IL_300a: Unknown result type (might be due to invalid IL or missing references) //IL_300f: Unknown result type (might be due to invalid IL or missing references) //IL_2f86: Unknown result type (might be due to invalid IL or missing references) //IL_2fb1: Unknown result type (might be due to invalid IL or missing references) //IL_2fb6: Unknown result type (might be due to invalid IL or missing references) //IL_2fca: Unknown result type (might be due to invalid IL or missing references) //IL_2fcc: Unknown result type (might be due to invalid IL or missing references) //IL_2fd4: Unknown result type (might be due to invalid IL or missing references) //IL_3927: Unknown result type (might be due to invalid IL or missing references) //IL_392c: Unknown result type (might be due to invalid IL or missing references) //IL_38ab: Unknown result type (might be due to invalid IL or missing references) //IL_38b0: Unknown result type (might be due to invalid IL or missing references) //IL_382d: Unknown result type (might be due to invalid IL or missing references) //IL_3858: Unknown result type (might be due to invalid IL or missing references) //IL_385d: Unknown result type (might be due to invalid IL or missing references) //IL_386b: Unknown result type (might be due to invalid IL or missing references) //IL_386d: Unknown result type (might be due to invalid IL or missing references) //IL_3875: Unknown result type (might be due to invalid IL or missing references) //IL_3603: Unknown result type (might be due to invalid IL or missing references) //IL_3613: Unknown result type (might be due to invalid IL or missing references) //IL_3623: Unknown result type (might be due to invalid IL or missing references) //IL_3628: Unknown result type (might be due to invalid IL or missing references) //IL_3520: Unknown result type (might be due to invalid IL or missing references) //IL_3525: Unknown result type (might be due to invalid IL or missing references) //IL_34aa: Unknown result type (might be due to invalid IL or missing references) //IL_34af: Unknown result type (might be due to invalid IL or missing references) //IL_3426: Unknown result type (might be due to invalid IL or missing references) //IL_3451: Unknown result type (might be due to invalid IL or missing references) //IL_3456: Unknown result type (might be due to invalid IL or missing references) //IL_346a: Unknown result type (might be due to invalid IL or missing references) //IL_346c: Unknown result type (might be due to invalid IL or missing references) //IL_3474: Unknown result type (might be due to invalid IL or missing references) //IL_31b5: Unknown result type (might be due to invalid IL or missing references) //IL_31c5: Unknown result type (might be due to invalid IL or missing references) //IL_31d5: Unknown result type (might be due to invalid IL or missing references) //IL_31da: Unknown result type (might be due to invalid IL or missing references) //IL_30a3: Unknown result type (might be due to invalid IL or missing references) //IL_30a8: Unknown result type (might be due to invalid IL or missing references) //IL_3025: Unknown result type (might be due to invalid IL or missing references) //IL_3050: Unknown result type (might be due to invalid IL or missing references) //IL_3055: Unknown result type (might be due to invalid IL or missing references) //IL_3063: Unknown result type (might be due to invalid IL or missing references) //IL_3065: Unknown result type (might be due to invalid IL or missing references) //IL_306d: Unknown result type (might be due to invalid IL or missing references) //IL_3aa3: Unknown result type (might be due to invalid IL or missing references) //IL_3ab3: Unknown result type (might be due to invalid IL or missing references) //IL_3ac3: Unknown result type (might be due to invalid IL or missing references) //IL_3ac8: Unknown result type (might be due to invalid IL or missing references) //IL_39c0: Unknown result type (might be due to invalid IL or missing references) //IL_39c5: Unknown result type (might be due to invalid IL or missing references) //IL_394a: Unknown result type (might be due to invalid IL or missing references) //IL_394f: Unknown result type (might be due to invalid IL or missing references) //IL_38c6: Unknown result type (might be due to invalid IL or missing references) //IL_38f1: Unknown result type (might be due to invalid IL or missing references) //IL_38f6: Unknown result type (might be due to invalid IL or missing references) //IL_390a: Unknown result type (might be due to invalid IL or missing references) //IL_390c: Unknown result type (might be due to invalid IL or missing references) //IL_3914: Unknown result type (might be due to invalid IL or missing references) //IL_3655: Unknown result type (might be due to invalid IL or missing references) //IL_3665: Unknown result type (might be due to invalid IL or missing references) //IL_3675: Unknown result type (might be due to invalid IL or missing references) //IL_367a: Unknown result type (might be due to invalid IL or missing references) //IL_3543: Unknown result type (might be due to invalid IL or missing references) //IL_3548: Unknown result type (might be due to invalid IL or missing references) //IL_34c5: Unknown result type (might be due to invalid IL or missing references) //IL_34f0: Unknown result type (might be due to invalid IL or missing references) //IL_34f5: Unknown result type (might be due to invalid IL or missing references) //IL_3503: Unknown result type (might be due to invalid IL or missing references) //IL_3505: Unknown result type (might be due to invalid IL or missing references) //IL_350d: Unknown result type (might be due to invalid IL or missing references) //IL_30be: Unknown result type (might be due to invalid IL or missing references) //IL_30e9: Unknown result type (might be due to invalid IL or missing references) //IL_30ee: Unknown result type (might be due to invalid IL or missing references) //IL_3102: Unknown result type (might be due to invalid IL or missing references) //IL_3104: Unknown result type (might be due to invalid IL or missing references) //IL_310c: Unknown result type (might be due to invalid IL or missing references) //IL_3af5: Unknown result type (might be due to invalid IL or missing references) //IL_3b05: Unknown result type (might be due to invalid IL or missing references) //IL_3b15: Unknown result type (might be due to invalid IL or missing references) //IL_3b1a: Unknown result type (might be due to invalid IL or missing references) //IL_39e3: Unknown result type (might be due to invalid IL or missing references) //IL_39e8: Unknown result type (might be due to invalid IL or missing references) //IL_3965: Unknown result type (might be due to invalid IL or missing references) //IL_3990: Unknown result type (might be due to invalid IL or missing references) //IL_3995: Unknown result type (might be due to invalid IL or missing references) //IL_39a3: Unknown result type (might be due to invalid IL or missing references) //IL_39a5: Unknown result type (might be due to invalid IL or missing references) //IL_39ad: Unknown result type (might be due to invalid IL or missing references) //IL_355e: Unknown result type (might be due to invalid IL or missing references) //IL_3589: Unknown result type (might be due to invalid IL or missing references) //IL_358e: Unknown result type (might be due to invalid IL or missing references) //IL_35a2: Unknown result type (might be due to invalid IL or missing references) //IL_35a4: Unknown result type (might be due to invalid IL or missing references) //IL_35ac: Unknown result type (might be due to invalid IL or missing references) //IL_39fe: Unknown result type (might be due to invalid IL or missing references) //IL_3a29: Unknown result type (might be due to invalid IL or missing references) //IL_3a2e: Unknown result type (might be due to invalid IL or missing references) //IL_3a42: Unknown result type (might be due to invalid IL or missing references) //IL_3a44: Unknown result type (might be due to invalid IL or missing references) //IL_3a4c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)cannon == (Object)null || (Object)(object)lmgL == (Object)null || (Object)(object)lmgR == (Object)null || (Object)(object)lmgL2 == (Object)null || (Object)(object)lmgR2 == (Object)null || (Object)(object)rocket1 == (Object)null || (Object)(object)rocket2 == (Object)null || (Object)(object)rocket3 == (Object)null || (Object)(object)rocket4 == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (Rev11.activeInHierarchy || Rev22.activeInHierarchy || Rev33.activeInHierarchy) { if (((FVRInteractiveObject)maingrab).IsHeld) { ((FVRInteractiveObject)maingrab).ForceBreakInteraction(); } ((FVRInteractiveObject)maingrab).IsSimpleInteract = true; maingrab.DistantGrabbable = false; } if (!Rev11.activeInHierarchy && !Rev22.activeInHierarchy && !Rev33.activeInHierarchy && !Level1Geo.activeInHierarchy && !Level2Geo.activeInHierarchy && !Level3Geo.activeInHierarchy) { ((FVRInteractiveObject)maingrab).IsSimpleInteract = false; maingrab.DistantGrabbable = true; } if (Level1Geo.activeInHierarchy || Level2Geo.activeInHierarchy || Level3Geo.activeInHierarchy) { if (((FVRInteractiveObject)maingrab).IsHeld) { ((FVRInteractiveObject)maingrab).ForceBreakInteraction(); } ((FVRInteractiveObject)maingrab).IsSimpleInteract = true; maingrab.DistantGrabbable = false; } if (!Level1.activeInHierarchy && !Level2.activeInHierarchy && !Level3.activeInHierarchy) { bypassed = false; laserMark = null; search = false; } if (Level1.activeInHierarchy || Level2.activeInHierarchy || Level3.activeInHierarchy) { search = true; } if (!Level1Geo.activeInHierarchy && !Level2Geo.activeInHierarchy && !Level3Geo.activeInHierarchy) { if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable != (Object)null && ((Object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject).name == "TF2SentryRemoter(Clone)") { if ((Object)(object)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable).gameObject.GetComponent() != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable).gameObject.GetComponent().OBJtoEnable2 != (Object)null) { if (GM.CurrentMovementManager.Hands[0].Input.TriggerFloat > 0.8f) { fire = true; } else if (GM.CurrentMovementManager.Hands[0].Input.TriggerFloat <= 0.8f) { fire = false; } bypassed = true; laserMark = ((Component)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable).gameObject.GetComponent().OBJtoEnable2.gameObject; } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable).gameObject.GetComponent().OBJtoEnable2 == (Object)null) { laserMark = null; bypassed = false; } } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable).gameObject.GetComponent() == (Object)null) { laserMark = null; bypassed = false; } } else if ((Object)(object)GM.CurrentMovementManager.Hands[0].OtherHand.m_currentInteractable == (Object)null) { laserMark = null; bypassed = false; } } if ((Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable != (Object)null && ((Object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject).name == "TF2SentryRemoter(Clone)") { if ((Object)(object)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent() != (Object)null) { if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent().OBJtoEnable2 != (Object)null) { if (GM.CurrentMovementManager.Hands[1].Input.TriggerFloat > 0.8f) { fire = true; } else if (GM.CurrentMovementManager.Hands[1].Input.TriggerFloat <= 0.8f) { fire = false; } bypassed = true; laserMark = ((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent().OBJtoEnable2.gameObject; } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent().OBJtoEnable2 == (Object)null) { laserMark = null; bypassed = false; } } else if ((Object)(object)((Component)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable).gameObject.GetComponent() == (Object)null) { laserMark = null; bypassed = false; } } else if ((Object)(object)GM.CurrentMovementManager.Hands[1].OtherHand.m_currentInteractable == (Object)null) { laserMark = null; bypassed = false; } } if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable == (Object)null && (Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable == (Object)null) { bypassed = false; laserMark = null; } if ((Object)(object)GM.CurrentMovementManager.Hands[0].m_currentInteractable != (Object)null && (Object)(object)GM.CurrentMovementManager.Hands[1].m_currentInteractable != (Object)null) { if (((Object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject).name != "TF2SentryRemoter(Clone)" && ((Object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject).name != "TF2SentryRemoter(Clone)") { bypassed = false; laserMark = null; } if (((Object)((Component)GM.CurrentMovementManager.Hands[0].m_currentInteractable).gameObject).name == "TF2SentryRemoter(Clone)" && ((Object)((Component)GM.CurrentMovementManager.Hands[1].m_currentInteractable).gameObject).name == "TF2SentryRemoter(Clone)") { bypassed = false; laserMark = null; } } ((FVRInteractiveObject)maingrab).IsSimpleInteract = false; maingrab.DistantGrabbable = true; } if ((((FVRInteractiveObject)maingrab).IsHeld || (Object)(object)maingrab.m_quickbeltSlot != (Object)null) && curlevel == 1) { ((Component)HX1).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Component)HY1).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); grabbed1 = true; search = false; fire = false; } if ((((FVRInteractiveObject)maingrab).IsHeld || (Object)(object)maingrab.m_quickbeltSlot != (Object)null) && curlevel == 2) { ((Component)HX2).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Component)HY2).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); grabbed2 = true; search = false; fire = false; } if ((((FVRInteractiveObject)maingrab).IsHeld || (Object)(object)maingrab.m_quickbeltSlot != (Object)null) && curlevel == 3) { ((Component)HX3).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Component)HY3).gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 0f); grabbed3 = true; search = false; fire = false; } if (!((FVRInteractiveObject)maingrab).IsHeld && (Object)(object)maingrab.m_quickbeltSlot == (Object)null && curlevel == 1) { grabbed1 = false; } if (!((FVRInteractiveObject)maingrab).IsHeld && (Object)(object)maingrab.m_quickbeltSlot == (Object)null && curlevel == 2) { grabbed2 = false; } if (!((FVRInteractiveObject)maingrab).IsHeld && (Object)(object)maingrab.m_quickbeltSlot == (Object)null && curlevel == 3) { grabbed3 = false; } if (grabbed1 && curlevel == 1 && cdupgrade <= 0f) { anit11.SetBool("Play", false); Rev11.SetActive(false); if (cd1 > 0f) { Level1.SetActive(false); Rev1.SetActive(true); anit1.SetBool("Play", true); cd1 -= Time.deltaTime; } else if (cd1 <= 0f) { anit1.SetBool("Play", false); Rev1.SetActive(false); toolboxGeo.SetActive(true); cd1 = 0f; } } if (!grabbed1 && curlevel == 1 && cdupgrade <= 0f) { anit1.SetBool("Play", false); Rev1.SetActive(false); if (cd1 < 1f) { toolboxGeo.SetActive(false); Rev11.SetActive(true); anit11.SetBool("Play", true); cd1 += Time.deltaTime; } else if (cd1 >= 1f) { Level1.SetActive(true); anit11.SetBool("Play", false); Rev11.SetActive(false); cd1 = 1f; } } if (grabbed2 && curlevel == 2 && cdupgrade <= 0f) { anit11.SetBool("Play", false); Rev11.SetActive(false); anit22.SetBool("Play", false); Rev22.SetActive(false); if (cd2 > 0f) { Level2.SetActive(false); Rev2.SetActive(true); anit2.SetBool("Play", true); cd2 -= Time.deltaTime; } else if (cd2 <= 0f) { anit2.SetBool("Play", false); Rev2.SetActive(false); cd2 = 0f; if (cd1 > 0f) { Rev1.SetActive(true); anit1.SetBool("Play", true); cd1 -= Time.deltaTime; } else if (cd1 <= 0f) { anit1.SetBool("Play", false); Rev1.SetActive(false); toolboxGeo.SetActive(true); cd1 = 0f; } } } if (!grabbed2 && curlevel == 2 && cdupgrade <= 0f) { anit1.SetBool("Play", false); Rev1.SetActive(false); anit2.SetBool("Play", false); Rev2.SetActive(false); if (cd1 < 1f) { toolboxGeo.SetActive(false); Rev11.SetActive(true); anit11.SetBool("Play", true); cd1 += Time.deltaTime; } else if (cd1 >= 1f) { anit11.SetBool("Play", false); Rev11.SetActive(false); cd1 = 1f; if (cd2 < 0.25f) { Rev22.SetActive(true); anit22.SetBool("Play", true); cd2 += Time.deltaTime; } else if (cd2 >= 0.25f) { Level2.SetActive(true); anit22.SetBool("Play", false); Rev22.SetActive(false); cd2 = 0.25f; } } } if (grabbed3 && curlevel == 3 && cdupgrade <= 0f) { anit11.SetBool("Play", false); Rev11.SetActive(false); anit22.SetBool("Play", false); Rev22.SetActive(false); anit33.SetBool("Play", false); Rev33.SetActive(false); if (cd3 > 0f) { Level3.SetActive(false); Rev3.SetActive(true); anit3.SetBool("Play", true); cd3 -= Time.deltaTime; } else if (cd3 <= 0f) { anit3.SetBool("Play", false); Rev3.SetActive(false); cd3 = 0f; if (cd2 > 0f) { Rev2.SetActive(true); anit2.SetBool("Play", true); cd2 -= Time.deltaTime; } else if (cd2 <= 0f) { anit2.SetBool("Play", false); Rev2.SetActive(false); cd2 = 0f; if (cd1 > 0f) { Rev1.SetActive(true); anit1.SetBool("Play", true); cd1 -= Time.deltaTime; } else if (cd1 <= 0f) { anit1.SetBool("Play", false); Rev1.SetActive(false); toolboxGeo.SetActive(true); cd1 = 0f; } } } } if (!grabbed3 && curlevel == 3 && cdupgrade <= 0f) { anit1.SetBool("Play", false); Rev1.SetActive(false); anit2.SetBool("Play", false); Rev2.SetActive(false); anit3.SetBool("Play", false); Rev3.SetActive(false); if (cd1 < 1f) { toolboxGeo.SetActive(false); Rev11.SetActive(true); anit11.SetBool("Play", true); cd1 += Time.deltaTime; } else if (cd1 >= 1f) { anit11.SetBool("Play", false); Rev11.SetActive(false); cd1 = 1f; if (cd2 < 0.25f) { Rev22.SetActive(true); anit22.SetBool("Play", true); cd2 += Time.deltaTime; } else if (cd2 >= 0.25f) { anit22.SetBool("Play", false); Rev22.SetActive(false); cd2 = 0.25f; if (cd3 < 0.25f) { Level3.SetActive(false); Rev33.SetActive(true); anit33.SetBool("Play", true); cd3 += Time.deltaTime; } else if ((double)cd3 >= 0.25) { anit33.SetBool("Play", false); Rev33.SetActive(false); Level3.SetActive(true); cd3 = 0.25f; } } } } if (!bypassed) { laser1.IsActive = false; laser2.IsActive = false; laser3.IsActive = false; if ((Object)(object)sosigLink == (Object)null) { if (search) { if (!reverse) { HX.transform.localEulerAngles = new Vector3(0f, HX.transform.localEulerAngles.y + 20f * Time.deltaTime, 0f); } else if (reverse) { HX.transform.localEulerAngles = new Vector3(0f, HX.transform.localEulerAngles.y - 20f * Time.deltaTime, 0f); } if (HX.transform.localEulerAngles.y >= 45f && HX.transform.localEulerAngles.y <= 180f) { reverse = true; } if (HX.transform.localEulerAngles.y <= 315f && HX.transform.localEulerAngles.y > 180f) { reverse = false; } HY.transform.localEulerAngles = new Vector3(Mathf.SmoothDamp(HY.transform.localEulerAngles.y, 0f, ref refy1, 0.25f), 0f, 0f); } alert.SetActive(false); } else if ((Object)(object)sosigLink != (Object)null) { XAxisLookAt(sightX.transform, ((Component)sosigLink).gameObject.transform.position, Vector3.forward); YAxisLookAt(sightY.transform, ((Component)sosigLink).gameObject.transform.position, Vector3.forward); if (sightY.transform.localEulerAngles.y > 0f && sightY.transform.localEulerAngles.y < 180f) { HX.transform.localEulerAngles = new Vector3(0f, HX.transform.localEulerAngles.y + 100f * Time.deltaTime, 0f); } else if (sightY.transform.localEulerAngles.y < 360f && sightY.transform.localEulerAngles.y > 180f) { HX.transform.localEulerAngles = new Vector3(0f, HX.transform.localEulerAngles.y - 100f * Time.deltaTime, 0f); } if (sightX.transform.localEulerAngles.x > 0f && sightX.transform.localEulerAngles.x < 180f) { HY.transform.localEulerAngles = new Vector3(HY.transform.localEulerAngles.x + 100f * Time.deltaTime, 0f, 0f); } else if (sightX.transform.localEulerAngles.x > 180f && sightX.transform.localEulerAngles.x < 360f) { HY.transform.localEulerAngles = new Vector3(HY.transform.localEulerAngles.x - 100f * Time.deltaTime, 0f, 0f); } alert.SetActive(true); } } else if (bypassed) { if ((Object)(object)laserMark != (Object)null) { laser1.IsActive = true; laser2.IsActive = true; laser3.IsActive = true; alert.SetActive(false); XAxisLookAt(sightX.transform, laserMark.gameObject.transform.position, Vector3.forward); YAxisLookAt(sightY.transform, laserMark.gameObject.transform.position, Vector3.forward); if (sightY.transform.localEulerAngles.y > 0f && sightY.transform.localEulerAngles.y < 180f) { HX.transform.localEulerAngles = new Vector3(0f, HX.transform.localEulerAngles.y + 100f * Time.deltaTime, 0f); } else if (sightY.transform.localEulerAngles.y < 360f && sightY.transform.localEulerAngles.y > 180f) { HX.transform.localEulerAngles = new Vector3(0f, HX.transform.localEulerAngles.y - 100f * Time.deltaTime, 0f); } if (sightX.transform.localEulerAngles.x > 0f && sightX.transform.localEulerAngles.x < 180f) { HY.transform.localEulerAngles = new Vector3(HY.transform.localEulerAngles.x + 100f * Time.deltaTime, 0f, 0f); } else if (sightX.transform.localEulerAngles.x > 180f && sightX.transform.localEulerAngles.x < 360f) { HY.transform.localEulerAngles = new Vector3(HY.transform.localEulerAngles.x - 100f * Time.deltaTime, 0f, 0f); } BPCD = 2f; } else if ((Object)(object)laserMark == (Object)null) { laser1.IsActive = false; laser2.IsActive = false; laser3.IsActive = false; if (BPCD > 0f) { BPCD -= Time.deltaTime; } else if (BPCD <= 0f) { BPCD = 2f; bypassed = false; } } } cannonnum = Mathf.Clamp(cannonnum, 0f, 500f); lmgLnum = Mathf.Clamp(lmgLnum, 0f, 1000f); lmgRnum = Mathf.Clamp(lmgRnum, 0f, 1000f); rocketnum = Mathf.Clamp(rocketnum, 0f, 10f); if (fire) { if (curlevel == 1) { cannoncd -= Time.deltaTime; if (cannonnum > 0f && cannoncd <= 0f) { cannonC.SetRound((FireArmRoundClass)1, ((Component)cannonC).gameObject.transform.position, ((Component)cannonC).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotgun, ((Component)cannonmuzzle).transform.position); cannon.Fire(cannonC, ((Component)cannonmuzzle).transform, false, 1f, -1f); cannon.FireMuzzleSmoke(); cannoncd = 0.25f; cannonnum -= 1f; } if (cannonnum <= 0f && cannoncd <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)cannonmuzzle).transform.position); cannoncd = 0.25f; } } if (curlevel == 2) { lmgLcd -= Time.deltaTime; lmgRcd -= Time.deltaTime; if (lmgLnum > 0f && lmgLcd <= 0f) { lmgLC.SetRound((FireArmRoundClass)1, ((Component)lmgLC).gameObject.transform.position, ((Component)lmgLC).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotgun, ((Component)lmgLmuzzle).transform.position); lmgL.Fire(lmgLC, ((Component)lmgLmuzzle).transform, false, 1f, -1f); lmgL.FireMuzzleSmoke(); lmgLcd = 0.1f; lmgLnum -= 1f; } if (lmgLnum <= 0f && lmgLcd <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)lmgLmuzzle).transform.position); lmgLcd = 0.1f; } if (lmgRnum > 0f && lmgRcd <= 0f) { lmgRC.SetRound((FireArmRoundClass)1, ((Component)lmgRC).gameObject.transform.position, ((Component)lmgRC).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotgun, ((Component)lmgRmuzzle).transform.position); lmgR.Fire(lmgRC, ((Component)lmgRmuzzle).transform, false, 1f, -1f); lmgR.FireMuzzleSmoke(); lmgRcd = 0.1f; lmgRnum -= 1f; } if (lmgRnum <= 0f && lmgRcd <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)lmgRmuzzle).transform.position); lmgRcd = 0.1f; } } if (curlevel == 3) { lmgLcd2 -= Time.deltaTime; lmgRcd2 -= Time.deltaTime; if (lmgLnum2 > 0f && lmgLcd2 <= 0f) { lmgLC2.SetRound((FireArmRoundClass)1, ((Component)lmgLC2).gameObject.transform.position, ((Component)lmgLC2).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotgun, ((Component)lmgLmuzzle2).transform.position); lmgL2.Fire(lmgLC2, ((Component)lmgLmuzzle2).transform, false, 1f, -1f); lmgL2.FireMuzzleSmoke(); lmgLcd2 = 0.1f; lmgLnum2 -= 1f; } if (lmgLnum2 <= 0f && lmgLcd2 <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)lmgLmuzzle2).transform.position); lmgLcd2 = 0.1f; } if (lmgRnum2 > 0f && lmgRcd2 <= 0f) { lmgRC2.SetRound((FireArmRoundClass)1, ((Component)lmgRC2).gameObject.transform.position, ((Component)lmgRC2).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotgun, ((Component)lmgRmuzzle2).transform.position); lmgR2.Fire(lmgRC2, ((Component)lmgRmuzzle2).transform, false, 1f, -1f); lmgR2.FireMuzzleSmoke(); lmgRcd2 = 0.1f; lmgRnum2 -= 1f; } if (lmgRnum2 <= 0f && lmgRcd2 <= 0f) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)lmgRmuzzle2).transform.position); lmgRcd2 = 0.1f; } if (!Physics.CapsuleCast(laserdetect.transform.position, laserdetect.transform.position, 0.25f, laserdetect.transform.forward, 10f, LayerMask.op_Implicit(LM))) { rocketcd -= Time.deltaTime; if (rocketnum > 0f && rocketcd <= 0f) { rocket1C.SetRound((FireArmRoundClass)160, ((Component)rocket1C).gameObject.transform.position, ((Component)rocket1C).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotrocket, ((Component)rocket1muzzle).transform.position); rocket1.Fire(rocket1C, ((Component)rocket1muzzle).transform, false, 1f, -1f); rocket2C.SetRound((FireArmRoundClass)160, ((Component)rocket2C).gameObject.transform.position, ((Component)rocket2C).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotrocket, ((Component)rocket2muzzle).transform.position); rocket2.Fire(rocket2C, ((Component)rocket2muzzle).transform, false, 1f, -1f); rocket3C.SetRound((FireArmRoundClass)160, ((Component)rocket3C).gameObject.transform.position, ((Component)rocket3C).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotrocket, ((Component)rocket3muzzle).transform.position); rocket3.Fire(rocket3C, ((Component)rocket3muzzle).transform, false, 1f, -1f); rocket4C.SetRound((FireArmRoundClass)160, ((Component)rocket4C).gameObject.transform.position, ((Component)rocket4C).gameObject.transform.rotation); SM.PlayCoreSound((FVRPooledAudioType)41, shotrocket, ((Component)rocket4muzzle).transform.position); rocket4.Fire(rocket4C, ((Component)rocket4muzzle).transform, false, 1f, -1f); rocketcd = 5f; rocketnum -= 1f; } } } } else if (!fire) { cannoncd = 0.25f; lmgLcd = 0.1f; lmgRcd = 0.1f; rocketcd = 1f; } if (search) { sosigLink = SearchTarget(); } cd -= Time.deltaTime; if (cd <= 0f) { ani1.speed = Mathf.SmoothDamp(ani1.speed, 1f, ref a1ref, 0.1f); build1.pitch = Mathf.SmoothDamp(build1.pitch, 1f, ref b1ref, 0.1f); ani2.speed = Mathf.SmoothDamp(ani2.speed, 1f, ref a2ref, 0.1f); build2.pitch = Mathf.SmoothDamp(build2.pitch, 1f, ref b2ref, 0.1f); ani3.speed = Mathf.SmoothDamp(ani3.speed, 1f, ref a3ref, 0.1f); build3.pitch = Mathf.SmoothDamp(build3.pitch, 1f, ref b3ref, 0.1f); cd = 0f; } else if (cd > 0f) { ani1.speed = Mathf.SmoothDamp(ani1.speed, 2f, ref a1ref, 0.1f); build1.pitch = Mathf.SmoothDamp(build1.pitch, 2f, ref b1ref, 0.1f); ani2.speed = Mathf.SmoothDamp(ani2.speed, 2f, ref a2ref, 0.1f); build2.pitch = Mathf.SmoothDamp(build2.pitch, 2f, ref b2ref, 0.1f); ani3.speed = Mathf.SmoothDamp(ani3.speed, 2f, ref a3ref, 0.1f); build3.pitch = Mathf.SmoothDamp(build3.pitch, 2f, ref b3ref, 0.1f); } if (levelup >= 100f && curlevel < 1) { search = false; sightY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightY1.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightY2.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightY3.transform.localEulerAngles = new Vector3(0f, 0f, 0f); HY.transform.localEulerAngles = new Vector3(Mathf.SmoothDamp(HY.transform.localEulerAngles.x, 0f, ref refy, 0.2f), 0f, 0f); JointSpring val = default(JointSpring); val.spring = 2000f; val.damper = 50f; val.targetPosition = 0f; JointSpring spring = val; HY1.spring = spring; HY2.spring = spring; HY3.spring = spring; val = default(JointSpring); val.spring = 2000f; val.damper = 50f; val.targetPosition = 0f; JointSpring spring2 = val; HX1.spring = spring2; HX2.spring = spring2; HX3.spring = spring2; sightX.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightX1.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightX2.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightX3.transform.localEulerAngles = new Vector3(0f, 0f, 0f); fire = false; HX.transform.localEulerAngles = new Vector3(0f, Mathf.SmoothDamp(HX.transform.localEulerAngles.y, 0f, ref refx, 0.2f), 0f); waitcenter -= Time.deltaTime; if (waitcenter <= 0f) { if (curlevel < 1) { cdupgrade = 13f; } if (curlevel >= 1) { cdupgrade = 7f; } curlevel++; levelup = 0f; waitcenter = 2f; } } if (levelup >= 1000f && curlevel < 3 && curlevel >= 1) { search = false; sightY.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightY1.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightY2.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightY3.transform.localEulerAngles = new Vector3(0f, 0f, 0f); HY.transform.localEulerAngles = new Vector3(Mathf.SmoothDamp(HY.transform.localEulerAngles.x, 0f, ref refy, 0.2f), 0f, 0f); JointSpring val = default(JointSpring); val.spring = 2000f; val.damper = 50f; val.targetPosition = 0f; JointSpring spring3 = val; HY1.spring = spring3; HY2.spring = spring3; HY3.spring = spring3; val = default(JointSpring); val.spring = 2000f; val.damper = 50f; val.targetPosition = 0f; JointSpring spring4 = val; HX1.spring = spring4; HX2.spring = spring4; HX3.spring = spring4; sightX.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightX1.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightX2.transform.localEulerAngles = new Vector3(0f, 0f, 0f); sightX3.transform.localEulerAngles = new Vector3(0f, 0f, 0f); fire = false; HX.transform.localEulerAngles = new Vector3(0f, Mathf.SmoothDamp(HX.transform.localEulerAngles.y, 0f, ref refx, 0.2f), 0f); waitcenter -= Time.deltaTime; if (waitcenter <= 0f) { if (curlevel < 1) { cdupgrade = 13f; } if (curlevel >= 1) { cdupgrade = 7f; } curlevel++; levelup = 0f; waitcenter = 2f; } } if (curlevel == 1) { Level2.SetActive(false); Level3.SetActive(false); heightholder.transform.localPosition = ((Component)lv1height).transform.localPosition; AnimatorStateInfo currentAnimatorStateInfo = ani1.GetCurrentAnimatorStateInfo(0); if (cdupgrade > 6.5f) { cdupgrade -= Time.deltaTime; Level1.SetActive(false); ((Behaviour)ani1).enabled = true; Level1Geo.SetActive(true); } else if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsTag("lv1") && cdupgrade < 12f) { if (!sp1) { Level1.SetActive(true); Level1Geo.SetActive(false); cdupgrade = 0f; sp1 = true; } toolbox.SetActive(false); if (!search && levelup < 1000f) { search = true; } } if (search) { if (HX.transform.localEulerAngles.y >= 0f && HX.transform.localEulerAngles.y <= 180f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HX.transform.localEulerAngles.y; JointSpring spring5 = val; HX1.spring = spring5; } if (HX.transform.localEulerAngles.y <= 360f && HX.transform.localEulerAngles.y >= 180f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HX.transform.localEulerAngles.y - 360f; JointSpring spring6 = val; HX1.spring = spring6; } if (HY.transform.localEulerAngles.x >= 0f && HY.transform.localEulerAngles.x < 90f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HY.transform.localEulerAngles.x; JointSpring spring7 = val; HY1.spring = spring7; } if (HY.transform.localEulerAngles.x <= 360f && HY.transform.localEulerAngles.x > 270f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HY.transform.localEulerAngles.x - 360f; JointSpring spring8 = val; HY1.spring = spring8; } } if ((Object)(object)laserMark == (Object)null) { if ((Object)(object)sosigLink == (Object)null) { fire = false; } else if ((Object)(object)sosigLink != (Object)null) { if (Vector3.Angle(((Component)FireArm1).transform.forward, ((Component)sosigLink).transform.position - ((Component)FireArm1).transform.position) <= 10f) { fire = true; } else if (Vector3.Angle(((Component)FireArm1).transform.forward, ((Component)sosigLink).transform.position - ((Component)FireArm1).transform.position) > 10f) { fire = false; } } } life = Mathf.Clamp(life, 0f, 5000f); } else if (curlevel == 2) { Level1.SetActive(false); Level3.SetActive(false); heightholder.transform.localPosition = ((Component)lv2height).transform.localPosition; AnimatorStateInfo currentAnimatorStateInfo2 = ani2.GetCurrentAnimatorStateInfo(0); if (cdupgrade > 3.5f) { Level2.SetActive(false); ((Behaviour)ani2).enabled = true; Level2Geo.SetActive(true); cdupgrade -= Time.deltaTime; } else if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo2)).IsTag("lv2") && cdupgrade <= 5f) { if (!sp2) { Level2.SetActive(true); Level2Geo.SetActive(false); cdupgrade = 0f; sp2 = true; } if (!search && levelup < 1000f) { search = true; } } if (search) { if (HX.transform.localEulerAngles.y >= 0f && HX.transform.localEulerAngles.y <= 180f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HX.transform.localEulerAngles.y; JointSpring spring9 = val; HX2.spring = spring9; } if (HX.transform.localEulerAngles.y <= 360f && HX.transform.localEulerAngles.y >= 180f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HX.transform.localEulerAngles.y - 360f; JointSpring spring10 = val; HX2.spring = spring10; } if (HY.transform.localEulerAngles.x >= 0f && HY.transform.localEulerAngles.x < 90f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HY.transform.localEulerAngles.x; JointSpring spring11 = val; HY2.spring = spring11; } if (HY.transform.localEulerAngles.x <= 360f && HY.transform.localEulerAngles.x > 270f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HY.transform.localEulerAngles.x - 360f; JointSpring spring12 = val; HY2.spring = spring12; } } if ((Object)(object)laserMark == (Object)null) { if ((Object)(object)sosigLink == (Object)null) { fire = false; } else if ((Object)(object)sosigLink != (Object)null) { if (Vector3.Angle(((Component)FireArm2).transform.forward, ((Component)sosigLink).transform.position - ((Component)FireArm2).transform.position) <= 10f) { fire = true; } else if (Vector3.Angle(((Component)FireArm2).transform.forward, ((Component)sosigLink).transform.position - ((Component)FireArm2).transform.position) > 10f) { fire = false; } } } life = Mathf.Clamp(life, 0f, 10000f); } else { if (curlevel != 3) { return; } Level1.SetActive(false); Level2.SetActive(false); heightholder.transform.localPosition = ((Component)lv3height).transform.localPosition; AnimatorStateInfo currentAnimatorStateInfo3 = ani3.GetCurrentAnimatorStateInfo(0); if (cdupgrade > 3.5f) { Level3.SetActive(false); Level3Geo.SetActive(true); ((Behaviour)ani3).enabled = true; cdupgrade -= Time.deltaTime; } else if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo3)).IsTag("lv3") && cdupgrade < 5f) { if (!sp3) { Level3.SetActive(true); Level3Geo.SetActive(false); cdupgrade = 0f; sp3 = true; } if (!search && levelup < 1000f) { search = true; } } if (search) { if (HX.transform.localEulerAngles.y >= 0f && HX.transform.localEulerAngles.y <= 180f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HX.transform.localEulerAngles.y; JointSpring spring13 = val; HX3.spring = spring13; } if (HX.transform.localEulerAngles.y <= 360f && HX.transform.localEulerAngles.y >= 180f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HX.transform.localEulerAngles.y - 360f; JointSpring spring14 = val; HX3.spring = spring14; } if (HY.transform.localEulerAngles.x >= 0f && HY.transform.localEulerAngles.x < 90f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HY.transform.localEulerAngles.x; JointSpring spring15 = val; HY3.spring = spring15; } if (HY.transform.localEulerAngles.x <= 360f && HY.transform.localEulerAngles.x > 270f) { JointSpring val = default(JointSpring); val.spring = 1000f; val.damper = 50f; val.targetPosition = HY.transform.localEulerAngles.x - 360f; JointSpring spring16 = val; HY3.spring = spring16; } } if ((Object)(object)laserMark == (Object)null) { if ((Object)(object)sosigLink == (Object)null) { fire = false; } else if ((Object)(object)sosigLink != (Object)null) { if (Vector3.Angle(((Component)FireArm3).transform.forward, ((Component)sosigLink).transform.position - ((Component)FireArm3).transform.position) <= 10f) { fire = true; } else if (Vector3.Angle(((Component)FireArm3).transform.forward, ((Component)sosigLink).transform.position - ((Component)FireArm3).transform.position) > 10f) { fire = false; } } } life = Mathf.Clamp(life, 0f, 15000f); } } private void XAxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, 0f, 0f); } private void YAxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(0f, tr_self.localEulerAngles.y, 0f); } private SosigLink SearchTarget() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Invalid comparison between Unknown and I4 //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Invalid comparison between Unknown and I4 //IL_00d9: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_0215: 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_0161: 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_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) Collider[] array = Physics.OverlapSphere(((Component)FireArm).transform.position, 50f, LayerMask.op_Implicit(LatchingMask)); List list = new List(); for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i].attachedRigidbody != (Object)null && !list.Contains(array[i].attachedRigidbody)) { list.Add(array[i].attachedRigidbody); } } SosigLink result = null; float num = 360f; for (int j = 0; j < list.Count; j++) { SosigLink component = ((Component)list[j]).GetComponent(); if ((Object)(object)TMM == (Object)null) { if ((Object)(object)component != (Object)null && (int)component.S.BodyState != 3) { Vector3 val = ((Component)list[j]).transform.position - ((Component)FireArm).transform.position; float num2 = Vector3.Angle(val, ((Component)FireArm).transform.forward); Sosig s = component.S; SosigLink val2 = ((!(num2 <= 360f)) ? s.Links[1] : s.Links[0]); if (!Physics.Linecast(((Component)FireArm).transform.position, ((Component)val2).transform.position, LayerMask.op_Implicit(BlockingMask), (QueryTriggerInteraction)1)) { result = val2; num = num2; } } } else if ((Object)(object)TMM != (Object)null && (Object)(object)component != (Object)null && (int)component.S.BodyState != 3 && TMM.IFFsBlue.Contains(component.S.GetIFF())) { Vector3 val3 = ((Component)list[j]).transform.position - ((Component)FireArm).transform.position; float num3 = Vector3.Angle(val3, ((Component)FireArm).transform.forward); Sosig s2 = component.S; SosigLink val4 = ((!(num3 <= 360f)) ? s2.Links[1] : s2.Links[0]); if (!Physics.Linecast(((Component)FireArm).transform.position, ((Component)val4).transform.position, LayerMask.op_Implicit(BlockingMask), (QueryTriggerInteraction)1)) { result = val4; num = num3; } } } return result; } } public class SemtexGrenadeStickyComponent : MonoBehaviour { public PinnedGrenade grenade; public AudioEvent spam; public bool spammed = false; public Collider grabcol; public GameObject phys; public Collider col; public Rigidbody mainrig; public GameObject fakepoint; public bool activated = false; public Transform mainpos; private void Start() { } private void OnCollisionEnter(Collision collision) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (activated) { if (!spammed) { SM.PlayCoreSound((FVRPooledAudioType)41, spam, ((Component)this).gameObject.transform.position); spammed = true; } fakepoint.SetActive(true); fakepoint.transform.SetParent(((Component)collision.collider).gameObject.transform); ((FVRInteractiveObject)grenade).m_hand = null; } } private void Update() { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)fakepoint == (Object)null || (Object)(object)grenade == (Object)null) { } if (grenade.m_isLeverReleased) { activated = true; } if ((Object)(object)fakepoint == (Object)null) { phys.SetActive(true); ((FVRPhysicalObject)grenade).UsesGravity = true; mainrig.useGravity = true; grabcol.enabled = true; col.enabled = false; ((FVRInteractiveObject)grenade).EndInteractionDistance = 0.25f; ((FVRPhysicalObject)grenade).DistantGrabbable = true; activated = false; } ((Component)this).gameObject.transform.position = ((Component)mainpos).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)mainpos).transform.eulerAngles; if ((Object)(object)fakepoint != (Object)null) { if (fakepoint.activeInHierarchy) { ((FVRInteractiveObject)grenade).EndInteractionDistance = 0f; ((FVRInteractiveObject)grenade).EndInteractionIfDistant = true; ((FVRPhysicalObject)grenade).DistantGrabbable = false; ((FVRInteractiveObject)grenade).ForceBreakInteraction(); ((Component)grenade).gameObject.transform.position = fakepoint.transform.position; ((Component)grenade).gameObject.transform.eulerAngles = fakepoint.transform.eulerAngles; mainrig.useGravity = false; ((FVRPhysicalObject)grenade).UsesGravity = false; col.enabled = false; } else if (!fakepoint.activeInHierarchy) { mainrig.useGravity = true; ((FVRPhysicalObject)grenade).UsesGravity = true; if (!activated) { phys.SetActive(true); col.enabled = false; } else if (activated) { phys.SetActive(false); col.enabled = true; grabcol.enabled = false; ((FVRPhysicalObject)grenade).DistantGrabbable = false; } } } if ((Object)(object)grenade == (Object)null) { if ((Object)(object)fakepoint != (Object)null) { Object.Destroy((Object)(object)fakepoint); } Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class StickBombScript : MonoBehaviour { public FVRInteractiveObject clampgrab; public PinnedGrenadePin clampmove; public GameObject clampmani; public PinnedGrenadePin realpin; public PinnedGrenade grenade; public AudioEvent clampoff; public AudioEvent spam; public AudioEvent glassbreak; public AudioEvent springunfold; public bool spammed = false; public GameObject clampPrefab; public GameObject clampFake; public GameObject clampSpawnPos; public GameObject CLAMPF; public GameObject CoverFake; public Collider grabcol; public GameObject phys; public Collider col; public Rigidbody mainrig; public FVRPhysicalObject mainphys; public GameObject coverPrefab; public Transform coverSpawnPos; public GameObject fakepoint; public bool activated = false; public Transform mainpos; public WaggleJoint shellwag1; public WaggleJoint shellwag2; public GameObject shell1; public GameObject shell2; public bool coverOff = false; public bool clampOff = false; public GameObject clickbase2; private void Start() { } private void OnCollisionEnter(Collision collision) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (activated) { if (!spammed) { SM.PlayCoreSound((FVRPooledAudioType)41, spam, ((Component)this).gameObject.transform.position); SM.PlayCoreSound((FVRPooledAudioType)41, glassbreak, ((Component)this).gameObject.transform.position); spammed = true; } fakepoint.SetActive(true); fakepoint.transform.SetParent(((Component)collision.collider).gameObject.transform); ((FVRInteractiveObject)mainphys).m_hand = null; } } private void Update() { //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)clickbase2 == (Object)null || (Object)(object)fakepoint == (Object)null || (Object)(object)clampgrab == (Object)null || (Object)(object)realpin == (Object)null || (Object)(object)grenade == (Object)null || (Object)(object)clampmove == (Object)null) { } if ((Object)(object)realpin != (Object)null) { if (((Behaviour)realpin).enabled) { grenade.m_isPinPulled = true; } else { grenade.m_isPinPulled = false; } } else if ((Object)(object)realpin == (Object)null) { grenade.m_isPinPulled = true; } if (grenade.m_isFused && clampOff) { if (spammed) { ((FVRInteractiveObject)grenade).m_hand = null; ((FVRInteractiveObject)grenade).ForceBreakInteraction(); } ((FVRInteractiveObject)mainphys).IsSimpleInteract = true; grabcol.enabled = false; mainphys.DistantGrabbable = false; ((FVRInteractiveObject)mainphys).EndInteractionDistance = 0f; } if ((Object)(object)clampmove != (Object)null) { if (((Behaviour)clampmove).enabled) { clampmani.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else { clampmani.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } else if ((Object)(object)clampmove == (Object)null) { clampmani.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } if (clampFake.transform.localPosition.z > 0.95f) { if (!clampOff) { SM.PlayCoreSound((FVRPooledAudioType)41, clampoff, ((Component)this).gameObject.transform.position); Object.Instantiate(clampPrefab, clampSpawnPos.transform.position, clampSpawnPos.transform.rotation); clampOff = true; if ((Object)(object)clampgrab != (Object)null) { clampgrab.ForceBreakInteraction(); } CLAMPF.SetActive(false); } if ((Object)(object)clickbase2 != (Object)null) { Object.Destroy((Object)(object)clickbase2); } ((Behaviour)shellwag1).enabled = true; ((Behaviour)shellwag2).enabled = true; } if (shell1.transform.localEulerAngles.x > 65f && shell2.transform.localEulerAngles.x > 65f && !coverOff) { SM.PlayCoreSound((FVRPooledAudioType)41, springunfold, ((Component)this).gameObject.transform.position); CoverFake.SetActive(false); Object.Instantiate(coverPrefab, ((Component)coverSpawnPos).transform.position, ((Component)coverSpawnPos).transform.rotation); coverOff = true; activated = true; } if ((Object)(object)fakepoint == (Object)null) { phys.SetActive(true); mainphys.UsesGravity = true; mainrig.useGravity = true; grabcol.enabled = true; col.enabled = false; ((FVRInteractiveObject)mainphys).EndInteractionDistance = 0.25f; mainphys.DistantGrabbable = true; activated = false; } ((Component)this).gameObject.transform.position = ((Component)mainpos).transform.position; ((Component)this).gameObject.transform.eulerAngles = ((Component)mainpos).transform.eulerAngles; if ((Object)(object)fakepoint != (Object)null) { if (fakepoint.activeInHierarchy) { ((FVRInteractiveObject)mainphys).EndInteractionDistance = 0f; ((FVRInteractiveObject)mainphys).EndInteractionIfDistant = true; mainphys.DistantGrabbable = false; ((FVRInteractiveObject)mainphys).ForceBreakInteraction(); ((Component)mainphys).gameObject.transform.position = fakepoint.transform.position; ((Component)mainphys).gameObject.transform.eulerAngles = fakepoint.transform.eulerAngles; mainrig.useGravity = false; mainphys.UsesGravity = false; col.enabled = false; } else if (!fakepoint.activeInHierarchy) { mainrig.useGravity = true; mainphys.UsesGravity = true; if (!activated) { phys.SetActive(true); col.enabled = false; } else if (activated) { phys.SetActive(false); col.enabled = true; grabcol.enabled = false; mainphys.DistantGrabbable = false; } } } if ((Object)(object)mainphys == (Object)null) { if ((Object)(object)fakepoint != (Object)null) { Object.Destroy((Object)(object)fakepoint); } Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class RandomMovement : MonoBehaviour { public NavMeshAgent agent; public float range; public Transform centrePoint; private void Start() { agent = ((Component)this).GetComponent(); } private void Update() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) if (agent.remainingDistance <= agent.stoppingDistance && RandomPoint(centrePoint.position, range, out var result)) { Debug.DrawRay(result, Vector3.up, Color.blue, 1f); agent.SetDestination(result); } } private bool RandomPoint(Vector3 center, float range, out Vector3 result) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) Vector3 val = center + Random.insideUnitSphere * range; NavMeshHit val2 = default(NavMeshHit); if (NavMesh.SamplePosition(val, ref val2, 1f, -1)) { result = ((NavMeshHit)(ref val2)).position; return true; } result = Vector3.zero; return false; } } namespace JerryComponent { public class AKActions : MonoBehaviour { public GameObject Hammer; public ManipulateObject HammerMani; public bool ishammerready = false; public ClosedBolt closedbolt; public ClosedBoltWeapon gun; public MagFold selector; public AudioEvent click; public bool clicked = false; private void Start() { gun.m_isHammerCocked = true; } private void FixedUpdate() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) if (gun.m_isHammerCocked) { ((Behaviour)HammerMani).enabled = false; Hammer.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ishammerready = true; } else if (!gun.m_isHammerCocked) { if (ishammerready) { Hammer.transform.localEulerAngles = new Vector3(90f, 0f, 0f); ishammerready = false; } ((Behaviour)HammerMani).enabled = true; } if (!((FVRInteractiveObject)selector).m_isHeld) { if (((Component)selector).gameObject.transform.localEulerAngles.y <= 54f) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); clicked = true; } ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 48f, 0f); gun.m_fireSelectorMode = 2; } else if (((Component)selector).gameObject.transform.localEulerAngles.y > 54f && ((Component)selector).gameObject.transform.localEulerAngles.y <= 64f) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); clicked = true; } ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 60f, 0f); gun.m_fireSelectorMode = 1; } else if (((Component)selector).gameObject.transform.localEulerAngles.y > 64f) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)this).gameObject.transform.position); clicked = true; } ((Component)selector).gameObject.transform.localEulerAngles = new Vector3(0f, 68f, 0f); gun.m_fireSelectorMode = 0; } } else if (((FVRInteractiveObject)selector).IsHeld) { clicked = false; } } } public class Nyet : MonoBehaviour { public GameObject akzenit; public GameObject akfactory; public GameObject stockzenit; public GameObject stockfactory; public FVRFireArmAttachmentMount[] mounts; public AudioEvent nyet; public bool attached = false; public float cd = 3f; public bool isNyet = false; public GameObject sensor; private void FixedUpdate() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < mounts.Length; i++) { if (mounts[i].HasAttachmentsOnIt()) { mounts[i].AttachmentsList[0].DetachFromMount(); attached = true; } } if (attached && !isNyet) { akzenit.SetActive(false); akfactory.SetActive(true); stockzenit.SetActive(false); stockfactory.SetActive(true); SM.PlayCoreSound((FVRPooledAudioType)0, nyet, ((Component)this).transform.position); isNyet = true; } if (isNyet) { cd -= Time.deltaTime; if (cd <= 0f) { isNyet = false; akzenit.SetActive(true); akfactory.SetActive(false); stockfactory.SetActive(false); stockzenit.SetActive(true); cd = 3f; attached = false; } } } } public class FN40GL : MonoBehaviour { public FVRAlternateGrip foregrip; public Collider foregripcol; public FVRInteractiveObject forehandle; public Collider forehandlecol; public FVRFireArmChamber chamber; public Collider chambercol; public AR15HandleSightFlipper button; public AudioEvent click; public bool isOpen = false; public float Zaxisref; public WaggleJoint wag; public GameObject wagjointlimitrot; public GameObject wagjointlimitrot2; public ClosedBoltWeapon gun; public bool springed = false; public ClosedBolt bolt; public bool ejected = false; 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_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_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_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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0239: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) wag.angleLimitLeft = wagjointlimitrot.transform.localEulerAngles.x / 10f * 8.5f + wagjointlimitrot2.transform.localEulerAngles.x / 10f * 21.5f; wag.angleLimitRight = wagjointlimitrot.transform.localEulerAngles.x / 10f * 8.5f + wagjointlimitrot2.transform.localEulerAngles.x / 10f * 21.5f; if (((Component)button.Flipsight).transform.localEulerAngles.z > 15f && !button.m_isLargeAperture) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)button.Flipsight).transform.position); button.m_isLargeAperture = true; isOpen = true; } if (isOpen) { ((Behaviour)foregrip).enabled = false; foregripcol.enabled = false; forehandlecol.enabled = true; if (!springed) { if (((Component)forehandle).gameObject.transform.localPosition.z > -0.0175f) { ((Component)forehandle).gameObject.transform.localPosition = new Vector3(0f, 0f, Mathf.SmoothDamp(((Component)forehandle).gameObject.transform.localPosition.z, -0.02f, ref Zaxisref, 0.15f)); } else if (((Component)forehandle).gameObject.transform.localPosition.z <= -0.0175f) { springed = true; gun.CockHammer(true); } } if (forehandle.IsHeld && ((Component)forehandle).gameObject.transform.localPosition.z > -0.005f) { isOpen = false; ((Component)forehandle).gameObject.transform.localPosition = new Vector3(0f, 0f, 0f); ejected = false; } } else if (!isOpen) { springed = false; if (forehandle.IsHeld) { ((Behaviour)foregrip).enabled = true; foregripcol.enabled = true; FVRViveHand hand = forehandle.m_hand; forehandle.ForceBreakInteraction(); ((FVRInteractiveObject)foregrip).BeginInteraction(hand); hand.ForceSetInteractable((FVRInteractiveObject)(object)foregrip); forehandlecol.enabled = false; } } if (((Component)forehandle).gameObject.transform.localPosition.z > -0.1f) { chambercol.enabled = false; chamber.IsManuallyChamberable = false; } else if (((Component)forehandle).gameObject.transform.localPosition.z <= -0.1f) { chambercol.enabled = true; chamber.IsManuallyChamberable = true; if (!ejected) { if (chamber.IsFull) { chamber.EjectRound(gun.RoundPos_Ejection.position, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), false); } ejected = true; } } ((Component)bolt).gameObject.transform.localPosition = new Vector3(0f, 0f, ((Component)forehandle).gameObject.transform.localPosition.z); } } public class RangeFinderChamber : MonoBehaviour { public Text rangedisplay; public LayerMask lm; public FVRInteractiveObject grip; public FVRFireArmChamber chamber; public float range; public bool ranging = false; public AudioEvent bip; public AudioEvent bip2; public Transform aperture; private void Start() { range = 1000f; rangedisplay.text = "999"; } private void FixedUpdate() { //IL_0067: 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_007c: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) if (!grip.IsHeld) { return; } if (grip.m_hand.Input.TriggerFloat >= 0.5f) { if (!ranging) { SM.PlayCoreSound((FVRPooledAudioType)41, bip, ((Component)this).transform.position); ranging = true; } Ray val = default(Ray); ((Ray)(ref val))..ctor(aperture.position, aperture.forward); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2, 1500f, LayerMask.op_Implicit(lm))) { if (((RaycastHit)(ref val2)).distance >= 1000f) { rangedisplay.text = "999"; range = 1000f; } else if (((RaycastHit)(ref val2)).distance < 1000f) { rangedisplay.text = ((int)((RaycastHit)(ref val2)).distance).ToString(); range = ((RaycastHit)(ref val2)).distance + 1f; } } else if (!Physics.Raycast(val, ref val2)) { rangedisplay.text = "999"; range = 1000f; } } else if (grip.m_hand.Input.TriggerFloat < 0.5f && ranging) { ranging = false; if (chamber.IsFull && !chamber.IsSpent) { chamber.m_round.BallisticProjectilePrefab.GetComponent().MaxRange = range; } SM.PlayCoreSound((FVRPooledAudioType)41, bip2, ((Component)this).transform.position); } } } internal class HandFollowing : MonoBehaviour { public string handAnimaControName_Gun; public string handAnimaControName_Mag; private GameObject _player; private GameObject _POLeft; private GameObject _PORight; private FVRViveHand leftHand; private FVRViveHand rightHand; public Transform _ZuoShouWeiZhi; public Transform _YouShouWeiZhi; private void Start() { _player = ((Component)Object.FindObjectOfType()).gameObject; leftHand = ((Component)_player.transform.Find("Controller (left)")).GetComponent(); rightHand = ((Component)_player.transform.Find("Controller (right)")).GetComponent(); } private void Update() { HandFollow(); } private void HandFollow() { //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)leftHand.CurrentInteractable != (Object)null) { if ((Object)(object)((Component)leftHand.CurrentInteractable).GetComponent().PoseOverride_Touch != (Object)null) { _ZuoShouWeiZhi.position = ((Component)leftHand.CurrentInteractable).GetComponent().PoseOverride_Touch.position; _ZuoShouWeiZhi.rotation = ((Component)leftHand.CurrentInteractable).GetComponent().PoseOverride_Touch.rotation; ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, true); } else { _ZuoShouWeiZhi.position = ((Component)leftHand.CurrentInteractable).gameObject.transform.position; _ZuoShouWeiZhi.rotation = GM.CurrentMovementManager.LeftHand.rotation; ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, true); ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } } else { _ZuoShouWeiZhi.position = GM.CurrentMovementManager.LeftHand.position; _ZuoShouWeiZhi.rotation = GM.CurrentMovementManager.LeftHand.rotation; ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_ZuoShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } if (!((Object)(object)rightHand.CurrentInteractable != (Object)null)) { _YouShouWeiZhi.position = GM.CurrentMovementManager.RightHand.position; _YouShouWeiZhi.rotation = GM.CurrentMovementManager.RightHand.rotation; ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } else if ((Object)(object)((Component)rightHand.CurrentInteractable).GetComponent().PoseOverride_Touch != (Object)null) { _YouShouWeiZhi.position = ((Component)rightHand.CurrentInteractable).gameObject.GetComponent().PoseOverride_Touch.position; _YouShouWeiZhi.rotation = ((Component)rightHand.CurrentInteractable).gameObject.GetComponent().PoseOverride_Touch.rotation; ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, false); ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, true); } else { _YouShouWeiZhi.position = ((Component)rightHand.CurrentInteractable).gameObject.transform.position; _YouShouWeiZhi.rotation = GM.CurrentMovementManager.RightHand.rotation; ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Mag, true); ((Component)_YouShouWeiZhi).GetComponentInChildren().SetBool(handAnimaControName_Gun, false); } } } public class OTSGLTrigger : MonoBehaviour { public GP25 GLitself; public AttachableFirearmPhysicalObject AFPO; [NonSerialized] public ClosedBoltWeapon gun; public int prefireselectermode; public bool stored = false; private void FixedUpdate() { //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_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_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRFireArmAttachment)AFPO).curMount != (Object)null) { if (!GLitself.m_safetyEngaged) { if ((Object)(object)((Component)((FVRFireArmAttachment)AFPO).curMount.MyObject).gameObject.GetComponent() != (Object)null) { gun = ((Component)((FVRFireArmAttachment)AFPO).curMount.MyObject).gameObject.GetComponent(); if (!stored) { prefireselectermode = gun.m_fireSelectorMode; stored = true; } if (gun.m_fireSelectorMode != 0) { gun.ToggleFireSelector(); } } if (((FVRInteractiveObject)((FVRFireArmAttachment)AFPO).curMount.MyObject).m_isHeld) { if ((Object)(object)gun != (Object)null && ((FVRInteractiveObject)gun).m_hand.Input.TriggerFloat >= gun.TriggerFiringThreshold && GLitself.Chamber.IsFull) { GLitself.Fire(true); } ((Component)GLitself.Trigger).transform.localPosition = new Vector3(((Component)GLitself.Trigger).transform.localPosition.x, ((Component)GLitself.Trigger).transform.localPosition.y, GLitself.TriggerRange.y * ((FVRInteractiveObject)((FVRFireArmAttachment)AFPO).curMount.MyObject).m_hand.Input.TriggerFloat); } else if (!((FVRInteractiveObject)((FVRFireArmAttachment)AFPO).curMount.MyObject).m_isHeld) { ((Component)GLitself.Trigger).transform.localPosition = new Vector3(((Component)GLitself.Trigger).transform.localPosition.x, ((Component)GLitself.Trigger).transform.localPosition.y, 0f); } } else { if (!GLitself.m_safetyEngaged || !((Object)(object)((Component)((FVRFireArmAttachment)AFPO).curMount.MyObject).gameObject.GetComponent() != (Object)null)) { return; } gun = ((Component)((FVRFireArmAttachment)AFPO).curMount.MyObject).gameObject.GetComponent(); if (stored && (Object)(object)gun != (Object)null) { if (gun.m_fireSelectorMode != prefireselectermode) { gun.ToggleFireSelector(); } else if (gun.m_fireSelectorMode == prefireselectermode) { stored = false; } } } } else { if (!((Object)(object)((FVRFireArmAttachment)AFPO).curMount == (Object)null)) { return; } ((Component)GLitself.Trigger).transform.localPosition = new Vector3(((Component)GLitself.Trigger).transform.localPosition.x, ((Component)GLitself.Trigger).transform.localPosition.y, 0f); if (stored && (Object)(object)gun != (Object)null) { if (gun.m_fireSelectorMode != prefireselectermode) { gun.ToggleFireSelector(); } else if (gun.m_fireSelectorMode == prefireselectermode) { gun = null; stored = false; } } } } } public class OilLamp : MonoBehaviour { public FVRFireArmAttachment lamp; public WaggleJoint wag1; public WaggleJoint wag2; public GameObject flame; public Light light; private void Start() { } private void Update() { //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (!((FVRInteractiveObject)lamp).m_isHeld && (Object)(object)lamp.curMount == (Object)null && (Object)(object)((FVRPhysicalObject)lamp).m_quickbeltSlot == (Object)null) { ((Behaviour)wag1).enabled = false; ((Behaviour)wag2).enabled = false; ((Component)wag1.hingeGraphic).transform.localEulerAngles = new Vector3(270f, 0f, 0f); ((Component)wag2.hingeGraphic).transform.localEulerAngles = new Vector3(270f, 0f, 0f); } else if (((FVRInteractiveObject)lamp).m_isHeld || (Object)(object)lamp.curMount != (Object)null || (Object)(object)((FVRPhysicalObject)lamp).m_quickbeltSlot != (Object)null) { ((Behaviour)wag1).enabled = true; ((Behaviour)wag2).enabled = true; } light.range = flame.transform.localScale.y * 10f; light.intensity = flame.transform.localScale.y * 1f; } } public class BounceSetOut : MonoBehaviour { public float ColThresh = 0.5f; public Transform muzzlepos; public Rigidbody rig; public Handgun gun; public FVRFireArmChamber chamber; public float cd = 0f; public bool grabbing = false; public bool mag = false; public bool holding = false; private void Start() { cd = Random.Range(500, 10000); } private void FixedUpdate() { //IL_002e: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) cd -= 1f; if (cd <= 0f && (int)gun.Slide.CurPos == 0) { gun.Fire(); cd = Random.Range(500, 10000); } if (((FVRInteractiveObject)gun.Slide).IsHeld && !grabbing && (int)gun.Slide.CurPos == 0) { float num = 0f; num = Random.Range(0, 10); if (num > 9f) { gun.Fire(); } grabbing = true; } if (!((FVRInteractiveObject)gun.Slide).IsHeld) { grabbing = false; } if (((FVRInteractiveObject)gun).IsHeld && !holding && (int)gun.Slide.CurPos == 0) { float num2 = 0f; num2 = Random.Range(0, 10); if (num2 > 9f) { gun.Fire(); } holding = true; } if (!((FVRInteractiveObject)gun).IsHeld) { holding = false; } if ((Object)(object)((FVRFireArm)gun).Magazine != (Object)null && !mag && (int)gun.Slide.CurPos == 0) { float num3 = 0f; num3 = Random.Range(0, 10); if (num3 > 9f) { gun.Fire(); } mag = true; } if ((Object)(object)((FVRFireArm)gun).Magazine == (Object)null) { mag = false; } } public void OnCollisionEnter(Collision col) { //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_0067: Unknown result type (might be due to invalid IL or missing references) ColThresh = Random.Range(0.5f, 2.5f); Vector3 relativeVelocity = col.relativeVelocity; if (((Vector3)(ref relativeVelocity)).magnitude > ColThresh && (int)gun.Slide.CurPos == 0) { gun.Fire(); rig.AddExplosionForce(5f, ((Component)muzzlepos).transform.position, 1f); ColThresh = Random.Range(0.5f, 2.5f); } } } public class GasFilter : Suppressor { public SuppressorInterface INTERF; public float timerG = 0f; public bool isUsed = false; public float minutesleft = 5f; public Rigidbody RB; private void Start() { } private void Update() { if (((Behaviour)INTERF).isActiveAndEnabled) { if (!isUsed) { timerG += Time.deltaTime; float num = (int)timerG / 60; if (num >= minutesleft) { ((FVRFireArmAttachment)this).DetachFromMount(); isUsed = true; } PlayerBlindness._isAMaskEquipped = true; } if (isUsed) { ((FVRFireArmAttachment)this).DetachFromMount(); PlayerBlindness._isAMaskEquipped = false; RB.isKinematic = false; RB.useGravity = true; } } else if (((Behaviour)INTERF).isActiveAndEnabled) { } } } public class GasMaskFilterDetect : MonoBehaviour { public GameObject GM; public GameObject Detect; public GameObject Breath; public FVRPhysicalObject Phy; private void Start() { } private void Update() { if ((Object)(object)Phy.m_quickbeltSlot != (Object)null) { if (Detect.activeInHierarchy) { GM.SetActive(false); Breath.SetActive(false); } else if (!Detect.activeInHierarchy) { GM.SetActive(true); Breath.SetActive(true); } } else if ((Object)(object)Phy.m_quickbeltSlot == (Object)null) { GM.SetActive(false); Breath.SetActive(false); } } } public class ARChargeHandle : MonoBehaviour { public ClosedBoltHandle handle1; public ClosedBolt bolt; public float handle1ForwardValue; private void FixedUpdate() { if (bolt.m_isBoltLocked) { handle1.Speed_Forward = 0f; } else if (!bolt.m_isBoltLocked) { handle1.Speed_Forward = handle1ForwardValue; } } } public class Forwardassistslap : MonoBehaviour { public bool haveGun = true; public ClosedBoltWeapon gun; private Vector3 velLinearWorld; private Vector3 velLinearWorldL; private Vector3 velLinearWorldR; public Transform slapDir; public float slapRange = 0.1f; private bool Slamed = false; public GameObject assistGeo; public float forwardValue; private float forref; public AudioEvent slap; public float speedrequired = 1f; public bool haveboltgeo = false; public GameObject boltgeo; public float boltmoveamount; public bool havemalfunction = false; public bool isStuck = false; public float boltmalpoint; public float Speed_Forward; private void FixedUpdate() { //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_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_0061: 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_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Invalid comparison between Unknown and I4 //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_0081: 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_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_0316: 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_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_057b: 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_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) if (!haveGun) { velLinearWorldL = GM.CurrentMovementManager.Hands[0].Input.VelLinearWorld; velLinearWorldR = GM.CurrentMovementManager.Hands[1].Input.VelLinearWorld; if (!Slamed && Vector3.Distance(GM.CurrentMovementManager.Hands[0].PalmTransform.position, slapDir.position) < 0.1f && Vector3.Angle(velLinearWorldL, slapDir.forward) < 50f && ((Vector3)(ref velLinearWorldL)).magnitude > speedrequired) { SM.PlayCoreSound((FVRPooledAudioType)41, slap, assistGeo.transform.position); Slamed = true; } if (!Slamed && Vector3.Distance(GM.CurrentMovementManager.Hands[1].PalmTransform.position, slapDir.position) < 0.1f && Vector3.Angle(velLinearWorldR, slapDir.forward) < 50f && ((Vector3)(ref velLinearWorldR)).magnitude > speedrequired) { SM.PlayCoreSound((FVRPooledAudioType)41, slap, assistGeo.transform.position); Slamed = true; } } if (haveGun) { 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 > speedrequired) { SM.PlayCoreSound((FVRPooledAudioType)41, slap, assistGeo.transform.position); Slamed = true; } } if ((int)gun.Bolt.CurPos == 4) { float num = Random.Range(0, 100); if (num > 98f && havemalfunction) { isStuck = true; } } if (isStuck) { if (((Component)gun.Bolt).gameObject.transform.localPosition.z >= boltmalpoint) { if (gun.Bolt.Speed_Forward != 0f) { ((Component)gun.Bolt).gameObject.transform.localPosition = new Vector3(((Component)gun.Bolt).gameObject.transform.localPosition.x, ((Component)gun.Bolt).gameObject.transform.localPosition.y, boltmalpoint); gun.Bolt.Speed_Forward = 0f; } } else if (((Component)gun.Bolt).gameObject.transform.localPosition.z < boltmalpoint) { gun.Bolt.Speed_Forward = Speed_Forward; } } } 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)) { return; } if (isStuck) { isStuck = false; if (haveGun) { gun.Bolt.Speed_Forward = Speed_Forward; } } if (haveboltgeo) { if (boltgeo.gameObject.transform.localPosition.z < 0f) { boltgeo.gameObject.transform.localPosition = new Vector3(boltgeo.gameObject.transform.localPosition.x, boltgeo.gameObject.transform.localPosition.y, boltgeo.gameObject.transform.localPosition.z + boltmoveamount); } else if (boltgeo.gameObject.transform.localPosition.z >= 0f) { boltgeo.gameObject.transform.localPosition = new Vector3(boltgeo.gameObject.transform.localPosition.x, boltgeo.gameObject.transform.localPosition.y, 0f); } } Slamed = false; } } public class Pen15Upper : MonoBehaviour { public enum HBCBoltType { Impaling, Explosive } public HBCBoltType BoltType; [NonSerialized] public bool m_isFlying; [Header("Ballistics")] public float BaseSpeed = 40f; public float GravityMultiplier = 1f; public float AirDragMultiplier = 1f; public Vector3 Dimensions; public float DragCoefficient; public float Mass; [NonSerialized] public Vector3 m_velocity = Vector3.zero; [NonSerialized] public Vector3 m_forward = Vector3.forward; [NonSerialized] public Vector3 m_lastPoint = Vector3.zero; [NonSerialized] public float m_gravMag = 9.81f; [Header("Raycasting")] public LayerMask LM_Hit; public LayerMask LM_Env; public LayerMask LM_Agent; [NonSerialized] public RaycastHit m_hit; [NonSerialized] public RaycastHit m_hit2; public float PinDistanceLimit = 1f; public Vector2 LinkPenetrationRange; [NonSerialized] public bool m_isTickingDownToDestroy; [NonSerialized] public float m_tickDownToDestroy = 30f; public Renderer Rend; [Header("Sound")] public AudioEvent AudEvent_Hit_Skewer; public AudioEvent AudEvent_Hit_Meat; public AudioEvent AudEvent_Hit_Solid; public AudioEvent AudEvent_Hit_Solid_Light; [NonSerialized] public int m_numBounces; [NonSerialized] public float m_cookedAmount; public FVRObject upperprop; public FVRInteractiveObject grab; public void Start() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) SetCookedAmount(1f); Fire(((Component)this).gameObject.transform.forward, ((Component)this).gameObject.transform.position, 1f); } public void Fire(Vector3 dir, Vector3 initPos, float velMult) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected I4, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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) GravityMode ballisticGravityMode = GM.Options.SimulationOptions.BallisticGravityMode; switch ((int)ballisticGravityMode) { case 0: m_gravMag = 9.81f; break; case 1: m_gravMag = 5f; break; case 2: m_gravMag = 1.622f; break; case 3: m_gravMag = 0f; break; } m_velocity = ((Vector3)(ref dir)).normalized * BaseSpeed * velMult; m_forward = dir; m_isFlying = true; } public void SetCookedAmount(float f) { if ((Object)(object)Rend != (Object)null) { Rend.material.SetFloat("_BlendScale", f); } m_cookedAmount = f; } public void Update() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b3: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: 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_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: 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_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: 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_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) if (grab.IsHeld) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (m_isTickingDownToDestroy) { m_tickDownToDestroy -= Time.deltaTime; if (m_tickDownToDestroy <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (!m_isFlying) { return; } float deltaTime = Time.deltaTime; m_velocity += Vector3.down * m_gravMag * deltaTime * GravityMultiplier; float materialDensity = 1.225f * AirDragMultiplier; m_velocity = ApplyDrag(m_velocity, materialDensity, deltaTime); Vector3 position = ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref m_velocity)).normalized; float magnitude = ((Vector3)(ref m_velocity)).magnitude; float num = magnitude * deltaTime; if (!Physics.Raycast(position, normalized, ref m_hit, num, LayerMask.op_Implicit(LM_Hit), (QueryTriggerInteraction)2)) { ((Component)this).transform.position = position + m_velocity * deltaTime; ((Component)this).transform.rotation = Quaternion.LookRotation(normalized); return; } m_isFlying = false; Rigidbody attachedRigidbody = ((RaycastHit)(ref m_hit)).collider.attachedRigidbody; if (m_cookedAmount < 0.4f) { SM.PlayCoreSoundDelayed((FVRPooledAudioType)11, AudEvent_Hit_Meat, ((Component)this).transform.position, Vector3.Distance(((Component)this).transform.position, GM.CurrentPlayerBody.Head.position) / 343f); Object.Destroy((Object)(object)((Component)this).gameObject); } else if ((Object)(object)attachedRigidbody == (Object)null) { FXM.SpawnImpactEffect(((RaycastHit)(ref m_hit)).point, ((RaycastHit)(ref m_hit)).normal, 1, (ImpactEffectMagnitude)2, false, false, Color.white, (Material)null); float num2 = Vector3.Angle(-normalized, ((RaycastHit)(ref m_hit)).normal); if (num2 > 60f && m_numBounces < 4) { m_numBounces++; Vector3 val = Vector3.Reflect(normalized, ((RaycastHit)(ref m_hit)).normal); m_velocity = ((Vector3)(ref val)).normalized * (magnitude * 0.8f); ((Component)this).transform.rotation = Quaternion.LookRotation(m_velocity); ((Component)this).transform.position = ((RaycastHit)(ref m_hit)).point + ((RaycastHit)(ref m_hit)).normal * 0.001f; SM.PlayCoreSoundDelayed((FVRPooledAudioType)11, AudEvent_Hit_Solid_Light, ((Component)this).transform.position, Vector3.Distance(((Component)this).transform.position, GM.CurrentPlayerBody.Head.position) / 343f); } else { ((Component)this).transform.rotation = Quaternion.LookRotation(normalized); StickIntoWall(((RaycastHit)(ref m_hit)).point); SM.PlayCoreSoundDelayed((FVRPooledAudioType)11, AudEvent_Hit_Solid, ((Component)this).transform.position, Vector3.Distance(((Component)this).transform.position, GM.CurrentPlayerBody.Head.position) / 343f); } } else { SosigLink component = ((Component)((RaycastHit)(ref m_hit)).collider.attachedRigidbody).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { DamageOtherThing(((RaycastHit)(ref m_hit)).collider, attachedRigidbody, ((RaycastHit)(ref m_hit)).point - ((RaycastHit)(ref m_hit)).normal * 0.005f, normalized, passOn: true); Explode(((RaycastHit)(ref m_hit)).point); } else { DamageOtherThing(((RaycastHit)(ref m_hit)).collider, attachedRigidbody, ((RaycastHit)(ref m_hit)).point - ((RaycastHit)(ref m_hit)).normal * 0.005f, normalized, passOn: true); ImpaleCheck(component, ((RaycastHit)(ref m_hit)).point - ((RaycastHit)(ref m_hit)).normal * 0.005f, normalized); } } } public Vector3 ApplyDrag(Vector3 velocity, float materialDensity, float time) { //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) float num = (float)Math.PI * Mathf.Pow(Dimensions.x * 0.5f, 2f); float magnitude = ((Vector3)(ref velocity)).magnitude; Vector3 normalized = ((Vector3)(ref velocity)).normalized; float dragCoefficient = DragCoefficient; Vector3 val = -velocity * (materialDensity * 0.5f * dragCoefficient * num / Mass) * magnitude; return normalized * Mathf.Clamp(magnitude - ((Vector3)(ref val)).magnitude * time, 0f, magnitude); } public void Explode(Vector3 point) { Object.Destroy((Object)(object)((Component)this).gameObject); } public void StickIntoWall(Vector3 point) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((Component)this).transform.position = point + ((Component)this).transform.forward * Random.Range(LinkPenetrationRange.x, LinkPenetrationRange.y); } public void DamageOtherThing(Collider c, Rigidbody r, Vector3 hitPoint, Vector3 castDir, bool passOn) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0042: 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_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_0076: 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_007e: 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) IFVRDamageable component = ((Component)((Component)c).transform).gameObject.GetComponent(); if (component == null && passOn) { component = ((Component)r).gameObject.GetComponent(); } if (component != null) { IFVRDamageable obj = component; Damage val = new Damage(); val.Class = (DamageClass)1; val.damageSize = Dimensions.x; val.hitNormal = -castDir; val.Source_IFF = GM.CurrentPlayerBody.GetPlayerIFF(); val.strikeDir = castDir; val.point = hitPoint; val.Dam_Piercing = 3000f; val.Dam_TotalKinetic = 3000f; val.Dam_Stunning = 2f; obj.Damage(val); } } public void ImpaleCheck(SosigLink l, Vector3 hitPoint, Vector3 castDir) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_001c: 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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_049a: 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_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_024f: 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_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0179: 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_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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: 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_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_041c: 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_0427: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0447: 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_02ca: 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_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0329: 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_032f: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) float num = Dimensions.z + PinDistanceLimit; Damage val = new Damage(); val.Class = (DamageClass)1; val.damageSize = Dimensions.x; val.hitNormal = -castDir; val.Source_IFF = GM.CurrentPlayerBody.GetPlayerIFF(); val.strikeDir = castDir; val.Dam_Piercing = 500f; val.Dam_TotalKinetic = 500f; val.point = hitPoint; val.Dam_Stunning = 2f; Vector3 val2 = ((Component)l).transform.position + ((Component)l).transform.up * 0.15f; Vector3 val3 = ((Component)l).transform.position - ((Component)l).transform.up * 0.15f; bool flag = false; bool flag2 = false; if (Physics.CapsuleCast(val2, val3, 0.13f, castDir, ref m_hit, num, LayerMask.op_Implicit(LM_Env), (QueryTriggerInteraction)1)) { if (Physics.Raycast(hitPoint, castDir, ref m_hit2, ((RaycastHit)(ref m_hit)).distance + Dimensions.z, LayerMask.op_Implicit(LM_Env), (QueryTriggerInteraction)2) && (Object)(object)((Component)l).gameObject.GetComponent() == (Object)null) { ((Component)l).transform.position = ((Component)l).transform.position + ((RaycastHit)(ref m_hit)).distance * castDir; ((Component)this).transform.position = ((RaycastHit)(ref m_hit2)).point + castDir * 0.05f; FixedJoint val4 = ((Component)l).gameObject.AddComponent(); l.S.KillSosig(); ((Component)this).transform.SetParent(((Component)l).transform); val.point += ((RaycastHit)(ref m_hit)).distance * castDir; flag = true; l.Damage(val); } } else if (Physics.CapsuleCast(val2, val3, 0.13f, castDir, ref m_hit, num, LayerMask.op_Implicit(LM_Agent), (QueryTriggerInteraction)1) && (Object)(object)((Component)l).gameObject.GetComponent() == (Object)null) { Ray val5 = default(Ray); ((Ray)(ref val5))..ctor(hitPoint, castDir); RaycastHit[] array = Physics.RaycastAll(val5, ((RaycastHit)(ref m_hit)).distance + Dimensions.z, LayerMask.op_Implicit(LM_Agent), (QueryTriggerInteraction)2); for (int i = 0; i < array.Length; i++) { if (!((Object)(object)((RaycastHit)(ref array[i])).collider.attachedRigidbody == (Object)null)) { SosigLink component = ((Component)((RaycastHit)(ref array[i])).collider.attachedRigidbody).gameObject.GetComponent(); if (!((Object)(object)component == (Object)(object)l) && !((Object)(object)component == (Object)null)) { ((Component)this).transform.position = hitPoint + castDir * Random.Range(LinkPenetrationRange.y * 0.8f, LinkPenetrationRange.y); ((Component)this).transform.SetParent(((Component)l).transform); ((Component)l).transform.position = ((Component)l).transform.position + ((RaycastHit)(ref m_hit)).distance * castDir; FixedJoint val6 = ((Component)l).gameObject.AddComponent(); ((Joint)val6).connectedBody = component.R; l.S.KillSosig(); component.S.KillSosig(); val.point += ((RaycastHit)(ref array[i])).distance * castDir; flag2 = true; l.Damage(val); component.Damage(val); break; } } } } if (!flag && !flag2) { ((Component)this).transform.position = hitPoint + castDir * Random.Range(LinkPenetrationRange.x, LinkPenetrationRange.y); ((Component)this).transform.SetParent(((Component)l).transform); l.Damage(val); l.R.AddForceAtPosition(castDir * 30f, hitPoint, (ForceMode)1); SM.PlayCoreSoundDelayed((FVRPooledAudioType)11, AudEvent_Hit_Meat, ((Component)this).transform.position, Vector3.Distance(((Component)this).transform.position, GM.CurrentPlayerBody.Head.position) / 343f); } else { SM.PlayCoreSoundDelayed((FVRPooledAudioType)11, AudEvent_Hit_Skewer, ((Component)this).transform.position, Vector3.Distance(((Component)this).transform.position, GM.CurrentPlayerBody.Head.position) / 343f); } } private void OnDestroy() { //IL_0012: 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) GameObject val = Object.Instantiate(((AnvilAsset)upperprop).GetGameObject(), ((Component)this).transform.position, ((Component)this).transform.rotation, (Transform)null); if (grab.IsHeld && (Object)(object)val.GetComponent() != (Object)null) { FVRViveHand hand = grab.m_hand; grab.ForceBreakInteraction(); hand.ForceSetInteractable((FVRInteractiveObject)(object)val.GetComponent()); ((FVRInteractiveObject)val.GetComponent()).BeginInteraction(hand); } } } public class UpperBoltGeo : MonoBehaviour { public GameObject bolt; public GameObject handle; public FVRInteractiveObject handleGrab; private void Update() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_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_0075: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) if (handleGrab.IsHeld && bolt.transform.localPosition.z > handle.transform.localPosition.z) { bolt.transform.localPosition = new Vector3(bolt.transform.localPosition.x, bolt.transform.localPosition.y, handle.transform.localPosition.z); } if (!handleGrab.IsHeld && bolt.transform.localPosition.z > handle.transform.localPosition.z) { handle.transform.localPosition = new Vector3(handle.transform.localPosition.x, handle.transform.localPosition.y, bolt.transform.localPosition.z); } } } public class UpperLauncher : MonoBehaviour { public AR15HandleSightFlipper forepin; public AR15HandleSightFlipper rearpin; public GameObject upper; public FVRFireArm main; public FVRFireArmChamber chamber; public FVRAlternateGrip grip; public Transform shootpos; public GameObject upperold; public GameObject explosion; public GameObject muzzleblock; public bool shot = false; public string uppername = "Pen15UpperMeleeProp(Clone)"; public GameObject uppernew; public Collider col; private void OnShotFired(FVRFireArm firearm) { if (!forepin.m_isLargeAperture && !rearpin.m_isLargeAperture && (Object)(object)firearm == (Object)(object)main) { shot = true; col.enabled = true; } } private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == uppername && shot) { uppernew = ((Component)other).gameObject; } } 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_00c0: 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_00de: 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_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_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_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0214: 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_0242: 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_0342: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)uppernew != (Object)null) { uppernew.gameObject.transform.SetParent(((Component)shootpos).transform); if ((Object)(object)uppernew.gameObject.GetComponent() != (Object)null) { uppernew.gameObject.GetComponent().useGravity = false; uppernew.gameObject.GetComponent().isKinematic = true; } if ((Object)(object)uppernew.GetComponent() != (Object)null) { ((FVRInteractiveObject)uppernew.GetComponent()).SetAllCollidersToLayer(false, "Interactable"); } uppernew.transform.localPosition = Vector3.Lerp(uppernew.transform.localPosition, new Vector3(0f, 0f, 0f), 0.1f); uppernew.transform.localEulerAngles = new Vector3(Mathf.Lerp(uppernew.transform.localEulerAngles.x, 0f, 0.5f), Mathf.Lerp(uppernew.transform.localEulerAngles.y, 0f, 0.75f), Mathf.Lerp(uppernew.transform.localEulerAngles.z, 0f, 0.25f)); if ((Object)(object)uppernew.GetComponent() != (Object)null) { ((FVRInteractiveObject)uppernew.GetComponent()).ForceBreakInteraction(); if (uppernew.GetComponent().AttachmentsList.Count > 0) { for (int i = 0; i < ((FVRPhysicalObject)main).AttachmentsList.Count; i++) { uppernew.GetComponent().AttachmentsList[i].DetachFromMount(); } } } if (uppernew.transform.localPosition == new Vector3(0f, 0f, 0f) && uppernew.transform.localEulerAngles == new Vector3(0f, 0f, 0f)) { Object.Destroy((Object)(object)uppernew.gameObject); shot = false; col.enabled = false; upperold.SetActive(true); } } if (!forepin.m_isLargeAperture && !rearpin.m_isLargeAperture) { muzzleblock.SetActive(true); } if (forepin.m_isLargeAperture || rearpin.m_isLargeAperture) { muzzleblock.SetActive(false); } if (upperold.activeInHierarchy && shot) { chamber.SetRound((FVRFireArmRound)null, false); ((FVRInteractiveObject)grip).ForceBreakInteraction(); main.EjectMag(false); upperold.SetActive(false); Object.Instantiate(upper, shootpos.position, shootpos.rotation); Object.Instantiate(explosion, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); } if (shot && ((FVRPhysicalObject)main).AttachmentsList != null && ((FVRPhysicalObject)main).AttachmentsList.Count > 0) { for (int j = 0; j < ((FVRPhysicalObject)main).AttachmentsList.Count; j++) { ((FVRPhysicalObject)main).AttachmentsList[j].DetachFromMount(); } } } 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 PistolMagSlide : MonoBehaviour { private void Start() { } private void Update() { } } [RequireComponent(typeof(CharacterController))] public class FPSViewer : MonoBehaviour { [SerializeField] private bool m_IsWalking; [SerializeField] private float m_WalkSpeed; [SerializeField] private float m_RunSpeed; [SerializeField] [Range(0f, 1f)] private float m_RunstepLenghten; [SerializeField] private float m_JumpSpeed; [SerializeField] private float m_StickToGroundForce; [SerializeField] private float m_GravityMultiplier; [SerializeField] private bool m_UseFovKick; [SerializeField] private bool m_UseHeadBob; [SerializeField] private float m_StepInterval; [SerializeField] private Camera m_Camera; private bool m_Jump; private float m_YRotation; private Vector2 m_Input; private Vector3 m_MoveDir = Vector3.zero; private CharacterController m_CharacterController; private CollisionFlags m_CollisionFlags; private bool m_PreviouslyGrounded; private Vector3 m_OriginalCameraPosition; private float m_StepCycle; private float m_NextStep; private bool m_Jumping; private MouseCamera m_MouseLook; private void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) m_CharacterController = ((Component)this).GetComponent(); m_OriginalCameraPosition = ((Component)m_Camera).transform.localPosition; m_StepCycle = 0f; m_NextStep = m_StepCycle / 2f; m_Jumping = false; m_MouseLook = new MouseCamera(); m_MouseLook.Init(((Component)this).transform, ((Component)m_Camera).transform); } private void Update() { RotateView(); if (!m_Jump) { m_Jump = Input.GetKeyDown((KeyCode)32); } if (!m_PreviouslyGrounded && m_CharacterController.isGrounded) { m_MoveDir.y = 0f; m_Jumping = false; } if (!m_CharacterController.isGrounded && !m_Jumping && m_PreviouslyGrounded) { m_MoveDir.y = 0f; } m_PreviouslyGrounded = m_CharacterController.isGrounded; } private void FixedUpdate() { //IL_000f: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0130: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_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) GetInput(out var speed); Vector3 val = ((Component)this).transform.forward * m_Input.y + ((Component)this).transform.right * m_Input.x; RaycastHit val2 = default(RaycastHit); Physics.SphereCast(((Component)this).transform.position, m_CharacterController.radius, Vector3.down, ref val2, m_CharacterController.height / 2f, -1, (QueryTriggerInteraction)1); Vector3 val3 = Vector3.ProjectOnPlane(val, ((RaycastHit)(ref val2)).normal); val = ((Vector3)(ref val3)).normalized; m_MoveDir.x = val.x * speed; m_MoveDir.z = val.z * speed; if (m_CharacterController.isGrounded) { m_MoveDir.y = 0f - m_StickToGroundForce; if (m_Jump) { m_MoveDir.y = m_JumpSpeed; m_Jump = false; m_Jumping = true; } } else { m_MoveDir += Physics.gravity * m_GravityMultiplier * Time.fixedDeltaTime; } m_CollisionFlags = m_CharacterController.Move(m_MoveDir * Time.fixedDeltaTime); ProgressStepCycle(speed); UpdateCameraPosition(speed); m_MouseLook.UpdateCursorLock(); } private void ProgressStepCycle(float speed) { //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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) Vector3 velocity = m_CharacterController.velocity; if (((Vector3)(ref velocity)).sqrMagnitude > 0f && (m_Input.x != 0f || m_Input.y != 0f)) { float stepCycle = m_StepCycle; Vector3 velocity2 = m_CharacterController.velocity; m_StepCycle = stepCycle + (((Vector3)(ref velocity2)).magnitude + speed * ((!m_IsWalking) ? m_RunstepLenghten : 1f)) * Time.fixedDeltaTime; } if (m_StepCycle > m_NextStep) { m_NextStep = m_StepCycle + m_StepInterval; } } private void UpdateCameraPosition(float speed) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (m_UseHeadBob) { Vector3 velocity = m_CharacterController.velocity; Vector3 localPosition; if (((Vector3)(ref velocity)).magnitude > 0f && m_CharacterController.isGrounded) { localPosition = ((Component)m_Camera).transform.localPosition; localPosition.y = ((Component)m_Camera).transform.localPosition.y; } else { localPosition = ((Component)m_Camera).transform.localPosition; localPosition.y = m_OriginalCameraPosition.y; } ((Component)m_Camera).transform.localPosition = localPosition; } } private void GetInput(out float speed) { //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_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) float axis = Input.GetAxis("Horizontal"); float axis2 = Input.GetAxis("Vertical"); bool isWalking = m_IsWalking; m_IsWalking = !Input.GetKey((KeyCode)304); speed = ((!m_IsWalking) ? m_RunSpeed : m_WalkSpeed); m_Input = new Vector2(axis, axis2); if (((Vector2)(ref m_Input)).sqrMagnitude > 1f) { ((Vector2)(ref m_Input)).Normalize(); } if (m_IsWalking != isWalking && m_UseFovKick) { Vector3 velocity = m_CharacterController.velocity; if (((Vector3)(ref velocity)).sqrMagnitude > 0f) { ((MonoBehaviour)this).StopAllCoroutines(); } } } private void RotateView() { m_MouseLook.LookRotation(((Component)this).transform, ((Component)m_Camera).transform); } private void OnControllerColliderHit(ControllerColliderHit hit) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_0043: 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_0053: Unknown result type (might be due to invalid IL or missing references) Rigidbody attachedRigidbody = hit.collider.attachedRigidbody; if ((int)m_CollisionFlags != 4 && !((Object)(object)attachedRigidbody == (Object)null) && !attachedRigidbody.isKinematic) { attachedRigidbody.AddForceAtPosition(m_CharacterController.velocity * 0.1f, hit.point, (ForceMode)1); } } } public class MouseCamera : MonoBehaviour { public float XSensitivity = 2f; public float YSensitivity = 2f; public bool clampVerticalRotation = true; public float MinimumX = -90f; public float MaximumX = 90f; public bool smooth; public float smoothTime = 5f; public bool lockCursor = true; private Quaternion m_CharacterTargetRot; private Quaternion m_CameraTargetRot; private bool m_cursorIsLocked = true; public void Init(Transform character, Transform camera) { //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_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) m_CharacterTargetRot = character.localRotation; m_CameraTargetRot = camera.localRotation; } public void LookRotation(Transform character, Transform camera) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) float num = Input.GetAxis("Mouse X") * XSensitivity; float num2 = Input.GetAxis("Mouse Y") * YSensitivity; m_CharacterTargetRot *= Quaternion.Euler(0f, num, 0f); m_CameraTargetRot *= Quaternion.Euler(0f - num2, 0f, 0f); if (clampVerticalRotation) { m_CameraTargetRot = ClampRotationAroundXAxis(m_CameraTargetRot); } if (smooth) { character.localRotation = Quaternion.Slerp(character.localRotation, m_CharacterTargetRot, smoothTime * Time.deltaTime); camera.localRotation = Quaternion.Slerp(camera.localRotation, m_CameraTargetRot, smoothTime * Time.deltaTime); } else { character.localRotation = m_CharacterTargetRot; camera.localRotation = m_CameraTargetRot; } UpdateCursorLock(); } public void SetCursorLock(bool value) { lockCursor = value; if (!lockCursor) { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } } public void UpdateCursorLock() { if (lockCursor) { InternalLockUpdate(); } } private void InternalLockUpdate() { if (Input.GetKeyUp((KeyCode)27)) { m_cursorIsLocked = false; } else if (Input.GetMouseButtonUp(0)) { m_cursorIsLocked = true; } if (m_cursorIsLocked) { Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } else if (!m_cursorIsLocked) { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } } private Quaternion ClampRotationAroundXAxis(Quaternion q) { //IL_0085: 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_008c: Unknown result type (might be due to invalid IL or missing references) q.x /= q.w; q.y /= q.w; q.z /= q.w; q.w = 1f; float num = 114.59156f * Mathf.Atan(q.x); num = Mathf.Clamp(num, MinimumX, MaximumX); q.x = Mathf.Tan((float)Math.PI / 360f * num); return q; } } public enum VolumeShape { BOX, SPHERE } [RequireComponent(typeof(BoxCollider))] [RequireComponent(typeof(SphereCollider))] public class PostProcessVolume : MonoBehaviour { private SphereCollider _sphereCollider; private BoxCollider _boxCollider; [Header("VolumeMode")] public VolumeShape ShapeOfVolume = VolumeShape.BOX; [Header("SphereVolumeSetting")] public float OuterSphereRadius = 1f; public float InnerSphereRadius; [Header("BoxVolumeSetting")] public Vector3 OuterBoxSize = Vector3.one; private Vector3 _outerBoxSize = Vector3.one; public float OuterBoxSizeMultiplier = 1f; private float _outerBoxSizeMultiplier = 1f; public Vector3 InnerBoxSize = Vector3.zero; private Vector3 _innerBoxSize = Vector3.zero; public float InnerBoxSizeMultiplier = 1f; private float _innerBoxSizeMultiplier = 1f; [Header("PostProcessing Effects")] public AntialiasingModel antialiasing = new AntialiasingModel(); public AmbientOcclusionModel ambientOcclusion = new AmbientOcclusionModel(); public ScreenSpaceReflectionModel screenSpaceReflection = new ScreenSpaceReflectionModel(); public DepthOfFieldModel depthOfField = new DepthOfFieldModel(); public MotionBlurModel motionBlur = new MotionBlurModel(); public EyeAdaptationModel eyeAdaptation = new EyeAdaptationModel(); public BloomModel bloom = new BloomModel(); public ColorGradingModel colorGrading = new ColorGradingModel(); public UserLutModel userLut = new UserLutModel(); public ChromaticAberrationModel chromaticAberration = new ChromaticAberrationModel(); public GrainModel grain = new GrainModel(); public VignetteModel vignette = new VignetteModel(); public DitheringModel dithering = new DitheringModel(); [Header("ResetAllValues")] public PostProcessingProfile _ResetProfile; private bool _hasJustStarted = true; private void Start() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) _sphereCollider = ((Component)this).GetComponent(); ((Collider)_sphereCollider).isTrigger = true; _boxCollider = ((Component)this).GetComponent(); ((Collider)_boxCollider).isTrigger = true; ((Component)this).transform.localScale = Vector3.one; if (ShapeOfVolume == VolumeShape.BOX) { ((Collider)_boxCollider).enabled = true; ((Collider)_sphereCollider).enabled = false; } else if (ShapeOfVolume == VolumeShape.SPHERE) { ((Collider)_boxCollider).enabled = false; ((Collider)_sphereCollider).enabled = true; } } private void OnValidate() { CheckColliderShape(); } private void Update() { } private void OnTriggerStay(Collider other) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) PostProcessVolumeReceiver component = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { PostProcessVolume volume = ((Component)this).GetComponent(); component.SetValues(ref volume, GradientPercentage(((Component)other).transform.position)); } } private void OnTriggerExit(Collider other) { PostProcessVolumeReceiver component = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.ResetValues(); } } private float GradientPercentage(Vector3 position) { //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_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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)this).transform.position - position; switch (ShapeOfVolume) { case VolumeShape.BOX: { val = Quaternion.Inverse(((Component)this).transform.rotation) * val; float num2 = Mathf.Clamp01((Mathf.Abs(val.x) - InnerBoxSize.x * 0.5f) / ((_boxCollider.size.x - InnerBoxSize.x) * 0.5f)); float num3 = Mathf.Clamp01((Mathf.Abs(val.y) - InnerBoxSize.y * 0.5f) / ((_boxCollider.size.y - InnerBoxSize.y) * 0.5f)); float num4 = Mathf.Clamp01((Mathf.Abs(val.z) - InnerBoxSize.z * 0.5f) / ((_boxCollider.size.z - InnerBoxSize.z) * 0.5f)); float num5 = Mathf.Max(new float[3] { num2, num3, num4 }); return Mathf.Clamp01(1f - num5); } case VolumeShape.SPHERE: { float num = (((Vector3)(ref val)).magnitude - InnerSphereRadius) / (_sphereCollider.radius - InnerSphereRadius); return Mathf.Clamp01(1f - num); } default: return 0f; } } public void ResetValues() { if ((Object)(object)_ResetProfile == (Object)null) { Debug.LogError((object)"No ProfileEntered"); return; } antialiasing.enabled = _ResetProfile.antialiasing.enabled; ambientOcclusion.enabled = _ResetProfile.ambientOcclusion.enabled; screenSpaceReflection.enabled = _ResetProfile.screenSpaceReflection.enabled; depthOfField.enabled = _ResetProfile.depthOfField.enabled; motionBlur.enabled = _ResetProfile.motionBlur.enabled; eyeAdaptation.enabled = _ResetProfile.eyeAdaptation.enabled; bloom.enabled = _ResetProfile.bloom.enabled; colorGrading.enabled = _ResetProfile.colorGrading.enabled; userLut.enabled = _ResetProfile.userLut.enabled; chromaticAberration.enabled = _ResetProfile.chromaticAberration.enabled; grain.enabled = _ResetProfile.grain.enabled; vignette.enabled = _ResetProfile.vignette.enabled; dithering.enabled = _ResetProfile.dithering.enabled; antialiasing.settings = _ResetProfile.antialiasing.settings; ambientOcclusion.settings = _ResetProfile.ambientOcclusion.settings; screenSpaceReflection.settings = _ResetProfile.screenSpaceReflection.settings; depthOfField.settings = _ResetProfile.depthOfField.settings; motionBlur.settings = _ResetProfile.motionBlur.settings; eyeAdaptation.settings = _ResetProfile.eyeAdaptation.settings; bloom.settings = _ResetProfile.bloom.settings; colorGrading.settings = _ResetProfile.colorGrading.settings; userLut.settings = _ResetProfile.userLut.settings; chromaticAberration.settings = _ResetProfile.chromaticAberration.settings; grain.settings = _ResetProfile.grain.settings; vignette.settings = _ResetProfile.vignette.settings; dithering.settings = _ResetProfile.dithering.settings; } public void CheckColliderShape() { //IL_0049: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: 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_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) if (_hasJustStarted) { _hasJustStarted = false; _outerBoxSize = OuterBoxSize / OuterBoxSizeMultiplier; _innerBoxSize = InnerBoxSize / InnerBoxSizeMultiplier; } ((Component)this).transform.localScale = Vector3.one; if ((Object)(object)_boxCollider == (Object)null || (Object)(object)_sphereCollider == (Object)null) { _sphereCollider = ((Component)this).GetComponent(); ((Collider)_sphereCollider).isTrigger = true; _boxCollider = ((Component)this).GetComponent(); ((Collider)_boxCollider).isTrigger = true; } OuterSphereRadius = Mathf.Clamp(OuterSphereRadius, 0f, float.PositiveInfinity); _sphereCollider.radius = OuterSphereRadius; InnerSphereRadius = Mathf.Clamp(InnerSphereRadius, 0f, _sphereCollider.radius); if (_outerBoxSizeMultiplier != OuterBoxSizeMultiplier) { OuterBoxSizeMultiplier = Mathf.Clamp(OuterBoxSizeMultiplier, 0.01f, float.PositiveInfinity); OuterBoxSize = _outerBoxSize * OuterBoxSizeMultiplier; _outerBoxSizeMultiplier = OuterBoxSizeMultiplier; } OuterBoxSize.x = Mathf.Clamp(OuterBoxSize.x, 0f, float.PositiveInfinity); OuterBoxSize.y = Mathf.Clamp(OuterBoxSize.y, 0f, float.PositiveInfinity); OuterBoxSize.z = Mathf.Clamp(OuterBoxSize.z, 0f, float.PositiveInfinity); _outerBoxSize = OuterBoxSize / _outerBoxSizeMultiplier; _boxCollider.size = OuterBoxSize; if (_innerBoxSizeMultiplier != InnerBoxSizeMultiplier) { InnerBoxSizeMultiplier = Mathf.Clamp(InnerBoxSizeMultiplier, 0.01f, float.PositiveInfinity); InnerBoxSize = _innerBoxSize * InnerBoxSizeMultiplier; _innerBoxSizeMultiplier = InnerBoxSizeMultiplier; } _innerBoxSize = InnerBoxSize / _innerBoxSizeMultiplier; InnerBoxSize.x = Mathf.Clamp(InnerBoxSize.x, 0f, _boxCollider.size.x); InnerBoxSize.y = Mathf.Clamp(InnerBoxSize.y, 0f, _boxCollider.size.y); InnerBoxSize.z = Mathf.Clamp(InnerBoxSize.z, 0f, _boxCollider.size.z); if (ShapeOfVolume == VolumeShape.BOX) { ((Collider)_boxCollider).enabled = true; ((Collider)_sphereCollider).enabled = false; } else if (ShapeOfVolume == VolumeShape.SPHERE) { ((Collider)_boxCollider).enabled = false; ((Collider)_sphereCollider).enabled = true; } } private void OnDrawGizmos() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_004d: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_00c9: 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_0095: 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_00b4: Unknown result type (might be due to invalid IL or missing references) CheckColliderShape(); Matrix4x4 matrix = Matrix4x4.TRS(((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform.lossyScale); Gizmos.matrix = matrix; switch (ShapeOfVolume) { case VolumeShape.BOX: Gizmos.color = Color.blue; Gizmos.DrawWireCube(Vector3.zero, _boxCollider.size); Gizmos.color = Color.yellow; Gizmos.DrawWireCube(Vector3.zero, InnerBoxSize); break; case VolumeShape.SPHERE: Gizmos.color = Color.blue; Gizmos.DrawWireSphere(Vector3.zero, _sphereCollider.radius); Gizmos.color = Color.yellow; Gizmos.DrawWireSphere(Vector3.zero, InnerSphereRadius); break; } Gizmos.matrix = Matrix4x4.identity; } } [RequireComponent(typeof(PostProcessingBehaviour))] [RequireComponent(typeof(BoxCollider))] [RequireComponent(typeof(Rigidbody))] public class PostProcessVolumeReceiver : MonoBehaviour { private PostProcessingProfile _profileOriginal; private PostProcessingProfile _profileCopy; private AntialiasingModel.Settings antialiasingSettings; private AmbientOcclusionModel.Settings ambientOcclusionSettings; private ScreenSpaceReflectionModel.Settings screenSpaceReflectionSettings; private DepthOfFieldModel.Settings depthOfFieldSettings; private MotionBlurModel.Settings motionBlurSettings; private EyeAdaptationModel.Settings eyeAdaptationSettings; private BloomModel.Settings bloomSettings; private ColorGradingModel.Settings colorGradingSettings; private UserLutModel.Settings userLutSettings; private ChromaticAberrationModel.Settings chromaticAberrationSettings; private GrainModel.Settings grainSettings; private VignetteModel.Settings vignetteSettings; private DitheringModel.Settings ditheringSettings; private void Start() { _profileOriginal = ((Component)this).GetComponent().profile; if ((Object)(object)_profileOriginal == (Object)null) { Debug.LogError((object)"No Post ProcessingProfile added to camera!"); return; } _profileCopy = Object.Instantiate(_profileOriginal); ((Component)this).GetComponent().profile = _profileCopy; colorGradingSettings = _profileCopy.colorGrading.settings; ((Component)this).GetComponent().isKinematic = false; ((Component)this).GetComponent().useGravity = false; ((Component)this).GetComponent().isTrigger = true; } public void SetValues(ref PostProcessVolume volume, float percentage) { //IL_1430: Unknown result type (might be due to invalid IL or missing references) //IL_144a: 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_1455: Unknown result type (might be due to invalid IL or missing references) //IL_147e: Unknown result type (might be due to invalid IL or missing references) //IL_1498: Unknown result type (might be due to invalid IL or missing references) //IL_149e: Unknown result type (might be due to invalid IL or missing references) //IL_14a3: 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_14e6: Unknown result type (might be due to invalid IL or missing references) //IL_14ec: Unknown result type (might be due to invalid IL or missing references) //IL_14f1: Unknown result type (might be due to invalid IL or missing references) //IL_1564: Unknown result type (might be due to invalid IL or missing references) //IL_1583: Unknown result type (might be due to invalid IL or missing references) //IL_1589: Unknown result type (might be due to invalid IL or missing references) //IL_158e: Unknown result type (might be due to invalid IL or missing references) //IL_15c1: Unknown result type (might be due to invalid IL or missing references) //IL_15e0: Unknown result type (might be due to invalid IL or missing references) //IL_15e6: Unknown result type (might be due to invalid IL or missing references) //IL_15eb: Unknown result type (might be due to invalid IL or missing references) //IL_161e: Unknown result type (might be due to invalid IL or missing references) //IL_163d: Unknown result type (might be due to invalid IL or missing references) //IL_1643: Unknown result type (might be due to invalid IL or missing references) //IL_1648: Unknown result type (might be due to invalid IL or missing references) //IL_1698: Unknown result type (might be due to invalid IL or missing references) //IL_16b7: Unknown result type (might be due to invalid IL or missing references) //IL_16bd: Unknown result type (might be due to invalid IL or missing references) //IL_16c2: Unknown result type (might be due to invalid IL or missing references) //IL_16f5: Unknown result type (might be due to invalid IL or missing references) //IL_1714: Unknown result type (might be due to invalid IL or missing references) //IL_171a: Unknown result type (might be due to invalid IL or missing references) //IL_171f: Unknown result type (might be due to invalid IL or missing references) //IL_1752: Unknown result type (might be due to invalid IL or missing references) //IL_1771: Unknown result type (might be due to invalid IL or missing references) //IL_1777: Unknown result type (might be due to invalid IL or missing references) //IL_177c: Unknown result type (might be due to invalid IL or missing references) //IL_1b37: Unknown result type (might be due to invalid IL or missing references) //IL_1b4c: Unknown result type (might be due to invalid IL or missing references) //IL_1b52: Unknown result type (might be due to invalid IL or missing references) //IL_1b57: Unknown result type (might be due to invalid IL or missing references) //IL_1bde: Unknown result type (might be due to invalid IL or missing references) //IL_1be3: 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_1bfd: Unknown result type (might be due to invalid IL or missing references) //IL_1c03: Unknown result type (might be due to invalid IL or missing references) //IL_1c08: Unknown result type (might be due to invalid IL or missing references) //IL_1c0d: Unknown result type (might be due to invalid IL or missing references) if (volume.antialiasing.enabled) { _profileCopy.antialiasing.enabled = true; _profileCopy.antialiasing.settings = volume.antialiasing.settings; antialiasingSettings.method = volume.antialiasing.settings.method; if (volume.antialiasing.settings.method == AntialiasingModel.Method.Taa) { antialiasingSettings.taaSettings.jitterSpread = Mathf.Lerp(_profileOriginal.antialiasing.settings.taaSettings.jitterSpread, volume.antialiasing.settings.taaSettings.jitterSpread, percentage); antialiasingSettings.taaSettings.stationaryBlending = Mathf.Lerp(_profileOriginal.antialiasing.settings.taaSettings.stationaryBlending, volume.antialiasing.settings.taaSettings.stationaryBlending, percentage); antialiasingSettings.taaSettings.motionBlending = Mathf.Lerp(_profileOriginal.antialiasing.settings.taaSettings.motionBlending, volume.antialiasing.settings.taaSettings.motionBlending, percentage); antialiasingSettings.taaSettings.sharpen = Mathf.Lerp(_profileOriginal.antialiasing.settings.taaSettings.sharpen, volume.antialiasing.settings.taaSettings.sharpen, percentage); _profileCopy.antialiasing.settings = antialiasingSettings; } else if (volume.antialiasing.settings.method == AntialiasingModel.Method.Fxaa) { antialiasingSettings.fxaaSettings.preset = volume.antialiasing.settings.fxaaSettings.preset; _profileCopy.antialiasing.settings = antialiasingSettings; } } if (volume.ambientOcclusion.enabled) { _profileCopy.ambientOcclusion.enabled = true; _profileCopy.ambientOcclusion.settings = volume.ambientOcclusion.settings; ambientOcclusionSettings.intensity = Mathf.Lerp(_profileOriginal.ambientOcclusion.settings.intensity, volume.ambientOcclusion.settings.intensity, percentage); ambientOcclusionSettings.radius = Mathf.Lerp(_profileOriginal.ambientOcclusion.settings.radius, volume.ambientOcclusion.settings.radius, percentage); ambientOcclusionSettings.sampleCount = volume.ambientOcclusion.settings.sampleCount; ambientOcclusionSettings.downsampling = volume.ambientOcclusion.settings.downsampling; ambientOcclusionSettings.forceForwardCompatibility = volume.ambientOcclusion.settings.forceForwardCompatibility; ambientOcclusionSettings.highPrecision = volume.ambientOcclusion.settings.highPrecision; ambientOcclusionSettings.ambientOnly = volume.ambientOcclusion.settings.ambientOnly; _profileCopy.ambientOcclusion.settings = ambientOcclusionSettings; } else { _profileCopy.ambientOcclusion.enabled = false; } if (volume.screenSpaceReflection.enabled) { _profileCopy.screenSpaceReflection.enabled = true; _profileCopy.screenSpaceReflection.settings = volume.screenSpaceReflection.settings; screenSpaceReflectionSettings.reflection.blendType = volume.screenSpaceReflection.settings.reflection.blendType; screenSpaceReflectionSettings.reflection.reflectionQuality = volume.screenSpaceReflection.settings.reflection.reflectionQuality; screenSpaceReflectionSettings.reflection.maxDistance = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.reflection.maxDistance, volume.screenSpaceReflection.settings.reflection.maxDistance, percentage); screenSpaceReflectionSettings.reflection.iterationCount = (int)Mathf.Lerp((float)_profileOriginal.screenSpaceReflection.settings.reflection.iterationCount, (float)volume.screenSpaceReflection.settings.reflection.iterationCount, percentage); screenSpaceReflectionSettings.reflection.stepSize = (int)Mathf.Lerp((float)_profileOriginal.screenSpaceReflection.settings.reflection.stepSize, (float)volume.screenSpaceReflection.settings.reflection.stepSize, percentage); screenSpaceReflectionSettings.reflection.widthModifier = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.reflection.widthModifier, volume.screenSpaceReflection.settings.reflection.widthModifier, percentage); screenSpaceReflectionSettings.reflection.reflectionBlur = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.reflection.reflectionBlur, volume.screenSpaceReflection.settings.reflection.reflectionBlur, percentage); screenSpaceReflectionSettings.reflection.reflectBackfaces = volume.screenSpaceReflection.settings.reflection.reflectBackfaces; screenSpaceReflectionSettings.intensity.reflectionMultiplier = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.intensity.reflectionMultiplier, volume.screenSpaceReflection.settings.intensity.reflectionMultiplier, percentage); screenSpaceReflectionSettings.intensity.fadeDistance = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.intensity.fadeDistance, volume.screenSpaceReflection.settings.intensity.fadeDistance, percentage); screenSpaceReflectionSettings.intensity.fresnelFade = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.intensity.fresnelFade, volume.screenSpaceReflection.settings.intensity.fresnelFade, percentage); screenSpaceReflectionSettings.intensity.fresnelFadePower = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.intensity.fresnelFadePower, volume.screenSpaceReflection.settings.intensity.fresnelFadePower, percentage); screenSpaceReflectionSettings.screenEdgeMask.intensity = Mathf.Lerp(_profileOriginal.screenSpaceReflection.settings.screenEdgeMask.intensity, volume.screenSpaceReflection.settings.screenEdgeMask.intensity, percentage); _profileCopy.screenSpaceReflection.settings = screenSpaceReflectionSettings; } else { _profileCopy.screenSpaceReflection.enabled = false; } if (volume.depthOfField.enabled) { _profileCopy.depthOfField.enabled = true; _profileCopy.depthOfField.settings = volume.depthOfField.settings; depthOfFieldSettings.focusDistance = Mathf.Lerp(_profileOriginal.depthOfField.settings.focusDistance, volume.depthOfField.settings.focusDistance, percentage); depthOfFieldSettings.aperture = Mathf.Lerp(_profileOriginal.depthOfField.settings.aperture, volume.depthOfField.settings.aperture, percentage); depthOfFieldSettings.useCameraFov = volume.depthOfField.settings.useCameraFov; depthOfFieldSettings.focalLength = Mathf.Lerp(_profileOriginal.depthOfField.settings.focalLength, volume.depthOfField.settings.focalLength, percentage); depthOfFieldSettings.kernelSize = volume.depthOfField.settings.kernelSize; _profileCopy.depthOfField.settings = depthOfFieldSettings; } else { _profileCopy.depthOfField.enabled = false; } if (volume.motionBlur.enabled) { _profileCopy.motionBlur.enabled = true; _profileCopy.motionBlur.settings = volume.motionBlur.settings; motionBlurSettings.shutterAngle = Mathf.Lerp(_profileOriginal.motionBlur.settings.shutterAngle, volume.motionBlur.settings.shutterAngle, percentage); motionBlurSettings.sampleCount = (int)Mathf.Lerp((float)_profileOriginal.motionBlur.settings.sampleCount, (float)volume.motionBlur.settings.sampleCount, percentage); motionBlurSettings.frameBlending = Mathf.Lerp(_profileOriginal.motionBlur.settings.frameBlending, volume.motionBlur.settings.frameBlending, percentage); _profileCopy.motionBlur.settings = motionBlurSettings; } else { _profileCopy.motionBlur.enabled = false; } if (volume.eyeAdaptation.enabled) { _profileCopy.eyeAdaptation.enabled = true; _profileCopy.eyeAdaptation.settings = volume.eyeAdaptation.settings; eyeAdaptationSettings.logMin = (int)Mathf.Lerp((float)_profileOriginal.eyeAdaptation.settings.logMin, (float)volume.eyeAdaptation.settings.logMin, percentage); eyeAdaptationSettings.logMax = (int)Mathf.Lerp((float)_profileOriginal.eyeAdaptation.settings.logMax, (float)volume.eyeAdaptation.settings.logMax, percentage); eyeAdaptationSettings.lowPercent = Mathf.Lerp(_profileOriginal.eyeAdaptation.settings.lowPercent, volume.eyeAdaptation.settings.lowPercent, percentage); eyeAdaptationSettings.highPercent = Mathf.Lerp(_profileOriginal.eyeAdaptation.settings.highPercent, volume.eyeAdaptation.settings.highPercent, percentage); eyeAdaptationSettings.minLuminance = Mathf.Lerp(_profileOriginal.eyeAdaptation.settings.minLuminance, volume.eyeAdaptation.settings.minLuminance, percentage); eyeAdaptationSettings.maxLuminance = Mathf.Lerp(_profileOriginal.eyeAdaptation.settings.maxLuminance, volume.eyeAdaptation.settings.maxLuminance, percentage); eyeAdaptationSettings.dynamicKeyValue = volume.eyeAdaptation.settings.dynamicKeyValue; eyeAdaptationSettings.keyValue = Mathf.Lerp(_profileOriginal.eyeAdaptation.settings.keyValue, volume.eyeAdaptation.settings.keyValue, percentage); eyeAdaptationSettings.adaptationType = volume.eyeAdaptation.settings.adaptationType; eyeAdaptationSettings.speedUp = Mathf.Lerp(_profileOriginal.eyeAdaptation.settings.speedUp, volume.eyeAdaptation.settings.speedUp, percentage); eyeAdaptationSettings.speedDown = Mathf.Lerp(_profileOriginal.eyeAdaptation.settings.speedDown, volume.eyeAdaptation.settings.speedDown, percentage); _profileCopy.eyeAdaptation.settings = eyeAdaptationSettings; } else { _profileCopy.eyeAdaptation.enabled = false; } if (volume.bloom.enabled) { _profileCopy.bloom.enabled = true; _profileCopy.bloom.settings = volume.bloom.settings; bloomSettings.bloom.intensity = Mathf.Lerp(_profileOriginal.bloom.settings.bloom.intensity, volume.bloom.settings.bloom.intensity, percentage); bloomSettings.bloom.threshold = Mathf.Lerp(_profileOriginal.bloom.settings.bloom.threshold, volume.bloom.settings.bloom.threshold, percentage); bloomSettings.bloom.thresholdLinear = Mathf.Lerp(_profileOriginal.bloom.settings.bloom.thresholdLinear, volume.bloom.settings.bloom.thresholdLinear, percentage); bloomSettings.bloom.softKnee = Mathf.Lerp(_profileOriginal.bloom.settings.bloom.softKnee, volume.bloom.settings.bloom.softKnee, percentage); bloomSettings.bloom.radius = Mathf.Lerp(_profileOriginal.bloom.settings.bloom.radius, volume.bloom.settings.bloom.radius, percentage); bloomSettings.bloom.antiFlicker = volume.bloom.settings.bloom.antiFlicker; bloomSettings.lensDirt.texture = _profileOriginal.bloom.settings.lensDirt.texture; bloomSettings.lensDirt.intensity = Mathf.Lerp(_profileOriginal.bloom.settings.lensDirt.intensity, volume.bloom.settings.lensDirt.intensity, percentage); _profileCopy.bloom.settings = bloomSettings; } else { _profileCopy.bloom.enabled = false; } if (volume.colorGrading.enabled) { _profileCopy.colorGrading.enabled = true; _profileCopy.colorGrading.settings = volume.colorGrading.settings; colorGradingSettings.tonemapping.tonemapper = volume.colorGrading.settings.tonemapping.tonemapper; colorGradingSettings.tonemapping.neutralBlackIn = Mathf.Lerp(_profileOriginal.colorGrading.settings.tonemapping.neutralBlackIn, volume.colorGrading.settings.tonemapping.neutralBlackIn, percentage); colorGradingSettings.tonemapping.neutralWhiteIn = Mathf.Lerp(_profileOriginal.colorGrading.settings.tonemapping.neutralWhiteIn, volume.colorGrading.settings.tonemapping.neutralWhiteIn, percentage); colorGradingSettings.tonemapping.neutralBlackOut = Mathf.Lerp(_profileOriginal.colorGrading.settings.tonemapping.neutralBlackOut, volume.colorGrading.settings.tonemapping.neutralBlackOut, percentage); colorGradingSettings.tonemapping.neutralWhiteOut = Mathf.Lerp(_profileOriginal.colorGrading.settings.tonemapping.neutralWhiteOut, volume.colorGrading.settings.tonemapping.neutralWhiteOut, percentage); colorGradingSettings.tonemapping.neutralWhiteLevel = Mathf.Lerp(_profileOriginal.colorGrading.settings.tonemapping.neutralWhiteLevel, volume.colorGrading.settings.tonemapping.neutralWhiteLevel, percentage); colorGradingSettings.tonemapping.neutralWhiteClip = Mathf.Lerp(_profileOriginal.colorGrading.settings.tonemapping.neutralWhiteClip, volume.colorGrading.settings.tonemapping.neutralWhiteClip, percentage); colorGradingSettings.basic.temperature = Mathf.Lerp(_profileOriginal.colorGrading.settings.basic.temperature, volume.colorGrading.settings.basic.temperature, percentage); colorGradingSettings.basic.hueShift = Mathf.Lerp(_profileOriginal.colorGrading.settings.basic.hueShift, volume.colorGrading.settings.basic.hueShift, percentage); colorGradingSettings.basic.contrast = Mathf.Lerp(_profileOriginal.colorGrading.settings.basic.contrast, volume.colorGrading.settings.basic.contrast, percentage); colorGradingSettings.basic.postExposure = Mathf.Lerp(_profileOriginal.colorGrading.settings.basic.postExposure, volume.colorGrading.settings.basic.postExposure, percentage); colorGradingSettings.basic.saturation = Mathf.Lerp(_profileOriginal.colorGrading.settings.basic.saturation, volume.colorGrading.settings.basic.saturation, percentage); colorGradingSettings.basic.tint = Mathf.Lerp(_profileOriginal.colorGrading.settings.basic.tint, volume.colorGrading.settings.basic.tint, percentage); colorGradingSettings.channelMixer.currentEditingChannel = volume.colorGrading.settings.channelMixer.currentEditingChannel; colorGradingSettings.channelMixer.red = Vector3.Lerp(_profileOriginal.colorGrading.settings.channelMixer.red, volume.colorGrading.settings.channelMixer.red, percentage); colorGradingSettings.channelMixer.green = Vector3.Lerp(_profileOriginal.colorGrading.settings.channelMixer.green, volume.colorGrading.settings.channelMixer.green, percentage); colorGradingSettings.channelMixer.blue = Vector3.Lerp(_profileOriginal.colorGrading.settings.channelMixer.blue, volume.colorGrading.settings.channelMixer.blue, percentage); colorGradingSettings.colorWheels.mode = volume.colorGrading.settings.colorWheels.mode; if (colorGradingSettings.colorWheels.mode == ColorGradingModel.ColorWheelMode.Linear) { colorGradingSettings.colorWheels.linear.gain = Color.Lerp(_profileOriginal.colorGrading.settings.colorWheels.linear.gain, volume.colorGrading.settings.colorWheels.linear.gain, percentage); colorGradingSettings.colorWheels.linear.gamma = Color.Lerp(_profileOriginal.colorGrading.settings.colorWheels.linear.gamma, volume.colorGrading.settings.colorWheels.linear.gamma, percentage); colorGradingSettings.colorWheels.linear.lift = Color.Lerp(_profileOriginal.colorGrading.settings.colorWheels.linear.lift, volume.colorGrading.settings.colorWheels.linear.lift, percentage); } else if (colorGradingSettings.colorWheels.mode == ColorGradingModel.ColorWheelMode.Log) { colorGradingSettings.colorWheels.log.slope = Color.Lerp(_profileOriginal.colorGrading.settings.colorWheels.log.slope, volume.colorGrading.settings.colorWheels.log.slope, percentage); colorGradingSettings.colorWheels.log.power = Color.Lerp(_profileOriginal.colorGrading.settings.colorWheels.log.power, volume.colorGrading.settings.colorWheels.log.power, percentage); colorGradingSettings.colorWheels.log.offset = Color.Lerp(_profileOriginal.colorGrading.settings.colorWheels.log.offset, volume.colorGrading.settings.colorWheels.log.offset, percentage); } colorGradingSettings.curves = _profileOriginal.colorGrading.settings.curves; _profileCopy.colorGrading.settings = colorGradingSettings; } else { _profileCopy.colorGrading.enabled = false; } if (volume.userLut.enabled) { _profileCopy.userLut.enabled = true; _profileCopy.userLut.settings = volume.userLut.settings; userLutSettings.lut = _profileOriginal.userLut.settings.lut; userLutSettings.contribution = Mathf.Lerp(_profileOriginal.userLut.settings.contribution, volume.userLut.settings.contribution, percentage); _profileCopy.userLut.settings = userLutSettings; } else { _profileCopy.userLut.enabled = false; } if (volume.chromaticAberration.enabled) { _profileCopy.chromaticAberration.enabled = true; _profileCopy.chromaticAberration.settings = volume.chromaticAberration.settings; chromaticAberrationSettings.spectralTexture = volume.chromaticAberration.settings.spectralTexture; chromaticAberrationSettings.intensity = Mathf.Lerp(_profileOriginal.chromaticAberration.settings.intensity, volume.chromaticAberration.settings.intensity, percentage); _profileCopy.chromaticAberration.settings = chromaticAberrationSettings; } else { _profileCopy.chromaticAberration.enabled = false; } if (volume.grain.enabled) { _profileCopy.grain.enabled = true; _profileCopy.grain.settings = volume.grain.settings; grainSettings.intensity = Mathf.Lerp(_profileOriginal.grain.settings.intensity, volume.grain.settings.intensity, percentage); grainSettings.luminanceContribution = Mathf.Lerp(_profileOriginal.grain.settings.luminanceContribution, volume.grain.settings.luminanceContribution, percentage); grainSettings.size = Mathf.Lerp(_profileOriginal.grain.settings.size, volume.grain.settings.size, percentage); grainSettings.colored = volume.grain.settings.colored; _profileCopy.grain.settings = grainSettings; } else { _profileCopy.grain.enabled = false; } if (volume.vignette.enabled) { _profileCopy.vignette.enabled = true; _profileCopy.vignette.settings = volume.vignette.settings; vignetteSettings.mode = volume.vignette.settings.mode; vignetteSettings.color = Color.Lerp(_profileOriginal.vignette.settings.color, volume.vignette.settings.color, percentage); if (vignetteSettings.mode == VignetteModel.Mode.Masked) { vignetteSettings.opacity = Mathf.Lerp(_profileOriginal.vignette.settings.opacity, volume.vignette.settings.opacity, percentage); } else if (vignetteSettings.mode == VignetteModel.Mode.Classic) { vignetteSettings.center = Vector2.op_Implicit(Vector3.Lerp(Vector2.op_Implicit(_profileOriginal.vignette.settings.center), Vector2.op_Implicit(volume.vignette.settings.center), percentage)); vignetteSettings.intensity = Mathf.Lerp(_profileOriginal.vignette.settings.intensity, volume.vignette.settings.intensity, percentage); vignetteSettings.smoothness = Mathf.Lerp(_profileOriginal.vignette.settings.smoothness, volume.vignette.settings.smoothness, percentage); vignetteSettings.roundness = Mathf.Lerp(_profileOriginal.vignette.settings.roundness, volume.vignette.settings.roundness, percentage); vignetteSettings.rounded = volume.vignette.settings.rounded; } _profileCopy.vignette.settings = vignetteSettings; } else { _profileCopy.vignette.enabled = false; } if (volume.dithering.enabled) { _profileCopy.dithering.enabled = true; } else { _profileCopy.dithering.enabled = false; } } public void ResetValues() { if (_profileOriginal.antialiasing.enabled) { _profileCopy.antialiasing.enabled = true; _profileCopy.antialiasing.settings = _profileOriginal.antialiasing.settings; } else { _profileCopy.antialiasing.enabled = false; } if (_profileOriginal.ambientOcclusion.enabled) { _profileCopy.ambientOcclusion.enabled = true; _profileCopy.ambientOcclusion.settings = _profileOriginal.ambientOcclusion.settings; } else { _profileCopy.ambientOcclusion.enabled = false; } if (_profileOriginal.screenSpaceReflection.enabled) { _profileCopy.screenSpaceReflection.enabled = true; _profileCopy.screenSpaceReflection.settings = _profileOriginal.screenSpaceReflection.settings; } else { _profileCopy.screenSpaceReflection.enabled = false; } if (_profileOriginal.depthOfField.enabled) { _profileCopy.depthOfField.enabled = true; _profileCopy.depthOfField.settings = _profileOriginal.depthOfField.settings; } else { _profileCopy.depthOfField.enabled = false; } if (_profileOriginal.motionBlur.enabled) { _profileCopy.motionBlur.enabled = true; _profileCopy.motionBlur.settings = _profileOriginal.motionBlur.settings; } else { _profileCopy.motionBlur.enabled = false; } if (_profileOriginal.eyeAdaptation.enabled) { _profileCopy.eyeAdaptation.enabled = true; _profileCopy.eyeAdaptation.settings = _profileOriginal.eyeAdaptation.settings; } else { _profileCopy.eyeAdaptation.enabled = false; } if (_profileOriginal.bloom.enabled) { _profileCopy.bloom.enabled = true; _profileCopy.bloom.settings = _profileOriginal.bloom.settings; } else { _profileCopy.bloom.enabled = false; } if (_profileOriginal.colorGrading.enabled) { _profileCopy.colorGrading.enabled = true; _profileCopy.colorGrading.settings = _profileOriginal.colorGrading.settings; } else { _profileCopy.colorGrading.enabled = false; } if (_profileOriginal.userLut.enabled) { _profileCopy.userLut.enabled = true; _profileCopy.userLut.settings = _profileOriginal.userLut.settings; } else { _profileCopy.userLut.enabled = false; } if (_profileOriginal.chromaticAberration.enabled) { _profileCopy.chromaticAberration.enabled = true; _profileCopy.chromaticAberration.settings = _profileOriginal.chromaticAberration.settings; } else { _profileCopy.chromaticAberration.enabled = false; } if (_profileOriginal.grain.enabled) { _profileCopy.grain.enabled = true; _profileCopy.grain.settings = _profileOriginal.grain.settings; } else { _profileCopy.grain.enabled = false; } if (_profileOriginal.vignette.enabled) { _profileCopy.vignette.enabled = true; _profileCopy.vignette.settings = _profileOriginal.vignette.settings; } else { _profileCopy.vignette.enabled = false; } if (_profileOriginal.dithering.enabled) { _profileCopy.dithering.enabled = true; _profileCopy.dithering.settings = _profileOriginal.dithering.settings; } else { _profileCopy.dithering.enabled = false; } } } namespace UnityEngine.PostProcessing { public sealed class GetSetAttribute : PropertyAttribute { public readonly string name; public bool dirty; public GetSetAttribute(string name) { this.name = name; } } public sealed class MinAttribute : PropertyAttribute { public readonly float min; public MinAttribute(float min) { this.min = min; } } public sealed class TrackballAttribute : PropertyAttribute { public readonly string method; public TrackballAttribute(string method) { this.method = method; } } public sealed class TrackballGroupAttribute : PropertyAttribute { } public sealed class AmbientOcclusionComponent : PostProcessingComponentCommandBuffer { private static class Uniforms { internal static readonly int _Intensity = Shader.PropertyToID("_Intensity"); internal static readonly int _Radius = Shader.PropertyToID("_Radius"); internal static readonly int _Downsample = Shader.PropertyToID("_Downsample"); internal static readonly int _SampleCount = Shader.PropertyToID("_SampleCount"); internal static readonly int _OcclusionTexture1 = Shader.PropertyToID("_OcclusionTexture1"); internal static readonly int _OcclusionTexture2 = Shader.PropertyToID("_OcclusionTexture2"); internal static readonly int _OcclusionTexture = Shader.PropertyToID("_OcclusionTexture"); internal static readonly int _MainTex = Shader.PropertyToID("_MainTex"); internal static readonly int _TempRT = Shader.PropertyToID("_TempRT"); } private enum OcclusionSource { DepthTexture, DepthNormalsTexture, GBuffer } private const string k_BlitShaderString = "Hidden/Post FX/Blit"; private const string k_ShaderString = "Hidden/Post FX/Ambient Occlusion"; private readonly RenderTargetIdentifier[] m_MRT = (RenderTargetIdentifier[])(object)new RenderTargetIdentifier[2] { RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)10), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2) }; private OcclusionSource occlusionSource { get { if (context.isGBufferAvailable && !base.model.settings.forceForwardCompatibility) { return OcclusionSource.GBuffer; } if (base.model.settings.highPrecision && (!context.isGBufferAvailable || base.model.settings.forceForwardCompatibility)) { return OcclusionSource.DepthTexture; } return OcclusionSource.DepthNormalsTexture; } } private bool ambientOnlySupported => context.isHdr && base.model.settings.ambientOnly && context.isGBufferAvailable && !base.model.settings.forceForwardCompatibility; public override bool active => base.model.enabled && base.model.settings.intensity > 0f && !context.interrupted; public override DepthTextureMode GetCameraFlags() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) DepthTextureMode val = (DepthTextureMode)0; if (occlusionSource == OcclusionSource.DepthTexture) { val = (DepthTextureMode)(val | 1); } if (occlusionSource != OcclusionSource.GBuffer) { val = (DepthTextureMode)(val | 2); } return val; } public override string GetName() { return "Ambient Occlusion"; } public override CameraEvent GetCameraEvent() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) return (CameraEvent)((!ambientOnlySupported || context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.AmbientOcclusion)) ? 12 : 21); } public override void PopulateCommandBuffer(CommandBuffer cb) { //IL_00ea: 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_0126: 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_0171: 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_0185: 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_01ca: 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_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0285: 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_0298: Unknown result type (might be due to invalid IL or missing references) AmbientOcclusionModel.Settings settings = base.model.settings; Material val = context.materialFactory.Get("Hidden/Post FX/Blit"); Material val2 = context.materialFactory.Get("Hidden/Post FX/Ambient Occlusion"); val2.shaderKeywords = null; val2.SetFloat(Uniforms._Intensity, settings.intensity); val2.SetFloat(Uniforms._Radius, settings.radius); val2.SetFloat(Uniforms._Downsample, (!settings.downsampling) ? 1f : 0.5f); val2.SetInt(Uniforms._SampleCount, (int)settings.sampleCount); int width = context.width; int height = context.height; int num = ((!settings.downsampling) ? 1 : 2); int occlusionTexture = Uniforms._OcclusionTexture1; cb.GetTemporaryRT(occlusionTexture, width / num, height / num, 0, (FilterMode)1, (RenderTextureFormat)0, (RenderTextureReadWrite)1); cb.Blit((Texture)null, RenderTargetIdentifier.op_Implicit(occlusionTexture), val2, (int)occlusionSource); int occlusionTexture2 = Uniforms._OcclusionTexture2; cb.GetTemporaryRT(occlusionTexture2, width, height, 0, (FilterMode)1, (RenderTextureFormat)0, (RenderTextureReadWrite)1); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(occlusionTexture)); cb.Blit(RenderTargetIdentifier.op_Implicit(occlusionTexture), RenderTargetIdentifier.op_Implicit(occlusionTexture2), val2, (occlusionSource != OcclusionSource.GBuffer) ? 3 : 4); cb.ReleaseTemporaryRT(occlusionTexture); occlusionTexture = Uniforms._OcclusionTexture; cb.GetTemporaryRT(occlusionTexture, width, height, 0, (FilterMode)1, (RenderTextureFormat)0, (RenderTextureReadWrite)1); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(occlusionTexture2)); cb.Blit(RenderTargetIdentifier.op_Implicit(occlusionTexture2), RenderTargetIdentifier.op_Implicit(occlusionTexture), val2, 5); cb.ReleaseTemporaryRT(occlusionTexture2); if (context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.AmbientOcclusion)) { cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(occlusionTexture)); cb.Blit(RenderTargetIdentifier.op_Implicit(occlusionTexture), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), val2, 8); context.Interrupt(); } else if (ambientOnlySupported) { cb.SetRenderTarget(m_MRT, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2)); cb.DrawMesh(GraphicsUtils.quad, Matrix4x4.identity, val2, 0, 7); } else { RenderTextureFormat val3 = (RenderTextureFormat)((!context.isHdr) ? 7 : 9); int tempRT = Uniforms._TempRT; cb.GetTemporaryRT(tempRT, context.width, context.height, 0, (FilterMode)1, val3); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(tempRT), val, 0); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(tempRT)); cb.Blit(RenderTargetIdentifier.op_Implicit(tempRT), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), val2, 6); cb.ReleaseTemporaryRT(tempRT); } cb.ReleaseTemporaryRT(occlusionTexture); } } public sealed class BloomComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _AutoExposure = Shader.PropertyToID("_AutoExposure"); internal static readonly int _Threshold = Shader.PropertyToID("_Threshold"); internal static readonly int _Curve = Shader.PropertyToID("_Curve"); internal static readonly int _PrefilterOffs = Shader.PropertyToID("_PrefilterOffs"); internal static readonly int _SampleScale = Shader.PropertyToID("_SampleScale"); internal static readonly int _BaseTex = Shader.PropertyToID("_BaseTex"); internal static readonly int _BloomTex = Shader.PropertyToID("_BloomTex"); internal static readonly int _Bloom_Settings = Shader.PropertyToID("_Bloom_Settings"); internal static readonly int _Bloom_DirtTex = Shader.PropertyToID("_Bloom_DirtTex"); internal static readonly int _Bloom_DirtIntensity = Shader.PropertyToID("_Bloom_DirtIntensity"); } private const int k_MaxPyramidBlurLevel = 16; private readonly RenderTexture[] m_BlurBuffer1 = (RenderTexture[])(object)new RenderTexture[16]; private readonly RenderTexture[] m_BlurBuffer2 = (RenderTexture[])(object)new RenderTexture[16]; public override bool active => base.model.enabled && base.model.settings.bloom.intensity > 0f && !context.interrupted; public void Prepare(RenderTexture source, Material uberMaterial, Texture autoExposure) { //IL_0089: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) BloomModel.BloomSettings bloom = base.model.settings.bloom; BloomModel.LensDirtSettings lensDirt = base.model.settings.lensDirt; Material val = context.materialFactory.Get("Hidden/Post FX/Bloom"); val.shaderKeywords = null; val.SetTexture(Uniforms._AutoExposure, autoExposure); int width = context.width / 2; int num = context.height / 2; RenderTextureFormat format = (RenderTextureFormat)((!Application.isMobilePlatform) ? 9 : 7); float num2 = Mathf.Log((float)num, 2f) + bloom.radius - 8f; int num3 = (int)num2; int num4 = Mathf.Clamp(num3, 1, 16); float thresholdLinear = bloom.thresholdLinear; val.SetFloat(Uniforms._Threshold, thresholdLinear); float num5 = thresholdLinear * bloom.softKnee + 1E-05f; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(thresholdLinear - num5, num5 * 2f, 0.25f / num5); val.SetVector(Uniforms._Curve, Vector4.op_Implicit(val2)); val.SetFloat(Uniforms._PrefilterOffs, (!bloom.antiFlicker) ? 0f : (-0.5f)); float num6 = 0.5f + num2 - (float)num3; val.SetFloat(Uniforms._SampleScale, num6); if (bloom.antiFlicker) { val.EnableKeyword("ANTI_FLICKER"); } RenderTexture val3 = context.renderTextureFactory.Get(width, num, 0, format, (RenderTextureReadWrite)0, (FilterMode)1, (TextureWrapMode)1); Graphics.Blit((Texture)(object)source, val3, val, 0); RenderTexture val4 = val3; for (int i = 0; i < num4; i++) { m_BlurBuffer1[i] = context.renderTextureFactory.Get(((Texture)val4).width / 2, ((Texture)val4).height / 2, 0, format, (RenderTextureReadWrite)0, (FilterMode)1, (TextureWrapMode)1); int num7 = ((i == 0) ? 1 : 2); Graphics.Blit((Texture)(object)val4, m_BlurBuffer1[i], val, num7); val4 = m_BlurBuffer1[i]; } for (int num8 = num4 - 2; num8 >= 0; num8--) { RenderTexture val5 = m_BlurBuffer1[num8]; val.SetTexture(Uniforms._BaseTex, (Texture)(object)val5); m_BlurBuffer2[num8] = context.renderTextureFactory.Get(((Texture)val5).width, ((Texture)val5).height, 0, format, (RenderTextureReadWrite)0, (FilterMode)1, (TextureWrapMode)1); Graphics.Blit((Texture)(object)val4, m_BlurBuffer2[num8], val, 3); val4 = m_BlurBuffer2[num8]; } RenderTexture val6 = val4; for (int j = 0; j < 16; j++) { if ((Object)(object)m_BlurBuffer1[j] != (Object)null) { context.renderTextureFactory.Release(m_BlurBuffer1[j]); } if ((Object)(object)m_BlurBuffer2[j] != (Object)null && (Object)(object)m_BlurBuffer2[j] != (Object)(object)val6) { context.renderTextureFactory.Release(m_BlurBuffer2[j]); } m_BlurBuffer1[j] = null; m_BlurBuffer2[j] = null; } context.renderTextureFactory.Release(val3); uberMaterial.SetTexture(Uniforms._BloomTex, (Texture)(object)val6); uberMaterial.SetVector(Uniforms._Bloom_Settings, Vector4.op_Implicit(new Vector2(num6, bloom.intensity))); if (lensDirt.intensity > 0f && (Object)(object)lensDirt.texture != (Object)null) { uberMaterial.SetTexture(Uniforms._Bloom_DirtTex, lensDirt.texture); uberMaterial.SetFloat(Uniforms._Bloom_DirtIntensity, lensDirt.intensity); uberMaterial.EnableKeyword("BLOOM_LENS_DIRT"); } else { uberMaterial.EnableKeyword("BLOOM"); } } } public sealed class BuiltinDebugViewsComponent : PostProcessingComponentCommandBuffer { private static class Uniforms { internal static readonly int _DepthScale = Shader.PropertyToID("_DepthScale"); internal static readonly int _TempRT = Shader.PropertyToID("_TempRT"); internal static readonly int _Opacity = Shader.PropertyToID("_Opacity"); internal static readonly int _MainTex = Shader.PropertyToID("_MainTex"); internal static readonly int _TempRT2 = Shader.PropertyToID("_TempRT2"); internal static readonly int _Amplitude = Shader.PropertyToID("_Amplitude"); internal static readonly int _Scale = Shader.PropertyToID("_Scale"); } private enum Pass { Depth, Normals, MovecOpacity, MovecImaging, MovecArrows } private class ArrowArray { public Mesh mesh { get; private set; } public int columnCount { get; private set; } public int rowCount { get; private set; } public void BuildMesh(int columns, int rows) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_011f: 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) Vector3[] array = (Vector3[])(object)new Vector3[6] { new Vector3(0f, 0f, 0f), new Vector3(0f, 1f, 0f), new Vector3(0f, 1f, 0f), new Vector3(-1f, 1f, 0f), new Vector3(0f, 1f, 0f), new Vector3(1f, 1f, 0f) }; int num = 6 * columns * rows; List list = new List(num); List list2 = new List(num); Vector2 item = default(Vector2); for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { ((Vector2)(ref item))..ctor((0.5f + (float)j) / (float)columns, (0.5f + (float)i) / (float)rows); for (int k = 0; k < 6; k++) { list.Add(array[k]); list2.Add(item); } } } int[] array2 = new int[num]; for (int l = 0; l < num; l++) { array2[l] = l; } Mesh val = new Mesh(); ((Object)val).hideFlags = (HideFlags)52; mesh = val; mesh.SetVertices(list); mesh.SetUVs(0, list2); mesh.SetIndices(array2, (MeshTopology)3, 0); mesh.UploadMeshData(true); columnCount = columns; rowCount = rows; } public void Release() { GraphicsUtils.Destroy((Object)(object)mesh); mesh = null; } } private const string k_ShaderString = "Hidden/Post FX/Builtin Debug Views"; private ArrowArray m_Arrows; public override bool active => base.model.IsModeActive(BuiltinDebugViewsModel.Mode.Depth) || base.model.IsModeActive(BuiltinDebugViewsModel.Mode.Normals) || base.model.IsModeActive(BuiltinDebugViewsModel.Mode.MotionVectors); public override DepthTextureMode GetCameraFlags() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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) BuiltinDebugViewsModel.Mode mode = base.model.settings.mode; DepthTextureMode val = (DepthTextureMode)0; switch (mode) { case BuiltinDebugViewsModel.Mode.Normals: val = (DepthTextureMode)(val | 2); break; case BuiltinDebugViewsModel.Mode.MotionVectors: val = (DepthTextureMode)(val | 5); break; case BuiltinDebugViewsModel.Mode.Depth: val = (DepthTextureMode)(val | 1); break; } return val; } public override CameraEvent GetCameraEvent() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) return (CameraEvent)((base.model.settings.mode != BuiltinDebugViewsModel.Mode.MotionVectors) ? 12 : 18); } public override string GetName() { return "Builtin Debug Views"; } public override void PopulateCommandBuffer(CommandBuffer cb) { BuiltinDebugViewsModel.Settings settings = base.model.settings; Material val = context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views"); val.shaderKeywords = null; if (context.isGBufferAvailable) { val.EnableKeyword("SOURCE_GBUFFER"); } switch (settings.mode) { case BuiltinDebugViewsModel.Mode.Depth: DepthPass(cb); break; case BuiltinDebugViewsModel.Mode.Normals: DepthNormalsPass(cb); break; case BuiltinDebugViewsModel.Mode.MotionVectors: MotionVectorsPass(cb); break; } context.Interrupt(); } private void DepthPass(CommandBuffer cb) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) Material val = context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views"); BuiltinDebugViewsModel.DepthSettings depth = base.model.settings.depth; cb.SetGlobalFloat(Uniforms._DepthScale, 1f / depth.scale); cb.Blit((Texture)null, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), val, 0); } private void DepthNormalsPass(CommandBuffer cb) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) Material val = context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views"); cb.Blit((Texture)null, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), val, 1); } private void MotionVectorsPass(CommandBuffer cb) { //IL_0078: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) if (Application.isPlaying) { Material val = context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views"); BuiltinDebugViewsModel.MotionVectorsSettings motionVectors = base.model.settings.motionVectors; int num = Uniforms._TempRT; cb.GetTemporaryRT(num, context.width, context.height, 0, (FilterMode)1); cb.SetGlobalFloat(Uniforms._Opacity, motionVectors.sourceOpacity); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2)); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(num), val, 2); if (motionVectors.motionImageOpacity > 0f && motionVectors.motionImageAmplitude > 0f) { int tempRT = Uniforms._TempRT2; cb.GetTemporaryRT(tempRT, context.width, context.height, 0, (FilterMode)1); cb.SetGlobalFloat(Uniforms._Opacity, motionVectors.motionImageOpacity); cb.SetGlobalFloat(Uniforms._Amplitude, motionVectors.motionImageAmplitude); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(num)); cb.Blit(RenderTargetIdentifier.op_Implicit(num), RenderTargetIdentifier.op_Implicit(tempRT), val, 3); cb.ReleaseTemporaryRT(num); num = tempRT; } if (motionVectors.motionVectorsOpacity > 0f && motionVectors.motionVectorsAmplitude > 0f) { PrepareArrows(); float num2 = 1f / (float)motionVectors.motionVectorsResolution; float num3 = num2 * (float)context.height / (float)context.width; cb.SetGlobalVector(Uniforms._Scale, Vector4.op_Implicit(new Vector2(num3, num2))); cb.SetGlobalFloat(Uniforms._Opacity, motionVectors.motionVectorsOpacity); cb.SetGlobalFloat(Uniforms._Amplitude, motionVectors.motionVectorsAmplitude); cb.DrawMesh(m_Arrows.mesh, Matrix4x4.identity, val, 0, 4); } cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(num)); cb.Blit(RenderTargetIdentifier.op_Implicit(num), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2)); cb.ReleaseTemporaryRT(num); } } private void PrepareArrows() { int motionVectorsResolution = base.model.settings.motionVectors.motionVectorsResolution; int num = motionVectorsResolution * Screen.width / Screen.height; if (m_Arrows == null) { m_Arrows = new ArrowArray(); } if (m_Arrows.columnCount != num || m_Arrows.rowCount != motionVectorsResolution) { m_Arrows.Release(); m_Arrows.BuildMesh(num, motionVectorsResolution); } } public override void OnDisable() { if (m_Arrows != null) { m_Arrows.Release(); } m_Arrows = null; } } public sealed class ChromaticAberrationComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _ChromaticAberration_Amount = Shader.PropertyToID("_ChromaticAberration_Amount"); internal static readonly int _ChromaticAberration_Spectrum = Shader.PropertyToID("_ChromaticAberration_Spectrum"); } private Texture2D m_SpectrumLut; public override bool active => base.model.enabled && base.model.settings.intensity > 0f && !context.interrupted; public override void OnDisable() { GraphicsUtils.Destroy((Object)(object)m_SpectrumLut); m_SpectrumLut = null; } public override void Prepare(Material uberMaterial) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) ChromaticAberrationModel.Settings settings = base.model.settings; Texture2D val = settings.spectralTexture; if ((Object)(object)val == (Object)null) { if ((Object)(object)m_SpectrumLut == (Object)null) { Texture2D val2 = new Texture2D(3, 1, (TextureFormat)3, false); ((Object)val2).name = "Chromatic Aberration Spectrum Lookup"; ((Texture)val2).filterMode = (FilterMode)1; ((Texture)val2).wrapMode = (TextureWrapMode)1; ((Texture)val2).anisoLevel = 0; ((Object)val2).hideFlags = (HideFlags)52; m_SpectrumLut = val2; Color[] pixels = (Color[])(object)new Color[3] { new Color(1f, 0f, 0f), new Color(0f, 1f, 0f), new Color(0f, 0f, 1f) }; m_SpectrumLut.SetPixels(pixels); m_SpectrumLut.Apply(); } val = m_SpectrumLut; } uberMaterial.EnableKeyword("CHROMATIC_ABERRATION"); uberMaterial.SetFloat(Uniforms._ChromaticAberration_Amount, settings.intensity * 0.03f); uberMaterial.SetTexture(Uniforms._ChromaticAberration_Spectrum, (Texture)(object)val); } } public sealed class ColorGradingComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _LutParams = Shader.PropertyToID("_LutParams"); internal static readonly int _NeutralTonemapperParams1 = Shader.PropertyToID("_NeutralTonemapperParams1"); internal static readonly int _NeutralTonemapperParams2 = Shader.PropertyToID("_NeutralTonemapperParams2"); internal static readonly int _HueShift = Shader.PropertyToID("_HueShift"); internal static readonly int _Saturation = Shader.PropertyToID("_Saturation"); internal static readonly int _Contrast = Shader.PropertyToID("_Contrast"); internal static readonly int _Balance = Shader.PropertyToID("_Balance"); internal static readonly int _Lift = Shader.PropertyToID("_Lift"); internal static readonly int _InvGamma = Shader.PropertyToID("_InvGamma"); internal static readonly int _Gain = Shader.PropertyToID("_Gain"); internal static readonly int _Slope = Shader.PropertyToID("_Slope"); internal static readonly int _Power = Shader.PropertyToID("_Power"); internal static readonly int _Offset = Shader.PropertyToID("_Offset"); internal static readonly int _ChannelMixerRed = Shader.PropertyToID("_ChannelMixerRed"); internal static readonly int _ChannelMixerGreen = Shader.PropertyToID("_ChannelMixerGreen"); internal static readonly int _ChannelMixerBlue = Shader.PropertyToID("_ChannelMixerBlue"); internal static readonly int _Curves = Shader.PropertyToID("_Curves"); internal static readonly int _LogLut = Shader.PropertyToID("_LogLut"); internal static readonly int _LogLut_Params = Shader.PropertyToID("_LogLut_Params"); internal static readonly int _ExposureEV = Shader.PropertyToID("_ExposureEV"); } private const int k_InternalLogLutSize = 32; private const int k_CurvePrecision = 128; private const float k_CurveStep = 1f / 128f; private Texture2D m_GradingCurves; public override bool active => base.model.enabled && !context.interrupted; private float StandardIlluminantY(float x) { return 2.87f * x - 3f * x * x - 0.27509508f; } private Vector3 CIExyToLMS(float x, float y) { //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_0076: Unknown result type (might be due to invalid IL or missing references) float num = 1f; float num2 = num * x / y; float num3 = num * (1f - x - y) / y; float num4 = 0.7328f * num2 + 0.4296f * num - 0.1624f * num3; float num5 = -0.7036f * num2 + 1.6975f * num + 0.0061f * num3; float num6 = 0.003f * num2 + 0.0136f * num + 0.9834f * num3; return new Vector3(num4, num5, num6); } private Vector3 CalculateColorBalance(float temperature, float tint) { //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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) float num = temperature / 55f; float num2 = tint / 55f; float x = 0.31271f - num * ((!(num < 0f)) ? 0.05f : 0.1f); float y = StandardIlluminantY(x) + num2 * 0.05f; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0.949237f, 1.03542f, 1.08728f); Vector3 val2 = CIExyToLMS(x, y); return new Vector3(val.x / val2.x, val.y / val2.y, val.z / val2.z); } private static Color NormalizeColor(Color c) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_009d: Unknown result type (might be due to invalid IL or missing references) float num = (c.r + c.g + c.b) / 3f; if (Mathf.Approximately(num, 0f)) { return new Color(1f, 1f, 1f, c.a); } Color result = default(Color); result.r = c.r / num; result.g = c.g / num; result.b = c.b / num; result.a = c.a; return result; } private static Vector3 ClampVector(Vector3 v, float min, float max) { //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_0036: Unknown result type (might be due to invalid IL or missing references) return new Vector3(Mathf.Clamp(v.x, min, max), Mathf.Clamp(v.y, min, max), Mathf.Clamp(v.z, min, max)); } public static Vector3 GetLiftValue(Color lift) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_008e: Unknown result type (might be due to invalid IL or missing references) Color val = NormalizeColor(lift); float num = (val.r + val.g + val.b) / 3f; float num2 = (val.r - num) * 0.1f + lift.a; float num3 = (val.g - num) * 0.1f + lift.a; float num4 = (val.b - num) * 0.1f + lift.a; return ClampVector(new Vector3(num2, num3, num4), -1f, 1f); } public static Vector3 GetGammaValue(Color gamma) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) Color val = NormalizeColor(gamma); float num = (val.r + val.g + val.b) / 3f; gamma.a *= ((!(gamma.a < 0f)) ? 5f : 0.8f); float num2 = Mathf.Pow(2f, (val.r - num) * 0.5f) + gamma.a; float num3 = Mathf.Pow(2f, (val.g - num) * 0.5f) + gamma.a; float num4 = Mathf.Pow(2f, (val.b - num) * 0.5f) + gamma.a; float num5 = 1f / Mathf.Max(0.01f, num2); float num6 = 1f / Mathf.Max(0.01f, num3); float num7 = 1f / Mathf.Max(0.01f, num4); return ClampVector(new Vector3(num5, num6, num7), 0f, 5f); } public static Vector3 GetGainValue(Color gain) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00d3: 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) Color val = NormalizeColor(gain); float num = (val.r + val.g + val.b) / 3f; gain.a *= ((!(gain.a > 0f)) ? 1f : 3f); float num2 = Mathf.Pow(2f, (val.r - num) * 0.5f) + gain.a; float num3 = Mathf.Pow(2f, (val.g - num) * 0.5f) + gain.a; float num4 = Mathf.Pow(2f, (val.b - num) * 0.5f) + gain.a; return ClampVector(new Vector3(num2, num3, num4), 0f, 4f); } public static void CalculateLiftGammaGain(Color lift, Color gamma, Color gain, out Vector3 outLift, out Vector3 outGamma, out Vector3 outGain) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) outLift = GetLiftValue(lift); outGamma = GetGammaValue(gamma); outGain = GetGainValue(gain); } public static Vector3 GetSlopeValue(Color slope) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) Color val = NormalizeColor(slope); float num = (val.r + val.g + val.b) / 3f; slope.a *= 0.5f; float num2 = (val.r - num) * 0.1f + slope.a + 1f; float num3 = (val.g - num) * 0.1f + slope.a + 1f; float num4 = (val.b - num) * 0.1f + slope.a + 1f; return ClampVector(new Vector3(num2, num3, num4), 0f, 2f); } public static Vector3 GetPowerValue(Color power) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) Color val = NormalizeColor(power); float num = (val.r + val.g + val.b) / 3f; power.a *= 0.5f; float num2 = (val.r - num) * 0.1f + power.a + 1f; float num3 = (val.g - num) * 0.1f + power.a + 1f; float num4 = (val.b - num) * 0.1f + power.a + 1f; float num5 = 1f / Mathf.Max(0.01f, num2); float num6 = 1f / Mathf.Max(0.01f, num3); float num7 = 1f / Mathf.Max(0.01f, num4); return ClampVector(new Vector3(num5, num6, num7), 0.5f, 2.5f); } public static Vector3 GetOffsetValue(Color offset) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00a1: Unknown result type (might be due to invalid IL or missing references) Color val = NormalizeColor(offset); float num = (val.r + val.g + val.b) / 3f; offset.a *= 0.5f; float num2 = (val.r - num) * 0.05f + offset.a; float num3 = (val.g - num) * 0.05f + offset.a; float num4 = (val.b - num) * 0.05f + offset.a; return ClampVector(new Vector3(num2, num3, num4), -0.8f, 0.8f); } public static void CalculateSlopePowerOffset(Color slope, Color power, Color offset, out Vector3 outSlope, out Vector3 outPower, out Vector3 outOffset) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) outSlope = GetSlopeValue(slope); outPower = GetPowerValue(power); outOffset = GetOffsetValue(offset); } private Texture2D GetCurveTexture() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_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) if ((Object)(object)m_GradingCurves == (Object)null) { Texture2D val = new Texture2D(128, 2, (TextureFormat)17, false, true); ((Object)val).name = "Internal Curves Texture"; ((Object)val).hideFlags = (HideFlags)52; ((Texture)val).anisoLevel = 0; ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).filterMode = (FilterMode)1; m_GradingCurves = val; } Color[] array = (Color[])(object)new Color[256]; ColorGradingModel.CurvesSettings curves = base.model.settings.curves; curves.hueVShue.Cache(); curves.hueVSsat.Cache(); for (int i = 0; i < 128; i++) { float t = (float)i * (1f / 128f); float num = curves.hueVShue.Evaluate(t); float num2 = curves.hueVSsat.Evaluate(t); float num3 = curves.satVSsat.Evaluate(t); float num4 = curves.lumVSsat.Evaluate(t); ref Color reference = ref array[i]; reference = new Color(num, num2, num3, num4); float num5 = curves.master.Evaluate(t); float num6 = curves.red.Evaluate(t); float num7 = curves.green.Evaluate(t); float num8 = curves.blue.Evaluate(t); ref Color reference2 = ref array[i + 128]; reference2 = new Color(num6, num7, num8, num5); } m_GradingCurves.SetPixels(array); m_GradingCurves.Apply(false, false); return m_GradingCurves; } private bool IsLogLutValid(RenderTexture lut) { return (Object)(object)lut != (Object)null && lut.IsCreated() && ((Texture)lut).height == 32; } private void GenerateLut() { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_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_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_029a: 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_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0348: 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_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) ColorGradingModel.Settings settings = base.model.settings; if (!IsLogLutValid(base.model.bakedLut)) { GraphicsUtils.Destroy((Object)(object)base.model.bakedLut); ColorGradingModel colorGradingModel = base.model; RenderTexture val = new RenderTexture(1024, 32, 0, (RenderTextureFormat)2); ((Object)val).name = "Color Grading Log LUT"; ((Object)val).hideFlags = (HideFlags)52; ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).anisoLevel = 0; colorGradingModel.bakedLut = val; } Material val2 = context.materialFactory.Get("Hidden/Post FX/Lut Generator"); val2.SetVector(Uniforms._LutParams, new Vector4(32f, 0.00048828125f, 1f / 64f, 1.032258f)); val2.shaderKeywords = null; ColorGradingModel.TonemappingSettings tonemapping = settings.tonemapping; switch (tonemapping.tonemapper) { case ColorGradingModel.Tonemapper.Neutral: { val2.EnableKeyword("TONEMAPPING_NEUTRAL"); float num = tonemapping.neutralBlackIn * 20f + 1f; float num2 = tonemapping.neutralBlackOut * 10f + 1f; float num3 = tonemapping.neutralWhiteIn / 20f; float num4 = 1f - tonemapping.neutralWhiteOut / 20f; float num5 = num / num2; float num6 = num3 / num4; float num7 = Mathf.Max(0f, Mathf.LerpUnclamped(0.57f, 0.37f, num5)); float num8 = Mathf.LerpUnclamped(0.01f, 0.24f, num6); float num9 = Mathf.Max(0f, Mathf.LerpUnclamped(0.02f, 0.2f, num5)); val2.SetVector(Uniforms._NeutralTonemapperParams1, new Vector4(0.2f, num7, num8, num9)); val2.SetVector(Uniforms._NeutralTonemapperParams2, new Vector4(0.02f, 0.3f, tonemapping.neutralWhiteLevel, tonemapping.neutralWhiteClip / 10f)); break; } case ColorGradingModel.Tonemapper.ACES: val2.EnableKeyword("TONEMAPPING_FILMIC"); break; } val2.SetFloat(Uniforms._HueShift, settings.basic.hueShift / 360f); val2.SetFloat(Uniforms._Saturation, settings.basic.saturation); val2.SetFloat(Uniforms._Contrast, settings.basic.contrast); val2.SetVector(Uniforms._Balance, Vector4.op_Implicit(CalculateColorBalance(settings.basic.temperature, settings.basic.tint))); CalculateLiftGammaGain(settings.colorWheels.linear.lift, settings.colorWheels.linear.gamma, settings.colorWheels.linear.gain, out var outLift, out var outGamma, out var outGain); val2.SetVector(Uniforms._Lift, Vector4.op_Implicit(outLift)); val2.SetVector(Uniforms._InvGamma, Vector4.op_Implicit(outGamma)); val2.SetVector(Uniforms._Gain, Vector4.op_Implicit(outGain)); CalculateSlopePowerOffset(settings.colorWheels.log.slope, settings.colorWheels.log.power, settings.colorWheels.log.offset, out var outSlope, out var outPower, out var outOffset); val2.SetVector(Uniforms._Slope, Vector4.op_Implicit(outSlope)); val2.SetVector(Uniforms._Power, Vector4.op_Implicit(outPower)); val2.SetVector(Uniforms._Offset, Vector4.op_Implicit(outOffset)); val2.SetVector(Uniforms._ChannelMixerRed, Vector4.op_Implicit(settings.channelMixer.red)); val2.SetVector(Uniforms._ChannelMixerGreen, Vector4.op_Implicit(settings.channelMixer.green)); val2.SetVector(Uniforms._ChannelMixerBlue, Vector4.op_Implicit(settings.channelMixer.blue)); val2.SetTexture(Uniforms._Curves, (Texture)(object)GetCurveTexture()); Graphics.Blit((Texture)null, base.model.bakedLut, val2, 0); } public override void Prepare(Material uberMaterial) { //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) if (base.model.isDirty || !IsLogLutValid(base.model.bakedLut)) { GenerateLut(); base.model.isDirty = false; } uberMaterial.EnableKeyword((!context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.PreGradingLog)) ? "COLOR_GRADING" : "COLOR_GRADING_LOG_VIEW"); RenderTexture bakedLut = base.model.bakedLut; uberMaterial.SetTexture(Uniforms._LogLut, (Texture)(object)bakedLut); uberMaterial.SetVector(Uniforms._LogLut_Params, Vector4.op_Implicit(new Vector3(1f / (float)((Texture)bakedLut).width, 1f / (float)((Texture)bakedLut).height, (float)((Texture)bakedLut).height - 1f))); float num = Mathf.Exp(base.model.settings.basic.postExposure * 0.6931472f); uberMaterial.SetFloat(Uniforms._ExposureEV, num); } public void OnGUI() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) RenderTexture bakedLut = base.model.bakedLut; Rect viewport = context.viewport; Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref viewport)).x * (float)Screen.width + 8f, 8f, (float)((Texture)bakedLut).width, (float)((Texture)bakedLut).height); GUI.DrawTexture(val, (Texture)(object)bakedLut); } public override void OnDisable() { GraphicsUtils.Destroy((Object)(object)m_GradingCurves); GraphicsUtils.Destroy((Object)(object)base.model.bakedLut); m_GradingCurves = null; base.model.bakedLut = null; } } public sealed class DepthOfFieldComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _DepthOfFieldTex = Shader.PropertyToID("_DepthOfFieldTex"); internal static readonly int _Distance = Shader.PropertyToID("_Distance"); internal static readonly int _LensCoeff = Shader.PropertyToID("_LensCoeff"); internal static readonly int _MaxCoC = Shader.PropertyToID("_MaxCoC"); internal static readonly int _RcpMaxCoC = Shader.PropertyToID("_RcpMaxCoC"); internal static readonly int _RcpAspect = Shader.PropertyToID("_RcpAspect"); internal static readonly int _MainTex = Shader.PropertyToID("_MainTex"); internal static readonly int _HistoryCoC = Shader.PropertyToID("_HistoryCoC"); internal static readonly int _HistoryWeight = Shader.PropertyToID("_HistoryWeight"); internal static readonly int _DepthOfFieldParams = Shader.PropertyToID("_DepthOfFieldParams"); } private const string k_ShaderString = "Hidden/Post FX/Depth Of Field"; private RenderTexture m_CoCHistory; private RenderBuffer[] m_MRT = (RenderBuffer[])(object)new RenderBuffer[2]; private const float k_FilmHeight = 0.024f; public override bool active => base.model.enabled && SystemInfo.SupportsRenderTextureFormat((RenderTextureFormat)2) && SystemInfo.SupportsRenderTextureFormat((RenderTextureFormat)15) && !context.interrupted; public override DepthTextureMode GetCameraFlags() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return (DepthTextureMode)1; } private float CalculateFocalLength() { DepthOfFieldModel.Settings settings = base.model.settings; if (!settings.useCameraFov) { return settings.focalLength / 1000f; } float num = context.camera.fieldOfView * ((float)Math.PI / 180f); return 0.012f / Mathf.Tan(0.5f * num); } private float CalculateMaxCoCRadius(int screenHeight) { float num = (float)base.model.settings.kernelSize * 4f + 6f; return Mathf.Min(0.05f, num / (float)screenHeight); } public void Prepare(RenderTexture source, Material uberMaterial, bool antialiasCoC) { //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_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: 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_0226: Unknown result type (might be due to invalid IL or missing references) DepthOfFieldModel.Settings settings = base.model.settings; Material val = context.materialFactory.Get("Hidden/Post FX/Depth Of Field"); val.shaderKeywords = null; float focusDistance = settings.focusDistance; float num = CalculateFocalLength(); focusDistance = Mathf.Max(focusDistance, num); val.SetFloat(Uniforms._Distance, focusDistance); float num2 = num * num / (settings.aperture * (focusDistance - num) * 0.024f * 2f); val.SetFloat(Uniforms._LensCoeff, num2); float num3 = CalculateMaxCoCRadius(((Texture)source).height); val.SetFloat(Uniforms._MaxCoC, num3); val.SetFloat(Uniforms._RcpMaxCoC, 1f / num3); float num4 = (float)((Texture)source).height / (float)((Texture)source).width; val.SetFloat(Uniforms._RcpAspect, num4); RenderTexture val2 = context.renderTextureFactory.Get(context.width / 2, context.height / 2, 0, (RenderTextureFormat)2, (RenderTextureReadWrite)0, (FilterMode)1, (TextureWrapMode)1); ((Texture)source).filterMode = (FilterMode)0; if (!antialiasCoC) { Graphics.Blit((Texture)(object)source, val2, val, 0); } else { bool flag = (Object)(object)m_CoCHistory == (Object)null || !m_CoCHistory.IsCreated() || ((Texture)m_CoCHistory).width != context.width / 2 || ((Texture)m_CoCHistory).height != context.height / 2; RenderTexture temporary = RenderTexture.GetTemporary(context.width / 2, context.height / 2, 0, (RenderTextureFormat)15); ((Texture)temporary).filterMode = (FilterMode)0; ((Object)temporary).name = "CoC History"; ref RenderBuffer reference = ref m_MRT[0]; reference = val2.colorBuffer; ref RenderBuffer reference2 = ref m_MRT[1]; reference2 = temporary.colorBuffer; val.SetTexture(Uniforms._MainTex, (Texture)(object)source); val.SetTexture(Uniforms._HistoryCoC, (Texture)(object)m_CoCHistory); val.SetFloat(Uniforms._HistoryWeight, (!flag) ? 0.5f : 0f); Graphics.SetRenderTarget(m_MRT, val2.depthBuffer); GraphicsUtils.Blit(val, 1); RenderTexture.ReleaseTemporary(m_CoCHistory); m_CoCHistory = temporary; } RenderTexture val3 = context.renderTextureFactory.Get(context.width / 2, context.height / 2, 0, (RenderTextureFormat)2, (RenderTextureReadWrite)0, (FilterMode)1, (TextureWrapMode)1); Graphics.Blit((Texture)(object)val2, val3, val, (int)(2 + settings.kernelSize)); Graphics.Blit((Texture)(object)val3, val2, val, 6); if (context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.FocusPlane)) { uberMaterial.SetVector(Uniforms._DepthOfFieldParams, Vector4.op_Implicit(new Vector2(focusDistance, num2))); uberMaterial.EnableKeyword("DEPTH_OF_FIELD_COC_VIEW"); context.Interrupt(); } else { uberMaterial.SetTexture(Uniforms._DepthOfFieldTex, (Texture)(object)val2); uberMaterial.EnableKeyword("DEPTH_OF_FIELD"); } context.renderTextureFactory.Release(val3); ((Texture)source).filterMode = (FilterMode)1; } public override void OnDisable() { if ((Object)(object)m_CoCHistory != (Object)null) { RenderTexture.ReleaseTemporary(m_CoCHistory); } m_CoCHistory = null; } } public sealed class DitheringComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _DitheringTex = Shader.PropertyToID("_DitheringTex"); internal static readonly int _DitheringCoords = Shader.PropertyToID("_DitheringCoords"); } private Texture2D[] noiseTextures; private int textureIndex = 0; private const int k_TextureCount = 64; public override bool active => base.model.enabled && !context.interrupted; public override void OnDisable() { noiseTextures = null; } private void LoadNoiseTextures() { noiseTextures = (Texture2D[])(object)new Texture2D[64]; for (int i = 0; i < 64; i++) { noiseTextures[i] = Resources.Load("Bluenoise64/LDR_LLL1_" + i); } } public override void Prepare(Material uberMaterial) { //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (++textureIndex >= 64) { textureIndex = 0; } float value = Random.value; float value2 = Random.value; if (noiseTextures == null) { LoadNoiseTextures(); } Texture2D val = noiseTextures[textureIndex]; uberMaterial.EnableKeyword("DITHERING"); uberMaterial.SetTexture(Uniforms._DitheringTex, (Texture)(object)val); uberMaterial.SetVector(Uniforms._DitheringCoords, new Vector4((float)context.width / (float)((Texture)val).width, (float)context.height / (float)((Texture)val).height, value, value2)); } } public sealed class EyeAdaptationComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _Params = Shader.PropertyToID("_Params"); internal static readonly int _Speed = Shader.PropertyToID("_Speed"); internal static readonly int _ScaleOffsetRes = Shader.PropertyToID("_ScaleOffsetRes"); internal static readonly int _ExposureCompensation = Shader.PropertyToID("_ExposureCompensation"); internal static readonly int _AutoExposure = Shader.PropertyToID("_AutoExposure"); internal static readonly int _DebugWidth = Shader.PropertyToID("_DebugWidth"); } private ComputeShader m_EyeCompute; private ComputeBuffer m_HistogramBuffer; private readonly RenderTexture[] m_AutoExposurePool = (RenderTexture[])(object)new RenderTexture[2]; private int m_AutoExposurePingPing; private RenderTexture m_CurrentAutoExposure; private RenderTexture m_DebugHistogram; private static uint[] s_EmptyHistogramBuffer; private bool m_FirstFrame = true; private const int k_HistogramBins = 64; private const int k_HistogramThreadX = 16; private const int k_HistogramThreadY = 16; public override bool active => base.model.enabled && SystemInfo.supportsComputeShaders && !context.interrupted; public void ResetHistory() { m_FirstFrame = true; } public override void OnEnable() { m_FirstFrame = true; } public override void OnDisable() { RenderTexture[] autoExposurePool = m_AutoExposurePool; foreach (RenderTexture obj in autoExposurePool) { GraphicsUtils.Destroy((Object)(object)obj); } if (m_HistogramBuffer != null) { m_HistogramBuffer.Release(); } m_HistogramBuffer = null; if ((Object)(object)m_DebugHistogram != (Object)null) { m_DebugHistogram.Release(); } m_DebugHistogram = null; } private Vector4 GetHistogramScaleOffsetRes() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) EyeAdaptationModel.Settings settings = base.model.settings; float num = settings.logMax - settings.logMin; float num2 = 1f / num; float num3 = (float)(-settings.logMin) * num2; return new Vector4(num2, num3, Mathf.Floor((float)context.width / 2f), Mathf.Floor((float)context.height / 2f)); } public Texture Prepare(RenderTexture source, Material uberMaterial) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //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_009e: 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_00ef: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_017e: 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_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Expected O, but got Unknown EyeAdaptationModel.Settings settings = base.model.settings; if ((Object)(object)m_EyeCompute == (Object)null) { m_EyeCompute = Resources.Load("Shaders/EyeHistogram"); } Material val = context.materialFactory.Get("Hidden/Post FX/Eye Adaptation"); val.shaderKeywords = null; if (m_HistogramBuffer == null) { m_HistogramBuffer = new ComputeBuffer(64, 4); } if (s_EmptyHistogramBuffer == null) { s_EmptyHistogramBuffer = new uint[64]; } Vector4 histogramScaleOffsetRes = GetHistogramScaleOffsetRes(); RenderTexture val2 = context.renderTextureFactory.Get((int)histogramScaleOffsetRes.z, (int)histogramScaleOffsetRes.w, 0, source.format, (RenderTextureReadWrite)0, (FilterMode)1, (TextureWrapMode)1); Graphics.Blit((Texture)(object)source, val2); if ((Object)(object)m_AutoExposurePool[0] == (Object)null || !m_AutoExposurePool[0].IsCreated()) { m_AutoExposurePool[0] = new RenderTexture(1, 1, 0, (RenderTextureFormat)14); } if ((Object)(object)m_AutoExposurePool[1] == (Object)null || !m_AutoExposurePool[1].IsCreated()) { m_AutoExposurePool[1] = new RenderTexture(1, 1, 0, (RenderTextureFormat)14); } m_HistogramBuffer.SetData((Array)s_EmptyHistogramBuffer); int num = m_EyeCompute.FindKernel("KEyeHistogram"); m_EyeCompute.SetBuffer(num, "_Histogram", m_HistogramBuffer); m_EyeCompute.SetTexture(num, "_Source", (Texture)(object)val2); m_EyeCompute.SetVector("_ScaleOffsetRes", histogramScaleOffsetRes); m_EyeCompute.Dispatch(num, Mathf.CeilToInt((float)((Texture)val2).width / 16f), Mathf.CeilToInt((float)((Texture)val2).height / 16f), 1); context.renderTextureFactory.Release(val2); settings.highPercent = Mathf.Clamp(settings.highPercent, 1.01f, 99f); settings.lowPercent = Mathf.Clamp(settings.lowPercent, 1f, settings.highPercent - 0.01f); val.SetBuffer("_Histogram", m_HistogramBuffer); val.SetVector(Uniforms._Params, new Vector4(settings.lowPercent * 0.01f, settings.highPercent * 0.01f, Mathf.Exp(settings.minLuminance * 0.6931472f), Mathf.Exp(settings.maxLuminance * 0.6931472f))); val.SetVector(Uniforms._Speed, Vector4.op_Implicit(new Vector2(settings.speedDown, settings.speedUp))); val.SetVector(Uniforms._ScaleOffsetRes, histogramScaleOffsetRes); val.SetFloat(Uniforms._ExposureCompensation, settings.keyValue); if (settings.dynamicKeyValue) { val.EnableKeyword("AUTO_KEY_VALUE"); } if (m_FirstFrame || !Application.isPlaying) { m_CurrentAutoExposure = m_AutoExposurePool[0]; Graphics.Blit((Texture)null, m_CurrentAutoExposure, val, 1); Graphics.Blit((Texture)(object)m_AutoExposurePool[0], m_AutoExposurePool[1]); } else { int autoExposurePingPing = m_AutoExposurePingPing; RenderTexture val3 = m_AutoExposurePool[++autoExposurePingPing % 2]; RenderTexture val4 = m_AutoExposurePool[++autoExposurePingPing % 2]; Graphics.Blit((Texture)(object)val3, val4, val, (int)settings.adaptationType); m_AutoExposurePingPing = ++autoExposurePingPing % 2; m_CurrentAutoExposure = val4; } if (context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.EyeAdaptation)) { if ((Object)(object)m_DebugHistogram == (Object)null || !m_DebugHistogram.IsCreated()) { RenderTexture val5 = new RenderTexture(256, 128, 0, (RenderTextureFormat)0); ((Texture)val5).filterMode = (FilterMode)0; ((Texture)val5).wrapMode = (TextureWrapMode)1; m_DebugHistogram = val5; } val.SetFloat(Uniforms._DebugWidth, (float)((Texture)m_DebugHistogram).width); Graphics.Blit((Texture)null, m_DebugHistogram, val, 2); } m_FirstFrame = false; return (Texture)(object)m_CurrentAutoExposure; } public void OnGUI() { //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_006b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)m_DebugHistogram == (Object)null) && m_DebugHistogram.IsCreated()) { Rect viewport = context.viewport; Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref viewport)).x * (float)Screen.width + 8f, 8f, (float)((Texture)m_DebugHistogram).width, (float)((Texture)m_DebugHistogram).height); GUI.DrawTexture(val, (Texture)(object)m_DebugHistogram); } } } public sealed class FogComponent : PostProcessingComponentCommandBuffer { private static class Uniforms { internal static readonly int _FogColor = Shader.PropertyToID("_FogColor"); internal static readonly int _Density = Shader.PropertyToID("_Density"); internal static readonly int _Start = Shader.PropertyToID("_Start"); internal static readonly int _End = Shader.PropertyToID("_End"); internal static readonly int _TempRT = Shader.PropertyToID("_TempRT"); } private const string k_ShaderString = "Hidden/Post FX/Fog"; public override bool active => base.model.enabled && context.isGBufferAvailable && RenderSettings.fog && !context.interrupted; public override string GetName() { return "Fog"; } public override DepthTextureMode GetCameraFlags() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return (DepthTextureMode)1; } public override CameraEvent GetCameraEvent() { //IL_0003: 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) return (CameraEvent)12; } public override void PopulateCommandBuffer(CommandBuffer cb) { //IL_0030: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Invalid comparison between Unknown and I4 //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Invalid comparison between Unknown and I4 //IL_00d2: 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_00fa: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) FogModel.Settings settings = base.model.settings; Material val = context.materialFactory.Get("Hidden/Post FX/Fog"); val.shaderKeywords = null; val.SetColor(Uniforms._FogColor, RenderSettings.fogColor); val.SetFloat(Uniforms._Density, RenderSettings.fogDensity); val.SetFloat(Uniforms._Start, RenderSettings.fogStartDistance); val.SetFloat(Uniforms._End, RenderSettings.fogEndDistance); FogMode fogMode = RenderSettings.fogMode; if ((int)fogMode != 1) { if ((int)fogMode != 2) { if ((int)fogMode == 3) { val.EnableKeyword("FOG_EXP2"); } } else { val.EnableKeyword("FOG_EXP"); } } else { val.EnableKeyword("FOG_LINEAR"); } RenderTextureFormat val2 = (RenderTextureFormat)((!context.isHdr) ? 7 : 9); cb.GetTemporaryRT(Uniforms._TempRT, context.width, context.height, 24, (FilterMode)1, val2); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(Uniforms._TempRT)); cb.Blit(RenderTargetIdentifier.op_Implicit(Uniforms._TempRT), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), val, settings.excludeSkybox ? 1 : 0); cb.ReleaseTemporaryRT(Uniforms._TempRT); } } public sealed class FxaaComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _QualitySettings = Shader.PropertyToID("_QualitySettings"); internal static readonly int _ConsoleSettings = Shader.PropertyToID("_ConsoleSettings"); } public override bool active => base.model.enabled && base.model.settings.method == AntialiasingModel.Method.Fxaa && !context.interrupted; public void Render(RenderTexture source, RenderTexture destination) { //IL_0075: 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_00a6: Unknown result type (might be due to invalid IL or missing references) AntialiasingModel.FxaaSettings fxaaSettings = base.model.settings.fxaaSettings; Material val = context.materialFactory.Get("Hidden/Post FX/FXAA"); AntialiasingModel.FxaaQualitySettings fxaaQualitySettings = AntialiasingModel.FxaaQualitySettings.presets[(int)fxaaSettings.preset]; AntialiasingModel.FxaaConsoleSettings fxaaConsoleSettings = AntialiasingModel.FxaaConsoleSettings.presets[(int)fxaaSettings.preset]; val.SetVector(Uniforms._QualitySettings, Vector4.op_Implicit(new Vector3(fxaaQualitySettings.subpixelAliasingRemovalAmount, fxaaQualitySettings.edgeDetectionThreshold, fxaaQualitySettings.minimumRequiredLuminance))); val.SetVector(Uniforms._ConsoleSettings, new Vector4(fxaaConsoleSettings.subpixelSpreadAmount, fxaaConsoleSettings.edgeSharpnessAmount, fxaaConsoleSettings.edgeDetectionThreshold, fxaaConsoleSettings.minimumRequiredLuminance)); Graphics.Blit((Texture)(object)source, destination, val, 0); } } public sealed class GrainComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _Grain_Params1 = Shader.PropertyToID("_Grain_Params1"); internal static readonly int _Grain_Params2 = Shader.PropertyToID("_Grain_Params2"); internal static readonly int _GrainTex = Shader.PropertyToID("_GrainTex"); internal static readonly int _Phase = Shader.PropertyToID("_Phase"); } private RenderTexture m_GrainLookupRT; public override bool active => base.model.enabled && base.model.settings.intensity > 0f && SystemInfo.SupportsRenderTextureFormat((RenderTextureFormat)2) && !context.interrupted; public override void OnDisable() { GraphicsUtils.Destroy((Object)(object)m_GrainLookupRT); m_GrainLookupRT = null; } public override void Prepare(Material uberMaterial) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //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_0172: Unknown result type (might be due to invalid IL or missing references) GrainModel.Settings settings = base.model.settings; uberMaterial.EnableKeyword("GRAIN"); float realtimeSinceStartup = Time.realtimeSinceStartup; float value = Random.value; float value2 = Random.value; if ((Object)(object)m_GrainLookupRT == (Object)null || !m_GrainLookupRT.IsCreated()) { GraphicsUtils.Destroy((Object)(object)m_GrainLookupRT); RenderTexture val = new RenderTexture(192, 192, 0, (RenderTextureFormat)2); ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)0; ((Texture)val).anisoLevel = 0; ((Object)val).name = "Grain Lookup Texture"; m_GrainLookupRT = val; m_GrainLookupRT.Create(); } Material val2 = context.materialFactory.Get("Hidden/Post FX/Grain Generator"); val2.SetFloat(Uniforms._Phase, realtimeSinceStartup / 20f); Graphics.Blit((Texture)null, m_GrainLookupRT, val2, settings.colored ? 1 : 0); uberMaterial.SetTexture(Uniforms._GrainTex, (Texture)(object)m_GrainLookupRT); uberMaterial.SetVector(Uniforms._Grain_Params1, Vector4.op_Implicit(new Vector2(settings.luminanceContribution, settings.intensity * 20f))); uberMaterial.SetVector(Uniforms._Grain_Params2, new Vector4((float)context.width / (float)((Texture)m_GrainLookupRT).width / settings.size, (float)context.height / (float)((Texture)m_GrainLookupRT).height / settings.size, value, value2)); } } public sealed class MotionBlurComponent : PostProcessingComponentCommandBuffer { private static class Uniforms { internal static readonly int _VelocityScale = Shader.PropertyToID("_VelocityScale"); internal static readonly int _MaxBlurRadius = Shader.PropertyToID("_MaxBlurRadius"); internal static readonly int _RcpMaxBlurRadius = Shader.PropertyToID("_RcpMaxBlurRadius"); internal static readonly int _VelocityTex = Shader.PropertyToID("_VelocityTex"); internal static readonly int _MainTex = Shader.PropertyToID("_MainTex"); internal static readonly int _Tile2RT = Shader.PropertyToID("_Tile2RT"); internal static readonly int _Tile4RT = Shader.PropertyToID("_Tile4RT"); internal static readonly int _Tile8RT = Shader.PropertyToID("_Tile8RT"); internal static readonly int _TileMaxOffs = Shader.PropertyToID("_TileMaxOffs"); internal static readonly int _TileMaxLoop = Shader.PropertyToID("_TileMaxLoop"); internal static readonly int _TileVRT = Shader.PropertyToID("_TileVRT"); internal static readonly int _NeighborMaxTex = Shader.PropertyToID("_NeighborMaxTex"); internal static readonly int _LoopCount = Shader.PropertyToID("_LoopCount"); internal static readonly int _TempRT = Shader.PropertyToID("_TempRT"); internal static readonly int _History1LumaTex = Shader.PropertyToID("_History1LumaTex"); internal static readonly int _History2LumaTex = Shader.PropertyToID("_History2LumaTex"); internal static readonly int _History3LumaTex = Shader.PropertyToID("_History3LumaTex"); internal static readonly int _History4LumaTex = Shader.PropertyToID("_History4LumaTex"); internal static readonly int _History1ChromaTex = Shader.PropertyToID("_History1ChromaTex"); internal static readonly int _History2ChromaTex = Shader.PropertyToID("_History2ChromaTex"); internal static readonly int _History3ChromaTex = Shader.PropertyToID("_History3ChromaTex"); internal static readonly int _History4ChromaTex = Shader.PropertyToID("_History4ChromaTex"); internal static readonly int _History1Weight = Shader.PropertyToID("_History1Weight"); internal static readonly int _History2Weight = Shader.PropertyToID("_History2Weight"); internal static readonly int _History3Weight = Shader.PropertyToID("_History3Weight"); internal static readonly int _History4Weight = Shader.PropertyToID("_History4Weight"); } private enum Pass { VelocitySetup, TileMax1, TileMax2, TileMaxV, NeighborMax, Reconstruction, FrameCompression, FrameBlendingChroma, FrameBlendingRaw } public class ReconstructionFilter { private RenderTextureFormat m_VectorRTFormat = (RenderTextureFormat)13; private RenderTextureFormat m_PackedRTFormat = (RenderTextureFormat)8; public ReconstructionFilter() { //IL_0003: 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) CheckTextureFormatSupport(); } private void CheckTextureFormatSupport() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (!SystemInfo.SupportsRenderTextureFormat(m_PackedRTFormat)) { m_PackedRTFormat = (RenderTextureFormat)0; } } public bool IsSupported() { return SystemInfo.supportsMotionVectors; } public void ProcessImage(PostProcessingContext context, CommandBuffer cb, ref MotionBlurModel.Settings settings, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material) { //IL_0070: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_010a: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0177: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: 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_0214: 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_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) int num = (int)(5f * (float)context.height / 100f); int num2 = ((num - 1) / 8 + 1) * 8; float num3 = settings.shutterAngle / 360f; cb.SetGlobalFloat(Uniforms._VelocityScale, num3); cb.SetGlobalFloat(Uniforms._MaxBlurRadius, (float)num); cb.SetGlobalFloat(Uniforms._RcpMaxBlurRadius, 1f / (float)num); int velocityTex = Uniforms._VelocityTex; cb.GetTemporaryRT(velocityTex, context.width, context.height, 0, (FilterMode)0, m_PackedRTFormat, (RenderTextureReadWrite)1); cb.Blit((Texture)null, RenderTargetIdentifier.op_Implicit(velocityTex), material, 0); int tile2RT = Uniforms._Tile2RT; cb.GetTemporaryRT(tile2RT, context.width / 2, context.height / 2, 0, (FilterMode)0, m_VectorRTFormat, (RenderTextureReadWrite)1); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(velocityTex)); cb.Blit(RenderTargetIdentifier.op_Implicit(velocityTex), RenderTargetIdentifier.op_Implicit(tile2RT), material, 1); int tile4RT = Uniforms._Tile4RT; cb.GetTemporaryRT(tile4RT, context.width / 4, context.height / 4, 0, (FilterMode)0, m_VectorRTFormat, (RenderTextureReadWrite)1); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(tile2RT)); cb.Blit(RenderTargetIdentifier.op_Implicit(tile2RT), RenderTargetIdentifier.op_Implicit(tile4RT), material, 2); cb.ReleaseTemporaryRT(tile2RT); int tile8RT = Uniforms._Tile8RT; cb.GetTemporaryRT(tile8RT, context.width / 8, context.height / 8, 0, (FilterMode)0, m_VectorRTFormat, (RenderTextureReadWrite)1); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(tile4RT)); cb.Blit(RenderTargetIdentifier.op_Implicit(tile4RT), RenderTargetIdentifier.op_Implicit(tile8RT), material, 2); cb.ReleaseTemporaryRT(tile4RT); Vector2 val = Vector2.one * ((float)num2 / 8f - 1f) * -0.5f; cb.SetGlobalVector(Uniforms._TileMaxOffs, Vector4.op_Implicit(val)); cb.SetGlobalFloat(Uniforms._TileMaxLoop, (float)(int)((float)num2 / 8f)); int tileVRT = Uniforms._TileVRT; cb.GetTemporaryRT(tileVRT, context.width / num2, context.height / num2, 0, (FilterMode)0, m_VectorRTFormat, (RenderTextureReadWrite)1); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(tile8RT)); cb.Blit(RenderTargetIdentifier.op_Implicit(tile8RT), RenderTargetIdentifier.op_Implicit(tileVRT), material, 3); cb.ReleaseTemporaryRT(tile8RT); int neighborMaxTex = Uniforms._NeighborMaxTex; int num4 = context.width / num2; int num5 = context.height / num2; cb.GetTemporaryRT(neighborMaxTex, num4, num5, 0, (FilterMode)0, m_VectorRTFormat, (RenderTextureReadWrite)1); cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit(tileVRT)); cb.Blit(RenderTargetIdentifier.op_Implicit(tileVRT), RenderTargetIdentifier.op_Implicit(neighborMaxTex), material, 4); cb.ReleaseTemporaryRT(tileVRT); cb.SetGlobalFloat(Uniforms._LoopCount, (float)Mathf.Clamp(settings.sampleCount / 2, 1, 64)); cb.SetGlobalTexture(Uniforms._MainTex, source); cb.Blit(source, destination, material, 5); cb.ReleaseTemporaryRT(velocityTex); cb.ReleaseTemporaryRT(neighborMaxTex); } } public class FrameBlendingFilter { private struct Frame { public RenderTexture lumaTexture; public RenderTexture chromaTexture; private float m_Time; private RenderTargetIdentifier[] m_MRT; public float CalculateWeight(float strength, float currentTime) { if (Mathf.Approximately(m_Time, 0f)) { return 0f; } float num = Mathf.Lerp(80f, 16f, strength); return Mathf.Exp((m_Time - currentTime) * num); } public void Release() { if ((Object)(object)lumaTexture != (Object)null) { RenderTexture.ReleaseTemporary(lumaTexture); } if ((Object)(object)chromaTexture != (Object)null) { RenderTexture.ReleaseTemporary(chromaTexture); } lumaTexture = null; chromaTexture = null; } public void MakeRecord(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, Material material) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_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_0098: 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_00bb: Unknown result type (might be due to invalid IL or missing references) Release(); lumaTexture = RenderTexture.GetTemporary(width, height, 0, (RenderTextureFormat)16, (RenderTextureReadWrite)1); chromaTexture = RenderTexture.GetTemporary(width, height, 0, (RenderTextureFormat)16, (RenderTextureReadWrite)1); ((Texture)lumaTexture).filterMode = (FilterMode)0; ((Texture)chromaTexture).filterMode = (FilterMode)0; if (m_MRT == null) { m_MRT = (RenderTargetIdentifier[])(object)new RenderTargetIdentifier[2]; } ref RenderTargetIdentifier reference = ref m_MRT[0]; reference = RenderTargetIdentifier.op_Implicit((Texture)(object)lumaTexture); ref RenderTargetIdentifier reference2 = ref m_MRT[1]; reference2 = RenderTargetIdentifier.op_Implicit((Texture)(object)chromaTexture); cb.SetGlobalTexture(Uniforms._MainTex, source); cb.SetRenderTarget(m_MRT, RenderTargetIdentifier.op_Implicit((Texture)(object)lumaTexture)); cb.DrawMesh(GraphicsUtils.quad, Matrix4x4.identity, material, 0, 6); m_Time = Time.time; } public void MakeRecordRaw(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, RenderTextureFormat format) { //IL_000c: 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_0031: 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) Release(); lumaTexture = RenderTexture.GetTemporary(width, height, 0, format); ((Texture)lumaTexture).filterMode = (FilterMode)0; cb.SetGlobalTexture(Uniforms._MainTex, source); cb.Blit(source, RenderTargetIdentifier.op_Implicit((Texture)(object)lumaTexture)); m_Time = Time.time; } } private bool m_UseCompression; private RenderTextureFormat m_RawTextureFormat; private Frame[] m_FrameList; private int m_LastFrameCount; public FrameBlendingFilter() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) m_UseCompression = CheckSupportCompression(); m_RawTextureFormat = GetPreferredRenderTextureFormat(); m_FrameList = new Frame[4]; } public void Dispose() { Frame[] frameList = m_FrameList; foreach (Frame frame in frameList) { frame.Release(); } } public void PushFrame(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, Material material) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) int frameCount = Time.frameCount; if (frameCount != m_LastFrameCount) { int num = frameCount % m_FrameList.Length; if (m_UseCompression) { m_FrameList[num].MakeRecord(cb, source, width, height, material); } else { m_FrameList[num].MakeRecordRaw(cb, source, width, height, m_RawTextureFormat); } m_LastFrameCount = frameCount; } } public void BlendFrames(CommandBuffer cb, float strength, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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_0094: 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_00c2: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) float time = Time.time; Frame frameRelative = GetFrameRelative(-1); Frame frameRelative2 = GetFrameRelative(-2); Frame frameRelative3 = GetFrameRelative(-3); Frame frameRelative4 = GetFrameRelative(-4); cb.SetGlobalTexture(Uniforms._History1LumaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative.lumaTexture)); cb.SetGlobalTexture(Uniforms._History2LumaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative2.lumaTexture)); cb.SetGlobalTexture(Uniforms._History3LumaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative3.lumaTexture)); cb.SetGlobalTexture(Uniforms._History4LumaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative4.lumaTexture)); cb.SetGlobalTexture(Uniforms._History1ChromaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative.chromaTexture)); cb.SetGlobalTexture(Uniforms._History2ChromaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative2.chromaTexture)); cb.SetGlobalTexture(Uniforms._History3ChromaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative3.chromaTexture)); cb.SetGlobalTexture(Uniforms._History4ChromaTex, RenderTargetIdentifier.op_Implicit((Texture)(object)frameRelative4.chromaTexture)); cb.SetGlobalFloat(Uniforms._History1Weight, frameRelative.CalculateWeight(strength, time)); cb.SetGlobalFloat(Uniforms._History2Weight, frameRelative2.CalculateWeight(strength, time)); cb.SetGlobalFloat(Uniforms._History3Weight, frameRelative3.CalculateWeight(strength, time)); cb.SetGlobalFloat(Uniforms._History4Weight, frameRelative4.CalculateWeight(strength, time)); cb.SetGlobalTexture(Uniforms._MainTex, source); cb.Blit(source, destination, material, (!m_UseCompression) ? 8 : 7); } private static bool CheckSupportCompression() { return SystemInfo.SupportsRenderTextureFormat((RenderTextureFormat)16) && SystemInfo.supportedRenderTargetCount > 1; } private static RenderTextureFormat GetPreferredRenderTextureFormat() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) RenderTextureFormat[] array = new RenderTextureFormat[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); RenderTextureFormat[] array2 = (RenderTextureFormat[])(object)array; RenderTextureFormat[] array3 = array2; foreach (RenderTextureFormat val in array3) { if (SystemInfo.SupportsRenderTextureFormat(val)) { return val; } } return (RenderTextureFormat)7; } private Frame GetFrameRelative(int offset) { int num = (Time.frameCount + m_FrameList.Length + offset) % m_FrameList.Length; return m_FrameList[num]; } } private ReconstructionFilter m_ReconstructionFilter; private FrameBlendingFilter m_FrameBlendingFilter; private bool m_FirstFrame = true; public ReconstructionFilter reconstructionFilter { get { if (m_ReconstructionFilter == null) { m_ReconstructionFilter = new ReconstructionFilter(); } return m_ReconstructionFilter; } } public FrameBlendingFilter frameBlendingFilter { get { if (m_FrameBlendingFilter == null) { m_FrameBlendingFilter = new FrameBlendingFilter(); } return m_FrameBlendingFilter; } } public override bool active { get { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 MotionBlurModel.Settings settings = base.model.settings; return base.model.enabled && ((settings.shutterAngle > 0f && reconstructionFilter.IsSupported()) || settings.frameBlending > 0f) && (int)SystemInfo.graphicsDeviceType != 8 && !context.interrupted; } } public override string GetName() { return "Motion Blur"; } public void ResetHistory() { if (m_FrameBlendingFilter != null) { m_FrameBlendingFilter.Dispose(); } m_FrameBlendingFilter = null; } public override DepthTextureMode GetCameraFlags() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return (DepthTextureMode)5; } public override CameraEvent GetCameraEvent() { //IL_0003: 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) return (CameraEvent)18; } public override void OnEnable() { m_FirstFrame = true; } public override void PopulateCommandBuffer(CommandBuffer cb) { //IL_0078: 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_0150: 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_0163: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: 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_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) if (!Application.isPlaying) { return; } if (m_FirstFrame) { m_FirstFrame = false; return; } Material material = context.materialFactory.Get("Hidden/Post FX/Motion Blur"); Material val = context.materialFactory.Get("Hidden/Post FX/Blit"); MotionBlurModel.Settings settings = base.model.settings; RenderTextureFormat val2 = (RenderTextureFormat)((!context.isHdr) ? 7 : 9); int tempRT = Uniforms._TempRT; cb.GetTemporaryRT(tempRT, context.width, context.height, 0, (FilterMode)0, val2); if (settings.shutterAngle > 0f && settings.frameBlending > 0f) { reconstructionFilter.ProcessImage(context, cb, ref settings, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(tempRT), material); frameBlendingFilter.BlendFrames(cb, settings.frameBlending, RenderTargetIdentifier.op_Implicit(tempRT), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), material); frameBlendingFilter.PushFrame(cb, RenderTargetIdentifier.op_Implicit(tempRT), context.width, context.height, material); } else if (settings.shutterAngle > 0f) { cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2)); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(tempRT), val, 0); reconstructionFilter.ProcessImage(context, cb, ref settings, RenderTargetIdentifier.op_Implicit(tempRT), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), material); } else if (settings.frameBlending > 0f) { cb.SetGlobalTexture(Uniforms._MainTex, RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2)); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(tempRT), val, 0); frameBlendingFilter.BlendFrames(cb, settings.frameBlending, RenderTargetIdentifier.op_Implicit(tempRT), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), material); frameBlendingFilter.PushFrame(cb, RenderTargetIdentifier.op_Implicit(tempRT), context.width, context.height, material); } cb.ReleaseTemporaryRT(tempRT); } public override void OnDisable() { if (m_FrameBlendingFilter != null) { m_FrameBlendingFilter.Dispose(); } } } public sealed class ScreenSpaceReflectionComponent : PostProcessingComponentCommandBuffer { private static class Uniforms { internal static readonly int _RayStepSize = Shader.PropertyToID("_RayStepSize"); internal static readonly int _AdditiveReflection = Shader.PropertyToID("_AdditiveReflection"); internal static readonly int _BilateralUpsampling = Shader.PropertyToID("_BilateralUpsampling"); internal static readonly int _TreatBackfaceHitAsMiss = Shader.PropertyToID("_TreatBackfaceHitAsMiss"); internal static readonly int _AllowBackwardsRays = Shader.PropertyToID("_AllowBackwardsRays"); internal static readonly int _TraceBehindObjects = Shader.PropertyToID("_TraceBehindObjects"); internal static readonly int _MaxSteps = Shader.PropertyToID("_MaxSteps"); internal static readonly int _FullResolutionFiltering = Shader.PropertyToID("_FullResolutionFiltering"); internal static readonly int _HalfResolution = Shader.PropertyToID("_HalfResolution"); internal static readonly int _HighlightSuppression = Shader.PropertyToID("_HighlightSuppression"); internal static readonly int _PixelsPerMeterAtOneMeter = Shader.PropertyToID("_PixelsPerMeterAtOneMeter"); internal static readonly int _ScreenEdgeFading = Shader.PropertyToID("_ScreenEdgeFading"); internal static readonly int _ReflectionBlur = Shader.PropertyToID("_ReflectionBlur"); internal static readonly int _MaxRayTraceDistance = Shader.PropertyToID("_MaxRayTraceDistance"); internal static readonly int _FadeDistance = Shader.PropertyToID("_FadeDistance"); internal static readonly int _LayerThickness = Shader.PropertyToID("_LayerThickness"); internal static readonly int _SSRMultiplier = Shader.PropertyToID("_SSRMultiplier"); internal static readonly int _FresnelFade = Shader.PropertyToID("_FresnelFade"); internal static readonly int _FresnelFadePower = Shader.PropertyToID("_FresnelFadePower"); internal static readonly int _ReflectionBufferSize = Shader.PropertyToID("_ReflectionBufferSize"); internal static readonly int _ScreenSize = Shader.PropertyToID("_ScreenSize"); internal static readonly int _InvScreenSize = Shader.PropertyToID("_InvScreenSize"); internal static readonly int _ProjInfo = Shader.PropertyToID("_ProjInfo"); internal static readonly int _CameraClipInfo = Shader.PropertyToID("_CameraClipInfo"); internal static readonly int _ProjectToPixelMatrix = Shader.PropertyToID("_ProjectToPixelMatrix"); internal static readonly int _WorldToCameraMatrix = Shader.PropertyToID("_WorldToCameraMatrix"); internal static readonly int _CameraToWorldMatrix = Shader.PropertyToID("_CameraToWorldMatrix"); internal static readonly int _Axis = Shader.PropertyToID("_Axis"); internal static readonly int _CurrentMipLevel = Shader.PropertyToID("_CurrentMipLevel"); internal static readonly int _NormalAndRoughnessTexture = Shader.PropertyToID("_NormalAndRoughnessTexture"); internal static readonly int _HitPointTexture = Shader.PropertyToID("_HitPointTexture"); internal static readonly int _BlurTexture = Shader.PropertyToID("_BlurTexture"); internal static readonly int _FilteredReflections = Shader.PropertyToID("_FilteredReflections"); internal static readonly int _FinalReflectionTexture = Shader.PropertyToID("_FinalReflectionTexture"); internal static readonly int _TempTexture = Shader.PropertyToID("_TempTexture"); } private enum PassIndex { RayTraceStep, CompositeFinal, Blur, CompositeSSR, MinMipGeneration, HitPointToReflections, BilateralKeyPack, BlitDepthAsCSZ, PoissonBlur } private bool k_HighlightSuppression = false; private bool k_TraceBehindObjects = true; private bool k_TreatBackfaceHitAsMiss = false; private bool k_BilateralUpsample = true; private readonly int[] m_ReflectionTextures = new int[5]; public override bool active => base.model.enabled && context.isGBufferAvailable && !context.interrupted; public override DepthTextureMode GetCameraFlags() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return (DepthTextureMode)1; } public override void OnEnable() { m_ReflectionTextures[0] = Shader.PropertyToID("_ReflectionTexture0"); m_ReflectionTextures[1] = Shader.PropertyToID("_ReflectionTexture1"); m_ReflectionTextures[2] = Shader.PropertyToID("_ReflectionTexture2"); m_ReflectionTextures[3] = Shader.PropertyToID("_ReflectionTexture3"); m_ReflectionTextures[4] = Shader.PropertyToID("_ReflectionTexture4"); } public override string GetName() { return "Screen Space Reflection"; } public override CameraEvent GetCameraEvent() { //IL_0003: 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) return (CameraEvent)9; } public override void PopulateCommandBuffer(CommandBuffer cb) { //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_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_03aa: 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_03c0: 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_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: 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_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_045a: 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_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_048d: 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_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_0524: 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_0562: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: 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_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063f: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: 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) ScreenSpaceReflectionModel.Settings settings = base.model.settings; Camera camera = context.camera; int num = ((settings.reflection.reflectionQuality == ScreenSpaceReflectionModel.SSRResolution.High) ? 1 : 2); int num2 = context.width / num; int num3 = context.height / num; float num4 = context.width; float num5 = context.height; float num6 = num4 / 2f; float num7 = num5 / 2f; Material val = context.materialFactory.Get("Hidden/Post FX/Screen Space Reflection"); val.SetInt(Uniforms._RayStepSize, settings.reflection.stepSize); val.SetInt(Uniforms._AdditiveReflection, (settings.reflection.blendType == ScreenSpaceReflectionModel.SSRReflectionBlendType.Additive) ? 1 : 0); val.SetInt(Uniforms._BilateralUpsampling, k_BilateralUpsample ? 1 : 0); val.SetInt(Uniforms._TreatBackfaceHitAsMiss, k_TreatBackfaceHitAsMiss ? 1 : 0); val.SetInt(Uniforms._AllowBackwardsRays, settings.reflection.reflectBackfaces ? 1 : 0); val.SetInt(Uniforms._TraceBehindObjects, k_TraceBehindObjects ? 1 : 0); val.SetInt(Uniforms._MaxSteps, settings.reflection.iterationCount); val.SetInt(Uniforms._FullResolutionFiltering, 0); val.SetInt(Uniforms._HalfResolution, (settings.reflection.reflectionQuality != 0) ? 1 : 0); val.SetInt(Uniforms._HighlightSuppression, k_HighlightSuppression ? 1 : 0); float num8 = num4 / (-2f * Mathf.Tan(camera.fieldOfView / 180f * (float)Math.PI * 0.5f)); val.SetFloat(Uniforms._PixelsPerMeterAtOneMeter, num8); val.SetFloat(Uniforms._ScreenEdgeFading, settings.screenEdgeMask.intensity); val.SetFloat(Uniforms._ReflectionBlur, settings.reflection.reflectionBlur); val.SetFloat(Uniforms._MaxRayTraceDistance, settings.reflection.maxDistance); val.SetFloat(Uniforms._FadeDistance, settings.intensity.fadeDistance); val.SetFloat(Uniforms._LayerThickness, settings.reflection.widthModifier); val.SetFloat(Uniforms._SSRMultiplier, settings.intensity.reflectionMultiplier); val.SetFloat(Uniforms._FresnelFade, settings.intensity.fresnelFade); val.SetFloat(Uniforms._FresnelFadePower, settings.intensity.fresnelFadePower); Matrix4x4 projectionMatrix = camera.projectionMatrix; Vector4 val2 = default(Vector4); ((Vector4)(ref val2))..ctor(-2f / (num4 * ((Matrix4x4)(ref projectionMatrix))[0]), -2f / (num5 * ((Matrix4x4)(ref projectionMatrix))[5]), (1f - ((Matrix4x4)(ref projectionMatrix))[2]) / ((Matrix4x4)(ref projectionMatrix))[0], (1f + ((Matrix4x4)(ref projectionMatrix))[6]) / ((Matrix4x4)(ref projectionMatrix))[5]); Vector3 val3 = ((!float.IsPositiveInfinity(camera.farClipPlane)) ? new Vector3(camera.nearClipPlane * camera.farClipPlane, camera.nearClipPlane - camera.farClipPlane, camera.farClipPlane) : new Vector3(camera.nearClipPlane, -1f, 1f)); val.SetVector(Uniforms._ReflectionBufferSize, Vector4.op_Implicit(new Vector2((float)num2, (float)num3))); val.SetVector(Uniforms._ScreenSize, Vector4.op_Implicit(new Vector2(num4, num5))); val.SetVector(Uniforms._InvScreenSize, Vector4.op_Implicit(new Vector2(1f / num4, 1f / num5))); val.SetVector(Uniforms._ProjInfo, val2); val.SetVector(Uniforms._CameraClipInfo, Vector4.op_Implicit(val3)); Matrix4x4 val4 = default(Matrix4x4); ((Matrix4x4)(ref val4)).SetRow(0, new Vector4(num6, 0f, 0f, num6)); ((Matrix4x4)(ref val4)).SetRow(1, new Vector4(0f, num7, 0f, num7)); ((Matrix4x4)(ref val4)).SetRow(2, new Vector4(0f, 0f, 1f, 0f)); ((Matrix4x4)(ref val4)).SetRow(3, new Vector4(0f, 0f, 0f, 1f)); Matrix4x4 val5 = val4 * projectionMatrix; val.SetMatrix(Uniforms._ProjectToPixelMatrix, val5); val.SetMatrix(Uniforms._WorldToCameraMatrix, camera.worldToCameraMatrix); int cameraToWorldMatrix = Uniforms._CameraToWorldMatrix; Matrix4x4 worldToCameraMatrix = camera.worldToCameraMatrix; val.SetMatrix(cameraToWorldMatrix, ((Matrix4x4)(ref worldToCameraMatrix)).inverse); RenderTextureFormat val6 = (RenderTextureFormat)(context.isHdr ? 2 : 0); int normalAndRoughnessTexture = Uniforms._NormalAndRoughnessTexture; int hitPointTexture = Uniforms._HitPointTexture; int blurTexture = Uniforms._BlurTexture; int filteredReflections = Uniforms._FilteredReflections; int finalReflectionTexture = Uniforms._FinalReflectionTexture; int tempTexture = Uniforms._TempTexture; cb.GetTemporaryRT(normalAndRoughnessTexture, -1, -1, 0, (FilterMode)0, (RenderTextureFormat)0, (RenderTextureReadWrite)1); cb.GetTemporaryRT(hitPointTexture, num2, num3, 0, (FilterMode)1, (RenderTextureFormat)2, (RenderTextureReadWrite)1); for (int i = 0; i < 5; i++) { cb.GetTemporaryRT(m_ReflectionTextures[i], num2 >> i, num3 >> i, 0, (FilterMode)1, val6); } cb.GetTemporaryRT(filteredReflections, num2, num3, 0, (FilterMode)((!k_BilateralUpsample) ? 1 : 0), val6); cb.GetTemporaryRT(finalReflectionTexture, num2, num3, 0, (FilterMode)0, val6); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(normalAndRoughnessTexture), val, 6); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(hitPointTexture), val, 0); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(filteredReflections), val, 5); cb.Blit(RenderTargetIdentifier.op_Implicit(filteredReflections), RenderTargetIdentifier.op_Implicit(m_ReflectionTextures[0]), val, 8); for (int j = 1; j < 5; j++) { int num9 = m_ReflectionTextures[j - 1]; int num10 = j; cb.GetTemporaryRT(blurTexture, num2 >> num10, num3 >> num10, 0, (FilterMode)1, val6); cb.SetGlobalVector(Uniforms._Axis, new Vector4(1f, 0f, 0f, 0f)); cb.SetGlobalFloat(Uniforms._CurrentMipLevel, (float)j - 1f); cb.Blit(RenderTargetIdentifier.op_Implicit(num9), RenderTargetIdentifier.op_Implicit(blurTexture), val, 2); cb.SetGlobalVector(Uniforms._Axis, new Vector4(0f, 1f, 0f, 0f)); num9 = m_ReflectionTextures[j]; cb.Blit(RenderTargetIdentifier.op_Implicit(blurTexture), RenderTargetIdentifier.op_Implicit(num9), val, 2); cb.ReleaseTemporaryRT(blurTexture); } cb.Blit(RenderTargetIdentifier.op_Implicit(m_ReflectionTextures[0]), RenderTargetIdentifier.op_Implicit(finalReflectionTexture), val, 3); cb.GetTemporaryRT(tempTexture, camera.pixelWidth, camera.pixelHeight, 0, (FilterMode)1, val6); cb.Blit(RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2), RenderTargetIdentifier.op_Implicit(tempTexture), val, 1); cb.Blit(RenderTargetIdentifier.op_Implicit(tempTexture), RenderTargetIdentifier.op_Implicit((BuiltinRenderTextureType)2)); cb.ReleaseTemporaryRT(tempTexture); } } public sealed class TaaComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static int _Jitter = Shader.PropertyToID("_Jitter"); internal static int _SharpenParameters = Shader.PropertyToID("_SharpenParameters"); internal static int _FinalBlendParameters = Shader.PropertyToID("_FinalBlendParameters"); internal static int _HistoryTex = Shader.PropertyToID("_HistoryTex"); internal static int _MainTex = Shader.PropertyToID("_MainTex"); } private const string k_ShaderString = "Hidden/Post FX/Temporal Anti-aliasing"; private const int k_SampleCount = 8; private readonly RenderBuffer[] m_MRT = (RenderBuffer[])(object)new RenderBuffer[2]; private int m_SampleIndex = 0; private bool m_ResetHistory = true; private RenderTexture m_HistoryTexture; public override bool active => base.model.enabled && base.model.settings.method == AntialiasingModel.Method.Taa && SystemInfo.SupportsRenderTextureFormat((RenderTextureFormat)2) && SystemInfo.supportsMotionVectors && !context.interrupted; public override DepthTextureMode GetCameraFlags() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return (DepthTextureMode)5; } public void ResetHistory() { m_ResetHistory = true; } public void SetProjectionMatrix(Func jitteredFunc) { //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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_0090: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) AntialiasingModel.TaaSettings taaSettings = base.model.settings.taaSettings; Vector2 val = GenerateRandomOffset(); val *= taaSettings.jitterSpread; context.camera.nonJitteredProjectionMatrix = context.camera.projectionMatrix; if (jitteredFunc != null) { context.camera.projectionMatrix = jitteredFunc(val); } else { context.camera.projectionMatrix = ((!context.camera.orthographic) ? GetPerspectiveProjectionMatrix(val) : GetOrthographicProjectionMatrix(val)); } context.camera.useJitteredProjectionMatrixForTransparentRendering = false; val.x /= (float)context.width; val.y /= (float)context.height; Material val2 = context.materialFactory.Get("Hidden/Post FX/Temporal Anti-aliasing"); val2.SetVector(Uniforms._Jitter, Vector4.op_Implicit(val)); } public void Render(RenderTexture source, RenderTexture destination) { //IL_00a5: 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_0117: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) Material val = context.materialFactory.Get("Hidden/Post FX/Temporal Anti-aliasing"); val.shaderKeywords = null; AntialiasingModel.TaaSettings taaSettings = base.model.settings.taaSettings; if (m_ResetHistory || (Object)(object)m_HistoryTexture == (Object)null || ((Texture)m_HistoryTexture).width != ((Texture)source).width || ((Texture)m_HistoryTexture).height != ((Texture)source).height) { if (Object.op_Implicit((Object)(object)m_HistoryTexture)) { RenderTexture.ReleaseTemporary(m_HistoryTexture); } m_HistoryTexture = RenderTexture.GetTemporary(((Texture)source).width, ((Texture)source).height, 0, source.format); ((Object)m_HistoryTexture).name = "TAA History"; Graphics.Blit((Texture)(object)source, m_HistoryTexture, val, 2); } val.SetVector(Uniforms._SharpenParameters, new Vector4(taaSettings.sharpen, 0f, 0f, 0f)); val.SetVector(Uniforms._FinalBlendParameters, new Vector4(taaSettings.stationaryBlending, taaSettings.motionBlending, 6000f, 0f)); val.SetTexture(Uniforms._MainTex, (Texture)(object)source); val.SetTexture(Uniforms._HistoryTex, (Texture)(object)m_HistoryTexture); RenderTexture temporary = RenderTexture.GetTemporary(((Texture)source).width, ((Texture)source).height, 0, source.format); ((Object)temporary).name = "TAA History"; ref RenderBuffer reference = ref m_MRT[0]; reference = destination.colorBuffer; ref RenderBuffer reference2 = ref m_MRT[1]; reference2 = temporary.colorBuffer; Graphics.SetRenderTarget(m_MRT, source.depthBuffer); GraphicsUtils.Blit(val, context.camera.orthographic ? 1 : 0); RenderTexture.ReleaseTemporary(m_HistoryTexture); m_HistoryTexture = temporary; m_ResetHistory = false; } private float GetHaltonValue(int index, int radix) { float num = 0f; float num2 = 1f / (float)radix; while (index > 0) { num += (float)(index % radix) * num2; index /= radix; num2 /= (float)radix; } return num; } private Vector2 GenerateRandomOffset() { //IL_004c: 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_0053: Unknown result type (might be due to invalid IL or missing references) Vector2 result = default(Vector2); ((Vector2)(ref result))..ctor(GetHaltonValue(m_SampleIndex & 0x3FF, 2), GetHaltonValue(m_SampleIndex & 0x3FF, 3)); if (++m_SampleIndex >= 8) { m_SampleIndex = 0; } return result; } private Matrix4x4 GetPerspectiveProjectionMatrix(Vector2 offset) { //IL_00e4: 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_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Tan((float)Math.PI / 360f * context.camera.fieldOfView); float num2 = num * context.camera.aspect; offset.x *= num2 / (0.5f * (float)context.width); offset.y *= num / (0.5f * (float)context.height); float num3 = (offset.x - num2) * context.camera.nearClipPlane; float num4 = (offset.x + num2) * context.camera.nearClipPlane; float num5 = (offset.y + num) * context.camera.nearClipPlane; float num6 = (offset.y - num) * context.camera.nearClipPlane; Matrix4x4 result = default(Matrix4x4); ((Matrix4x4)(ref result))[0, 0] = 2f * context.camera.nearClipPlane / (num4 - num3); ((Matrix4x4)(ref result))[0, 1] = 0f; ((Matrix4x4)(ref result))[0, 2] = (num4 + num3) / (num4 - num3); ((Matrix4x4)(ref result))[0, 3] = 0f; ((Matrix4x4)(ref result))[1, 0] = 0f; ((Matrix4x4)(ref result))[1, 1] = 2f * context.camera.nearClipPlane / (num5 - num6); ((Matrix4x4)(ref result))[1, 2] = (num5 + num6) / (num5 - num6); ((Matrix4x4)(ref result))[1, 3] = 0f; ((Matrix4x4)(ref result))[2, 0] = 0f; ((Matrix4x4)(ref result))[2, 1] = 0f; ((Matrix4x4)(ref result))[2, 2] = (0f - (context.camera.farClipPlane + context.camera.nearClipPlane)) / (context.camera.farClipPlane - context.camera.nearClipPlane); ((Matrix4x4)(ref result))[2, 3] = (0f - 2f * context.camera.farClipPlane * context.camera.nearClipPlane) / (context.camera.farClipPlane - context.camera.nearClipPlane); ((Matrix4x4)(ref result))[3, 0] = 0f; ((Matrix4x4)(ref result))[3, 1] = 0f; ((Matrix4x4)(ref result))[3, 2] = -1f; ((Matrix4x4)(ref result))[3, 3] = 0f; return result; } private Matrix4x4 GetOrthographicProjectionMatrix(Vector2 offset) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) float orthographicSize = context.camera.orthographicSize; float num = orthographicSize * context.camera.aspect; offset.x *= num / (0.5f * (float)context.width); offset.y *= orthographicSize / (0.5f * (float)context.height); float num2 = offset.x - num; float num3 = offset.x + num; float num4 = offset.y + orthographicSize; float num5 = offset.y - orthographicSize; return Matrix4x4.Ortho(num2, num3, num5, num4, context.camera.nearClipPlane, context.camera.farClipPlane); } public override void OnDisable() { if ((Object)(object)m_HistoryTexture != (Object)null) { RenderTexture.ReleaseTemporary(m_HistoryTexture); } m_HistoryTexture = null; m_SampleIndex = 0; ResetHistory(); } } public sealed class UserLutComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _UserLut = Shader.PropertyToID("_UserLut"); internal static readonly int _UserLut_Params = Shader.PropertyToID("_UserLut_Params"); } public override bool active { get { UserLutModel.Settings settings = base.model.settings; return base.model.enabled && (Object)(object)settings.lut != (Object)null && settings.contribution > 0f && ((Texture)settings.lut).height == (int)Mathf.Sqrt((float)((Texture)settings.lut).width) && !context.interrupted; } } public override void Prepare(Material uberMaterial) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) UserLutModel.Settings settings = base.model.settings; uberMaterial.EnableKeyword("USER_LUT"); uberMaterial.SetTexture(Uniforms._UserLut, (Texture)(object)settings.lut); uberMaterial.SetVector(Uniforms._UserLut_Params, new Vector4(1f / (float)((Texture)settings.lut).width, 1f / (float)((Texture)settings.lut).height, (float)((Texture)settings.lut).height - 1f, settings.contribution)); } public void OnGUI() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) UserLutModel.Settings settings = base.model.settings; Rect viewport = context.viewport; Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref viewport)).x * (float)Screen.width + 8f, 8f, (float)((Texture)settings.lut).width, (float)((Texture)settings.lut).height); GUI.DrawTexture(val, (Texture)(object)settings.lut); } } public sealed class VignetteComponent : PostProcessingComponentRenderTexture { private static class Uniforms { internal static readonly int _Vignette_Color = Shader.PropertyToID("_Vignette_Color"); internal static readonly int _Vignette_Center = Shader.PropertyToID("_Vignette_Center"); internal static readonly int _Vignette_Settings = Shader.PropertyToID("_Vignette_Settings"); internal static readonly int _Vignette_Mask = Shader.PropertyToID("_Vignette_Mask"); internal static readonly int _Vignette_Opacity = Shader.PropertyToID("_Vignette_Opacity"); } public override bool active => base.model.enabled && !context.interrupted; public override void Prepare(Material uberMaterial) { //IL_0015: 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_00a6: Unknown result type (might be due to invalid IL or missing references) VignetteModel.Settings settings = base.model.settings; uberMaterial.SetColor(Uniforms._Vignette_Color, settings.color); if (settings.mode == VignetteModel.Mode.Classic) { uberMaterial.SetVector(Uniforms._Vignette_Center, Vector4.op_Implicit(settings.center)); uberMaterial.EnableKeyword("VIGNETTE_CLASSIC"); float num = (1f - settings.roundness) * 6f + settings.roundness; uberMaterial.SetVector(Uniforms._Vignette_Settings, new Vector4(settings.intensity * 3f, settings.smoothness * 5f, num, (!settings.rounded) ? 0f : 1f)); } else if (settings.mode == VignetteModel.Mode.Masked && (Object)(object)settings.mask != (Object)null && settings.opacity > 0f) { uberMaterial.EnableKeyword("VIGNETTE_MASKED"); uberMaterial.SetTexture(Uniforms._Vignette_Mask, settings.mask); uberMaterial.SetFloat(Uniforms._Vignette_Opacity, settings.opacity); } } } [Serializable] public class AmbientOcclusionModel : PostProcessingModel { public enum SampleCount { Lowest = 3, Low = 6, Medium = 10, High = 16 } [Serializable] public struct Settings { [Range(0f, 4f)] [Tooltip("Degree of darkness produced by the effect.")] public float intensity; [Min(0.0001f)] [Tooltip("Radius of sample points, which affects extent of darkened areas.")] public float radius; [Tooltip("Number of sample points, which affects quality and performance.")] public SampleCount sampleCount; [Tooltip("Halves the resolution of the effect to increase performance.")] public bool downsampling; [Tooltip("Forces compatibility with Forward rendered objects when working with the Deferred rendering path.")] public bool forceForwardCompatibility; [Tooltip("Enables the ambient-only mode in that the effect only affects ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering.")] public bool ambientOnly; [Tooltip("Toggles the use of a higher precision depth texture with the forward rendering path (may impact performances). Has no effect with the deferred rendering path.")] public bool highPrecision; public static Settings defaultSettings { get { Settings result = default(Settings); result.intensity = 1f; result.radius = 0.3f; result.sampleCount = SampleCount.Medium; result.downsampling = true; result.forceForwardCompatibility = false; result.ambientOnly = false; result.highPrecision = false; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class AntialiasingModel : PostProcessingModel { public enum Method { Fxaa, Taa } public enum FxaaPreset { ExtremePerformance, Performance, Default, Quality, ExtremeQuality } [Serializable] public struct FxaaQualitySettings { [Tooltip("The amount of desired sub-pixel aliasing removal. Effects the sharpeness of the output.")] [Range(0f, 1f)] public float subpixelAliasingRemovalAmount; [Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")] [Range(0.063f, 0.333f)] public float edgeDetectionThreshold; [Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")] [Range(0f, 0.0833f)] public float minimumRequiredLuminance; public static FxaaQualitySettings[] presets = new FxaaQualitySettings[5] { new FxaaQualitySettings { subpixelAliasingRemovalAmount = 0f, edgeDetectionThreshold = 0.333f, minimumRequiredLuminance = 0.0833f }, new FxaaQualitySettings { subpixelAliasingRemovalAmount = 0.25f, edgeDetectionThreshold = 0.25f, minimumRequiredLuminance = 0.0833f }, new FxaaQualitySettings { subpixelAliasingRemovalAmount = 0.75f, edgeDetectionThreshold = 0.166f, minimumRequiredLuminance = 0.0833f }, new FxaaQualitySettings { subpixelAliasingRemovalAmount = 1f, edgeDetectionThreshold = 0.125f, minimumRequiredLuminance = 0.0625f }, new FxaaQualitySettings { subpixelAliasingRemovalAmount = 1f, edgeDetectionThreshold = 0.063f, minimumRequiredLuminance = 0.0312f } }; } [Serializable] public struct FxaaConsoleSettings { [Tooltip("The amount of spread applied to the sampling coordinates while sampling for subpixel information.")] [Range(0.33f, 0.5f)] public float subpixelSpreadAmount; [Tooltip("This value dictates how sharp the edges in the image are kept; a higher value implies sharper edges.")] [Range(2f, 8f)] public float edgeSharpnessAmount; [Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")] [Range(0.125f, 0.25f)] public float edgeDetectionThreshold; [Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")] [Range(0.04f, 0.06f)] public float minimumRequiredLuminance; public static FxaaConsoleSettings[] presets = new FxaaConsoleSettings[5] { new FxaaConsoleSettings { subpixelSpreadAmount = 0.33f, edgeSharpnessAmount = 8f, edgeDetectionThreshold = 0.25f, minimumRequiredLuminance = 0.06f }, new FxaaConsoleSettings { subpixelSpreadAmount = 0.33f, edgeSharpnessAmount = 8f, edgeDetectionThreshold = 0.125f, minimumRequiredLuminance = 0.06f }, new FxaaConsoleSettings { subpixelSpreadAmount = 0.5f, edgeSharpnessAmount = 8f, edgeDetectionThreshold = 0.125f, minimumRequiredLuminance = 0.05f }, new FxaaConsoleSettings { subpixelSpreadAmount = 0.5f, edgeSharpnessAmount = 4f, edgeDetectionThreshold = 0.125f, minimumRequiredLuminance = 0.04f }, new FxaaConsoleSettings { subpixelSpreadAmount = 0.5f, edgeSharpnessAmount = 2f, edgeDetectionThreshold = 0.125f, minimumRequiredLuminance = 0.04f } }; } [Serializable] public struct FxaaSettings { public FxaaPreset preset; public static FxaaSettings defaultSettings { get { FxaaSettings result = default(FxaaSettings); result.preset = FxaaPreset.Default; return result; } } } [Serializable] public struct TaaSettings { [Tooltip("The diameter (in texels) inside which jitter samples are spread. Smaller values result in crisper but more aliased output, while larger values result in more stable but blurrier output.")] [Range(0.1f, 1f)] public float jitterSpread; [Tooltip("Controls the amount of sharpening applied to the color buffer.")] [Range(0f, 3f)] public float sharpen; [Tooltip("The blend coefficient for a stationary fragment. Controls the percentage of history sample blended into the final color.")] [Range(0f, 0.99f)] public float stationaryBlending; [Tooltip("The blend coefficient for a fragment with significant motion. Controls the percentage of history sample blended into the final color.")] [Range(0f, 0.99f)] public float motionBlending; public static TaaSettings defaultSettings { get { TaaSettings result = default(TaaSettings); result.jitterSpread = 0.75f; result.sharpen = 0.3f; result.stationaryBlending = 0.95f; result.motionBlending = 0.85f; return result; } } } [Serializable] public struct Settings { public Method method; public FxaaSettings fxaaSettings; public TaaSettings taaSettings; public static Settings defaultSettings { get { Settings result = default(Settings); result.method = Method.Fxaa; result.fxaaSettings = FxaaSettings.defaultSettings; result.taaSettings = TaaSettings.defaultSettings; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class BloomModel : PostProcessingModel { [Serializable] public struct BloomSettings { [Min(0f)] [Tooltip("Blend factor of the result image.")] public float intensity; [Min(0f)] [Tooltip("Filters out pixels under this level of brightness.")] public float threshold; [Range(0f, 1f)] [Tooltip("Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold).")] public float softKnee; [Range(1f, 7f)] [Tooltip("Changes extent of veiling effects in a screen resolution-independent fashion.")] public float radius; [Tooltip("Reduces flashing noise with an additional filter.")] public bool antiFlicker; public float thresholdLinear { get { return Mathf.GammaToLinearSpace(threshold); } set { threshold = Mathf.LinearToGammaSpace(value); } } public static BloomSettings defaultSettings { get { BloomSettings result = default(BloomSettings); result.intensity = 0.5f; result.threshold = 1.1f; result.softKnee = 0.5f; result.radius = 4f; result.antiFlicker = false; return result; } } } [Serializable] public struct LensDirtSettings { [Tooltip("Dirtiness texture to add smudges or dust to the lens.")] public Texture texture; [Min(0f)] [Tooltip("Amount of lens dirtiness.")] public float intensity; public static LensDirtSettings defaultSettings { get { LensDirtSettings result = default(LensDirtSettings); result.texture = null; result.intensity = 3f; return result; } } } [Serializable] public struct Settings { public BloomSettings bloom; public LensDirtSettings lensDirt; public static Settings defaultSettings { get { Settings result = default(Settings); result.bloom = BloomSettings.defaultSettings; result.lensDirt = LensDirtSettings.defaultSettings; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class BuiltinDebugViewsModel : PostProcessingModel { [Serializable] public struct DepthSettings { [Range(0f, 1f)] [Tooltip("Scales the camera far plane before displaying the depth map.")] public float scale; public static DepthSettings defaultSettings { get { DepthSettings result = default(DepthSettings); result.scale = 1f; return result; } } } [Serializable] public struct MotionVectorsSettings { [Range(0f, 1f)] [Tooltip("Opacity of the source render.")] public float sourceOpacity; [Range(0f, 1f)] [Tooltip("Opacity of the per-pixel motion vector colors.")] public float motionImageOpacity; [Min(0f)] [Tooltip("Because motion vectors are mainly very small vectors, you can use this setting to make them more visible.")] public float motionImageAmplitude; [Range(0f, 1f)] [Tooltip("Opacity for the motion vector arrows.")] public float motionVectorsOpacity; [Range(8f, 64f)] [Tooltip("The arrow density on screen.")] public int motionVectorsResolution; [Min(0f)] [Tooltip("Tweaks the arrows length.")] public float motionVectorsAmplitude; public static MotionVectorsSettings defaultSettings { get { MotionVectorsSettings result = default(MotionVectorsSettings); result.sourceOpacity = 1f; result.motionImageOpacity = 0f; result.motionImageAmplitude = 16f; result.motionVectorsOpacity = 1f; result.motionVectorsResolution = 24; result.motionVectorsAmplitude = 64f; return result; } } } public enum Mode { None, Depth, Normals, MotionVectors, AmbientOcclusion, EyeAdaptation, FocusPlane, PreGradingLog, LogLut, UserLut } [Serializable] public struct Settings { public Mode mode; public DepthSettings depth; public MotionVectorsSettings motionVectors; public static Settings defaultSettings { get { Settings result = default(Settings); result.mode = Mode.None; result.depth = DepthSettings.defaultSettings; result.motionVectors = MotionVectorsSettings.defaultSettings; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public bool willInterrupt => !IsModeActive(Mode.None) && !IsModeActive(Mode.EyeAdaptation) && !IsModeActive(Mode.PreGradingLog) && !IsModeActive(Mode.LogLut) && !IsModeActive(Mode.UserLut); public override void Reset() { settings = Settings.defaultSettings; } public bool IsModeActive(Mode mode) { return m_Settings.mode == mode; } } [Serializable] public class ChromaticAberrationModel : PostProcessingModel { [Serializable] public struct Settings { [Tooltip("Shift the hue of chromatic aberrations.")] public Texture2D spectralTexture; [Range(0f, 1f)] [Tooltip("Amount of tangential distortion.")] public float intensity; public static Settings defaultSettings { get { Settings result = default(Settings); result.spectralTexture = null; result.intensity = 0.1f; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class ColorGradingModel : PostProcessingModel { public enum Tonemapper { None, ACES, Neutral } [Serializable] public struct TonemappingSettings { [Tooltip("Tonemapping algorithm to use at the end of the color grading process. Use \"Neutral\" if you need a customizable tonemapper or \"Filmic\" to give a standard filmic look to your scenes.")] public Tonemapper tonemapper; [Range(-0.1f, 0.1f)] public float neutralBlackIn; [Range(1f, 20f)] public float neutralWhiteIn; [Range(-0.09f, 0.1f)] public float neutralBlackOut; [Range(1f, 19f)] public float neutralWhiteOut; [Range(0.1f, 20f)] public float neutralWhiteLevel; [Range(1f, 10f)] public float neutralWhiteClip; public static TonemappingSettings defaultSettings { get { TonemappingSettings result = default(TonemappingSettings); result.tonemapper = Tonemapper.Neutral; result.neutralBlackIn = 0.02f; result.neutralWhiteIn = 10f; result.neutralBlackOut = 0f; result.neutralWhiteOut = 10f; result.neutralWhiteLevel = 5.3f; result.neutralWhiteClip = 10f; return result; } } } [Serializable] public struct BasicSettings { [Tooltip("Adjusts the overall exposure of the scene in EV units. This is applied after HDR effect and right before tonemapping so it won't affect previous effects in the chain.")] public float postExposure; [Range(-100f, 100f)] [Tooltip("Sets the white balance to a custom color temperature.")] public float temperature; [Range(-100f, 100f)] [Tooltip("Sets the white balance to compensate for a green or magenta tint.")] public float tint; [Range(-180f, 180f)] [Tooltip("Shift the hue of all colors.")] public float hueShift; [Range(0f, 2f)] [Tooltip("Pushes the intensity of all colors.")] public float saturation; [Range(0f, 2f)] [Tooltip("Expands or shrinks the overall range of tonal values.")] public float contrast; public static BasicSettings defaultSettings { get { BasicSettings result = default(BasicSettings); result.postExposure = 0f; result.temperature = 0f; result.tint = 0f; result.hueShift = 0f; result.saturation = 1f; result.contrast = 1f; return result; } } } [Serializable] public struct ChannelMixerSettings { public Vector3 red; public Vector3 green; public Vector3 blue; [HideInInspector] public int currentEditingChannel; public static ChannelMixerSettings defaultSettings { get { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_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) ChannelMixerSettings result = default(ChannelMixerSettings); result.red = new Vector3(1f, 0f, 0f); result.green = new Vector3(0f, 1f, 0f); result.blue = new Vector3(0f, 0f, 1f); result.currentEditingChannel = 0; return result; } } } [Serializable] public struct LogWheelsSettings { [Trackball("GetSlopeValue")] public Color slope; [Trackball("GetPowerValue")] public Color power; [Trackball("GetOffsetValue")] public Color offset; public static LogWheelsSettings defaultSettings { get { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) LogWheelsSettings result = default(LogWheelsSettings); result.slope = Color.clear; result.power = Color.clear; result.offset = Color.clear; return result; } } } [Serializable] public struct LinearWheelsSettings { [Trackball("GetLiftValue")] public Color lift; [Trackball("GetGammaValue")] public Color gamma; [Trackball("GetGainValue")] public Color gain; public static LinearWheelsSettings defaultSettings { get { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) LinearWheelsSettings result = default(LinearWheelsSettings); result.lift = Color.clear; result.gamma = Color.clear; result.gain = Color.clear; return result; } } } public enum ColorWheelMode { Linear, Log } [Serializable] public struct ColorWheelsSettings { public ColorWheelMode mode; [TrackballGroup] public LogWheelsSettings log; [TrackballGroup] public LinearWheelsSettings linear; public static ColorWheelsSettings defaultSettings { get { ColorWheelsSettings result = default(ColorWheelsSettings); result.mode = ColorWheelMode.Log; result.log = LogWheelsSettings.defaultSettings; result.linear = LinearWheelsSettings.defaultSettings; return result; } } } [Serializable] public struct CurvesSettings { public ColorGradingCurve master; public ColorGradingCurve red; public ColorGradingCurve green; public ColorGradingCurve blue; public ColorGradingCurve hueVShue; public ColorGradingCurve hueVSsat; public ColorGradingCurve satVSsat; public ColorGradingCurve lumVSsat; [HideInInspector] public int e_CurrentEditingCurve; [HideInInspector] public bool e_CurveY; [HideInInspector] public bool e_CurveR; [HideInInspector] public bool e_CurveG; [HideInInspector] public bool e_CurveB; public static CurvesSettings defaultSettings { get { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0166: Expected O, but got Unknown //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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e3: 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_0202: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_0255: 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_0274: Expected O, but got Unknown CurvesSettings result = default(CurvesSettings); result.master = new ColorGradingCurve(new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }), 0f, loop: false, new Vector2(0f, 1f)); result.red = new ColorGradingCurve(new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }), 0f, loop: false, new Vector2(0f, 1f)); result.green = new ColorGradingCurve(new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }), 0f, loop: false, new Vector2(0f, 1f)); result.blue = new ColorGradingCurve(new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }), 0f, loop: false, new Vector2(0f, 1f)); result.hueVShue = new ColorGradingCurve(new AnimationCurve(), 0.5f, loop: true, new Vector2(0f, 1f)); result.hueVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, loop: true, new Vector2(0f, 1f)); result.satVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, loop: false, new Vector2(0f, 1f)); result.lumVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, loop: false, new Vector2(0f, 1f)); result.e_CurrentEditingCurve = 0; result.e_CurveY = true; result.e_CurveR = false; result.e_CurveG = false; result.e_CurveB = false; return result; } } } [Serializable] public struct Settings { public TonemappingSettings tonemapping; public BasicSettings basic; public ChannelMixerSettings channelMixer; public ColorWheelsSettings colorWheels; public CurvesSettings curves; public static Settings defaultSettings { get { Settings result = default(Settings); result.tonemapping = TonemappingSettings.defaultSettings; result.basic = BasicSettings.defaultSettings; result.channelMixer = ChannelMixerSettings.defaultSettings; result.colorWheels = ColorWheelsSettings.defaultSettings; result.curves = CurvesSettings.defaultSettings; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; OnValidate(); } } public bool isDirty { get; internal set; } public RenderTexture bakedLut { get; internal set; } public override void Reset() { m_Settings = Settings.defaultSettings; OnValidate(); } public override void OnValidate() { isDirty = true; } } [Serializable] public class DepthOfFieldModel : PostProcessingModel { public enum KernelSize { Small, Medium, Large, VeryLarge } [Serializable] public struct Settings { [Min(0.1f)] [Tooltip("Distance to the point of focus.")] public float focusDistance; [Range(0.05f, 32f)] [Tooltip("Ratio of aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is.")] public float aperture; [Range(1f, 300f)] [Tooltip("Distance between the lens and the film. The larger the value is, the shallower the depth of field is.")] public float focalLength; [Tooltip("Calculate the focal length automatically from the field-of-view value set on the camera.")] public bool useCameraFov; [Tooltip("Convolution kernel size of the bokeh filter, which determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required).")] public KernelSize kernelSize; public static Settings defaultSettings { get { Settings result = default(Settings); result.focusDistance = 10f; result.aperture = 5.6f; result.focalLength = 50f; result.useCameraFov = false; result.kernelSize = KernelSize.Medium; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class DitheringModel : PostProcessingModel { [Serializable] [StructLayout(LayoutKind.Sequential, Size = 1)] public struct Settings { public static Settings defaultSettings => default(Settings); } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class EyeAdaptationModel : PostProcessingModel { public enum EyeAdaptationType { Progressive, Fixed } [Serializable] public struct Settings { [Range(1f, 99f)] [Tooltip("Filters the dark part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")] public float lowPercent; [Range(1f, 99f)] [Tooltip("Filters the bright part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")] public float highPercent; [Tooltip("Minimum average luminance to consider for auto exposure (in EV).")] public float minLuminance; [Tooltip("Maximum average luminance to consider for auto exposure (in EV).")] public float maxLuminance; [Min(0f)] [Tooltip("Exposure bias. Use this to control the global exposure of the scene.")] public float keyValue; [Tooltip("Set this to true to let Unity handle the key value automatically based on average luminance.")] public bool dynamicKeyValue; [Tooltip("Use \"Progressive\" if you want the auto exposure to be animated. Use \"Fixed\" otherwise.")] public EyeAdaptationType adaptationType; [Min(0f)] [Tooltip("Adaptation speed from a dark to a light environment.")] public float speedUp; [Min(0f)] [Tooltip("Adaptation speed from a light to a dark environment.")] public float speedDown; [Range(-16f, -1f)] [Tooltip("Lower bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be.")] public int logMin; [Range(1f, 16f)] [Tooltip("Upper bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be.")] public int logMax; public static Settings defaultSettings { get { Settings result = default(Settings); result.lowPercent = 45f; result.highPercent = 95f; result.minLuminance = -5f; result.maxLuminance = 1f; result.keyValue = 0.25f; result.dynamicKeyValue = true; result.adaptationType = EyeAdaptationType.Progressive; result.speedUp = 2f; result.speedDown = 1f; result.logMin = -8; result.logMax = 4; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class FogModel : PostProcessingModel { [Serializable] public struct Settings { [Tooltip("Should the fog affect the skybox?")] public bool excludeSkybox; public static Settings defaultSettings { get { Settings result = default(Settings); result.excludeSkybox = true; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class GrainModel : PostProcessingModel { [Serializable] public struct Settings { [Tooltip("Enable the use of colored grain.")] public bool colored; [Range(0f, 1f)] [Tooltip("Grain strength. Higher means more visible grain.")] public float intensity; [Range(0.3f, 3f)] [Tooltip("Grain particle size in \"Filmic\" mode.")] public float size; [Range(0f, 1f)] [Tooltip("Controls the noisiness response curve based on scene luminance. Lower values mean less noise in dark areas.")] public float luminanceContribution; public static Settings defaultSettings { get { Settings result = default(Settings); result.colored = true; result.intensity = 0.5f; result.size = 1f; result.luminanceContribution = 0.8f; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class MotionBlurModel : PostProcessingModel { [Serializable] public struct Settings { [Range(0f, 360f)] [Tooltip("The angle of rotary shutter. Larger values give longer exposure.")] public float shutterAngle; [Range(4f, 32f)] [Tooltip("The amount of sample points, which affects quality and performances.")] public int sampleCount; [Range(0f, 1f)] [Tooltip("The strength of multiple frame blending. The opacity of preceding frames are determined from this coefficient and time differences.")] public float frameBlending; public static Settings defaultSettings { get { Settings result = default(Settings); result.shutterAngle = 270f; result.sampleCount = 10; result.frameBlending = 0f; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class ScreenSpaceReflectionModel : PostProcessingModel { public enum SSRResolution { High = 0, Low = 2 } public enum SSRReflectionBlendType { PhysicallyBased, Additive } [Serializable] public struct IntensitySettings { [Tooltip("Nonphysical multiplier for the SSR reflections. 1.0 is physically based.")] [Range(0f, 2f)] public float reflectionMultiplier; [Tooltip("How far away from the maxDistance to begin fading SSR.")] [Range(0f, 1000f)] public float fadeDistance; [Tooltip("Amplify Fresnel fade out. Increase if floor reflections look good close to the surface and bad farther 'under' the floor.")] [Range(0f, 1f)] public float fresnelFade; [Tooltip("Higher values correspond to a faster Fresnel fade as the reflection changes from the grazing angle.")] [Range(0.1f, 10f)] public float fresnelFadePower; } [Serializable] public struct ReflectionSettings { [Tooltip("How the reflections are blended into the render.")] public SSRReflectionBlendType blendType; [Tooltip("Half resolution SSRR is much faster, but less accurate.")] public SSRResolution reflectionQuality; [Tooltip("Maximum reflection distance in world units.")] [Range(0.1f, 300f)] public float maxDistance; [Tooltip("Max raytracing length.")] [Range(16f, 1024f)] public int iterationCount; [Tooltip("Log base 2 of ray tracing coarse step size. Higher traces farther, lower gives better quality silhouettes.")] [Range(1f, 16f)] public int stepSize; [Tooltip("Typical thickness of columns, walls, furniture, and other objects that reflection rays might pass behind.")] [Range(0.01f, 10f)] public float widthModifier; [Tooltip("Blurriness of reflections.")] [Range(0.1f, 8f)] public float reflectionBlur; [Tooltip("Enable for a performance gain in scenes where most glossy objects are horizontal, like floors, water, and tables. Leave on for scenes with glossy vertical objects.")] public bool reflectBackfaces; } [Serializable] public struct ScreenEdgeMask { [Tooltip("Higher = fade out SSRR near the edge of the screen so that reflections don't pop under camera motion.")] [Range(0f, 1f)] public float intensity; } [Serializable] public struct Settings { public ReflectionSettings reflection; public IntensitySettings intensity; public ScreenEdgeMask screenEdgeMask; public static Settings defaultSettings { get { Settings result = default(Settings); result.reflection = new ReflectionSettings { blendType = SSRReflectionBlendType.PhysicallyBased, reflectionQuality = SSRResolution.Low, maxDistance = 100f, iterationCount = 256, stepSize = 3, widthModifier = 0.5f, reflectionBlur = 1f, reflectBackfaces = false }; result.intensity = new IntensitySettings { reflectionMultiplier = 1f, fadeDistance = 100f, fresnelFade = 1f, fresnelFadePower = 1f }; result.screenEdgeMask = new ScreenEdgeMask { intensity = 0.03f }; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class UserLutModel : PostProcessingModel { [Serializable] public struct Settings { [Tooltip("Custom lookup texture (strip format, e.g. 256x16).")] public Texture2D lut; [Range(0f, 1f)] [Tooltip("Blending factor.")] public float contribution; public static Settings defaultSettings { get { Settings result = default(Settings); result.lut = null; result.contribution = 1f; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [Serializable] public class VignetteModel : PostProcessingModel { public enum Mode { Classic, Masked } [Serializable] public struct Settings { [Tooltip("Use the \"Classic\" mode for parametric controls. Use \"Round\" to get a perfectly round vignette no matter what the aspect ratio is. Use the \"Masked\" mode to use your own texture mask.")] public Mode mode; [ColorUsage(false)] [Tooltip("Vignette color. Use the alpha channel for transparency.")] public Color color; [Tooltip("Sets the vignette center point (screen center is [0.5,0.5]).")] public Vector2 center; [Range(0f, 1f)] [Tooltip("Amount of vignetting on screen.")] public float intensity; [Range(0.01f, 1f)] [Tooltip("Smoothness of the vignette borders.")] public float smoothness; [Range(0f, 1f)] [Tooltip("Lower values will make a square-ish vignette.")] public float roundness; [Tooltip("A black and white mask to use as a vignette.")] public Texture mask; [Range(0f, 1f)] [Tooltip("Mask opacity.")] public float opacity; [Tooltip("Should the vignette be perfectly round or be dependent on the current aspect ratio?")] public bool rounded; public static Settings defaultSettings { get { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_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) Settings result = default(Settings); result.mode = Mode.Classic; result.color = new Color(0f, 0f, 0f, 1f); result.center = new Vector2(0.5f, 0.5f); result.intensity = 0.45f; result.smoothness = 0.2f; result.roundness = 1f; result.mask = null; result.opacity = 1f; result.rounded = false; return result; } } } [SerializeField] private Settings m_Settings = Settings.defaultSettings; public Settings settings { get { return m_Settings; } set { m_Settings = value; } } public override void Reset() { m_Settings = Settings.defaultSettings; } } [ImageEffectAllowedInSceneView] [RequireComponent(typeof(Camera))] [DisallowMultipleComponent] [ExecuteInEditMode] [AddComponentMenu("Effects/Post-Processing Behaviour", -1)] public class PostProcessingBehaviour : MonoBehaviour { public PostProcessingProfile profile; public Func jitteredMatrixFunc; private Dictionary> m_CommandBuffers; private List m_Components; private Dictionary m_ComponentStates; private MaterialFactory m_MaterialFactory; private RenderTextureFactory m_RenderTextureFactory; private PostProcessingContext m_Context; private Camera m_Camera; private PostProcessingProfile m_PreviousProfile; private bool m_RenderingInSceneView = false; private BuiltinDebugViewsComponent m_DebugViews; private AmbientOcclusionComponent m_AmbientOcclusion; private ScreenSpaceReflectionComponent m_ScreenSpaceReflection; private FogComponent m_FogComponent; private MotionBlurComponent m_MotionBlur; private TaaComponent m_Taa; private EyeAdaptationComponent m_EyeAdaptation; private DepthOfFieldComponent m_DepthOfField; private BloomComponent m_Bloom; private ChromaticAberrationComponent m_ChromaticAberration; private ColorGradingComponent m_ColorGrading; private UserLutComponent m_UserLut; private GrainComponent m_Grain; private VignetteComponent m_Vignette; private DitheringComponent m_Dithering; private FxaaComponent m_Fxaa; private List m_ComponentsToEnable = new List(); private List m_ComponentsToDisable = new List(); private void OnEnable() { m_CommandBuffers = new Dictionary>(); m_MaterialFactory = new MaterialFactory(); m_RenderTextureFactory = new RenderTextureFactory(); m_Context = new PostProcessingContext(); m_Components = new List(); m_DebugViews = AddComponent(new BuiltinDebugViewsComponent()); m_AmbientOcclusion = AddComponent(new AmbientOcclusionComponent()); m_ScreenSpaceReflection = AddComponent(new ScreenSpaceReflectionComponent()); m_FogComponent = AddComponent(new FogComponent()); m_MotionBlur = AddComponent(new MotionBlurComponent()); m_Taa = AddComponent(new TaaComponent()); m_EyeAdaptation = AddComponent(new EyeAdaptationComponent()); m_DepthOfField = AddComponent(new DepthOfFieldComponent()); m_Bloom = AddComponent(new BloomComponent()); m_ChromaticAberration = AddComponent(new ChromaticAberrationComponent()); m_ColorGrading = AddComponent(new ColorGradingComponent()); m_UserLut = AddComponent(new UserLutComponent()); m_Grain = AddComponent(new GrainComponent()); m_Vignette = AddComponent(new VignetteComponent()); m_Dithering = AddComponent(new DitheringComponent()); m_Fxaa = AddComponent(new FxaaComponent()); m_ComponentStates = new Dictionary(); foreach (PostProcessingComponentBase component in m_Components) { m_ComponentStates.Add(component, value: false); } ((MonoBehaviour)this).useGUILayout = false; } private void OnPreCull() { //IL_0211: 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_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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) m_Camera = ((Component)this).GetComponent(); if ((Object)(object)profile == (Object)null || (Object)(object)m_Camera == (Object)null) { return; } PostProcessingContext postProcessingContext = m_Context.Reset(); postProcessingContext.profile = profile; postProcessingContext.renderTextureFactory = m_RenderTextureFactory; postProcessingContext.materialFactory = m_MaterialFactory; postProcessingContext.camera = m_Camera; m_DebugViews.Init(postProcessingContext, profile.debugViews); m_AmbientOcclusion.Init(postProcessingContext, profile.ambientOcclusion); m_ScreenSpaceReflection.Init(postProcessingContext, profile.screenSpaceReflection); m_FogComponent.Init(postProcessingContext, profile.fog); m_MotionBlur.Init(postProcessingContext, profile.motionBlur); m_Taa.Init(postProcessingContext, profile.antialiasing); m_EyeAdaptation.Init(postProcessingContext, profile.eyeAdaptation); m_DepthOfField.Init(postProcessingContext, profile.depthOfField); m_Bloom.Init(postProcessingContext, profile.bloom); m_ChromaticAberration.Init(postProcessingContext, profile.chromaticAberration); m_ColorGrading.Init(postProcessingContext, profile.colorGrading); m_UserLut.Init(postProcessingContext, profile.userLut); m_Grain.Init(postProcessingContext, profile.grain); m_Vignette.Init(postProcessingContext, profile.vignette); m_Dithering.Init(postProcessingContext, profile.dithering); m_Fxaa.Init(postProcessingContext, profile.antialiasing); if ((Object)(object)m_PreviousProfile != (Object)(object)profile) { DisableComponents(); m_PreviousProfile = profile; } CheckObservers(); DepthTextureMode val = (DepthTextureMode)0; foreach (PostProcessingComponentBase component in m_Components) { if (component.active) { val |= component.GetCameraFlags(); } } postProcessingContext.camera.depthTextureMode = val; if (!m_RenderingInSceneView && m_Taa.active && !profile.debugViews.willInterrupt) { m_Taa.SetProjectionMatrix(jitteredMatrixFunc); } } private void OnPreRender() { if (!((Object)(object)profile == (Object)null)) { TryExecuteCommandBuffer(m_DebugViews); TryExecuteCommandBuffer(m_AmbientOcclusion); TryExecuteCommandBuffer(m_ScreenSpaceReflection); TryExecuteCommandBuffer(m_FogComponent); if (!m_RenderingInSceneView) { TryExecuteCommandBuffer(m_MotionBlur); } } } private void OnPostRender() { if (!((Object)(object)profile == (Object)null) && !((Object)(object)m_Camera == (Object)null) && !m_RenderingInSceneView && m_Taa.active && !profile.debugViews.willInterrupt) { m_Context.camera.ResetProjectionMatrix(); } } [ImageEffectTransformsToLDR] private void OnRenderImage(RenderTexture source, RenderTexture destination) { if ((Object)(object)profile == (Object)null || (Object)(object)m_Camera == (Object)null) { Graphics.Blit((Texture)(object)source, destination); return; } bool flag = false; bool active = m_Fxaa.active; bool flag2 = m_Taa.active && !m_RenderingInSceneView; bool flag3 = m_DepthOfField.active && !m_RenderingInSceneView; Material val = m_MaterialFactory.Get("Post FX/Uber Shader"); val.shaderKeywords = null; RenderTexture val2 = source; if (flag2) { RenderTexture val3 = m_RenderTextureFactory.Get(val2); m_Taa.Render(val2, val3); val2 = val3; } Texture val4 = (Texture)(object)GraphicsUtils.whiteTexture; if (m_EyeAdaptation.active) { flag = true; val4 = m_EyeAdaptation.Prepare(val2, val); } val.SetTexture("_AutoExposure", val4); if (flag3) { flag = true; m_DepthOfField.Prepare(val2, val, flag2); } if (m_Bloom.active) { flag = true; m_Bloom.Prepare(val2, val, val4); } flag |= TryPrepareUberImageEffect(m_ChromaticAberration, val); flag |= TryPrepareUberImageEffect(m_ColorGrading, val); flag |= TryPrepareUberImageEffect(m_Vignette, val); flag |= TryPrepareUberImageEffect(m_UserLut, val); Material val5 = ((!active) ? null : m_MaterialFactory.Get("Hidden/Post FX/FXAA")); if (active) { val5.shaderKeywords = null; TryPrepareUberImageEffect(m_Grain, val5); TryPrepareUberImageEffect(m_Dithering, val5); if (flag) { RenderTexture val6 = m_RenderTextureFactory.Get(val2); Graphics.Blit((Texture)(object)val2, val6, val, 0); val2 = val6; } m_Fxaa.Render(val2, destination); } else { flag |= TryPrepareUberImageEffect(m_Grain, val); flag |= TryPrepareUberImageEffect(m_Dithering, val); if (flag) { if (!GraphicsUtils.isLinearColorSpace) { val.EnableKeyword("UNITY_COLORSPACE_GAMMA"); } Graphics.Blit((Texture)(object)val2, destination, val, 0); } } if (!flag && !active) { Graphics.Blit((Texture)(object)val2, destination); } m_RenderTextureFactory.ReleaseAll(); } private void OnGUI() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)Event.current.type == 7 && !((Object)(object)profile == (Object)null) && !((Object)(object)m_Camera == (Object)null)) { if (m_EyeAdaptation.active && profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.EyeAdaptation)) { m_EyeAdaptation.OnGUI(); } else if (m_ColorGrading.active && profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.LogLut)) { m_ColorGrading.OnGUI(); } else if (m_UserLut.active && profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.UserLut)) { m_UserLut.OnGUI(); } } } private void OnDisable() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair value in m_CommandBuffers.Values) { m_Camera.RemoveCommandBuffer(value.Key, value.Value); value.Value.Dispose(); } m_CommandBuffers.Clear(); if ((Object)(object)profile != (Object)null) { DisableComponents(); } m_Components.Clear(); if ((Object)(object)m_Camera != (Object)null) { m_Camera.depthTextureMode = (DepthTextureMode)0; } m_MaterialFactory.Dispose(); m_RenderTextureFactory.Dispose(); GraphicsUtils.Dispose(); } public void ResetTemporalEffects() { m_Taa.ResetHistory(); m_MotionBlur.ResetHistory(); m_EyeAdaptation.ResetHistory(); } private void CheckObservers() { foreach (KeyValuePair componentState in m_ComponentStates) { PostProcessingComponentBase key = componentState.Key; bool enabled = key.GetModel().enabled; if (enabled != componentState.Value) { if (enabled) { m_ComponentsToEnable.Add(key); } else { m_ComponentsToDisable.Add(key); } } } for (int i = 0; i < m_ComponentsToDisable.Count; i++) { PostProcessingComponentBase postProcessingComponentBase = m_ComponentsToDisable[i]; m_ComponentStates[postProcessingComponentBase] = false; postProcessingComponentBase.OnDisable(); } for (int j = 0; j < m_ComponentsToEnable.Count; j++) { PostProcessingComponentBase postProcessingComponentBase2 = m_ComponentsToEnable[j]; m_ComponentStates[postProcessingComponentBase2] = true; postProcessingComponentBase2.OnEnable(); } m_ComponentsToDisable.Clear(); m_ComponentsToEnable.Clear(); } private void DisableComponents() { foreach (PostProcessingComponentBase component in m_Components) { PostProcessingModel model = component.GetModel(); if (model != null && model.enabled) { component.OnDisable(); } } } private CommandBuffer AddCommandBuffer(CameraEvent evt, string name) where T : PostProcessingModel { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0012: 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) CommandBuffer val = new CommandBuffer(); val.name = name; CommandBuffer value = val; KeyValuePair value2 = new KeyValuePair(evt, value); m_CommandBuffers.Add(typeof(T), value2); m_Camera.AddCommandBuffer(evt, value2.Value); return value2.Value; } private void RemoveCommandBuffer() where T : PostProcessingModel { //IL_002c: Unknown result type (might be due to invalid IL or missing references) Type typeFromHandle = typeof(T); if (m_CommandBuffers.TryGetValue(typeFromHandle, out var value)) { m_Camera.RemoveCommandBuffer(value.Key, value.Value); m_CommandBuffers.Remove(typeFromHandle); value.Value.Dispose(); } } private CommandBuffer GetCommandBuffer(CameraEvent evt, string name) where T : PostProcessingModel { //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_001f: 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) if (!m_CommandBuffers.TryGetValue(typeof(T), out var value)) { return AddCommandBuffer(evt, name); } if (value.Key != evt) { RemoveCommandBuffer(); return AddCommandBuffer(evt, name); } return value.Value; } private void TryExecuteCommandBuffer(PostProcessingComponentCommandBuffer component) where T : PostProcessingModel { //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (component.active) { CommandBuffer commandBuffer = GetCommandBuffer(component.GetCameraEvent(), component.GetName()); commandBuffer.Clear(); component.PopulateCommandBuffer(commandBuffer); } else { RemoveCommandBuffer(); } } private bool TryPrepareUberImageEffect(PostProcessingComponentRenderTexture component, Material material) where T : PostProcessingModel { if (!component.active) { return false; } component.Prepare(material); return true; } private T AddComponent(T component) where T : PostProcessingComponentBase { m_Components.Add(component); return component; } } public abstract class PostProcessingComponentBase { public PostProcessingContext context; public abstract bool active { get; } public virtual DepthTextureMode GetCameraFlags() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return (DepthTextureMode)0; } public virtual void OnEnable() { } public virtual void OnDisable() { } public abstract PostProcessingModel GetModel(); } public abstract class PostProcessingComponent : PostProcessingComponentBase where T : PostProcessingModel { public T model { get; internal set; } public virtual void Init(PostProcessingContext pcontext, T pmodel) { context = pcontext; model = pmodel; } public override PostProcessingModel GetModel() { return model; } } public abstract class PostProcessingComponentCommandBuffer : PostProcessingComponent where T : PostProcessingModel { public abstract CameraEvent GetCameraEvent(); public abstract string GetName(); public abstract void PopulateCommandBuffer(CommandBuffer cb); } public abstract class PostProcessingComponentRenderTexture : PostProcessingComponent where T : PostProcessingModel { public virtual void Prepare(Material material) { } } public class PostProcessingContext { public PostProcessingProfile profile; public Camera camera; public MaterialFactory materialFactory; public RenderTextureFactory renderTextureFactory; public bool interrupted { get; private set; } public bool isGBufferAvailable => (int)camera.actualRenderingPath == 3; public bool isHdr => camera.allowHDR; public int width => camera.pixelWidth; public int height => camera.pixelHeight; public Rect viewport => camera.rect; public void Interrupt() { interrupted = true; } public PostProcessingContext Reset() { profile = null; camera = null; materialFactory = null; renderTextureFactory = null; interrupted = false; return this; } } [Serializable] public abstract class PostProcessingModel { [SerializeField] [GetSet("enabled")] private bool m_Enabled; public bool enabled { get { return m_Enabled; } set { m_Enabled = value; if (value) { OnValidate(); } } } public abstract void Reset(); public virtual void OnValidate() { } } public class PostProcessingProfile : ScriptableObject { [Serializable] public class MonitorSettings { public enum HistogramMode { Red, Green, Blue, Luminance, RGBMerged, RGBSplit } public Action onFrameEndEditorOnly; public int currentMonitorID = 0; public bool refreshOnPlay = false; public HistogramMode histogramMode = HistogramMode.Luminance; public float waveformExposure = 0.12f; public bool waveformY = false; public bool waveformR = true; public bool waveformG = true; public bool waveformB = true; public float paradeExposure = 0.12f; public float vectorscopeExposure = 0.12f; public bool vectorscopeShowBackground = true; } public BuiltinDebugViewsModel debugViews = new BuiltinDebugViewsModel(); public FogModel fog = new FogModel(); public AntialiasingModel antialiasing = new AntialiasingModel(); public AmbientOcclusionModel ambientOcclusion = new AmbientOcclusionModel(); public ScreenSpaceReflectionModel screenSpaceReflection = new ScreenSpaceReflectionModel(); public DepthOfFieldModel depthOfField = new DepthOfFieldModel(); public MotionBlurModel motionBlur = new MotionBlurModel(); public EyeAdaptationModel eyeAdaptation = new EyeAdaptationModel(); public BloomModel bloom = new BloomModel(); public ColorGradingModel colorGrading = new ColorGradingModel(); public UserLutModel userLut = new UserLutModel(); public ChromaticAberrationModel chromaticAberration = new ChromaticAberrationModel(); public GrainModel grain = new GrainModel(); public VignetteModel vignette = new VignetteModel(); public DitheringModel dithering = new DitheringModel(); public MonitorSettings monitors = new MonitorSettings(); internal static T CreateInstance(string v) { throw new NotImplementedException(); } } [Serializable] public sealed class ColorGradingCurve { public AnimationCurve curve; [SerializeField] private bool m_Loop; [SerializeField] private float m_ZeroValue; [SerializeField] private float m_Range; private AnimationCurve m_InternalLoopingCurve; public ColorGradingCurve(AnimationCurve curve, float zeroValue, bool loop, Vector2 bounds) { this.curve = curve; m_ZeroValue = zeroValue; m_Loop = loop; m_Range = ((Vector2)(ref bounds)).magnitude; } public void Cache() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown if (!m_Loop) { return; } int length = curve.length; if (length >= 2) { if (m_InternalLoopingCurve == null) { m_InternalLoopingCurve = new AnimationCurve(); } Keyframe val = curve[length - 1]; ((Keyframe)(ref val)).time = ((Keyframe)(ref val)).time - m_Range; Keyframe val2 = curve[0]; ((Keyframe)(ref val2)).time = ((Keyframe)(ref val2)).time + m_Range; m_InternalLoopingCurve.keys = curve.keys; m_InternalLoopingCurve.AddKey(val); m_InternalLoopingCurve.AddKey(val2); } } public float Evaluate(float t) { if (curve.length == 0) { return m_ZeroValue; } if (!m_Loop || curve.length == 1) { return curve.Evaluate(t); } return m_InternalLoopingCurve.Evaluate(t); } } public static class GraphicsUtils { private static Texture2D s_WhiteTexture; private static Mesh s_Quad; public static bool isLinearColorSpace => (int)QualitySettings.activeColorSpace == 1; public static bool supportsDX11 => SystemInfo.graphicsShaderLevel >= 50 && SystemInfo.supportsComputeShaders; public static Texture2D whiteTexture { get { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)s_WhiteTexture != (Object)null) { return s_WhiteTexture; } s_WhiteTexture = new Texture2D(1, 1, (TextureFormat)5, false); s_WhiteTexture.SetPixel(0, 0, new Color(1f, 1f, 1f, 1f)); s_WhiteTexture.Apply(); return s_WhiteTexture; } } public static Mesh quad { get { //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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown if ((Object)(object)s_Quad != (Object)null) { return s_Quad; } Vector3[] vertices = (Vector3[])(object)new Vector3[4] { new Vector3(-1f, -1f, 0f), new Vector3(1f, 1f, 0f), new Vector3(1f, -1f, 0f), new Vector3(-1f, 1f, 0f) }; Vector2[] uv = (Vector2[])(object)new Vector2[4] { new Vector2(0f, 0f), new Vector2(1f, 1f), new Vector2(1f, 0f), new Vector2(0f, 1f) }; int[] triangles = new int[6] { 0, 1, 2, 1, 0, 3 }; Mesh val = new Mesh(); val.vertices = vertices; val.uv = uv; val.triangles = triangles; s_Quad = val; s_Quad.RecalculateNormals(); s_Quad.RecalculateBounds(); return s_Quad; } } public static void Blit(Material material, int pass) { GL.PushMatrix(); GL.LoadOrtho(); material.SetPass(pass); GL.Begin(5); GL.TexCoord2(0f, 0f); GL.Vertex3(0f, 0f, 0.1f); GL.TexCoord2(1f, 0f); GL.Vertex3(1f, 0f, 0.1f); GL.TexCoord2(0f, 1f); GL.Vertex3(0f, 1f, 0.1f); GL.TexCoord2(1f, 1f); GL.Vertex3(1f, 1f, 0.1f); GL.End(); GL.PopMatrix(); } public static void ClearAndBlit(Texture source, RenderTexture destination, Material material, int pass, bool clearColor = true, bool clearDepth = false) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) RenderTexture active = RenderTexture.active; RenderTexture.active = destination; GL.Clear(false, clearColor, Color.clear); GL.PushMatrix(); GL.LoadOrtho(); material.SetTexture("_MainTex", source); material.SetPass(pass); GL.Begin(5); GL.TexCoord2(0f, 0f); GL.Vertex3(0f, 0f, 0.1f); GL.TexCoord2(1f, 0f); GL.Vertex3(1f, 0f, 0.1f); GL.TexCoord2(0f, 1f); GL.Vertex3(0f, 1f, 0.1f); GL.TexCoord2(1f, 1f); GL.Vertex3(1f, 1f, 0.1f); GL.End(); GL.PopMatrix(); RenderTexture.active = active; } public static void Destroy(Object obj) { if (obj != (Object)null) { if (Application.isPlaying) { Object.Destroy(obj); } else { Object.DestroyImmediate(obj); } } } public static void Dispose() { Destroy((Object)(object)s_Quad); } } public sealed class MaterialFactory : IDisposable { private Dictionary m_Materials; public MaterialFactory() { m_Materials = new Dictionary(); } public Material Get(string shaderName) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown if (!m_Materials.TryGetValue(shaderName, out var value)) { Shader val = Shader.Find(shaderName); if ((Object)(object)val == (Object)null) { throw new ArgumentException($"Shader not found ({shaderName})"); } Material val2 = new Material(val); ((Object)val2).name = string.Format("PostFX - {0}", shaderName.Substring(shaderName.LastIndexOf("/") + 1)); ((Object)val2).hideFlags = (HideFlags)52; value = val2; m_Materials.Add(shaderName, value); } return value; } public void Dispose() { Dictionary.Enumerator enumerator = m_Materials.GetEnumerator(); while (enumerator.MoveNext()) { Material value = enumerator.Current.Value; GraphicsUtils.Destroy((Object)(object)value); } m_Materials.Clear(); } } public sealed class RenderTextureFactory : IDisposable { private HashSet m_TemporaryRTs; public RenderTextureFactory() { m_TemporaryRTs = new HashSet(); } public RenderTexture Get(RenderTexture baseRenderTexture) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) return Get(((Texture)baseRenderTexture).width, ((Texture)baseRenderTexture).height, baseRenderTexture.depth, baseRenderTexture.format, (RenderTextureReadWrite)((!baseRenderTexture.sRGB) ? 1 : 2), ((Texture)baseRenderTexture).filterMode, ((Texture)baseRenderTexture).wrapMode); } public RenderTexture Get(int width, int height, int depthBuffer = 0, RenderTextureFormat format = 2, RenderTextureReadWrite rw = 0, FilterMode filterMode = 1, TextureWrapMode wrapMode = 1, string name = "FactoryTempTexture") { //IL_0004: 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_0015: Unknown result type (might be due to invalid IL or missing references) RenderTexture temporary = RenderTexture.GetTemporary(width, height, depthBuffer, format); ((Texture)temporary).filterMode = filterMode; ((Texture)temporary).wrapMode = wrapMode; ((Object)temporary).name = name; m_TemporaryRTs.Add(temporary); return temporary; } public void Release(RenderTexture rt) { if (!((Object)(object)rt == (Object)null)) { if (!m_TemporaryRTs.Contains(rt)) { throw new ArgumentException($"Attempting to remove a RenderTexture that was not allocated: {rt}"); } m_TemporaryRTs.Remove(rt); RenderTexture.ReleaseTemporary(rt); } } public void ReleaseAll() { HashSet.Enumerator enumerator = m_TemporaryRTs.GetEnumerator(); while (enumerator.MoveNext()) { RenderTexture.ReleaseTemporary(enumerator.Current); } m_TemporaryRTs.Clear(); } public void Dispose() { ReleaseAll(); } } } public class ExampleWheelController : MonoBehaviour { private static class Uniforms { internal static readonly int _MotionAmount = Shader.PropertyToID("_MotionAmount"); } public float acceleration; public Renderer motionVectorRenderer; private Rigidbody m_Rigidbody; private void Start() { m_Rigidbody = ((Component)this).GetComponent(); m_Rigidbody.maxAngularVelocity = 100f; } private void Update() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKey((KeyCode)273)) { m_Rigidbody.AddRelativeTorque(new Vector3(-1f * acceleration, 0f, 0f), (ForceMode)5); } else if (Input.GetKey((KeyCode)274)) { m_Rigidbody.AddRelativeTorque(new Vector3(1f * acceleration, 0f, 0f), (ForceMode)5); } float num = (0f - m_Rigidbody.angularVelocity.x) / 100f; if (Object.op_Implicit((Object)(object)motionVectorRenderer)) { motionVectorRenderer.material.SetFloat(Uniforms._MotionAmount, Mathf.Clamp(num, -0.25f, 0.25f)); } } } namespace UnityEngine.PostProcessing.Utilities { [RequireComponent(typeof(PostProcessingController))] public class FocusPuller : MonoBehaviour { [SerializeField] private Transform _target; [SerializeField] private float _offset = 0f; [SerializeField] private float _speed = 10f; private PostProcessingController _controller; private float _velocity; public Transform target { get { return _target; } set { _target = value; } } public float offset { get { return _offset; } set { _offset = value; } } public float speed { get { return _speed; } set { _speed = Mathf.Max(0.01f, value); } } private void Start() { _controller = ((Component)this).GetComponent(); } private void OnValidate() { speed = _speed; } private void Update() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_target == (Object)null)) { float focusDistance = _controller.depthOfField.focusDistance; float num = Vector3.Dot(_target.position - ((Component)this).transform.position, ((Component)this).transform.forward); float deltaTime = Time.deltaTime; float num2 = _velocity - (focusDistance - num) * speed * speed * deltaTime; float num3 = 1f + speed * deltaTime; _velocity = num2 / (num3 * num3); float focusDistance2 = focusDistance + _velocity * deltaTime; _controller.depthOfField.focusDistance = focusDistance2; } } } [RequireComponent(typeof(PostProcessingBehaviour))] public class PostProcessingController : MonoBehaviour { public bool controlAntialiasing; public bool enableAntialiasing; public AntialiasingModel.Settings antialiasing; public bool controlAmbientOcclusion; public bool enableAmbientOcclusion; public AmbientOcclusionModel.Settings ambientOcclusion; public bool controlScreenSpaceReflection; public bool enableScreenSpaceReflection; public ScreenSpaceReflectionModel.Settings screenSpaceReflection; public bool controlDepthOfField = true; public bool enableDepthOfField; public DepthOfFieldModel.Settings depthOfField; public bool controlMotionBlur; public bool enableMotionBlur; public MotionBlurModel.Settings motionBlur; public bool controlEyeAdaptation; public bool enableEyeAdaptation; public EyeAdaptationModel.Settings eyeAdaptation; public bool controlBloom; public bool enableBloom; public BloomModel.Settings bloom; public bool controlColorGrading; public bool enableColorGrading; public ColorGradingModel.Settings colorGrading; public bool controlUserLut; public bool enableUserLut; public UserLutModel.Settings userLut; public bool controlChromaticAberration; public bool enableChromaticAberration; public ChromaticAberrationModel.Settings chromaticAberration; public bool controlGrain; public bool enableGrain; public GrainModel.Settings grain; public bool controlVignette; public bool enableVignette; public VignetteModel.Settings vignette; private PostProcessingProfile _profile; private void Start() { PostProcessingBehaviour component = ((Component)this).GetComponent(); _profile = Object.Instantiate(component.profile); component.profile = _profile; enableAntialiasing = _profile.antialiasing.enabled; antialiasing = _profile.antialiasing.settings; enableAmbientOcclusion = _profile.ambientOcclusion.enabled; ambientOcclusion = _profile.ambientOcclusion.settings; enableScreenSpaceReflection = _profile.screenSpaceReflection.enabled; screenSpaceReflection = _profile.screenSpaceReflection.settings; enableDepthOfField = _profile.depthOfField.enabled; depthOfField = _profile.depthOfField.settings; enableMotionBlur = _profile.motionBlur.enabled; motionBlur = _profile.motionBlur.settings; enableEyeAdaptation = _profile.eyeAdaptation.enabled; eyeAdaptation = _profile.eyeAdaptation.settings; enableBloom = _profile.bloom.enabled; bloom = _profile.bloom.settings; enableColorGrading = _profile.colorGrading.enabled; colorGrading = _profile.colorGrading.settings; enableUserLut = _profile.userLut.enabled; userLut = _profile.userLut.settings; enableChromaticAberration = _profile.chromaticAberration.enabled; chromaticAberration = _profile.chromaticAberration.settings; enableGrain = _profile.grain.enabled; grain = _profile.grain.settings; enableVignette = _profile.vignette.enabled; vignette = _profile.vignette.settings; } private void Update() { if (controlAntialiasing) { if (enableAntialiasing != _profile.antialiasing.enabled) { _profile.antialiasing.enabled = enableAntialiasing; } if (enableAntialiasing) { _profile.antialiasing.settings = antialiasing; } } if (controlAmbientOcclusion) { if (enableAmbientOcclusion != _profile.ambientOcclusion.enabled) { _profile.ambientOcclusion.enabled = enableAmbientOcclusion; } if (enableAmbientOcclusion) { _profile.ambientOcclusion.settings = ambientOcclusion; } } if (controlScreenSpaceReflection) { if (enableScreenSpaceReflection != _profile.screenSpaceReflection.enabled) { _profile.screenSpaceReflection.enabled = enableScreenSpaceReflection; } if (enableScreenSpaceReflection) { _profile.screenSpaceReflection.settings = screenSpaceReflection; } } if (controlDepthOfField) { if (enableDepthOfField != _profile.depthOfField.enabled) { _profile.depthOfField.enabled = enableDepthOfField; } if (enableDepthOfField) { _profile.depthOfField.settings = depthOfField; } } if (controlMotionBlur) { if (enableMotionBlur != _profile.motionBlur.enabled) { _profile.motionBlur.enabled = enableMotionBlur; } if (enableMotionBlur) { _profile.motionBlur.settings = motionBlur; } } if (controlEyeAdaptation) { if (enableEyeAdaptation != _profile.eyeAdaptation.enabled) { _profile.eyeAdaptation.enabled = enableEyeAdaptation; } if (enableEyeAdaptation) { _profile.eyeAdaptation.settings = eyeAdaptation; } } if (controlBloom) { if (enableBloom != _profile.bloom.enabled) { _profile.bloom.enabled = enableBloom; } if (enableBloom) { _profile.bloom.settings = bloom; } } if (controlColorGrading) { if (enableColorGrading != _profile.colorGrading.enabled) { _profile.colorGrading.enabled = enableColorGrading; } if (enableColorGrading) { _profile.colorGrading.settings = colorGrading; } } if (controlUserLut) { if (enableUserLut != _profile.userLut.enabled) { _profile.userLut.enabled = enableUserLut; } if (enableUserLut) { _profile.userLut.settings = userLut; } } if (controlChromaticAberration) { if (enableChromaticAberration != _profile.chromaticAberration.enabled) { _profile.chromaticAberration.enabled = enableChromaticAberration; } if (enableChromaticAberration) { _profile.chromaticAberration.settings = chromaticAberration; } } if (controlGrain) { if (enableGrain != _profile.grain.enabled) { _profile.grain.enabled = enableGrain; } if (enableGrain) { _profile.grain.settings = grain; } } if (controlVignette) { if (enableVignette != _profile.vignette.enabled) { _profile.vignette.enabled = enableVignette; } if (enableVignette) { _profile.vignette.settings = vignette; } } } } } namespace JerryComponent { public class MagRotate : MonoBehaviour { public GameObject rot; public FVRFireArm gun; public MagFold fold; private void Awake() { } private void Start() { } private void Update() { //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)gun.Magazine)) { if ((Object)(object)((FVRInteractiveObject)gun).m_hand != (Object)null) { if (((FVRInteractiveObject)gun).m_hand.OtherHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { if (!((Object)(object)((FVRInteractiveObject)gun).m_hand.OtherHand.CurrentInteractable != (Object)null)) { ((FVRInteractiveObject)gun).m_hand.OtherHand.ForceSetInteractable((FVRInteractiveObject)(object)fold); ((FVRInteractiveObject)fold).BeginInteraction(((FVRInteractiveObject)gun).m_hand.OtherHand); } } else if (!((FVRInteractiveObject)gun).m_hand.OtherHand.Input.IsGrabbing && rot.transform.localEulerAngles.y < 30f) { gun.EjectMag(false); } else if (rot.transform.localEulerAngles.y >= 30f && (Object)(object)((FVRInteractiveObject)gun).m_hand.OtherHand.m_currentInteractable == (Object)(object)fold) { fold.MinRot = 30f; fold.MaxRot = 30f; } } else if ((Object)(object)((FVRInteractiveObject)gun).m_hand == (Object)null && rot.transform.localEulerAngles.y < 30f) { gun.EjectMag(false); } } else if (!Object.op_Implicit((Object)(object)gun.Magazine)) { fold.MinRot = 0f; fold.MaxRot = 30f; rot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } public class PicRailTrain : MonoBehaviour { public FVRFireArmAttachment thisAttachment; public bool amOnRail = false; public AudioEvent click; public bool clicked = false; public GameObject levelbubblething; public GameObject rear; public GameObject fore; public GameObject rearholder; public GameObject foreholder; public AudioSource running; public ParticleSystem smoke; public Animator ani; private void Start() { } private void Update() { //IL_0153: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08dd: Unknown result type (might be due to invalid IL or missing references) //IL_0901: Unknown result type (might be due to invalid IL or missing references) //IL_0925: 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_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: 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_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d0: 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_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_080c: Unknown result type (might be due to invalid IL or missing references) //IL_0825: Unknown result type (might be due to invalid IL or missing references) //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_0720: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: 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_0748: Unknown result type (might be due to invalid IL or missing references) //IL_074d: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ani == (Object)null) { } if ((Object)(object)thisAttachment.curMount != (Object)null) { if (!amOnRail) { ((Component)thisAttachment).gameObject.transform.SetParent(((Component)thisAttachment.curMount).gameObject.transform); rear.transform.SetParent(((Component)thisAttachment.curMount).gameObject.transform); fore.transform.SetParent(((Component)thisAttachment.curMount).gameObject.transform); amOnRail = true; } } else if ((Object)(object)thisAttachment.curMount == (Object)null && amOnRail) { ((Component)thisAttachment).gameObject.transform.SetParent((Transform)null); rear.transform.SetParent(rearholder.transform); fore.transform.SetParent(foreholder.transform); amOnRail = false; } if (amOnRail) { rear.transform.position = rearholder.transform.position; rear.transform.eulerAngles = rearholder.transform.eulerAngles; fore.transform.position = foreholder.transform.position; fore.transform.eulerAngles = foreholder.transform.eulerAngles; if (levelbubblething.transform.localEulerAngles.x < 42.5f || levelbubblething.transform.localEulerAngles.x > 47.5f) { ((Component)thisAttachment).gameObject.transform.localPosition = new Vector3(0f, 0f, ((Component)thisAttachment).gameObject.transform.localPosition.z + 0.01f * (Time.deltaTime * (levelbubblething.transform.localEulerAngles.x - 45f))); } if (rear.transform.localPosition.z < thisAttachment.curMount.Point_Rear.localPosition.z && fore.transform.localPosition.z < thisAttachment.curMount.Point_Front.localPosition.z) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)thisAttachment).gameObject.transform.position); clicked = true; } ((Component)thisAttachment).gameObject.transform.localPosition = new Vector3(0f, 0f, thisAttachment.curMount.Point_Rear.localPosition.z + (((Component)thisAttachment).gameObject.transform.localPosition.z - rear.transform.localPosition.z)); } else if (fore.transform.localPosition.z > thisAttachment.curMount.Point_Front.localPosition.z && rear.transform.localPosition.z > thisAttachment.curMount.Point_Rear.localPosition.z) { if (!clicked) { SM.PlayCoreSound((FVRPooledAudioType)41, click, ((Component)thisAttachment).gameObject.transform.position); clicked = true; } ((Component)thisAttachment).gameObject.transform.localPosition = new Vector3(0f, 0f, thisAttachment.curMount.Point_Front.localPosition.z + (((Component)thisAttachment).gameObject.transform.localPosition.z - fore.transform.localPosition.z)); } else if (rear.transform.localPosition.z > thisAttachment.curMount.Point_Rear.localPosition.z && fore.transform.localPosition.z < thisAttachment.curMount.Point_Front.localPosition.z) { clicked = false; if ((double)levelbubblething.transform.localEulerAngles.x < 42.5) { smoke.Play(); running.pitch = 0.11f * (45f - levelbubblething.transform.localEulerAngles.x); running.volume = 0.022f * (45f - levelbubblething.transform.localEulerAngles.x); if ((Object)(object)ani != (Object)null) { ani.SetFloat("Runn", 0.22f * (levelbubblething.transform.localEulerAngles.x - 45f)); } } else if ((double)levelbubblething.transform.localEulerAngles.x > 47.5) { smoke.Play(); running.pitch = 0.11f * (levelbubblething.transform.localEulerAngles.x - 45f); running.volume = 0.022f * (levelbubblething.transform.localEulerAngles.x - 45f); if ((Object)(object)ani != (Object)null) { ani.SetFloat("Runn", 0.22f * (levelbubblething.transform.localEulerAngles.x - 45f)); } } else if ((double)levelbubblething.transform.localEulerAngles.x > 42.5 && (double)levelbubblething.transform.localEulerAngles.x < 47.5) { smoke.Stop(); running.pitch = 0f; running.volume = 0f; if ((Object)(object)ani != (Object)null) { ani.SetFloat("Runn", 0f); } } } else if (rear.transform.localPosition.z < thisAttachment.curMount.Point_Rear.localPosition.z && fore.transform.localPosition.z > thisAttachment.curMount.Point_Front.localPosition.z) { smoke.Stop(); running.pitch = 0f; running.volume = 0f; if ((Object)(object)ani != (Object)null) { ani.SetFloat("Runn", 0f); } } } else if (!amOnRail) { rear.transform.localPosition = new Vector3(0f, 0f, 0f); rear.transform.localEulerAngles = new Vector3(0f, 0f, 0f); fore.transform.localPosition = new Vector3(0f, 0f, 0f); fore.transform.localEulerAngles = new Vector3(0f, 0f, 0f); running.pitch = 0f; running.volume = 0f; smoke.Stop(); if ((Object)(object)ani != (Object)null) { ani.SetFloat("Runn", 0f); } } if (running.pitch < 0f) { running.pitch = 0f; } else if (running.pitch > 1f) { running.pitch = 1f; } } } } public class FaceUpdate : MonoBehaviour { public AnimationClip[] animations; private Animator anim; public float delayWeight; private float current = 0f; private void Start() { anim = ((Component)this).GetComponent(); } private void Update() { if (Input.GetMouseButton(0)) { current = 1f; } else { current = Mathf.Lerp(current, 0f, delayWeight); } anim.SetLayerWeight(1, current); } } [RequireComponent(typeof(Animator))] public class IdleChanger : MonoBehaviour { private Animator anim; private AnimatorStateInfo currentState; private AnimatorStateInfo previousState; public bool _random = false; public float _threshold = 0.5f; public float _interval = 2f; private void Start() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) anim = ((Component)this).GetComponent(); currentState = anim.GetCurrentAnimatorStateInfo(0); previousState = currentState; ((MonoBehaviour)this).StartCoroutine("RandomChange"); } private void Update() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown("up") || Input.GetButton("Jump")) { anim.SetBool("Next", true); } if (Input.GetKeyDown("down")) { anim.SetBool("Back", true); } if (anim.GetBool("Next")) { currentState = anim.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref previousState)).nameHash != ((AnimatorStateInfo)(ref currentState)).nameHash) { anim.SetBool("Next", false); previousState = currentState; } } if (anim.GetBool("Back")) { currentState = anim.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref previousState)).nameHash != ((AnimatorStateInfo)(ref currentState)).nameHash) { anim.SetBool("Back", false); previousState = currentState; } } } private void OnGUI() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) GUI.Box(new Rect((float)(Screen.width - 110), 10f, 100f, 90f), "Change Motion"); if (GUI.Button(new Rect((float)(Screen.width - 100), 40f, 80f, 20f), "Next")) { anim.SetBool("Next", true); } if (GUI.Button(new Rect((float)(Screen.width - 100), 70f, 80f, 20f), "Back")) { anim.SetBool("Back", true); } } private IEnumerator RandomChange() { while (true) { if (_random) { float num = Random.Range(-1f, 1f); if (num <= 0f - _threshold) { anim.SetBool("Back", true); } else if (num >= _threshold) { anim.SetBool("Next", true); } } yield return (object)new WaitForSeconds(_interval); } } } public class SceneLoader : MonoBehaviour { private void OnGUI() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) GUI.Box(new Rect(10f, (float)(Screen.height - 100), 100f, 90f), "Change Scene"); if (GUI.Button(new Rect(20f, (float)(Screen.height - 70), 80f, 20f), "Next")) { LoadNextScene(); } if (GUI.Button(new Rect(20f, (float)(Screen.height - 40), 80f, 20f), "Back")) { LoadPreScene(); } } private void LoadPreScene() { int num = Application.loadedLevel + 1; if (num <= 1) { num = Application.levelCount; } Application.LoadLevel(num); } private void LoadNextScene() { int num = Application.loadedLevel + 1; if (num >= Application.levelCount) { num = 1; } Application.LoadLevel(num); } } public class ThirdPersonCamera : MonoBehaviour { public float smooth = 3f; private Transform standardPos; private Transform frontPos; private Transform jumpPos; private bool bQuickSwitch = false; private void Start() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) standardPos = GameObject.Find("CamPos").transform; if (Object.op_Implicit((Object)(object)GameObject.Find("FrontPos"))) { frontPos = GameObject.Find("FrontPos").transform; } if (Object.op_Implicit((Object)(object)GameObject.Find("JumpPos"))) { jumpPos = GameObject.Find("JumpPos").transform; } ((Component)this).transform.position = standardPos.position; ((Component)this).transform.forward = standardPos.forward; } private void FixedUpdate() { if (Input.GetButton("Fire1")) { setCameraPositionFrontView(); } else if (Input.GetButton("Fire2")) { setCameraPositionJumpView(); } else { setCameraPositionNormalView(); } } private void setCameraPositionNormalView() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (!bQuickSwitch) { ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, standardPos.position, Time.fixedDeltaTime * smooth); ((Component)this).transform.forward = Vector3.Lerp(((Component)this).transform.forward, standardPos.forward, Time.fixedDeltaTime * smooth); } else { ((Component)this).transform.position = standardPos.position; ((Component)this).transform.forward = standardPos.forward; bQuickSwitch = false; } } private void setCameraPositionFrontView() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) bQuickSwitch = true; ((Component)this).transform.position = frontPos.position; ((Component)this).transform.forward = frontPos.forward; } private void setCameraPositionJumpView() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) bQuickSwitch = false; ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, jumpPos.position, Time.fixedDeltaTime * smooth); ((Component)this).transform.forward = Vector3.Lerp(((Component)this).transform.forward, jumpPos.forward, Time.fixedDeltaTime * smooth); } } [RequireComponent(typeof(Animator))] [RequireComponent(typeof(CapsuleCollider))] [RequireComponent(typeof(Rigidbody))] public class UnityChanControlScriptWithRgidBody : MonoBehaviour { public float animSpeed = 1.5f; public float lookSmoother = 3f; public bool useCurves = true; public float useCurvesHeight = 0.5f; public float forwardSpeed = 7f; public float backwardSpeed = 2f; public float rotateSpeed = 2f; public float jumpPower = 3f; private CapsuleCollider col; private Rigidbody rb; private Vector3 velocity; private float orgColHight; private Vector3 orgVectColCenter; private Animator anim; private AnimatorStateInfo currentBaseState; private GameObject cameraObject; private static int idleState = Animator.StringToHash("Base Layer.Idle"); private static int locoState = Animator.StringToHash("Base Layer.Locomotion"); private static int jumpState = Animator.StringToHash("Base Layer.Jump"); private static int restState = Animator.StringToHash("Base Layer.Rest"); private void Start() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) anim = ((Component)this).GetComponent(); col = ((Component)this).GetComponent(); rb = ((Component)this).GetComponent(); cameraObject = GameObject.FindWithTag("MainCamera"); orgColHight = col.height; orgVectColCenter = col.center; } private void FixedUpdate() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) float axis = Input.GetAxis("Horizontal"); float axis2 = Input.GetAxis("Vertical"); anim.SetFloat("Speed", axis2); anim.SetFloat("Direction", axis); anim.speed = animSpeed; currentBaseState = anim.GetCurrentAnimatorStateInfo(0); rb.useGravity = true; velocity = new Vector3(0f, 0f, axis2); velocity = ((Component)this).transform.TransformDirection(velocity); if ((double)axis2 > 0.1) { velocity *= forwardSpeed; } else if ((double)axis2 < -0.1) { velocity *= backwardSpeed; } if (Input.GetButtonDown("Jump") && ((AnimatorStateInfo)(ref currentBaseState)).nameHash == locoState && !anim.IsInTransition(0)) { rb.AddForce(Vector3.up * jumpPower, (ForceMode)2); anim.SetBool("Jump", true); } Transform transform = ((Component)this).transform; transform.localPosition += velocity * Time.fixedDeltaTime; ((Component)this).transform.Rotate(0f, axis * rotateSpeed, 0f); if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == locoState) { if (useCurves) { resetCollider(); } } else if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == jumpState) { cameraObject.SendMessage("setCameraPositionJumpView"); if (anim.IsInTransition(0)) { return; } if (useCurves) { float @float = anim.GetFloat("JumpHeight"); float float2 = anim.GetFloat("GravityControl"); if (float2 > 0f) { rb.useGravity = false; } Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)this).transform.position + Vector3.up, -Vector3.up); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2)) { if (((RaycastHit)(ref val2)).distance > useCurvesHeight) { col.height = orgColHight - @float; float num = orgVectColCenter.y + @float; col.center = new Vector3(0f, num, 0f); } else { resetCollider(); } } } anim.SetBool("Jump", false); } else if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == idleState) { if (useCurves) { resetCollider(); } if (Input.GetButtonDown("Jump")) { anim.SetBool("Rest", true); } } else if (((AnimatorStateInfo)(ref currentBaseState)).nameHash == restState && !anim.IsInTransition(0)) { anim.SetBool("Rest", false); } } private void resetCollider() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) col.height = orgColHight; col.center = orgVectColCenter; } } namespace JerryComponent { public class LockLine : MonoBehaviour { public Transform[] controlPoints; public LineRenderer lineRenderer; private int _segmentNum = 50; private void Start() { } private void Update() { DrawCurve(); } private void DrawCurve() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) for (int i = 1; i <= _segmentNum; i++) { float t = (float)i / (float)_segmentNum; int num = 0; Vector3 val = CalculateCubicBezierPoint(t, controlPoints[num].position, controlPoints[num + 1].position, controlPoints[num + 2].position); lineRenderer.positionCount = i; lineRenderer.SetPosition(i - 1, val); } } private Vector3 CalculateCubicBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) float num = 1f - t; float num2 = t * t; float num3 = num * num; Vector3 val = num3 * p0; val += 2f * num * t * p1; return val + num2 * p2; } } public class BezierUtils { private static Vector3 CalculateCubicBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) float num = 1f - t; float num2 = t * t; float num3 = num * num; Vector3 val = num3 * p0; val += 2f * num * t * p1; return val + num2 * p2; } public static Vector3[] GetBeizerList(Vector3 startPoint, Vector3 controlPoint, Vector3 endPoint, int segmentNum) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) Vector3[] array = (Vector3[])(object)new Vector3[segmentNum]; for (int i = 1; i <= segmentNum; i++) { float t = (float)i / (float)segmentNum; Vector3 val = CalculateCubicBezierPoint(t, startPoint, controlPoint, endPoint); array[i - 1] = val; Debug.Log((object)array[i - 1]); } return array; } } public class SPMK6 : MonoBehaviour { public GameObject mark; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public float distanceNearest = 0f; public GameObject muzzle; public FVRPhysicalObject obj; private Vector3 velocity; public List linkInAngle = null; public float muzzleToTarget = 0f; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Remove(((Component)other).gameObject.GetComponent()); } } private void Update() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FVRInteractiveObject)obj).m_hand == (Object)null || linkInAngle == null || currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 30f || muzzleToTarget > 10f) { mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if ((Object)(object)nearestAI != (Object)null && (Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null) { distanceNearest = Vector3.Distance(((Component)this).transform.position, ((Component)nearestAI).transform.position); muzzleToTarget = Vector3.Angle(muzzle.transform.forward, ((Component)nearestAI).transform.position - ((Component)this).transform.position); if (muzzleToTarget < 10f && distanceNearest < 30f) { mark.SetActive(true); mark.transform.position = Vector3.SmoothDamp(mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.01f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); } } mark.transform.localEulerAngles = lookAtObj.transform.position - mark.transform.position; if (linkInAngle != null) { for (int i = 0; i < linkInAngle.Count; i++) { if ((Object)(object)linkInAngle[i] != (Object)null) { if (Vector3.Angle(((Component)this).transform.forward, ((Component)linkInAngle[i]).transform.position - ((Component)this).transform.position) > 10f) { linkInAngle.Remove(linkInAngle[i]); } } else if ((Object)(object)linkInAngle[i] == (Object)null) { linkInAngle.Remove(linkInAngle[i]); } } } if (currentAI == null) { return; } for (int j = 0; j < currentAI.Count; j++) { if ((Object)(object)currentAI[j] != (Object)null && Vector3.Angle(((Component)this).transform.forward, ((Component)currentAI[j]).transform.position - ((Component)this).transform.position) < 10f && !linkInAngle.Contains(currentAI[j])) { linkInAngle.Add(currentAI[j]); } } for (int k = 0; k < currentAI.Count; k++) { if ((Object)(object)currentAI[k] == (Object)null) { currentAI.Remove(currentAI[k]); } } if (linkInAngle != null) { nearestAI = GetNearestGameObject(((Component)this).transform, linkInAngle); } else if (linkInAngle != null) { } } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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, tr_self.localEulerAngles.z); } public Transform GetNearestGameObject(Transform player, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; i++) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).transform; } } } return val; } } public class SPMK6Upgraded : MonoBehaviour { public float cd = 0.5f; public bool ready; public Handgun gunitself; public GameObject selector; public GameObject trigger; public GameObject mark; public Transform lookbase; public List marks; public LayerMask lm; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public float distanceNearest = 0f; public GameObject laserpoint; public GameObject muzzle; public FVRPhysicalObject obj; private Vector3 velocity; public List linkInAngle = null; public float muzzleToTarget = 0f; private void OnTriggerEnter(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso") { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void OnTriggerExit(Collider other) { if (((Object)((Component)other).gameObject).name == "Sosig_Torso" && (Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { currentAI.Remove(((Component)other).gameObject.GetComponent()); } } private void Update() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) lookAtObj.transform.SetParent((Transform)null); lookAtObj.transform.position = lookbase.position; } private void FixedUpdate() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_023c: 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_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Unknown result type (might be due to invalid IL or missing references) //IL_098f: 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_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: 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_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_0686: 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_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0852: Unknown result type (might be due to invalid IL or missing references) //IL_086e: Unknown result type (might be due to invalid IL or missing references) //IL_0879: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject mark in marks) { mark.transform.SetParent((Transform)null); AxisLookAt(mark.transform, GM.CurrentPlayerBody.Head.position, Vector3.forward); } if (currentAI.Count > 0) { for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null) { currentAI.Remove(currentAI[i]); } } } if ((Object)(object)((FVRInteractiveObject)obj).m_hand == (Object)null || selector.transform.localEulerAngles.x == 0f) { laserpoint.SetActive(true); this.mark.SetActive(false); this.mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.eulerAngles = lookbase.eulerAngles; for (int j = 0; j < marks.Count; j++) { marks[j].SetActive(false); } } if ((Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null && selector.transform.localEulerAngles.x != 0f) { if (((Component)gunitself.Trigger).transform.localEulerAngles.x <= 15f) { laserpoint.SetActive(false); if (!ready) { cd = 0.25f; this.mark.SetActive(false); this.mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.eulerAngles = lookbase.eulerAngles; for (int k = 0; k < marks.Count; k++) { marks[k].SetActive(false); } } else if (ready) { for (int l = 0; l < linkInAngle.Count; l++) { if ((Object)(object)linkInAngle[l] != (Object)null) { marks[l].SetActive(true); marks[l].transform.position = ((Component)linkInAngle[l]).gameObject.transform.position; } else if ((Object)(object)linkInAngle[l] == (Object)null) { marks[l].SetActive(false); marks[l].transform.position = ((Component)this).gameObject.transform.position; } } if ((Object)(object)nearestAI != (Object)null) { AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); gunitself.Fire(); } if (linkInAngle.Count > 0) { nearestAI = GetNearestGameObject(((Component)this).transform, linkInAngle); } else if (linkInAngle.Count <= 0) { ready = false; } if (linkInAngle.Count <= 0) { ready = false; } if ((Object)(object)((FVRFireArm)gunitself).Magazine != (Object)null && ((FVRFireArm)gunitself).Magazine.m_numRounds <= 0) { ready = false; } } if (linkInAngle.Count > 0) { nearestAI = GetNearestGameObject(((Component)this).transform, linkInAngle); } } else if (((Component)gunitself.Trigger).transform.localEulerAngles.x > 15f) { ready = true; laserpoint.SetActive(false); if ((Object)(object)nearestAI != (Object)null) { distanceNearest = Vector3.Distance(((Component)this).transform.position, ((Component)nearestAI).transform.position); muzzleToTarget = Vector3.Angle(muzzle.transform.forward, ((Component)nearestAI).transform.position - ((Component)this).transform.position); if (muzzleToTarget < 10f && distanceNearest < 50f) { this.mark.SetActive(true); this.mark.transform.position = Vector3.SmoothDamp(this.mark.transform.position, ((Component)nearestAI).transform.position, ref velocity, 0.01f); AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); } } for (int m = 0; m < linkInAngle.Count; m++) { if ((Object)(object)linkInAngle[m] != (Object)null) { marks[m].SetActive(true); marks[m].transform.position = ((Component)linkInAngle[m]).gameObject.transform.position; } else if ((Object)(object)linkInAngle[m] == (Object)null) { marks[m].SetActive(false); marks[m].transform.position = ((Component)this).gameObject.transform.position; } } if ((Object)(object)GM.CurrentPlayerBody != (Object)null) { this.mark.transform.localEulerAngles = GM.CurrentPlayerBody.Head.position - this.mark.transform.position; } } } if (currentAI.Count > 0) { Ray val = default(Ray); RaycastHit val2 = default(RaycastHit); for (int n = 0; n < currentAI.Count; n++) { if ((Object)(object)currentAI[n] != (Object)null && Vector3.Angle(((Component)this).transform.forward, ((Component)currentAI[n]).transform.position - ((Component)this).transform.position) < 10f && !linkInAngle.Contains(currentAI[n]) && linkInAngle.Count < 18 && (Object)(object)((FVRInteractiveObject)obj).m_hand != (Object)null && selector.transform.localEulerAngles.x != 0f && ((Component)gunitself.Trigger).transform.localEulerAngles.x > 15f) { ((Ray)(ref val))..ctor(((Component)lookbase).transform.position, ((Component)currentAI[n]).gameObject.transform.position - ((Component)lookbase).transform.position); if (!Physics.Raycast(val, ref val2, Vector3.Distance(((Component)lookbase).transform.position, ((Component)currentAI[n]).gameObject.transform.position), LayerMask.op_Implicit(lm))) { linkInAngle.Add(currentAI[n]); } } } for (int num = 0; num < currentAI.Count; num++) { if ((Object)(object)currentAI[num] == (Object)null) { currentAI.Remove(currentAI[num]); } } } if (linkInAngle.Count <= 0) { return; } nearestAI = GetNearestGameObject(((Component)this).transform, linkInAngle); for (int num2 = 0; num2 < linkInAngle.Count; num2++) { if ((Object)(object)linkInAngle[num2] != (Object)null) { if (Vector3.Angle(((Component)this).transform.forward, ((Component)linkInAngle[num2]).transform.position - ((Component)this).transform.position) > 15f) { linkInAngle.Remove(linkInAngle[num2]); } } else if ((Object)(object)linkInAngle[num2] == (Object)null) { linkInAngle.Remove(linkInAngle[num2]); } } } 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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, tr_self.localEulerAngles.z); } 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_007c: 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) 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++) { if ((Object)(object)objects[i] != (Object)null) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).transform; } } } } return val; } } public class SMG0818EjectPort : MonoBehaviour { public OpenBoltReceiver gun; public Transform leftpos; public Transform rightpos; public GameObject coverrot; private void Start() { } private void FixedUpdate() { //IL_0032: 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) if ((Object)(object)((FVRFireArm)gun).Magazine != (Object)null) { coverrot.transform.localEulerAngles = new Vector3(0f, 0f, 0f); if (((FVRFireArm)gun).Magazine.m_numRounds > 0) { ((FVRFireArm)gun).MagazineEjectPos = leftpos; } else if (((FVRFireArm)gun).Magazine.m_numRounds <= 0) { ((FVRFireArm)gun).MagazineEjectPos = rightpos; ((FVRFireArm)gun).EjectMag(false); } } else if ((Object)(object)((FVRFireArm)gun).Magazine == (Object)null) { ((FVRFireArm)gun).MagazineEjectPos = leftpos; coverrot.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } } } public class scrach : MonoBehaviour { public GameObject Fire; public GameObject Detonate; public GameObject Cracker; public float DieTime; private void Start() { } public void KillMe() { Object.Destroy((Object)(object)Cracker); } private void Update() { if (Fire.activeInHierarchy) { Detonate.SetActive(true); ((MonoBehaviour)this).Invoke("KillMe", DieTime); } else { Detonate.SetActive(false); } } } public class SCshutDown : MonoBehaviour { public Collider col; public GameObject powersw; public AR15HandleSightFlipper but; public ShotClockMP2 SCMP2; public bool isMenuPlus = false; public bool isMenuMinus = false; public bool isSecPlus = false; public bool isSecMinusAndStart = false; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: 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) if (powersw.transform.localEulerAngles.x > 45f) { col.enabled = true; if (isSecMinusAndStart) { if (but.m_flipsightEndRotX - but.m_flipsightCurRotX < 1f && !but.m_isLargeAperture) { SCMP2.but4P = true; if (SCMP2.menu != 0f) { but.m_isLargeAperture = true; } } else if (but.m_flipsightEndRotX - but.m_flipsightCurRotX > 1f && but.m_isLargeAperture) { SCMP2.but4P = false; } } else if (isSecPlus) { if (but.m_flipsightEndRotX - but.m_flipsightCurRotX < 1f && !but.m_isLargeAperture) { SCMP2.but3P = true; but.m_isLargeAperture = true; } else if (but.m_flipsightEndRotX - but.m_flipsightCurRotX > 1f && but.m_isLargeAperture) { SCMP2.but3P = false; } } else if (isMenuMinus) { if (but.m_flipsightEndRotX - but.m_flipsightCurRotX < 1f && !but.m_isLargeAperture) { SCMP2.but2P = true; but.m_isLargeAperture = true; } else if (but.m_flipsightEndRotX - but.m_flipsightCurRotX > 1f && but.m_isLargeAperture) { SCMP2.but2P = false; } } else if (isMenuPlus) { if (but.m_flipsightEndRotX - but.m_flipsightCurRotX < 1f && !but.m_isLargeAperture) { SCMP2.but1P = true; but.m_isLargeAperture = true; } else if (but.m_flipsightEndRotX - but.m_flipsightCurRotX > 1f && but.m_isLargeAperture) { SCMP2.but1P = false; } } } else if (powersw.transform.localEulerAngles.x < 45f) { col.enabled = false; but.m_isLargeAperture = true; } } } public class ShotClockMP : MonoBehaviour { public GameObject startBeep; public GameObject startBeepPre; public GameObject textmode0; public GameObject textmode1; public GameObject textmode2; public GameObject menu0; public GameObject menu1; public GameObject menu2; public bool startcounting = false; private float shotsin; private float secondsin; public GameObject startbutton; public GameObject menuplus; public GameObject menuminus; public GameObject setplus; public GameObject setminusandon; public bool button1pressed = false; public bool button2pressed = false; public bool button3pressed = false; public bool button4pressed = false; public float menu; public float shots = 1f; public float seconds = 3f; public Text shotsText; public Text secondsText; public Text modesText; public Text timerText; private float t; private float startTime; public bool timerStarted = false; private void Awake() { menu = 0f; t = 0f; startTime = 0f; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void OnDisable() { menu = 0f; t = 0f; startTime = 0f; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void Update() { //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Expected O, but got Unknown //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Expected O, but got Unknown if (menu == 0f) { modesText.text = "Main"; textmode0.SetActive(true); textmode1.SetActive(false); textmode2.SetActive(false); } else if (menu == 1f) { modesText.text = "Shot"; textmode0.SetActive(false); textmode1.SetActive(true); textmode2.SetActive(false); } else if (menu == 2f) { modesText.text = "Secs"; textmode0.SetActive(false); textmode1.SetActive(false); textmode2.SetActive(true); } if (menu < 0f) { menu = 2f; } else if (menu > 2f) { menu = 0f; } shotsText.text = shots.ToString(); if (shots < 1f) { shots = 99f; } else if (shots > 99f) { shots = 1f; } secondsText.text = seconds.ToString(); if (seconds < 0f) { seconds = 10f; } else if (seconds > 10f) { seconds = 1f; } if (menuplus.transform.localEulerAngles.z > 1f) { if (!button1pressed) { menu += 1f; button1pressed = true; } } else if (menuplus.transform.localEulerAngles.z < 1f) { button1pressed = false; } if (menuminus.transform.localEulerAngles.z > 1f) { if (!button2pressed) { menu -= 1f; button2pressed = true; } } else if (menuminus.transform.localEulerAngles.z < 1f) { button2pressed = false; } if (setplus.transform.localEulerAngles.z > 1f) { if (!button3pressed) { if (menu == 0f) { button3pressed = true; } else if (menu == 1f) { shots += 1f; button3pressed = true; } else if (menu == 2f) { seconds += 1f; button3pressed = true; } } } else if (setplus.transform.localEulerAngles.z < 1f) { button3pressed = false; } if (setminusandon.transform.localEulerAngles.z > 1f) { if (!button4pressed) { if (menu == 0f) { t = 0f; startTime = 0f; startcounting = true; secondsin = seconds; shotsin = shots; button4pressed = true; startBeepPre.SetActive(true); } else if (menu == 1f) { shots -= 1f; button4pressed = true; } else if (menu == 2f) { seconds -= 1f; button4pressed = true; } } } else if (setminusandon.transform.localEulerAngles.z < 1f) { button4pressed = false; } if (startcounting) { secondsin -= 1f * Time.deltaTime; if (secondsin < 0f) { startBeepPre.SetActive(false); startBeep.SetActive(true); timerStarted = true; secondsin = 0f; startcounting = false; } } if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); t += Time.deltaTime; string text = ((int)t / 60).ToString("00"); string text2 = (t % 60f).ToString("00"); string text3 = (t * 1000f % 1000f).ToString("000"); string text4 = text3.Substring(0, 2); timerText.text = text + ":" + text2 + ":" + text4; if (shotsin < 0f || t > 60f) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); startBeep.SetActive(false); timerStarted = false; } } } private void OnShotFired(FVRFireArm firearm) { shotsin -= 1f; } private void OnDestroy() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } } } public class ShotClockMP2 : MonoBehaviour { public int i = 0; private Text stT; private string min; private string sec; private string milsec; private string mil; public List minL; public List secL; public List milsecL; public GameObject startBeep; public GameObject startBeepPre; public GameObject textmode0; public GameObject textmode1; public GameObject textmode2; public GameObject menu0; public GameObject menu1; public GameObject menu2; public bool startcounting = false; private float secondsin; public bool but1P = false; public bool but2P = false; public bool but3P = false; public bool but4P = false; public bool button1pressed = false; public bool button2pressed = false; public bool button3pressed = false; public bool button4pressed = false; public float menu; public float seconds = 3f; public Text setsText; public Text secondsText; public Text modesText; public Text timerText; public Text timerTextzero; private float t; private float startTime; public bool timerStarted = false; private void Awake() { stT = timerTextzero; minL.Add("00"); secL.Add("00"); milsecL.Add("00"); menu = 0f; t = 0f; startTime = 0f; min = "00"; sec = "00"; milsec = "000"; mil = "00"; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void OnDisable() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } min = "00"; sec = "00"; milsec = "000"; mil = "00"; minL.Clear(); secL.Clear(); milsecL.Clear(); menu = 0f; t = 0f; startTime = 0f; startBeepPre.SetActive(false); startBeep.SetActive(false); button1pressed = false; button2pressed = false; button3pressed = false; button4pressed = false; startcounting = false; timerStarted = false; } private void FixedUpdate() { //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Expected O, but got Unknown //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Expected O, but got Unknown //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Expected O, but got Unknown if (menu == 0f) { modesText.text = "Main"; textmode0.SetActive(true); textmode1.SetActive(false); textmode2.SetActive(false); } else if (menu == 1f) { modesText.text = "Sets"; textmode0.SetActive(false); textmode1.SetActive(true); textmode2.SetActive(false); } else if (menu == 2f) { modesText.text = "Secs"; textmode0.SetActive(false); textmode1.SetActive(false); textmode2.SetActive(true); } if (menu < 0f) { menu = 2f; } else if (menu > 2f) { menu = 0f; } if (minL.Count > 0 && secL.Count > 0 && milsecL.Count > 0) { if (i < 0) { i = minL.Count - 1; } else if (i > minL.Count - 1) { i = 0; } setsText.text = i + "=" + minL[i] + ":" + secL[i] + ":" + milsecL[i]; } secondsText.text = seconds.ToString(); if (seconds < 1f) { seconds = 10f; } else if (seconds > 10f) { seconds = 1f; } if (but1P) { if (!button1pressed) { menu += 1f; button1pressed = true; } } else if (!but1P) { button1pressed = false; } if (but2P) { if (!button2pressed) { menu -= 1f; button2pressed = true; } } else if (!but2P) { button2pressed = false; } if (but3P) { if (!button3pressed) { if (menu == 0f) { button3pressed = true; } else if (menu == 1f) { if (minL.Count > 0 && secL.Count > 0 && milsecL.Count > 0) { i++; } button3pressed = true; } else if (menu == 2f) { seconds += 1f; button3pressed = true; } } } else if (!but3P) { button3pressed = false; } if (but4P) { if (!button4pressed) { if (menu == 0f) { minL.Clear(); secL.Clear(); milsecL.Clear(); minL.Add("00"); secL.Add("00"); milsecL.Add("00"); t = 0f; startTime = 0f; startcounting = true; secondsin = seconds; button4pressed = true; startBeepPre.SetActive(true); } else if (menu == 1f) { if (minL.Count > 0 && secL.Count > 0 && milsecL.Count > 0) { i--; } button4pressed = true; } else if (menu == 2f) { seconds -= 1f; button4pressed = true; } } } else if (!but4P) { startcounting = false; GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); startBeep.SetActive(false); timerStarted = false; startBeepPre.SetActive(false); button4pressed = false; } if (startcounting) { secondsin -= 1f * Time.deltaTime; if (secondsin < 0f) { GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); startBeepPre.SetActive(false); startBeep.SetActive(true); timerStarted = true; secondsin = 0f; startcounting = false; } } if (timerStarted) { t += Time.deltaTime; int num = (int)t / 3600; int num2 = ((int)t - num * 3600) / 60; int num3 = (int)t - num * 3600 - num2 * 60; int num4 = (int)((t - (float)(int)t) * 1000f); min = num2.ToString("00"); sec = num3.ToString("00"); milsec = num4.ToString("000"); mil = milsec.Substring(0, 2); timerText.text = min + ":" + sec + ":" + mil; if (t / 60f > 5f) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); startBeep.SetActive(false); timerStarted = false; } } } private void OnShotFired(FVRFireArm firearm) { minL.Add(min); secL.Add(sec); milsecL.Add(mil); } private void OnDestroy() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown if (timerStarted) { GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } } } public class PixelShotGun : MonoBehaviour { public GameObject boltFake; public GameObject handleFake; public GameObject boltcon; public GameObject handlecon; public GameObject boltReal; public GameObject handleReal; public GameObject m0; public GameObject m1; public GameObject m2; public GameObject m3; public GameObject m4; public GameObject m5; private void Start() { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(true); } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) if (boltFake.transform.localPosition.z == 0f) { m0.SetActive(true); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 1f) { m0.SetActive(false); m1.SetActive(true); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 2f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(true); m3.SetActive(false); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 3f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(true); m4.SetActive(false); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 4f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(true); m5.SetActive(false); } if (boltFake.transform.localPosition.z == 5f) { m0.SetActive(false); m1.SetActive(false); m2.SetActive(false); m3.SetActive(false); m4.SetActive(false); m5.SetActive(true); } boltcon.transform.position = boltReal.transform.position; boltcon.transform.eulerAngles = boltReal.transform.eulerAngles; handlecon.transform.position = handleReal.transform.position; handlecon.transform.eulerAngles = handleReal.transform.eulerAngles; boltFake.transform.localPosition = new Vector3(0f, 0f, (float)(int)boltcon.transform.localPosition.z); handleFake.transform.localPosition = new Vector3(0f, 0f, (float)(int)handlecon.transform.localPosition.z); } } public class FireSCAV : MonoBehaviour { public GameObject soundsource; public BoltActionRifle gun; public AudioSource SCAV; public AudioClip[] clips; public GameObject foldingStock; public int limit = 99; private void OnShotFired(FVRFireArm firearm) { if ((Object)(object)firearm == (Object)(object)gun) { int num = 0; num = Random.Range(0, 100); if (!SCAV.isPlaying && num >= limit) { SCAV.clip = clips[Random.Range(0, clips.Length)]; SCAV.Play(); limit = 99; } if (!SCAV.isPlaying && num < limit) { limit--; } } } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent += new ShotFired(OnShotFired); } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown GM.CurrentSceneSettings.ShotFiredEvent -= new ShotFired(OnShotFired); } public void FixedUpdate() { //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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)GM.CurrentMovementManager != (Object)null) { soundsource.transform.position = GM.CurrentMovementManager.Head.position; } if (foldingStock.transform.localEulerAngles.x <= 90f && foldingStock.transform.localEulerAngles.y <= 90f && foldingStock.transform.localEulerAngles.z <= 90f && gun.m_fireSelectorMode != 0) { gun.ToggleFireSelector(); } } } public class TexasHook : MonoBehaviour { public List tars; private void Start() { } private void Update() { } } public class TexasSpawn : MonoBehaviour { public FVRObject rotate; public FVRObject tar; public TexasStar TS; public TexasHook TSRT; public Transform rot; public Transform[] tars; public int i = 0; public GameObject ROTATEOBJ; public GameObject[] TARGs; public bool grabbed = false; public Rigidbody lockrig; public Rigidbody rotrig; private void Start() { } private void Update() { //IL_0055: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((FVRInteractiveObject)TS).m_hand) || grabbed) { return; } if ((Object)(object)((Component)TS).gameObject.GetComponentInChildren() == (Object)null) { ROTATEOBJ = Object.Instantiate(((AnvilAsset)rotate).GetGameObject(), ((Component)rot).transform.position, ((Component)rot).transform.rotation); ROTATEOBJ.transform.SetParent(((Component)rot).transform); TSRT = ROTATEOBJ.GetComponent(); ((Joint)ROTATEOBJ.GetComponent()).connectedBody = lockrig; rotrig = ROTATEOBJ.GetComponent(); TS.Spinner = ROTATEOBJ.transform; } if (i < 5) { tars[i] = TSRT.tars[i]; if ((Object)(object)TARGs[i] == (Object)null) { TARGs[i] = Object.Instantiate(((AnvilAsset)tar).GetGameObject(), tars[i].position, tars[i].rotation); TARGs[i].transform.SetParent(tars[i]); ((Joint)TARGs[i].GetComponent()).connectedBody = rotrig; TS.Targets[i] = TARGs[i].GetComponent(); } i++; } else if (i >= 5) { grabbed = true; } } } public class TexasSpawnH3MP : MonoBehaviour { public TexasStar TS; private void FixedUpdate() { TexasStarTarget[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren(); if ((Object)(object)((Component)this).gameObject.GetComponentInChildren() == (Object)null) { ((Behaviour)TS).enabled = false; } else if ((Object)(object)((Component)this).gameObject.GetComponentInChildren() != (Object)null && componentsInChildren.Length >= 5) { TS.Targets = componentsInChildren; ((Behaviour)TS).enabled = true; } } } } namespace CustomTargets { public class TexasStar : FVRPhysicalObject { [Header("Texas Star Config")] public TexasStarTarget[] Targets; public Transform Spinner; public TexasSpawn tss; public Vector3 _origSpinnerPos; private Quaternion _origSpinnerRot; public void ResetTarget() { //IL_0059: 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) if ((Object)(object)Spinner != (Object)null) { ((Component)Spinner).GetComponent().isKinematic = true; } for (int i = 0; i < Targets.Length; i++) { Targets[i].ResetTarget(); ((Component)Targets[i]).gameObject.transform.position = tss.tars[i].position; ((Component)Targets[i]).gameObject.transform.eulerAngles = tss.tars[i].eulerAngles; if ((Object)(object)Targets[i]._fixedJoint == (Object)null) { Targets[i]._fixedJoint = ((Component)Targets[i]).gameObject.AddComponent(); ((Joint)Targets[i]._fixedJoint).connectedBody = ((Component)Spinner).gameObject.GetComponent(); } } } } } namespace JerryComponent { public class TexasStarA : MonoBehaviour { public FVRFireArmAttachmentMount Mount; public GameObject Weight; private void Start() { } private void Update() { if (Mount.HasAttachmentsOnIt()) { Weight.SetActive(true); } if (!Mount.HasAttachmentsOnIt()) { Weight.SetActive(false); } } } public class TexasStarB : ReactiveSteelTarget { public FVRFireArmAttachmentInterface interf; public FVRFireArmAttachment Attach; public GameObject Phys; public Damage dam; public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 if ((int)dam.Class == 1 && (int)dam.Class == 3 && (int)dam.Class == 2) { if (((Behaviour)interf).isActiveAndEnabled) { Attach.DetachFromMount(); Debug.Log((object)"I'm hit!"); } ((ReactiveSteelTarget)this).PlayHitSound(1f); } } private void Start() { } public void Update() { if (dam.Dam_TotalKinetic > 1f) { Attach.DetachFromMount(); } else if (!(dam.Dam_TotalKinetic <= 0f)) { } if (((Behaviour)interf).isActiveAndEnabled) { Phys.SetActive(true); } else if (!((Behaviour)interf).isActiveAndEnabled) { Phys.SetActive(false); } } } } namespace CustomTargets { public class TexasStarResetTarget : MonoBehaviour, IFVRDamageable { public AudioEvent ResetSound; public float HitSoundRefireDelay = 0.1f; public GameObject[] BulletHolePrefabs; public FVRPooledAudioType AudioPoolType = (FVRPooledAudioType)11; public int MaxHoles = 20; public TexasStar texasStar; private int _holeIndex; private float m_refireTick; private List m_currentHoles = new List(); public void Update() { if (m_refireTick > 0f) { m_refireTick -= Time.deltaTime; } } private void PlayHitSound(float soundMultiplier) { //IL_0024: 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_0047: 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_0069: 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) if (m_refireTick <= 0f) { m_refireTick = HitSoundRefireDelay; float num = Vector3.Distance(((Component)this).transform.position, GM.CurrentPlayerBody.Head.position); float num2 = num / 343f; SM.PlayCoreSoundDelayedOverrides(AudioPoolType, ResetSound, ((Component)this).transform.position, ResetSound.VolumeRange * soundMultiplier, ResetSound.PitchRange, num2 + 0.04f); } } public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)dam.Class == 1) { PlayHitSound(1f); texasStar.ResetTarget(); } } public void ClearHoles() { for (int num = m_currentHoles.Count - 1; num >= 0; num--) { Object.Destroy((Object)(object)m_currentHoles[num]); } m_currentHoles.Clear(); } } public class TexasStarTarget : MonoBehaviour, IFVRDamageable { public AudioEvent HitSounds; public float HitSoundRefireDelay = 0.1f; public GameObject[] BulletHolePrefabs; public FVRPooledAudioType AudioPoolType = (FVRPooledAudioType)11; public int MaxHoles = 20; public float MinDamageRequired = 1f; public float MaxDamageRequired = 1f; private int _holeIndex; private Rigidbody _rigidbody; public FixedJoint _fixedJoint; private bool m_hasRB; private float m_refireTick; private List m_currentHoles = new List(); private float _damageRequired; private float _damageReceived; private Vector3 _origPos; private Quaternion _origRot; public Rigidbody _origConnectedBody; public void Awake() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) _rigidbody = ((Component)this).GetComponent(); _fixedJoint = ((Component)this).GetComponent(); if ((Object)(object)_rigidbody != (Object)null) { m_hasRB = true; } _damageRequired = 1f; _origPos = ((Component)this).transform.localPosition; _origRot = ((Component)this).transform.localRotation; } public void Update() { if (m_refireTick > 0f) { m_refireTick -= Time.deltaTime; } } private void PlayHitSound(float soundMultiplier) { //IL_0024: 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_0047: 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_0069: 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) if (m_refireTick <= 0f) { m_refireTick = HitSoundRefireDelay; float num = Vector3.Distance(((Component)this).transform.position, GM.CurrentPlayerBody.Head.position); float num2 = num / 343f; SM.PlayCoreSoundDelayedOverrides(AudioPoolType, HitSounds, ((Component)this).transform.position, HitSounds.VolumeRange * soundMultiplier, HitSounds.PitchRange, num2 + 0.04f); } } public void Damage(Damage dam) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00f3: 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_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) if ((int)dam.Class != 1) { return; } Vector3 val = dam.point + dam.hitNormal * Random.Range(0.002f, 0.008f); if (BulletHolePrefabs.Length > 0) { if (m_currentHoles.Count > MaxHoles) { _holeIndex++; if (_holeIndex >= MaxHoles) { _holeIndex = 0; } m_currentHoles[_holeIndex].transform.position = val; m_currentHoles[_holeIndex].transform.rotation = Quaternion.LookRotation(dam.hitNormal, Random.onUnitSphere); } else { GameObject val2 = Object.Instantiate(BulletHolePrefabs[Random.Range(0, BulletHolePrefabs.Length)], val, Quaternion.LookRotation(dam.hitNormal, Random.onUnitSphere)); val2.transform.SetParent(((Component)this).transform); m_currentHoles.Add(val2); } } PlayHitSound(1f); _damageReceived += dam.Dam_Blunt; if ((Object)(object)_fixedJoint != (Object)null && _damageReceived >= _damageRequired) { Object.Destroy((Object)(object)_fixedJoint); ((MonoBehaviour)this).StartCoroutine(ApplyForce(dam)); } } public void ClearHoles() { for (int num = m_currentHoles.Count - 1; num >= 0; num--) { Object.Destroy((Object)(object)m_currentHoles[num]); } m_currentHoles.Clear(); } public void ResetTarget() { _damageReceived = 0f; _damageRequired = Random.Range(MinDamageRequired, MaxDamageRequired); ClearHoles(); } private IEnumerator ApplyForce(Damage dam) { yield return null; if (m_hasRB) { _rigidbody.AddForceAtPosition(dam.strikeDir * dam.Dam_Blunt * 0.1f, dam.point, (ForceMode)1); } } } } namespace JerryComponent { public class unfreeze : MonoBehaviour { public Rigidbody rig; private void Start() { } private void Update() { rig.isKinematic = false; } } public class ToolGun : MonoBehaviour { public GameObject none; public GameObject hinge; public GameObject fix; public GameObject spring; public GameObject force; public GameObject triggergeo; public FVRViveHand hand; public FVRPhysicalObject mainobj; public GameObject trigger; public GameObject togglelever; public GameObject buttonlever; public bool isFired; public GameObject objA; public GameObject objB; public Transform muzzle; public LayerMask lm; public Material mathinge; public Material matspring; public Material matfixed; public AudioEvent fire; private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_0755: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_084c: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) if (trigger.transform.localEulerAngles.x < 5f && isFired) { isFired = false; } if (togglelever.transform.localPosition.y < 0.5f) { none.SetActive(true); hinge.SetActive(false); fix.SetActive(false); spring.SetActive(false); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (togglelever.transform.localPosition.y > 0.5f && togglelever.transform.localPosition.y < 1.5f) { none.SetActive(false); hinge.SetActive(true); fix.SetActive(false); spring.SetActive(false); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(20f, 0f, 0f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val)).rigidbody != (Object)null) { if ((Object)(object)objA == (Object)null) { objA = ((Component)((RaycastHit)(ref val)).rigidbody).gameObject; } else if ((Object)(object)objA != (Object)null) { objB = ((Component)((RaycastHit)(ref val)).rigidbody).gameObject; if ((Object)(object)objB != (Object)(object)objA) { ConfigurableJoint val2 = objB.AddComponent(); ((Joint)val2).connectedBody = objA.GetComponent(); val2.xMotion = (ConfigurableJointMotion)0; val2.yMotion = (ConfigurableJointMotion)0; val2.zMotion = (ConfigurableJointMotion)0; ToolGunLine toolGunLine = objB.AddComponent(); toolGunLine.objA = objA; toolGunLine.objB = objB; toolGunLine.mat = mathinge; } objA = null; objB = null; } } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if (togglelever.transform.localPosition.y > 1.5f && togglelever.transform.localPosition.y < 2.5f) { none.SetActive(false); hinge.SetActive(false); fix.SetActive(true); spring.SetActive(false); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(0f, 355f, 345f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val3 = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val3, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val3)).rigidbody != (Object)null) { if ((Object)(object)objA == (Object)null) { objA = ((Component)((RaycastHit)(ref val3)).rigidbody).gameObject; } else if ((Object)(object)objA != (Object)null) { objB = ((Component)((RaycastHit)(ref val3)).rigidbody).gameObject; if ((Object)(object)objB != (Object)(object)objA) { FixedJoint val4 = objB.AddComponent(); ((Joint)val4).connectedBody = objA.GetComponent(); ToolGunLine toolGunLine2 = objB.AddComponent(); toolGunLine2.objA = objA; toolGunLine2.objB = objB; toolGunLine2.mat = matfixed; } objA = null; objB = null; } } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if (togglelever.transform.localPosition.y > 2.5f && togglelever.transform.localPosition.y < 3.5f) { none.SetActive(false); hinge.SetActive(false); fix.SetActive(false); spring.SetActive(true); force.SetActive(false); buttonlever.transform.localEulerAngles = new Vector3(340f, 0f, 0f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val5 = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val5, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val5)).rigidbody != (Object)null) { if ((Object)(object)objA == (Object)null) { objA = ((Component)((RaycastHit)(ref val5)).rigidbody).gameObject; } else if ((Object)(object)objA != (Object)null) { objB = ((Component)((RaycastHit)(ref val5)).rigidbody).gameObject; if ((Object)(object)objB != (Object)(object)objA) { SpringJoint val6 = objB.AddComponent(); ((Joint)val6).connectedBody = objA.GetComponent(); val6.spring = 25f; val6.damper = 5f; val6.tolerance = 0.025f; ((Joint)val6).anchor = new Vector3(0f, 0f, 0f); ((Joint)val6).autoConfigureConnectedAnchor = false; ((Joint)val6).connectedAnchor = new Vector3(0f, 0f, 0f); ToolGunLine toolGunLine3 = objB.AddComponent(); toolGunLine3.objA = objA; toolGunLine3.objB = objB; toolGunLine3.mat = matspring; } objA = null; objB = null; } } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if (togglelever.transform.localPosition.y > 3.5f) { none.SetActive(false); hinge.SetActive(false); fix.SetActive(false); spring.SetActive(false); force.SetActive(true); buttonlever.transform.localEulerAngles = new Vector3(0f, 5f, 15f); if (trigger.transform.localEulerAngles.x > 10f && !isFired) { RaycastHit val7 = default(RaycastHit); Physics.Raycast(muzzle.position, muzzle.forward, ref val7, 1000f, LayerMask.op_Implicit(lm)); if ((Object)(object)((RaycastHit)(ref val7)).rigidbody != (Object)null) { ((RaycastHit)(ref val7)).rigidbody.AddForce(((RaycastHit)(ref val7)).normal * -20f, (ForceMode)2); } SM.PlayGenericSound(fire, ((Component)this).transform.position); isFired = true; } } if ((Object)(object)((FVRInteractiveObject)mainobj).m_hand == (Object)null || (Object)(object)hand == (Object)null || (Object)(object)objA == (Object)null || (Object)(object)objB == (Object)null) { hand = null; } if (!((Object)(object)((FVRInteractiveObject)mainobj).m_hand != (Object)null)) { return; } hand = ((FVRInteractiveObject)mainobj).m_hand; if ((Object)(object)hand != (Object)null) { if (hand.Input.TriggerPressed) { triggergeo.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } else { triggergeo.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } } public class ToolGunLine : MonoBehaviour { public Material mat; public GameObject objA; public GameObject objB; public LineRenderer LR; public bool rendered; private void Start() { } private void Update() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) if (((Object)(object)objA != (Object)null) & ((Object)(object)objB != (Object)null)) { if (!rendered) { LR = objB.AddComponent(); rendered = true; } if ((Object)(object)LR != (Object)null) { ((Renderer)LR).material = mat; LR.SetPosition(0, objA.transform.position); LR.SetPosition(1, objB.transform.position); LR.startWidth = 0.01f; LR.endWidth = 0.01f; } } if ((Object)(object)objA == (Object)null || (Object)(object)objB == (Object)null) { LR = null; } } } public class Launcher2k11 : MonoBehaviour { public GameObject pointing; public NavMeshAgent agent; public GameObject missileGeoL; public GameObject missileGeoR; public GameObject launchposL; public GameObject launchposR; public GameObject missileprefab; public bool rdytolaunchL = false; public bool rdytolaunchR = false; public bool fireL = false; public bool fireR = false; public bool fire = false; public float cd = 10f; public float reloadL = 20f; public float reloadR = 20f; public Vector3 xvel = Vector3.zero; public Vector3 yvel = Vector3.zero; public GameObject lookatobj; public GameObject frameX; public GameObject frameY; public Radar1S91 radar; public void OnTriggerStay(Collider other) { if (((Object)((Component)other).gameObject).name == "RadarTriggerTrue") { radar = ((Component)other).gameObject.GetComponent(); } } private void Start() { fireL = true; fireR = false; missileGeoL.SetActive(false); missileGeoR.SetActive(false); reloadL = 0f; reloadR = 20f; } private void Update() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02af: 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_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)radar == (Object)null) { cd = 10f; lookatobj.transform.localEulerAngles = Vector3.RotateTowards(lookatobj.transform.localEulerAngles, new Vector3(0f, 0f, 0f), 360f, 360f); frameX.transform.localEulerAngles = new Vector3(Mathf.Lerp(frameX.transform.localEulerAngles.x, 30f, 0.1f), 0f, 0f); } if ((Object)(object)radar != (Object)null) { if (radar.mark.activeInHierarchy) { cd -= 1f * Time.deltaTime; if (cd < 0f) { cd = 0f; } lookatobj.transform.eulerAngles = Vector3.RotateTowards(lookatobj.transform.forward, radar.mark.gameObject.transform.position, 360f, 360f); frameX.transform.localEulerAngles = new Vector3(Mathf.Lerp(frameX.transform.localEulerAngles.x, 0f, 0.1f), 0f, 0f); if (frameX.transform.localEulerAngles.x < 5f) { fire = true; } } else if (!radar.mark.activeInHierarchy) { cd = 10f; lookatobj.transform.localEulerAngles = Vector3.RotateTowards(lookatobj.transform.localEulerAngles, new Vector3(0f, 0f, 0f), 360f, 360f); frameX.transform.localEulerAngles = new Vector3(Mathf.Lerp(frameX.transform.localEulerAngles.x, 30f, 0.1f), 0f, 0f); } } frameY.transform.localEulerAngles = Vector3.SmoothDamp(frameY.transform.localEulerAngles, new Vector3(0f, lookatobj.transform.localEulerAngles.y, 0f), ref yvel, 2f); if (reloadL >= 0f) { reloadL -= 1f * Time.deltaTime; } if (reloadL < 0f) { reloadL = 0f; } if (reloadL < 1f) { missileGeoL.SetActive(true); rdytolaunchL = true; } if (rdytolaunchL && fireL && fire && cd < 1f) { missileGeoL.SetActive(false); Object.Instantiate(missileprefab, launchposL.transform.position, launchposL.transform.rotation); reloadL = 20f; rdytolaunchL = false; fireL = false; cd = 10f; fireR = true; } if (reloadR >= 0f) { reloadR -= 1f * Time.deltaTime; } if (reloadR < 0f) { reloadR = 0f; } if (reloadR < 1f) { missileGeoR.SetActive(true); rdytolaunchR = true; } if (rdytolaunchR && fireR && fire && cd < 1f) { missileGeoR.SetActive(false); Object.Instantiate(missileprefab, launchposR.transform.position, launchposR.transform.rotation); reloadR = 20f; rdytolaunchR = false; fireR = false; cd = 10f; fireL = true; } } } public class Missile2k11 : MonoBehaviour { public Rigidbody rocket; public GameObject roc; public Rigidbody rb; public GameObject explosion; public GameObject explode; public GameObject mark; public GameObject subrocket; public GameObject mainrocket; public bool subtomain = false; public float countdown = 30f; public float m_speed = 25f; public float maxrot = 2f; public float acc = 50f; public float m_rotspeed = 1f; public float a = 0.0001f; public GameObject targrot; public GameObject FX; public bool lostTar = false; public bool comming = false; public float Xref; public float Yref; public float Zref; private void Start() { subrocket.SetActive(true); mainrocket.SetActive(false); } private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_036a: 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) FX.transform.position = ((Component)this).gameObject.transform.position; FX.transform.eulerAngles = ((Component)this).gameObject.transform.eulerAngles; FX.transform.SetParent((Transform)null); targrot.transform.SetParent((Transform)null); targrot.transform.position = ((Component)this).gameObject.transform.position; mark = GameObject.Find("2k11Mark"); if ((Object)(object)mark == (Object)null || (Object)(object)roc == (Object)null || (Object)(object)rocket == (Object)null) { } if (countdown < 29.5f && countdown > 27.5f) { rocket.AddRelativeTorque(new Vector3(0f, 0f, 50f), (ForceMode)1); rocket.AddRelativeForce(new Vector3(0f, 0f, 1000f), (ForceMode)1); } if (countdown < 25f && (Object)(object)mark == (Object)null) { m_rotspeed = Mathf.Lerp(m_rotspeed, maxrot, a); m_speed += acc * Time.deltaTime; Transform transform = ((Component)this).transform; transform.position += ((Component)this).transform.forward * m_speed * Time.deltaTime; rb.drag = Mathf.Lerp(rb.drag, 1f, 0.01f); } if (countdown < 25f && (Object)(object)mark != (Object)null) { if (!lostTar) { m_rotspeed = Mathf.Lerp(m_rotspeed, maxrot, a); Vector3 val = mark.transform.position - ((Component)this).transform.position; float num = m_rotspeed * Time.deltaTime; ((Component)this).transform.rotation = Quaternion.LookRotation(Vector3.RotateTowards(((Component)this).transform.forward, val, num, 0f)); AxisLookAt(targrot.transform, mark.transform.position, Vector3.forward); } Object.Destroy((Object)(object)roc); m_speed += acc * Time.deltaTime; Transform transform2 = ((Component)this).transform; transform2.position += ((Component)this).transform.forward * m_speed * Time.deltaTime; rb.drag = Mathf.Lerp(rb.drag, 1f, 0.01f); if (Vector3.Distance(((Component)this).transform.position, mark.transform.position) >= 15f && comming) { lostTar = true; } if (Vector3.Distance(((Component)this).transform.position, mark.transform.position) < 10f) { comming = true; } } if ((Object)(object)mark != (Object)null) { if (countdown <= -30f) { countdown = -30f; } if (Vector3.Distance(((Component)this).transform.position, mark.transform.position) < 1f || countdown < -25f) { Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } } else if ((Object)(object)mark == (Object)null && countdown <= -30f) { countdown = -30f; Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } countdown -= 1f * Time.deltaTime; if (countdown <= 25f) { subrocket.SetActive(false); mainrocket.SetActive(true); } } public void OnCollisionEnter(Collision collision) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(explode, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Instantiate(explosion, ((Component)this).transform.position, ((Component)this).transform.rotation); Object.Destroy((Object)(object)((Component)this).gameObject); } 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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, tr_self.localEulerAngles.z); } } public class Radar1S91 : MonoBehaviour { public GameObject airtarg; public GameObject pointing; public NavMeshAgent agent; public GameObject rotbase; public GameObject rotbaseelev; public GameObject sradar; public RotateOverTime rot; public GameObject fradar; public GameObject radarfold; public GameObject fradarbase; private Vector3 velocity; public GameObject mark; public Transform nearestAI; public List currentAI = null; public GameObject lookAtObj; public float distanceNearest = 0f; public Transform player; public Vector3 fradarvel = Vector3.zero; public Vector3 sradarvel = Vector3.zero; public LayerMask lm; public Transform radarpos; private void OnTriggerEnter(Collider other) { //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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) if ((((Object)((Component)other).gameObject).name == "Sosig_Torso" || ((Object)((Component)other).gameObject).name == "MIG29ATar") && ((Component)other).gameObject.transform.position.y - ((Component)this).gameObject.transform.position.y > 50f) { currentAI.Add(((Component)other).gameObject.GetComponent()); } } private void Start() { } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00f3: 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_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_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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_028c: 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_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0406: 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_0446: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pointing.transform.position - fradar.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Angle(((Component)this).transform.forward, normalized) / 20f; if (num > 0.01f || num < -0.01f) { Transform transform = fradar.transform; Vector3 val2 = Vector3.Slerp(fradar.transform.forward, normalized, Time.deltaTime / num); transform.forward = ((Vector3)(ref val2)).normalized; } else { Transform transform2 = ((Component)this).transform; Vector3 val3 = Vector3.Slerp(((Component)this).transform.forward, normalized, 1f); transform2.forward = ((Vector3)(ref val3)).normalized; } fradarbase.transform.eulerAngles = new Vector3(0f, fradar.transform.eulerAngles.y, 0f); if (rotbase.transform.localPosition.y < 0.008f) { radarfold.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } if (rotbase.transform.localPosition.y > 0.008f) { radarfold.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } if (currentAI == null || (Object)(object)nearestAI == (Object)null || distanceNearest > 1000f) { airtarg = GameObject.Find("F18_Steak(Clone)"); if ((Object)(object)airtarg != (Object)null) { if (radarfold.transform.localEulerAngles.x > 45f) { ((Behaviour)rot).enabled = true; } rotbaseelev.transform.localEulerAngles = new Vector3(90f, 0f, 0f); mark.SetActive(true); mark.transform.position = airtarg.transform.position; AxisLookAt(lookAtObj.transform, airtarg.transform.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, airtarg.transform.position); if (distanceNearest > 2000f) { airtarg = null; } } if ((Object)(object)airtarg == (Object)null) { mark.SetActive(false); mark.transform.localPosition = new Vector3(0f, 0f, 0f); lookAtObj.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Behaviour)rot).enabled = false; sradar.transform.localEulerAngles = Vector3.SmoothDamp(sradar.transform.localEulerAngles, new Vector3(0f, 0f, 0f), ref sradarvel, 1f); if (sradar.transform.localEulerAngles.y < 2f || sradar.transform.localEulerAngles.y > 358f) { rotbaseelev.transform.localEulerAngles = new Vector3(0f, 0f, 0f); } } } if ((Object)(object)nearestAI != (Object)null) { if (radarfold.transform.localEulerAngles.x > 45f) { ((Behaviour)rot).enabled = true; } rotbaseelev.transform.localEulerAngles = new Vector3(90f, 0f, 0f); mark.SetActive(true); mark.transform.position = ((Component)nearestAI).transform.position; AxisLookAt(lookAtObj.transform, nearestAI.position, Vector3.forward); distanceNearest = Vector3.Distance(player.position, ((Component)nearestAI).transform.position); if (distanceNearest > 2000f) { airtarg = null; } } AxisLookAt(mark.transform, lookAtObj.transform.position, Vector3.forward); if (currentAI == null) { return; } for (int i = 0; i < currentAI.Count; i++) { if ((Object)(object)currentAI[i] == (Object)null || Vector3.Distance(((Component)currentAI[i]).gameObject.transform.position, ((Component)this).gameObject.transform.position) > 2000f) { currentAI.Remove(currentAI[i]); } } nearestAI = GetNearestGameObject(player, currentAI); } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } public Transform GetNearestGameObject(Transform player, List objects) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) Transform val = null; if (objects == null || (Object)(object)val == (Object)null) { } if (objects.Count > 0 && (Object)(object)objects[0] != (Object)null) { val = ((Component)objects[0]).transform; float num = Vector3.Distance(player.position, ((Component)objects[0]).transform.position); for (int i = 1; i < objects.Count; i++) { float num2 = Vector3.Distance(player.position, ((Component)objects[i]).transform.position); if (num > num2) { num = num2; val = ((Component)objects[i]).transform; } } } return val; } } public class RideWhenPlayerIsOn : MonoBehaviour { public Transform parent; public GameObject followhead; private void Start() { } private void OnTriggerStay(Collider other) { if ((Object)(object)((Component)other).gameObject == (Object)(object)followhead) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent(((Component)parent).transform); } } private void OnTriggerExit(Collider other) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject == (Object)(object)followhead) { ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); } } private void Update() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) followhead.transform.position = ((Component)GM.CurrentMovementManager.Head).transform.position; } private void OnDisable() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); } private void OnDestroy() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((Component)GM.CurrentMovementManager).gameObject.transform.SetParent((Transform)null); ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles = new Vector3(0f, ((Component)GM.CurrentMovementManager).gameObject.transform.eulerAngles.y, 0f); Object.Destroy((Object)(object)followhead.gameObject); } } public class Trolly : MonoBehaviour { public Rigidbody rig1; public Rigidbody rig2; public Rigidbody rig3; public Rigidbody rig4; public Rigidbody rig5; public Rigidbody rig6; public Rigidbody rig7; public Rigidbody rig8; public Rigidbody rig9; private Rigidbody rig10; public Rigidbody parentdetect; public Rigidbody rig11; public Rigidbody rig12; public Rigidbody rig13; private ConfigurableJoint cfj; public Transform spawnpos; public FVRObject handlePrefab; private GameObject Handle; public float lastcurRot; public GameObject trigger; public GameObject lever; public float lastrot; public float thisrot; public HingeJoint jointR; public HingeJoint jointF; public float maxRot; public float minRot; public float curRot; public bool isPushingDown = false; public JointSpring jsR; public JointSpring jsF; public float frontMag; public bool isrotget = false; public float rotget; private void Start() { Handle = Object.Instantiate(((AnvilAsset)handlePrefab).GetGameObject(), spawnpos); cfj = Handle.AddComponent(); ((Joint)cfj).connectedBody = rig9; cfj.xMotion = (ConfigurableJointMotion)0; cfj.yMotion = (ConfigurableJointMotion)0; cfj.zMotion = (ConfigurableJointMotion)0; cfj.angularXMotion = (ConfigurableJointMotion)2; cfj.angularYMotion = (ConfigurableJointMotion)2; cfj.angularZMotion = (ConfigurableJointMotion)2; rig10 = Handle.GetComponent(); } private void Update() { //IL_018f: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_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_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) rig1.isKinematic = false; rig2.isKinematic = false; rig3.isKinematic = false; rig4.isKinematic = false; rig5.isKinematic = false; rig6.isKinematic = false; rig7.isKinematic = false; rig8.isKinematic = false; rig9.isKinematic = false; rig11.isKinematic = false; rig12.isKinematic = false; rig13.isKinematic = false; parentdetect.isKinematic = false; if ((Object)(object)rig10 != (Object)null && (Object)(object)Handle != (Object)null) { rig10.isKinematic = false; if ((Object)(object)rig10 == (Object)null || (Object)(object)Handle == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (curRot > maxRot) { curRot = maxRot; } else if (curRot < minRot) { curRot = minRot; } jsR.spring = 1000000f; jsF.spring = 1000000f; jsR.targetPosition = curRot; jsF.targetPosition = curRot / frontMag; jointR.spring = jsR; jointF.spring = jsF; if (trigger.transform.localEulerAngles.x < 45f) { thisrot = lever.transform.localEulerAngles.x; if (thisrot - lastrot > 0.5f) { isPushingDown = true; } else if (thisrot - lastrot <= 0.5f) { isPushingDown = false; } if (isPushingDown) { curRot += 25f * Time.deltaTime; } lastrot = thisrot; } else if (trigger.transform.localEulerAngles.x > 45f) { curRot -= 20f * Time.deltaTime; } } private void OnDestroy() { if ((Object)(object)rig10 != (Object)null) { Object.Destroy((Object)(object)((Component)rig10).gameObject); } Object.Destroy((Object)(object)((Component)parentdetect).gameObject); Object.Destroy((Object)(object)((Component)rig9).gameObject); Object.Destroy((Object)(object)((Component)rig8).gameObject); Object.Destroy((Object)(object)((Component)rig7).gameObject); Object.Destroy((Object)(object)((Component)rig6).gameObject); Object.Destroy((Object)(object)((Component)rig5).gameObject); Object.Destroy((Object)(object)((Component)rig4).gameObject); Object.Destroy((Object)(object)((Component)rig3).gameObject); Object.Destroy((Object)(object)((Component)rig2).gameObject); Object.Destroy((Object)(object)((Component)rig1).gameObject); Object.Destroy((Object)(object)((Component)rig11).gameObject); Object.Destroy((Object)(object)((Component)rig12).gameObject); Object.Destroy((Object)(object)((Component)rig13).gameObject); } } public class PortalGun : MonoBehaviour { public GameObject playerball; public float YHeight; public Vector3 vel = Vector3.zero; public GameObject blue; public GameObject yellow; public GameObject none; public AudioEvent shoot; public AudioEvent clear; public LayerMask lm; public Transform aperture; public RaycastHit hit; public GameObject triggerClear; public GameObject yellowTrigger; public GameObject blueTrigger; public bool fired = false; public GameObject yellowPortal; public GameObject bluePortal; public GameObject yellowPortalObjOut; public GameObject bluePortalObjOut; public GameObject yellowPortalOut; public GameObject bluePortalOut; public GameObject yellowPortalCam; public GameObject bluePortalCam; public GameObject yellowPortalCamRef; public GameObject bluePortalCamRef; public GameObject yellowRot; public GameObject blueRot; private void Start() { yellowPortal.transform.SetParent((Transform)null); bluePortal.transform.SetParent((Transform)null); blue.SetActive(false); yellow.SetActive(false); none.SetActive(true); yellowPortal.SetActive(false); bluePortal.SetActive(false); } private void AxisLookAt(Transform tr_self, Vector3 lookPos, Vector3 directionAxis) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = tr_self.rotation; Vector3 val = lookPos - tr_self.position; Vector3 val2 = tr_self.rotation * directionAxis; Vector3 val3 = Vector3.Cross(val2, val); Vector3 normalized = ((Vector3)(ref val3)).normalized; float num = Vector3.Angle(val2, val); tr_self.rotation = Quaternion.AngleAxis(num, normalized) * rotation; tr_self.localEulerAngles = new Vector3(tr_self.localEulerAngles.x, tr_self.localEulerAngles.y, 0f); } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_070e: Unknown result type (might be due to invalid IL or missing references) //IL_078e: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_0812: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(playerball.transform.position, yellowPortal.transform.position) < Vector3.Distance(playerball.transform.position, bluePortal.transform.position)) { if (yellowPortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y && yellowPortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = Vector3.SmoothDamp(playerball.transform.position, new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, yellowPortal.transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z), ref vel, 0.1f); } else if (yellowPortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } else if (yellowPortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } } else if (bluePortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y && bluePortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = Vector3.SmoothDamp(playerball.transform.position, new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, bluePortal.transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z), ref vel, 0.1f); } else if (bluePortal.transform.position.y < ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y - 2f, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } else if (bluePortal.transform.position.y > ((Component)GM.CurrentPlayerBody.Head).transform.position.y) { playerball.transform.position = new Vector3(((Component)GM.CurrentPlayerBody.Head).transform.position.x, ((Component)GM.CurrentPlayerBody.Head).transform.position.y, ((Component)GM.CurrentPlayerBody.Head).transform.position.z); } yellowPortalCam.transform.localRotation = yellowPortalCamRef.transform.localRotation; bluePortalCam.transform.localRotation = bluePortalCamRef.transform.localRotation; AxisLookAt(yellowPortalCamRef.transform, ((Component)GM.CurrentPlayerBody.Head).transform.position, Vector3.forward); AxisLookAt(bluePortalCamRef.transform, ((Component)GM.CurrentPlayerBody.Head).transform.position, Vector3.forward); if (yellowTrigger.transform.localEulerAngles.x > 45f && !fired) { blue.SetActive(false); yellow.SetActive(true); none.SetActive(false); SM.PlayGenericSound(shoot, ((Component)this).transform.position); shootYellow(); fired = true; } if (blueTrigger.transform.localEulerAngles.x > 45f && !fired) { blue.SetActive(true); yellow.SetActive(false); none.SetActive(false); SM.PlayGenericSound(shoot, ((Component)this).transform.position); shootBlue(); fired = true; } else if (yellowTrigger.transform.localEulerAngles.x < 45f && blueTrigger.transform.localEulerAngles.x < 45f && triggerClear.transform.localEulerAngles.x < 45f) { fired = false; } else if (triggerClear.transform.localEulerAngles.x > 45f && !fired) { blue.SetActive(false); yellow.SetActive(false); none.SetActive(true); SM.PlayGenericSound(clear, ((Component)this).transform.position); yellowPortal.SetActive(false); bluePortal.SetActive(false); yellowPortal.transform.localPosition = ((Component)this).transform.position; yellowPortal.transform.localEulerAngles = ((Component)this).transform.eulerAngles; bluePortal.transform.localPosition = ((Component)this).transform.position; bluePortal.transform.localEulerAngles = ((Component)this).transform.eulerAngles; fired = true; } } public void shootYellow() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Physics.Raycast(aperture.position, aperture.forward, ref hit, 1000f, LayerMask.op_Implicit(lm))) { yellowPortal.SetActive(true); yellowPortal.transform.position = ((RaycastHit)(ref hit)).point; yellowPortal.transform.rotation = Quaternion.LookRotation(((RaycastHit)(ref hit)).normal); } } public void shootBlue() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Physics.Raycast(aperture.position, aperture.forward, ref hit, 1000f, LayerMask.op_Implicit(lm))) { bluePortal.SetActive(true); bluePortal.transform.position = ((RaycastHit)(ref hit)).point; bluePortal.transform.rotation = Quaternion.LookRotation(((RaycastHit)(ref hit)).normal); } } private void OnDestroy() { Object.Destroy((Object)(object)yellowPortal.gameObject); Object.Destroy((Object)(object)bluePortal.gameObject); } } public class Portals : MonoBehaviour { public PortalGun pGun; public GameObject splode; public bool isYellowPortal = true; public GameObject face; public GameObject otherPotral; public Portals oppositeportal; private void OnTriggerEnter(Collider other) { //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject == (Object)(object)otherPotral) { ((Component)this).gameObject.SetActive(false); } if (!otherPotral.activeInHierarchy || !((Component)this).gameObject.activeInHierarchy) { return; } if ((Object)(object)((Component)other).gameObject == (Object)(object)pGun.playerball) { if (isYellowPortal) { ((Component)GM.CurrentMovementManager).transform.eulerAngles = new Vector3(0f, pGun.bluePortal.transform.eulerAngles.y, 0f); ((Component)GM.CurrentMovementManager).transform.position = pGun.bluePortalOut.transform.position; GM.CurrentMovementManager.Blast(pGun.bluePortalOut.transform.forward, 15f, false); Object.Instantiate(splode, pGun.bluePortalOut.transform); } else { ((Component)GM.CurrentMovementManager).transform.eulerAngles = new Vector3(0f, pGun.yellowPortal.transform.eulerAngles.y, 0f); ((Component)GM.CurrentMovementManager).transform.position = pGun.yellowPortalOut.transform.position; GM.CurrentMovementManager.Blast(pGun.yellowPortalOut.transform.forward, 15f, false); Object.Instantiate(splode, pGun.yellowPortalOut.transform); } } if (!((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null)) { return; } if ((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null) { if ((Object)(object)((Component)other).gameObject.GetComponent().m_quickbeltSlot != (Object)null) { return; } if (isYellowPortal) { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.bluePortalObjOut.transform.position; Object.Instantiate(splode, pGun.bluePortalOut.transform.position, pGun.bluePortalOut.transform.rotation); } else { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.yellowPortalObjOut.transform.position; Object.Instantiate(splode, pGun.yellowPortalOut.transform.position, pGun.yellowPortalOut.transform.rotation); } } if (isYellowPortal) { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.bluePortalObjOut.transform.position; Object.Instantiate(splode, pGun.bluePortalOut.transform.position, pGun.bluePortalOut.transform.rotation); } else { ((Component)other).gameObject.GetComponent().velocity = Vector3.zero; ((Component)other).transform.position = pGun.yellowPortalObjOut.transform.position; Object.Instantiate(splode, pGun.yellowPortalOut.transform.position, pGun.yellowPortalOut.transform.rotation); } } private void Update() { if (((Component)this).gameObject.activeInHierarchy && otherPotral.activeInHierarchy) { face.SetActive(true); } else { face.SetActive(false); } } } public class FrankenTurret : MonoBehaviour { public Animator ani; public FVRPhysicalObject obj; public LayerMask lm; public Transform bottom; public Transform top; public Transform left; public Transform right; public Transform rear; public float length = 0.5f; public float lengthshort = 0.05f; private void Start() { } private void Update() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)obj).m_isHeld) { ani.SetBool("Grabbed", true); ani.SetBool("InTheAir", false); ani.SetBool("FallOver", false); return; } ani.SetBool("Grabbed", false); RaycastHit val = default(RaycastHit); if (Physics.Raycast(bottom.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, length, LayerMask.op_Implicit(lm))) { ani.SetBool("InTheAir", false); ani.SetBool("FallOver", false); } else if (Physics.Raycast(top.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) || Physics.Raycast(left.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) || Physics.Raycast(right.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) || Physics.Raycast(rear.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm))) { ani.SetBool("InTheAir", false); ani.SetBool("FallOver", true); } else if (!Physics.Raycast(top.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) && !Physics.Raycast(left.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) && !Physics.Raycast(right.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm)) && !Physics.Raycast(rear.position, ((Component)this).transform.TransformDirection(Vector3.forward), ref val, lengthshort, LayerMask.op_Implicit(lm))) { ani.SetBool("InTheAir", true); ani.SetBool("FallOver", false); } } } public class Watch : MonoBehaviour { public GameObject hour; public GameObject minute; public GameObject second; public GameObject hourGeo; public GameObject minuteGeo; public GameObject secondGeo; public float refSec; public float rotationSpeed = 10f; private void Start() { //IL_002a: 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_0090: 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_00f7: 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) second.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Second * 6f, 0f); minute.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Minute * 6f, 0f); hour.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Hour * 30f, 0f); secondGeo.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Second * 6f, 0f); minuteGeo.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Minute * 6f, 0f); hourGeo.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Hour * 30f, 0f); } private void FixedUpdate() { //IL_002a: 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_0090: Unknown result type (might be due to invalid IL or missing references) second.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Second * 6f, 0f); minute.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Minute * 6f, 0f); hour.transform.localEulerAngles = new Vector3(0f, (float)DateTime.Now.Hour * 30f, 0f); } private void Update() { //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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_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_010e: Unknown result type (might be due to invalid IL or missing references) Quaternion val = Quaternion.Euler(0f, second.transform.localEulerAngles.y, 0f); Quaternion localRotation = secondGeo.transform.localRotation; secondGeo.transform.localRotation = Quaternion.Slerp(localRotation, val, Time.deltaTime * rotationSpeed); minuteGeo.transform.localEulerAngles = new Vector3(0f, minute.transform.localEulerAngles.y + 6f * (second.transform.localEulerAngles.y / 360f), 0f); hourGeo.transform.localEulerAngles = new Vector3(0f, hour.transform.localEulerAngles.y + 30f * (minuteGeo.transform.localEulerAngles.y / 360f), 0f); } } public class WristAttaching : MonoBehaviour { public FVRPhysicalObject mainObj; public FVRInteractiveObject grabInterface; public GameObject phys; public BoxCollider mainCol; public Rigidbody mainRig; public bool LeftOn = false; public bool RightOn = false; public GameObject posLeft; public GameObject posRight; public GameObject WatchGeo; public GameObject posMiddle; public AR15HandleSightFlipper flipper; private void FixedUpdate() { //IL_0044: 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_01c8: 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_0213: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: 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_0165: Unknown result type (might be due to invalid IL or missing references) if (((FVRInteractiveObject)mainObj).m_isHeld) { if ((Object)(object)((FVRInteractiveObject)mainObj).m_hand == (Object)(object)GM.CurrentMovementManager.Hands[0]) { if (Vector3.Distance(((Component)mainObj).gameObject.transform.position, GM.CurrentMovementManager.Hands[1].PalmTransform.position) < 0.1f) { LeftOn = false; RightOn = true; } else if (Vector3.Distance(((Component)mainObj).gameObject.transform.position, GM.CurrentMovementManager.Hands[1].PalmTransform.position) >= 0.1f) { LeftOn = false; RightOn = false; } } if ((Object)(object)((FVRInteractiveObject)mainObj).m_hand == (Object)(object)GM.CurrentMovementManager.Hands[1]) { if (Vector3.Distance(((Component)mainObj).gameObject.transform.position, GM.CurrentMovementManager.Hands[0].PalmTransform.position) < 0.1f) { LeftOn = true; RightOn = false; } else if (Vector3.Distance(((Component)mainObj).gameObject.transform.position, GM.CurrentMovementManager.Hands[0].PalmTransform.position) >= 0.1f) { LeftOn = false; RightOn = false; } } } if ((!RightOn && !LeftOn) || ((FVRInteractiveObject)mainObj).m_isHeld) { WatchGeo.transform.localPosition = posMiddle.transform.localPosition; WatchGeo.transform.localRotation = posMiddle.transform.localRotation; mainRig.isKinematic = false; mainCol.size = new Vector3(0.05f, 0.05f, 0.02f); phys.SetActive(true); flipper.m_isLargeAperture = true; } if (grabInterface.m_isHeld) { WatchGeo.transform.localPosition = posMiddle.transform.localPosition; WatchGeo.transform.localRotation = posMiddle.transform.localRotation; mainRig.isKinematic = false; mainCol.size = new Vector3(0.05f, 0.05f, 0.02f); FVRViveHand hand = grabInterface.m_hand; grabInterface.ForceBreakInteraction(); ((FVRInteractiveObject)mainObj).BeginInteraction(hand); hand.ForceSetInteractable((FVRInteractiveObject)(object)mainObj); phys.SetActive(true); flipper.m_isLargeAperture = true; ((Component)grabInterface).gameObject.SetActive(false); } if (!((FVRInteractiveObject)mainObj).m_isHeld && !RightOn && !LeftOn) { flipper.m_isLargeAperture = true; } } private void Update() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: 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) if (LeftOn && !RightOn && !((FVRInteractiveObject)mainObj).m_isHeld) { ((Component)mainObj).gameObject.transform.position = ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.position; ((Component)mainObj).gameObject.transform.rotation = ((Component)GM.CurrentMovementManager.Hands[0]).gameObject.transform.rotation; WatchGeo.transform.localPosition = posLeft.transform.localPosition; WatchGeo.transform.localRotation = posLeft.transform.localRotation; ((FVRInteractiveObject)mainObj).OnHoverEnd(); mainRig.isKinematic = true; mainCol.size = new Vector3(0f, 0f, 0f); phys.SetActive(false); ((Component)grabInterface).gameObject.SetActive(true); } if (RightOn && !LeftOn && !((FVRInteractiveObject)mainObj).m_isHeld) { ((Component)mainObj).gameObject.transform.position = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.position; ((Component)mainObj).gameObject.transform.rotation = ((Component)GM.CurrentMovementManager.Hands[1]).gameObject.transform.rotation; WatchGeo.transform.localPosition = posRight.transform.localPosition; WatchGeo.transform.localRotation = posRight.transform.localRotation; ((FVRInteractiveObject)mainObj).OnHoverEnd(); mainRig.isKinematic = true; mainCol.size = new Vector3(0f, 0f, 0f); phys.SetActive(false); ((Component)grabInterface).gameObject.SetActive(true); } } } public class RotateWith : MonoBehaviour { public GameObject main; public GameObject elevobj; public Text windSpeedText; public Text elev; public Text direction; public GameObject windwheel; public float windspeed; public GameObject dirtrue; public GameObject dirdisplay; private void Start() { } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) if (elevobj.transform.localEulerAngles.x < 360f && elevobj.transform.localEulerAngles.x > 180f) { elev.text = ((int)(elevobj.transform.localEulerAngles.x - 360f)).ToString(); } else if (elevobj.transform.localEulerAngles.x < 180f && elevobj.transform.localEulerAngles.x > 0f) { elev.text = ((int)elevobj.transform.localEulerAngles.x).ToString(); } direction.text = ((int)main.transform.eulerAngles.y).ToString(); dirdisplay.transform.localEulerAngles = new Vector3(0f, dirtrue.transform.localEulerAngles.y, 0f); Vector3 val = WindPlugin.WindVector + WindPlugin.ActiveGustVector; dirtrue.transform.rotation = Quaternion.LookRotation(val); if ((Object)(object)windSpeedText != (Object)null) { windSpeedText.text = Mathf.Round(((Vector3)(ref val)).magnitude * 100f) / 100f + " m/s"; } windwheel.transform.Rotate(Mathf.Round(((Vector3)(ref val)).magnitude * 100f) / 100f * 500f * Time.deltaTime, 0f, 0f, (Space)1); } } }