// Token: 0x06003D04 RID: 15620 RVA: 0x000DA7C0 File Offset: 0x000D89C0 private void RebindRenderers() { global::ArmorModelRenderer prefabRenderer = (!this.ragdollPrefab) ? null : this.ragdollPrefab.GetLocal <global::ArmorModelRenderer>(); global::SleepingAvatar.BindRenderer <global::ArmorModelFeet>(prefabRenderer, this.footArmor, this.footMeshFilter, this.footRenderer); global::SleepingAvatar.BindRenderer <global::ArmorModelLegs>(prefabRenderer, this.legArmor, this.legMeshFilter, this.legRenderer); global::SleepingAvatar.BindRenderer <global::ArmorModelTorso>(prefabRenderer, this.torsoArmor, this.torsoMeshFilter, this.torsoRenderer); global::SleepingAvatar.BindRenderer <global::ArmorModelHead>(prefabRenderer, this.headArmor, this.headMeshFilter, this.headRenderer); }
// 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: 0x060003BF RID: 959 RVA: 0x00011C90 File Offset: 0x0000FE90 private global::Ragdoll CreateRagdoll() { global::CharacterRagdollTrait trait = base.GetTrait <global::CharacterRagdollTrait>(); if (trait) { GameObject gameObject = Object.Instantiate(trait.ragdollPrefab, base.transform.position, base.transform.rotation) as GameObject; global::Ragdoll component = gameObject.GetComponent <global::Ragdoll>(); component.sourceMain = base.idMain; this._ragdollInstance = gameObject; Object.Destroy(gameObject, 80f); this.deathShot.LinkRagdoll(base.transform, gameObject); global::ArmorModelRenderer local = base.GetLocal <global::ArmorModelRenderer>(); global::ArmorModelRenderer local2 = component.GetLocal <global::ArmorModelRenderer>(); if (local && local2) { local2.BindArmorModels(local.GetArmorModelMemberMapCopy()); } return(component); } return(null); }
// Token: 0x06003D07 RID: 15623 RVA: 0x000DA8DC File Offset: 0x000D8ADC private bool CreateRagdoll() { if (this.ragdollPrefab) { global::ArmorModelRenderer local = this.ragdollPrefab.GetLocal <global::ArmorModelRenderer>(); if (local) { ActorRig actorRig = local.actorRig; if (actorRig) { AnimationClip animationClip; float num; if (actorRig.FindPoseClip("sleep", ref animationClip, ref num)) { this.ragdollInstance = (Object.Instantiate(this.ragdollPrefab, base.transform.position, base.transform.rotation) as global::Ragdoll); this.ragdollInstance.sourceMain = this; GameObject gameObject = this.ragdollInstance.gameObject; Object.Destroy(gameObject, 80f); gameObject.SampleAnimation(animationClip, num); local = this.ragdollInstance.GetLocal <global::ArmorModelRenderer>(); global::ArmorModelMemberMap map = default(global::ArmorModelMemberMap); bool flag = false; flag |= global::SleepingAvatar.BindArmorMap <global::ArmorModelFeet>(this.footArmor, ref map); flag |= global::SleepingAvatar.BindArmorMap <global::ArmorModelLegs>(this.legArmor, ref map); flag |= global::SleepingAvatar.BindArmorMap <global::ArmorModelTorso>(this.torsoArmor, ref map); flag |= global::SleepingAvatar.BindArmorMap <global::ArmorModelHead>(this.headArmor, ref map); if (flag) { local.BindArmorModels(map); } return(true); } } } } return(false); }
// Token: 0x06003D03 RID: 15619 RVA: 0x000DA6D4 File Offset: 0x000D88D4 private static void BindRenderer <TArmorModel>(global::ArmorModelRenderer prefabRenderer, global::ArmorDataBlock armor, MeshFilter filter, MeshRenderer renderer) where TArmorModel : global::ArmorModel <TArmorModel>, new() { TArmorModel tarmorModel; if (armor) { tarmorModel = armor.GetArmorModel <TArmorModel>(); if (!tarmorModel && prefabRenderer) { tarmorModel = prefabRenderer.GetArmorModel <TArmorModel>(); } } else { if (!prefabRenderer) { return; } tarmorModel = prefabRenderer.GetArmorModel <TArmorModel>(); } if (!tarmorModel) { return; } if (global::ArmorModelRenderer.Censored && tarmorModel.censoredModel) { tarmorModel = tarmorModel.censoredModel; } Mesh sharedMesh; if (tarmorModel && tarmorModel.actorMeshInfo.FindPose("sleep", ref sharedMesh)) { filter.sharedMesh = sharedMesh; renderer.sharedMaterials = tarmorModel.sharedMaterials; } }
// 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); }