private void NoRecoil() { if (!CVars.Misc.NoRecoil) { return; } HumanController localController = HackLocal.LocalController; InventoryItem currentEquippedItem = HackLocal.GetCurrentEquippedItem(localController); if (currentEquippedItem != null && !(currentEquippedItem is MeleeWeaponItem <MeleeWeaponDataBlock>)) { BulletWeaponItem <BulletWeaponDataBlock> bulletWeaponItem = currentEquippedItem as BulletWeaponItem <BulletWeaponDataBlock>; if (bulletWeaponItem != null) { bulletWeaponItem.datablock.bulletRange = 300f; bulletWeaponItem.datablock.recoilPitchMin = 0f; bulletWeaponItem.datablock.recoilPitchMax = 0f; bulletWeaponItem.datablock.recoilYawMin = 0f; bulletWeaponItem.datablock.recoilYawMax = 0f; bulletWeaponItem.datablock.aimSway = 0f; bulletWeaponItem.datablock.aimSwaySpeed = 0f; } } CameraMount componentInChildren = localController.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { HeadBob component = componentInChildren.GetComponent <HeadBob>(); if (component != null) { component.aimRotationScalar = 0f; component.viewModelRotationScalar = 0f; } } }
protected override void OnControlEngauge() { base.OnControlEngauge(); if (base.localControlled) { CameraMount componentInChildren = base.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { componentInChildren.open = true; } this.contextProbe = (this.contextProbe == null) ? base.AddAddon <ContextProbe>() : this.contextProbe; this.localRadiation = (this.localRadiation == null) ? base.AddAddon <LocalRadiationEffect>() : this.localRadiation; if (this.onceEngaged) { if (this.proxyTest != null) { this.proxyTest.treatAsProxy = false; } } else { this.proxyTest = base.GetComponent <PlayerProxyTest>(); this.onceEngaged = true; } base.enabled = true; } }
private static CameraMount CreateTemporaryCameraMount(CameraMount copyFrom, Transform parent, bool hasParent) { if (CameraMount.creatingTemporaryCameraMount) { throw new InvalidOperationException("Invalid/unexpected call stack recursion"); } CameraMount.ClearTemporaryCameraMount(); try { CameraMount.creatingTemporaryCameraMount = true; CameraMount.temporaryCameraMountSource = copyFrom; CameraMount.temporaryCameraMountHasParent = hasParent; CameraMount.temporaryCameraMountParent = parent; GameObject gameObject = new GameObject("__-temp mount-__", new Type[] { typeof(CameraMount) }) { hideFlags = HideFlags.DontSave }; CameraMount.temporaryCameraMountGameObject = gameObject; } finally { CameraMount.creatingTemporaryCameraMount = false; CameraMount.temporaryCameraMountSource = null; CameraMount.temporaryCameraMountHasParent = false; CameraMount.temporaryCameraMountParent = null; CameraMount.createdTemporaryCameraMount = CameraMount.temporaryCameraMount; } return(CameraMount.temporaryCameraMount); }
private void Awake() { this.awoke = true; if (this.camera == null) { this.camera = base.camera; } this.camera.enabled = false; if (creatingTemporaryCameraMount) { temporaryCameraMount = this; if (temporaryCameraMountHasParent) { Transform transform = base.transform; transform.parent = temporaryCameraMountParent; Transform transform2 = temporaryCameraMountSource.transform; transform.localPosition = transform2.localPosition; transform.localRotation = transform2.localRotation; transform.localScale = transform2.localScale; } this.camera.CopyFrom(temporaryCameraMountSource.camera); this.cameraFX = temporaryCameraMountSource.cameraFX; if (temporaryCameraMountSource.open) { this.Bind(); } } else if (this.autoBind) { this.Bind(); } }
private static CameraMount CreateTemporaryCameraMount(CameraMount copyFrom, Transform parent, bool hasParent) { if (creatingTemporaryCameraMount) { throw new InvalidOperationException("Invalid/unexpected call stack recursion"); } ClearTemporaryCameraMount(); try { creatingTemporaryCameraMount = true; temporaryCameraMountSource = copyFrom; temporaryCameraMountHasParent = hasParent; temporaryCameraMountParent = parent; Type[] components = new Type[] { typeof(CameraMount) }; GameObject obj2 = new GameObject("__-temp mount-__", components) { hideFlags = HideFlags.DontSave }; temporaryCameraMountGameObject = obj2; } finally { creatingTemporaryCameraMount = false; temporaryCameraMountSource = null; temporaryCameraMountHasParent = false; temporaryCameraMountParent = null; createdTemporaryCameraMount = (bool)temporaryCameraMount; } return(temporaryCameraMount); }
private void UnBind() { if (CameraMount.top == this) { CameraMount.SetMountInactive(); if (CameraMount.queue.Count <= 0) { CameraMount.top = null; } else { CameraMount.top = CameraMount.queue.Pop(); CameraMount.SetMountActive(); } } else if (CameraMount.queue.Count <= 1) { CameraMount.queue.Pop(); } else if (CameraMount.queue.Peek() != this) { CameraMount.REMOVE_FROM_QUEUE(this); } else { CameraMount.queue.Pop(); } this.bound = false; }
public void PreCullBegin() { CameraMount cameraMount = CameraMount.current; if (cameraMount != this.mount) { if (!cameraMount) { this._cameraFX = null; } else { this._cameraFX = cameraMount.cameraFX; } CameraFXPre.cameraFX = this._cameraFX; CameraFXPost.cameraFX = this._cameraFX; this.mount = cameraMount; } if (this.mount) { Camera camera = this.mount.camera; camera.ResetAspect(); camera.ResetProjectionMatrix(); camera.ResetWorldToCameraMatrix(); this.mount.OnPreMount(this); } }
protected override void OnControlCease() { if (base.localControlled) { CameraMount componentInChildren = base.GetComponentInChildren <CameraMount>(); if (componentInChildren) { componentInChildren.open = false; } } base.RemoveAddon <ContextProbe>(ref this.contextProbe); base.RemoveAddon <LocalRadiationEffect>(ref this.localRadiation); base.enabled = false; if (base.localControlled) { if (this.proxyTest) { this.proxyTest.treatAsProxy = true; } if (this._inventory) { this._inventory.DeactivateItem(); } } base.OnControlCease(); }
private static bool GetCharacterStuff(ref ConsoleSystem.Arg args, out Character character, out CameraMount camera, out ItemRepresentation itemRep, out ArmorModelRenderer armor) { character = null; itemRep = null; armor = null; camera = CameraMount.current; if (!camera) { args.ReplyWith("Theres no active camera mount."); return false; } character = IDBase.GetMain(camera) as Character; if (!character) { args.ReplyWith("theres no character for the current mounted camera"); return false; } armor = character.GetLocal<ArmorModelRenderer>(); InventoryHolder local = character.GetLocal<InventoryHolder>(); if (local) { itemRep = local.itemRepresentation; } return true; }
protected void uLink_OnNetworkInstantiate(uLink.NetworkMessageInfo info) { this.instantiatedPlayerClient = base.playerClient; if (this.instantiatedPlayerClient) { base.name = string.Format("{0}{1}", this.instantiatedPlayerClient.name, info.networkView.localPrefab); } try { this.deathTransfer = base.AddAddon <DeathTransfer>(); } catch (Exception exception) { Debug.LogException(exception, this); } if (!base.networkView.isMine) { if (base.CreateInterpolator()) { base.interpolator.running = true; } UnityEngine.Object.Destroy(base.GetComponent <LocalDamageDisplay>()); } else { CameraMount.ClearTemporaryCameraMount(); UnityEngine.Object.Destroy(base.GetComponent <ApplyCrouch>()); base.CreateCCMotor(); base.CreateOverlay(); } }
private void ClientLocalDeath() { Transform transforms; bool flag; Ragdoll ragdoll = this.DeathRagdoll(); if (base.localControlled) { if (!actor.forceThirdPerson) { CameraMount componentInChildren = base.GetComponentInChildren <CameraMount>(); if (!componentInChildren || !componentInChildren.open) { Debug.Log("No camera?"); } else { RagdollTransferInfoProvider ragdollTransferInfoProvider = base.controller as RagdollTransferInfoProvider; if (ragdollTransferInfoProvider == null) { transforms = null; flag = false; } else { try { RagdollTransferInfo ragdollTransferInfo = ragdollTransferInfoProvider.RagdollTransferInfo; flag = ragdollTransferInfo.FindHead(ragdoll.transform, out transforms); } catch (Exception exception) { Debug.LogException(exception, this); transforms = null; flag = false; } } if (flag) { Vector3 vector3 = transforms.InverseTransformPoint(componentInChildren.transform.position); vector3.y = vector3.y + 0.08f; Vector3 vector31 = transforms.TransformPoint(vector3); Ragdoll ragdoll1 = ragdoll; ragdoll1.origin = ragdoll1.origin + (vector31 - transforms.position); CameraMount.CreateTemporaryCameraMount(componentInChildren, transforms).camera.nearClipPlane = 0.02f; } ArmorModelRenderer local = ragdoll.GetLocal <ArmorModelRenderer>(); if (local) { local.enabled = false; } } } UnityEngine.Object.Destroy(base.GetComponent <LocalDamageDisplay>()); } }
private void ClientLocalDeath() { Ragdoll ragdoll = this.DeathRagdoll(); if (base.localControlled) { if (!actor.forceThirdPerson) { CameraMount componentInChildren = base.GetComponentInChildren <CameraMount>(); if ((componentInChildren != null) && componentInChildren.open) { Transform transform; bool flag; RagdollTransferInfoProvider controller = base.controller as RagdollTransferInfoProvider; if (controller != null) { try { flag = controller.RagdollTransferInfo.FindHead(ragdoll.transform, out transform); } catch (Exception exception) { Debug.LogException(exception, this); transform = null; flag = false; } } else { transform = null; flag = false; } if (flag) { Vector3 position = transform.InverseTransformPoint(componentInChildren.transform.position); position.y += 0.08f; Vector3 vector2 = transform.TransformPoint(position); ragdoll.origin += vector2 - transform.position; CameraMount.CreateTemporaryCameraMount(componentInChildren, transform).camera.nearClipPlane = 0.02f; } ArmorModelRenderer local = ragdoll.GetLocal <ArmorModelRenderer>(); if (local != null) { local.enabled = false; } } else { Debug.Log("No camera?"); } } Object.Destroy(base.GetComponent <LocalDamageDisplay>()); } }
public void DisableHeadTracking(bool disable) { if (isCardboard) { CardboardHead head = Cardboard.Controller.Head; head.trackRotation = !disable; head.trackPosition = !disable; } else { CameraMount mount = Camera.main.transform.parent.GetComponent <CameraMount>(); if (mount != null) { mount.DiabledTracking(disable); } } }
private static void REMOVE_FROM_QUEUE(CameraMount rem) { try { int count = CameraMount.queue.Count; for (int i = 0; i < count; i++) { CameraMount cameraMount = CameraMount.queue.Pop(); if (cameraMount != rem) { CameraMount.WORK_LATE.list.Add(cameraMount); } } CameraMount.WORK_LATE.list.Reverse(); foreach (CameraMount cameraMount1 in CameraMount.WORK_LATE.list) { CameraMount.queue.Push(cameraMount1); } } finally { CameraMount.WORK_LATE.list.Clear(); } }
private void Bind() { if (!CameraMount.top) { CameraMount.top = this; CameraMount.SetMountActive(); } else if (CameraMount.top.importance < this.importance) { CameraMount.SetMountInactive(); CameraMount.queue.Push(CameraMount.top); CameraMount.top = this; CameraMount.SetMountActive(); } else if (CameraMount.queue.Count == 0 || CameraMount.queue.Peek().importance <= this.importance) { CameraMount.queue.Push(this); } else { CameraMount.SORT_QUEUE(this); } this.bound = true; }
private void Bind() { if (top == null) { top = this; SetMountActive(); } else if (top.importance < this.importance) { SetMountInactive(); queue.Push(top); top = this; SetMountActive(); } else if ((queue.Count == 0) || (queue.Peek().importance <= this.importance)) { queue.Push(this); } else { SORT_QUEUE(this); } this.bound = true; }
private static void REMOVE_FROM_QUEUE(CameraMount rem) { try { int count = queue.Count; for (int i = 0; i < count; i++) { CameraMount item = queue.Pop(); if (item != rem) { WORK_LATE.list.Add(item); } } WORK_LATE.list.Reverse(); foreach (CameraMount mount2 in WORK_LATE.list) { queue.Push(mount2); } } finally { WORK_LATE.list.Clear(); } }
private void SetLocalOnlyComponentsEnabled(bool enable) { CCMotor component = base.GetComponent <CCMotor>(); if (component != null) { component.enabled = enable; CharacterController collider = base.collider as CharacterController; if (collider != null) { collider.enabled = enable; } } CameraMount componentInChildren = base.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { componentInChildren.open = enable; HeadBob bob = componentInChildren.GetComponent <HeadBob>(); if (bob != null) { bob.enabled = enable; } LazyCam cam = componentInChildren.GetComponent <LazyCam>(); if (cam != null) { cam.enabled = enable; } } LocalDamageDisplay display = base.GetComponent <LocalDamageDisplay>(); if (display != null) { display.enabled = enable; } }
private void SetLocalOnlyComponentsEnabled(bool enable) { CCMotor component = base.GetComponent <CCMotor>(); if (component) { component.enabled = enable; CharacterController characterController = base.collider as CharacterController; if (characterController) { characterController.enabled = enable; } } CameraMount componentInChildren = base.GetComponentInChildren <CameraMount>(); if (componentInChildren) { componentInChildren.open = enable; HeadBob headBob = componentInChildren.GetComponent <HeadBob>(); if (headBob) { headBob.enabled = enable; } LazyCam lazyCam = componentInChildren.GetComponent <LazyCam>(); if (lazyCam) { lazyCam.enabled = enable; } } LocalDamageDisplay localDamageDisplay = base.GetComponent <LocalDamageDisplay>(); if (localDamageDisplay) { localDamageDisplay.enabled = enable; } }
public static CameraMount CreateTemporaryCameraMount(CameraMount copyFrom, Transform parent) { return CameraMount.CreateTemporaryCameraMount(copyFrom, parent, parent); }
private static CameraMount CreateTemporaryCameraMount(CameraMount copyFrom, Transform parent, bool hasParent) { if (CameraMount.creatingTemporaryCameraMount) { throw new InvalidOperationException("Invalid/unexpected call stack recursion"); } CameraMount.ClearTemporaryCameraMount(); try { CameraMount.creatingTemporaryCameraMount = true; CameraMount.temporaryCameraMountSource = copyFrom; CameraMount.temporaryCameraMountHasParent = hasParent; CameraMount.temporaryCameraMountParent = parent; GameObject gameObject = new GameObject("__-temp mount-__", new Type[] { typeof(CameraMount) }) { hideFlags = HideFlags.DontSave }; CameraMount.temporaryCameraMountGameObject = gameObject; } finally { CameraMount.creatingTemporaryCameraMount = false; CameraMount.temporaryCameraMountSource = null; CameraMount.temporaryCameraMountHasParent = false; CameraMount.temporaryCameraMountParent = null; CameraMount.createdTemporaryCameraMount = CameraMount.temporaryCameraMount; } return CameraMount.temporaryCameraMount; }
private void NoRecoil() { if (CVars.Misc.NoRecoil) { HumanController localController = ESP_UpdateOBJs.LocalController; InventoryItem currentEquippedItem = Local.GetCurrentEquippedItem(localController); if ((currentEquippedItem != null) && !(currentEquippedItem is MeleeWeaponItem <MeleeWeaponDataBlock>)) { BulletWeaponItem <BulletWeaponDataBlock> item2 = currentEquippedItem as BulletWeaponItem <BulletWeaponDataBlock>; if (item2 != null) { defaultBulletRange = item2.datablock.bulletRange; defaultRecoilPitchMin = item2.datablock.recoilPitchMin; defaultRecoilPitchMax = item2.datablock.recoilPitchMax; defaultRecoilYawMin = item2.datablock.recoilYawMin; defaultRecoilYawMax = item2.datablock.recoilYawMax; defaultAimSway = item2.datablock.aimSway; defaultAimSwaySpeed = item2.datablock.aimSwaySpeed; //item2.datablock.bulletRange = 300f; item2.datablock.recoilPitchMin = 0f; item2.datablock.recoilPitchMax = 0f; item2.datablock.recoilYawMin = 0f; item2.datablock.recoilYawMax = 0f; item2.datablock.aimSway = 0f; item2.datablock.aimSwaySpeed = 0f; } } CameraMount componentInChildren = localController.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { HeadBob component = componentInChildren.GetComponent <HeadBob>(); if (component != null) { defaultAimRotationScalar = component.aimRotationScalar; defaultViewModelRotationScalar = component.viewModelRotationScalar; component.aimRotationScalar = 0f; component.viewModelRotationScalar = 0f; } } } else { if (defaultBulletRange == 0f) { HumanController localController = ESP_UpdateOBJs.LocalController; InventoryItem currentEquippedItem = Local.GetCurrentEquippedItem(localController); if ((currentEquippedItem != null) && !(currentEquippedItem is MeleeWeaponItem <MeleeWeaponDataBlock>)) { BulletWeaponItem <BulletWeaponDataBlock> item2 = currentEquippedItem as BulletWeaponItem <BulletWeaponDataBlock>; if (item2 != null) { defaultBulletRange = item2.datablock.bulletRange; defaultRecoilPitchMin = item2.datablock.recoilPitchMin; defaultRecoilPitchMax = item2.datablock.recoilPitchMax; defaultRecoilYawMin = item2.datablock.recoilYawMin; defaultRecoilYawMax = item2.datablock.recoilYawMax; defaultAimSway = item2.datablock.aimSway; defaultAimSwaySpeed = item2.datablock.aimSwaySpeed; } } CameraMount componentInChildren = localController.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { HeadBob component = componentInChildren.GetComponent <HeadBob>(); if (component != null) { defaultAimRotationScalar = component.aimRotationScalar; defaultViewModelRotationScalar = component.viewModelRotationScalar; } } } else { HumanController localController = ESP_UpdateOBJs.LocalController; InventoryItem currentEquippedItem = Local.GetCurrentEquippedItem(localController); if ((currentEquippedItem != null) && !(currentEquippedItem is MeleeWeaponItem <MeleeWeaponDataBlock>)) { BulletWeaponItem <BulletWeaponDataBlock> item2 = currentEquippedItem as BulletWeaponItem <BulletWeaponDataBlock>; if (item2 != null) { //item2.datablock.bulletRange = defaultBulletRange; item2.datablock.recoilPitchMin = defaultRecoilPitchMin; item2.datablock.recoilPitchMax = defaultRecoilPitchMax; item2.datablock.recoilYawMin = defaultRecoilYawMin; item2.datablock.recoilYawMax = defaultRecoilYawMax; item2.datablock.aimSway = defaultAimSway; item2.datablock.aimSwaySpeed = defaultAimSwaySpeed; } } CameraMount componentInChildren = localController.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { HeadBob component = componentInChildren.GetComponent <HeadBob>(); if (component != null) { component.aimRotationScalar = defaultAimRotationScalar; component.viewModelRotationScalar = defaultViewModelRotationScalar; } } } } }
private static bool GetCharacterStuff(ref ConsoleSystem.Arg args, out Character character, out CameraMount camera, out ItemRepresentation itemRep, out ArmorModelRenderer armor) { character = null; itemRep = null; armor = null; camera = CameraMount.current; if (!camera) { args.ReplyWith("Theres no active camera mount."); return(false); } character = IDBase.GetMain(camera) as Character; if (!character) { args.ReplyWith("theres no character for the current mounted camera"); return(false); } armor = character.GetLocal <ArmorModelRenderer>(); InventoryHolder local = character.GetLocal <InventoryHolder>(); if (local) { itemRep = local.itemRepresentation; } return(true); }
private static void SORT_QUEUE(CameraMount addExtra) { CameraMount.WORK_LATE.list.Add(addExtra); CameraMount.SORT_QUEUE(); }
private void Awake() { this.awoke = true; if (!this.camera) { this.camera = base.camera; } this.camera.enabled = false; if (CameraMount.creatingTemporaryCameraMount) { CameraMount.temporaryCameraMount = this; if (CameraMount.temporaryCameraMountHasParent) { Transform transforms = base.transform; transforms.parent = CameraMount.temporaryCameraMountParent; Transform transforms1 = CameraMount.temporaryCameraMountSource.transform; transforms.localPosition = transforms1.localPosition; transforms.localRotation = transforms1.localRotation; transforms.localScale = transforms1.localScale; } this.camera.CopyFrom(CameraMount.temporaryCameraMountSource.camera); this.cameraFX = CameraMount.temporaryCameraMountSource.cameraFX; if (CameraMount.temporaryCameraMountSource.open) { this.Bind(); } } else if (this.autoBind) { this.Bind(); } }
public static CameraMount CreateTemporaryCameraMount(CameraMount copyFrom) { return CameraMount.CreateTemporaryCameraMount(copyFrom, null, false); }
public static CameraMount CreateTemporaryCameraMount(CameraMount copyFrom) { return(CreateTemporaryCameraMount(copyFrom, null, false)); }
public static CameraMount CreateTemporaryCameraMount(CameraMount copyFrom, Transform parent) { return(CreateTemporaryCameraMount(copyFrom, parent, (bool)parent)); }
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250 public void OnGUI() { bool flag = !PlayerClient.GetLocalPlayer() || !PlayerClient.GetLocalPlayer().controllable; if (flag) { ZoomGUIRustNoWipe.onlytimemsg = true; ZoomGUIRustNoWipe.levelzoom = 60f; ZoomGUIRustNoWipe.counterseconds = 10f; Zoom.On = false; } else { bool flag2 = !Zoom.On && ZoomGUIRustNoWipe.counterseconds >= 0f; if (flag2) { GUI.DrawTexture(new Rect(600f, 200f, 116f, 54f), ZoomGUIRustNoWipe.Messagy, ScaleMode.StretchToFill); ZoomGUIRustNoWipe.counterseconds -= Time.deltaTime; } else { bool flag3 = !Zoom.On && ZoomGUIRustNoWipe.onlytimemsg; if (flag3) { ZoomGUIRustNoWipe.onlytimemsg = false; } else { bool flag4 = PlayerClient.GetLocalPlayer() || (PlayerClient.GetLocalPlayer().controllable&& Zoom.On); if (flag4) { ZoomGUIRustNoWipe.mouse0 = false; ZoomGUIRustNoWipe.mouse1 = false; bool key = Input.GetKey(KeyCode.Mouse0); if (key) { ZoomGUIRustNoWipe.mouse1 = true; } bool key2 = Input.GetKey(KeyCode.Mouse1); if (key2) { ZoomGUIRustNoWipe.mouse0 = true; } bool keyUp = Input.GetKeyUp(KeyCode.Mouse0); if (keyUp) { ZoomGUIRustNoWipe.mouse1 = false; } bool keyUp2 = Input.GetKeyUp(KeyCode.Mouse1); if (keyUp2) { ZoomGUIRustNoWipe.mouse0 = false; } } bool flag5 = ZoomGUIRustNoWipe.mouse1 && !ZoomGUIRustNoWipe.mouse0 && Zoom.On; if (flag5) { Inventory component = PlayerClient.GetLocalPlayer().controllable.GetComponent <Inventory>(); this.ClearWeapon(component); bool flag6 = ZoomGUIRustNoWipe.levelzoom > 60f; if (flag6) { ZoomGUIRustNoWipe.levelzoom = 60f; } bool flag7 = ZoomGUIRustNoWipe.levelzoom < 0f; if (flag7) { ZoomGUIRustNoWipe.levelzoom = 0f; } bool flag8 = ZoomGUIRustNoWipe.levelzoom >= 20f; if (flag8) { ZoomGUIRustNoWipe.levelzoom = ZoomGUIRustNoWipe.levelzoom - Time.deltaTime - 0.3f; } bool flag9 = ZoomGUIRustNoWipe.levelzoom < 20f; if (flag9) { ZoomGUIRustNoWipe.levelzoom = ZoomGUIRustNoWipe.levelzoom - Time.deltaTime - 0.05f; } bool flag10 = ZoomGUIRustNoWipe.levelzoom > 0f; if (flag10) { HumanController component2 = PlayerClient.GetLocalPlayer().controllable.GetComponent <HumanController>(); CameraMount componentInChildren = component2.GetComponentInChildren <CameraMount>(); bool flag11 = componentInChildren != null; if (flag11) { HeadBob component3 = componentInChildren.GetComponent <HeadBob>(); bool flag12 = component3 != null; if (flag12) { CameraFX mainCameraFX = CameraFX.mainCameraFX; bool flag13 = mainCameraFX != null; if (flag13) { mainCameraFX.SetFieldOfView(ZoomGUIRustNoWipe.levelzoom, 1f); } } } } } bool flag14 = ZoomGUIRustNoWipe.mouse0 && !ZoomGUIRustNoWipe.mouse1 && Zoom.On; if (flag14) { Inventory component4 = PlayerClient.GetLocalPlayer().controllable.GetComponent <Inventory>(); this.ClearWeapon(component4); bool flag15 = ZoomGUIRustNoWipe.levelzoom > 60f; if (flag15) { ZoomGUIRustNoWipe.levelzoom = 60f; } bool flag16 = ZoomGUIRustNoWipe.levelzoom < 0f; if (flag16) { ZoomGUIRustNoWipe.levelzoom = 0f; } bool flag17 = ZoomGUIRustNoWipe.levelzoom >= 20f; if (flag17) { ZoomGUIRustNoWipe.levelzoom = ZoomGUIRustNoWipe.levelzoom + Time.deltaTime + 0.3f; } bool flag18 = ZoomGUIRustNoWipe.levelzoom < 20f; if (flag18) { ZoomGUIRustNoWipe.levelzoom = ZoomGUIRustNoWipe.levelzoom + Time.deltaTime + 0.05f; } bool flag19 = ZoomGUIRustNoWipe.levelzoom > 0f; if (flag19) { HumanController component5 = PlayerClient.GetLocalPlayer().controllable.GetComponent <HumanController>(); CameraMount componentInChildren2 = component5.GetComponentInChildren <CameraMount>(); bool flag20 = componentInChildren2 != null; if (flag20) { HeadBob component6 = componentInChildren2.GetComponent <HeadBob>(); bool flag21 = component6 != null; if (flag21) { CameraFX mainCameraFX2 = CameraFX.mainCameraFX; bool flag22 = mainCameraFX2 != null; if (flag22) { mainCameraFX2.SetFieldOfView(ZoomGUIRustNoWipe.levelzoom, 1f); } } } } } } } } }