// 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: 0x060004B5 RID: 1205 RVA: 0x00019870 File Offset: 0x00017A70 public static void KillSmartRagdoll(Transform ragdoll) { SmartRagdollController componentInChildren = ragdoll.root.GetComponentInChildren <SmartRagdollController>(); if (componentInChildren == null) { return; } if (componentInChildren.simulatedRagdoll == null) { return; } componentInChildren.simulatedRagdoll.RagdollModeEnabled = true; }
// Token: 0x0600017C RID: 380 RVA: 0x0000DE00 File Offset: 0x0000C000 public static SmartRagdollController ClosestRagdoll(Vector3 fromPosition, SmartRagdollController.Logic ofLogic) { if (RagdollDatabase.activeRagdollsInScene.Count == 0) { return(null); } SmartRagdollController result = null; float num = float.PositiveInfinity; for (int i = 0; i < RagdollDatabase.activeRagdollsInScene.Count; i++) { if (!(RagdollDatabase.activeRagdollsInScene[i] == null) && RagdollDatabase.activeRagdollsInScene[i].isActiveAndEnabled && RagdollDatabase.activeRagdollsInScene[i].logic == ofLogic) { float num2 = Vector3.Distance(fromPosition, RagdollDatabase.activeRagdollsInScene[i].simulatedRagdollCore.position); if (num2 < num) { num = num2; result = RagdollDatabase.activeRagdollsInScene[i]; } } } return(result); }
// Token: 0x06000190 RID: 400 RVA: 0x0000E240 File Offset: 0x0000C440 public static bool RagdollHasLogic(Transform ragdollTransform, SmartRagdollController.Logic logicToCheck) { SmartRagdollController componentInChildren = ragdollTransform.root.GetComponentInChildren <SmartRagdollController>(); return(!(componentInChildren == null) && componentInChildren.logic == logicToCheck); }