// Token: 0x060003FC RID: 1020 RVA: 0x0001356C File Offset: 0x0001176C protected override void OnControlEngauge() { base.OnControlEngauge(); if (base.localControlled) { global::CameraMount componentInChildren = base.GetComponentInChildren <global::CameraMount>(); if (componentInChildren) { componentInChildren.open = true; } this.contextProbe = ((!this.contextProbe) ? base.AddAddon <global::ContextProbe>() : this.contextProbe); this.localRadiation = ((!this.localRadiation) ? base.AddAddon <global::LocalRadiationEffect>() : this.localRadiation); if (this.onceEngaged) { if (this.proxyTest) { this.proxyTest.treatAsProxy = false; } } else { this.proxyTest = base.GetComponent <global::PlayerProxyTest>(); this.onceEngaged = true; } base.enabled = true; } }
// Token: 0x060003FD RID: 1021 RVA: 0x00013638 File Offset: 0x00011838 protected override void OnControlCease() { if (base.localControlled) { global::CameraMount componentInChildren = base.GetComponentInChildren <global::CameraMount>(); if (componentInChildren) { componentInChildren.open = false; } } base.RemoveAddon <global::ContextProbe>(ref this.contextProbe); base.RemoveAddon <global::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(); }
// Token: 0x06002C1F RID: 11295 RVA: 0x000A5524 File Offset: 0x000A3724 public void PreCullBegin() { global::CameraMount current = global::CameraMount.current; if (current != this.mount) { if (current) { this._cameraFX = current.cameraFX; } else { this._cameraFX = null; } global::CameraFXPre.cameraFX = this._cameraFX; global::CameraFXPost.cameraFX = this._cameraFX; this.mount = current; } if (this.mount) { Camera camera = this.mount.camera; camera.ResetAspect(); camera.ResetProjectionMatrix(); camera.ResetWorldToCameraMatrix(); this.mount.OnPreMount(this); } }
// Token: 0x06002C03 RID: 11267 RVA: 0x000A5168 File Offset: 0x000A3368 private static global::CameraMount CreateTemporaryCameraMount(global::CameraMount copyFrom, Transform parent, bool hasParent) { if (global::CameraMount.creatingTemporaryCameraMount) { throw new InvalidOperationException("Invalid/unexpected call stack recursion"); } global::CameraMount.ClearTemporaryCameraMount(); try { global::CameraMount.creatingTemporaryCameraMount = true; global::CameraMount.temporaryCameraMountSource = copyFrom; global::CameraMount.temporaryCameraMountHasParent = hasParent; global::CameraMount.temporaryCameraMountParent = parent; global::CameraMount.temporaryCameraMountGameObject = new GameObject("__-temp mount-__", new Type[] { typeof(global::CameraMount) }) { hideFlags = 4 }; } finally { global::CameraMount.creatingTemporaryCameraMount = false; global::CameraMount.temporaryCameraMountSource = null; global::CameraMount.temporaryCameraMountHasParent = false; global::CameraMount.temporaryCameraMountParent = null; global::CameraMount.createdTemporaryCameraMount = global::CameraMount.temporaryCameraMount; } return(global::CameraMount.temporaryCameraMount); }
// Token: 0x060003C2 RID: 962 RVA: 0x00011ED4 File Offset: 0x000100D4 private void ClientLocalDeath() { global::Ragdoll ragdoll = this.DeathRagdoll(); if (base.localControlled) { if (!global::actor.forceThirdPerson) { global::CameraMount componentInChildren = base.GetComponentInChildren <global::CameraMount>(); if (componentInChildren && componentInChildren.open) { global::RagdollTransferInfoProvider ragdollTransferInfoProvider = base.controller as global::RagdollTransferInfoProvider; Transform transform; bool flag; if (ragdollTransferInfoProvider != null) { try { flag = ragdollTransferInfoProvider.RagdollTransferInfo.FindHead(ragdoll.transform, out transform); } catch (Exception ex) { Debug.LogException(ex, this); transform = null; flag = false; } } else { transform = null; flag = false; } if (flag) { Vector3 vector = transform.InverseTransformPoint(componentInChildren.transform.position); vector.y += 0.08f; Vector3 vector2 = transform.TransformPoint(vector); ragdoll.origin += vector2 - transform.position; global::CameraMount cameraMount = global::CameraMount.CreateTemporaryCameraMount(componentInChildren, transform); cameraMount.camera.nearClipPlane = 0.02f; } global::ArmorModelRenderer local = ragdoll.GetLocal <global::ArmorModelRenderer>(); if (local) { local.enabled = false; } } else { Debug.Log("No camera?"); } } Object.Destroy(base.GetComponent <global::LocalDamageDisplay>()); } }
// Token: 0x060003FA RID: 1018 RVA: 0x00013440 File Offset: 0x00011640 private void SetLocalOnlyComponentsEnabled(bool enable) { global::CCMotor component = base.GetComponent <global::CCMotor>(); if (component) { component.enabled = enable; CharacterController characterController = base.collider as CharacterController; if (characterController) { characterController.enabled = enable; } } global::CameraMount componentInChildren = base.GetComponentInChildren <global::CameraMount>(); if (componentInChildren) { componentInChildren.open = enable; global::HeadBob component2 = componentInChildren.GetComponent <global::HeadBob>(); if (component2) { component2.enabled = enable; } global::LazyCam component3 = componentInChildren.GetComponent <global::LazyCam>(); if (component3) { component3.enabled = enable; } } global::LocalDamageDisplay component4 = base.GetComponent <global::LocalDamageDisplay>(); if (component4) { component4.enabled = enable; } }
// Token: 0x06002BF4 RID: 11252 RVA: 0x000A4D04 File Offset: 0x000A2F04 private static void REMOVE_FROM_QUEUE(global::CameraMount rem) { try { int count = global::CameraMount.queue.Count; for (int i = 0; i < count; i++) { global::CameraMount cameraMount = global::CameraMount.queue.Pop(); if (cameraMount != rem) { global::CameraMount.WORK_LATE.list.Add(cameraMount); } } global::CameraMount.WORK_LATE.list.Reverse(); foreach (global::CameraMount t in global::CameraMount.WORK_LATE.list) { global::CameraMount.queue.Push(t); } } finally { global::CameraMount.WORK_LATE.list.Clear(); } }
// Token: 0x06002BF2 RID: 11250 RVA: 0x000A4C1C File Offset: 0x000A2E1C private static void SORT_QUEUE(global::CameraMount addExtra) { global::CameraMount.WORK_LATE.list.Add(addExtra); global::CameraMount.SORT_QUEUE(); }
// Token: 0x06002C02 RID: 11266 RVA: 0x000A5158 File Offset: 0x000A3358 public static global::CameraMount CreateTemporaryCameraMount(global::CameraMount copyFrom, Transform parent) { return(global::CameraMount.CreateTemporaryCameraMount(copyFrom, parent, parent)); }
// Token: 0x06002C01 RID: 11265 RVA: 0x000A514C File Offset: 0x000A334C public static global::CameraMount CreateTemporaryCameraMount(global::CameraMount copyFrom) { return(global::CameraMount.CreateTemporaryCameraMount(copyFrom, null, false)); }
// Token: 0x06000426 RID: 1062 RVA: 0x00014C84 File Offset: 0x00012E84 private static bool GetCharacterStuff(ref global::ConsoleSystem.Arg args, out global::Character character, out global::CameraMount camera, out global::ItemRepresentation itemRep, out global::ArmorModelRenderer armor) { character = null; itemRep = null; armor = null; camera = global::CameraMount.current; if (!camera) { args.ReplyWith("Theres no active camera mount."); return(false); } character = (IDBase.GetMain(camera) as global::Character); if (!character) { args.ReplyWith("theres no character for the current mounted camera"); return(false); } armor = character.GetLocal <global::ArmorModelRenderer>(); global::InventoryHolder local = character.GetLocal <global::InventoryHolder>(); if (local) { itemRep = local.itemRepresentation; } return(true); }