// Token: 0x06000245 RID: 581 RVA: 0x000110F0 File Offset: 0x0000F2F0 private void AddForces() { this.colliders = Physics.OverlapSphere(base.transform.position, this.explosionRadius); for (int i = 0; i < this.colliders.Length; i++) { AntiTouchSystem.KillPlayer(this.colliders[i].transform.root.GetComponent <PlayerSettings>()); AntiTouchSystem.KillSmartRagdoll(this.colliders[i].transform); this.FractureObjects(this.colliders[i].transform); Rigidbody component = this.colliders[i].GetComponent <Rigidbody>(); if (component != null) { if (this.dismemberRagdolls && UnityEngine.Random.Range(0, 4) == 0) { RagdollSettings.DismemberJoint(component.transform); } component.AddExplosionForce(this.explosionPower, base.transform.position, this.explosionRadius, 0f, ForceMode.Impulse); component.AddTorque(Vector3.Normalize(base.transform.position - component.position)); } this.anotherMine = this.colliders[i].transform.GetComponentInParent <Mine>(); if (this.anotherMine != null) { this.anotherMine.remoteDetonate = true; } } }
// Token: 0x060004B3 RID: 1203 RVA: 0x000197D8 File Offset: 0x000179D8 public static void ObjectTouchedSomething(AntiTouchObject antiTouchScript, Transform touchedObject) { if (antiTouchScript.antiTouchInBuildMode || (!antiTouchScript.antiTouchInBuildMode && !LevelManager.BuildModeOn)) { if (antiTouchScript.badForPlayer && Tag.Compare(touchedObject, Tag.Tags.Player)) { AntiTouchSystem.KillPlayer(touchedObject.transform.root.GetComponent <PlayerSettings>()); } if (antiTouchScript.badForSmartRagdolls && Tag.Compare(touchedObject, Tag.Tags.Ragdoll)) { if (antiTouchScript.specifiedSmartRagdolls.Length != 0) { for (int i = 0; i < antiTouchScript.specifiedSmartRagdolls.Length; i++) { if (SmartRagdollController.RagdollHasLogic(touchedObject, antiTouchScript.specifiedSmartRagdolls[i])) { AntiTouchSystem.KillSmartRagdoll(touchedObject); return; } } return; } AntiTouchSystem.KillSmartRagdoll(touchedObject); } } }
// Token: 0x06000231 RID: 561 RVA: 0x00010BD8 File Offset: 0x0000EDD8 private void Detonate() { if (this.detonated || LevelManager.BuildModeOn) { return; } if (UIVersion.NukeEnabled) { this.colliders = Physics.OverlapSphere(this.mineObject.transform.position, 1000f); } else { this.colliders = Physics.OverlapSphere(this.mineObject.transform.position, this.radius); } for (int i = 0; i < this.colliders.Length; i++) { AntiTouchSystem.KillPlayer(this.colliders[i].transform.root.GetComponent <PlayerSettings>()); AntiTouchSystem.KillSmartRagdoll(this.colliders[i].transform); this.FractureObjects(this.colliders[i].transform); Rigidbody component = this.colliders[i].GetComponent <Rigidbody>(); if (component != null) { if (this.dismemberRagdolls && UnityEngine.Random.Range(0, 4) == 0) { RagdollSettings.DismemberJoint(component.transform); } if (UIVersion.NukeEnabled) { component.AddExplosionForce(5000f * ((component.mass < 10f) ? 1f : (component.mass * 0.1f)), this.mineObject.transform.position, 1000f, 0f, ForceMode.Impulse); } else { component.AddExplosionForce(this.power * ((component.mass < 10f) ? 1f : (component.mass * 0.1f)), this.mineObject.transform.position, this.radius, 0f, ForceMode.Impulse); } component.AddTorque(Vector3.Normalize(base.transform.position - component.position)); } this.anotherMine = this.colliders[i].transform.GetComponentInParent <Mine>(); if (this.anotherMine != null) { this.anotherMine.remoteDetonate = true; } } this.spawnedExplosion.transform.position = this.mineObject.transform.position; this.spawnedExplosion.SetActive(true); this.mineObject.SetActive(false); this.detonated = true; }
// Token: 0x060004B2 RID: 1202 RVA: 0x00019760 File Offset: 0x00017960 public static void PlayerTouchedRagdoll(PlayerSettings playerSettings, Transform ragdoll) { if (!Tag.Compare(ragdoll, Tag.Tags.Ragdoll)) { return; } if (LevelManager.BuildModeOn) { return; } if (!playerSettings.ragdollsCanTouchThisPlayer) { AntiTouchSystem.KillSmartRagdoll(ragdoll); } AntiTouchSystem.antiTouchScript = ragdoll.root.GetComponent <AntiTouchObject>(); if (AntiTouchSystem.antiTouchScript == null) { return; } if ((AntiTouchSystem.antiTouchScript.antiTouchInBuildMode || !AntiTouchSystem.antiTouchScript.antiTouchInBuildMode) && AntiTouchSystem.antiTouchScript.badForPlayer) { AntiTouchSystem.KillPlayer(playerSettings); } }