using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Il2Cpp; using Il2CppHurricaneVR.Framework.Core.Grabbers; using Il2CppHurricaneVR.Framework.Shared; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem; using Il2CppSystem.Reflection; using MahitoMod; using MelonLoader; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(Core), "MahitoMod", "10.14.0", "YourName", null)] [assembly: MelonGame("Kubunautilus", "BrutalistickVR")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("WeaponHand")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("WeaponHand")] [assembly: AssemblyTitle("WeaponHand")] [assembly: AssemblyVersion("1.0.0.0")] namespace MahitoMod; public class Core : MelonMod { private enum WeaponType { None, Blade, Chainsaw, Hammer, Claws, AssassinBlade, Crowbar } private enum DeployState { Deploying, Deployed, Retracting } private class HandState { public HVRHandGrabber hand; public bool wasSecondary; public bool wasTrigger; public bool wasStick; public bool isLeftHand; public WeaponType selectedType = WeaponType.Blade; public WeaponType currentType = WeaponType.None; public GameObject weaponInstance; public Rigidbody weaponRb; public List clawInstances = new List(); public List clawRbs = new List(); public List weaponColliders = new List(); public Vector3 currentPos; public Quaternion currentRot; public DeployState deployState; public float deployProgress; public ChainsawManager chainsawManager; public AudioSource idleAudio; public AudioSource revvedAudio; public AudioClip startSoundClip; public AudioClip stopSoundClip; public ConfigurableJoint crowbarJoint; public bool IsActive => (Object)(object)weaponInstance != (Object)null || clawInstances.Count > 0; public bool IsRetracting => deployState == DeployState.Retracting; public void ClearWeapon() { weaponInstance = null; weaponRb = null; clawInstances.Clear(); clawRbs.Clear(); weaponColliders.Clear(); currentType = WeaponType.None; deployProgress = 0f; deployState = DeployState.Deployed; chainsawManager = null; idleAudio = null; revvedAudio = null; startSoundClip = null; stopSoundClip = null; wasTrigger = false; crowbarJoint = null; } } public static HVRHexaBodyInputs playerInputs; private HandState leftHand = new HandState(); private HandState rightHand = new HandState(); private GameObject katanaPrefab; private GameObject chainsawPrefab; private GameObject hammerPrefab; private GameObject zweihanderPrefab; private GameObject crowbarPrefab; private float searchTimer = 0f; private const float SEARCH_INTERVAL = 2f; private const float BLADE_LERP_SPEED = 50f; private const float BLADE_MAX_SPEED = 50f; private const float BLADE_MAX_ANGULAR_SPEED = 3600f; private const float BLADE_DEPLOY_DISTANCE = 0.5f; private const float BLADE_DEPLOY_DURATION = 0.1f; private const float HANDLE_CUT_THRESHOLD = 0.4f; private static readonly Vector3 GRIP_OFFSET = new Vector3(0f, -0.05f, -0.6f); private static readonly Quaternion GRIP_ROT_RIGHT = Quaternion.Euler(90f, 0f, 0f); private static readonly Quaternion GRIP_ROT_LEFT = Quaternion.Euler(90f, 0f, 0f) * Quaternion.Euler(0f, 180f, 0f); private const float CHAINSAW_LERP_SPEED = 84f; private const float CHAINSAW_MAX_SPEED = 84f; private const float CHAINSAW_MAX_ANGULAR_SPEED = 5400f; private const float CHAINSAW_DEPLOY_DISTANCE = 0.4f; private const float CHAINSAW_DEPLOY_DURATION = 0.15f; private static readonly Vector3 CHAINSAW_OFFSET_RIGHT = new Vector3(0f, 0.06f, -0.03f); private static readonly Vector3 CHAINSAW_OFFSET_LEFT = new Vector3(0f, -0.14f, -0.03f); private static readonly Quaternion CHAINSAW_ROT_RIGHT = Quaternion.Euler(0f, 180f, 90f); private static readonly Quaternion CHAINSAW_ROT_LEFT = Quaternion.Euler(0f, 180f, -90f); private const float CHAINSAW_IDLE_VOLUME = 1f; private const float CHAINSAW_REVVED_VOLUME = 0.5f; private const float CHAINSAW_START_VOLUME = 1f; private const float CHAINSAW_STOP_VOLUME = 1f; private const float HAMMER_LERP_SPEED = 250f; private const float HAMMER_MAX_SPEED = 250f; private const float HAMMER_MAX_ANGULAR_SPEED = 7200f; private const float HAMMER_DEPLOY_DISTANCE = 0.3f; private const float HAMMER_DEPLOY_DURATION = 0.25f; private const float HAMMER_HANDLE_CUT_THRESHOLD = 0.87f; private static readonly Vector3 HAMMER_OFFSET_RIGHT = new Vector3(0.03f, -0.04f, -0.77f); private static readonly Vector3 HAMMER_OFFSET_LEFT = new Vector3(-0.03f, -0.04f, -0.77f); private static readonly Quaternion HAMMER_ROT_RIGHT = Quaternion.Euler(90f, 0f, 0f); private static readonly Quaternion HAMMER_ROT_LEFT = Quaternion.Euler(90f, 0f, 0f) * Quaternion.Euler(0f, 180f, 0f); private const float CLAW_LERP_SPEED = 200f; private const float CLAW_MAX_SPEED = 200f; private const float CLAW_MAX_ANGULAR_SPEED = 10000f; private const float CLAW_DEPLOY_DISTANCE = 0.35f; private const float CLAW_DEPLOY_DURATION = 0.12f; private const float CLAW_SCALE = 0.6f; private const float CLAW_SPACING = 0.035f; private const float CLAW_HANDLE_CUT_THRESHOLD = 0.35f; private const float CLAW_MASS = 1.5f; private const float CLAW_DRAG = 0f; private const float CLAW_ANGULAR_DRAG = 0f; private static readonly Vector3 CLAW_BASE_OFFSET = new Vector3(0.03f, -0.04f, -0.24f); private static readonly Vector3 CLAW_OFFSET_LEFT = new Vector3(0f, -0.035f, 0f); private static readonly Vector3 CLAW_OFFSET_CENTER = new Vector3(0f, 0f, 0f); private static readonly Vector3 CLAW_OFFSET_RIGHT = new Vector3(0f, 0.035f, 0f); private static readonly Quaternion CLAW_ROT_RIGHT = Quaternion.Euler(90f, 0f, 0f); private static readonly Quaternion CLAW_ROT_LEFT = Quaternion.Euler(90f, 0f, 0f) * Quaternion.Euler(0f, 180f, 0f); private const float ASSASSIN_LERP_SPEED = 400f; private const float ASSASSIN_MAX_SPEED = 400f; private const float ASSASSIN_MAX_ANGULAR_SPEED = 10000f; private const float ASSASSIN_DEPLOY_DISTANCE = 0.35f; private const float ASSASSIN_DEPLOY_DURATION = 0.12f; private const float ASSASSIN_SCALE = 1f; private const float ASSASSIN_CUT_THRESHOLD = 0.8f; private const int ASSASSIN_CUT_AXIS = 1; private const bool ASSASSIN_CUT_REMOVE_BELOW = true; private const float ASSASSIN_MASS = 3f; private static readonly Vector3 ASSASSIN_OFFSET = new Vector3(0f, -0.04f, -1.2f); private static readonly Quaternion ASSASSIN_ROT_RIGHT = Quaternion.Euler(90f, 0f, 0f) * Quaternion.Euler(0f, 90f, 0f); private static readonly Quaternion ASSASSIN_ROT_LEFT = Quaternion.Euler(90f, 0f, 0f) * Quaternion.Euler(0f, 270f, 0f); private const float CROWBAR_SCALE = 1f; private const float CROWBAR_MASS = 1.75f; private const float CROWBAR_JOINT_POS_SPRING = 8000f; private const float CROWBAR_JOINT_POS_DAMPER = 120f; private const float CROWBAR_JOINT_POS_MAX_FORCE = 20000f; private const float CROWBAR_JOINT_LINEAR_LIMIT = 0.06f; private const float CROWBAR_JOINT_ANG_SPRING = 5000f; private const float CROWBAR_JOINT_ANG_DAMPER = 80f; private const float CROWBAR_JOINT_ANG_MAX_FORCE = 15000f; private static readonly Vector3 CROWBAR_OFFSET = new Vector3(0f, -0.02f, 0.19f); private static readonly Quaternion CROWBAR_ROT_RIGHT = Quaternion.Euler(90f, 0f, 0f) * Quaternion.Euler(0f, -90f, 0f); private static readonly Quaternion CROWBAR_ROT_LEFT = Quaternion.Euler(90f, 0f, 0f) * Quaternion.Euler(0f, 90f, 0f); private const float CROWBAR_DEPLOY_DISTANCE = 0.55f; private const float CROWBAR_DEPLOY_DURATION = 0.1f; private const float CROWBAR_LERP_SPEED = 120f; private const float CROWBAR_MAX_SPEED = 120f; private const float CROWBAR_MAX_ANGULAR_SPEED = 5000f; public override void OnInitializeMelon() { ((MelonBase)this).LoggerInstance.Msg("MahitoMod v10.14.0 — Crowbar Hook с анимацией деплоя."); ((MelonBase)this).LoggerInstance.Msg("Стик = выбор режима, B = достать/убрать."); ((MelonBase)this).LoggerInstance.Msg("Режимы: Blade, Chainsaw, Hammer, Claws, AssassinBlade, Crowbar"); } public override void OnSceneWasLoaded(int buildIndex, string sceneName) { DestroyWeapon(leftHand); DestroyWeapon(rightHand); playerInputs = null; katanaPrefab = null; chainsawPrefab = null; hammerPrefab = null; zweihanderPrefab = null; crowbarPrefab = null; searchTimer = 1f; leftHand = new HandState { isLeftHand = true, selectedType = WeaponType.Blade }; rightHand = new HandState { isLeftHand = false, selectedType = WeaponType.Blade }; if (!(sceneName == "MainMenuScene")) { GameObject val = GameObject.Find("Hexa4Rig26.10.23"); if (!((Object)(object)val == (Object)null)) { playerInputs = val.GetComponentInChildren(); HandState handState = leftHand; Transform obj = val.transform.Find("Physics LeftHand"); handState.hand = ((obj != null) ? ((Component)obj).GetComponent() : null); HandState handState2 = rightHand; Transform obj2 = val.transform.Find("Physics RightHand"); handState2.hand = ((obj2 != null) ? ((Component)obj2).GetComponent() : null); } } } public override void OnUpdate() { if ((Object)(object)playerInputs == (Object)null) { return; } searchTimer -= Time.deltaTime; if (searchTimer <= 0f) { searchTimer = 2f; if ((Object)(object)katanaPrefab == (Object)null) { FindKatanaPrefab(); } if ((Object)(object)chainsawPrefab == (Object)null) { FindChainsawPrefab(); } if ((Object)(object)hammerPrefab == (Object)null) { FindHammerPrefab(); } if ((Object)(object)zweihanderPrefab == (Object)null) { FindZweihanderPrefab(); } if ((Object)(object)crowbarPrefab == (Object)null) { FindCrowbarPrefab(); } } HVRController leftController = playerInputs.LeftController; HVRController rightController = playerInputs.RightController; if (!((Object)(object)leftController == (Object)null) && !((Object)(object)rightController == (Object)null)) { ProcessHand(leftHand, leftController); ProcessHand(rightHand, rightController); } } public override void OnFixedUpdate() { if (leftHand.IsActive) { UpdateWeaponPosition(leftHand); } if (rightHand.IsActive) { UpdateWeaponPosition(rightHand); } } private void ProcessHand(HandState hs, HVRController ctrl) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hs.hand == (Object)null) { return; } bool active = ctrl.TriggerButtonState.Active; bool active2 = ctrl.SecondaryButtonState.Active; bool active3 = ctrl.JoystickButtonState.Active; bool flag = active2 && !hs.wasSecondary; bool flag2 = active3 && !hs.wasStick; hs.wasSecondary = active2; hs.wasStick = active3; if (hs.currentType == WeaponType.Chainsaw && (Object)(object)hs.chainsawManager != (Object)null && hs.IsActive && !hs.IsRetracting) { bool flag3 = active && !hs.wasTrigger; bool flag4 = !active && hs.wasTrigger; hs.wasTrigger = active; if (flag3) { try { hs.chainsawManager.isRevved = true; } catch { } if ((Object)(object)hs.revvedAudio != (Object)null) { if (!hs.revvedAudio.isPlaying) { try { hs.revvedAudio.Play(); } catch { } } hs.revvedAudio.volume = 0.5f; } if ((Object)(object)hs.idleAudio != (Object)null) { hs.idleAudio.volume = 0f; } } else if (flag4) { try { hs.chainsawManager.isRevved = false; } catch { } if ((Object)(object)hs.idleAudio != (Object)null) { if (!hs.idleAudio.isPlaying) { try { hs.idleAudio.Play(); } catch { } } hs.idleAudio.volume = 1f; } if ((Object)(object)hs.revvedAudio != (Object)null) { hs.revvedAudio.volume = 0f; } } } if (flag2) { int selectedType = (int)(hs.selectedType + 1) % 7; hs.selectedType = (WeaponType)selectedType; string value = (hs.isLeftHand ? "Левая" : "Правая"); ((MelonBase)this).LoggerInstance.Msg($"[Mahito] {value} рука: режим → {hs.selectedType}"); } if (!flag || ((HVRGrabberBase)hs.hand).IsGrabbing || hs.IsRetracting) { return; } if (hs.IsActive) { hs.deployState = DeployState.Retracting; ((MelonBase)this).LoggerInstance.Msg("[Mahito] " + (hs.isLeftHand ? "Левая" : "Правая") + ": убираем оружие..."); return; } switch (hs.selectedType) { case WeaponType.Blade: SpawnBlade(hs); break; case WeaponType.Chainsaw: SpawnChainsaw(hs); break; case WeaponType.Hammer: SpawnHammer(hs); break; case WeaponType.Claws: SpawnClaws(hs); break; case WeaponType.AssassinBlade: SpawnAssassinBlade(hs); break; case WeaponType.Crowbar: SpawnCrowbar(hs); break; case WeaponType.None: break; } } private bool IsCuttingPart(Transform t) { Transform val = t; int num = 0; while ((Object)(object)val != (Object)null && num < 20) { string text = ((Object)val).name.ToLower(); if (text == "bar" || text.Contains("chainsawchain")) { return true; } val = val.parent; num++; } return false; } private void FindKatanaPrefab() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) try { Il2CppArrayBase val = Resources.FindObjectsOfTypeAll(); if (val == null) { return; } GameObject val2 = null; GameObject val3 = null; foreach (GameObject item in val) { if ((Object)(object)item == (Object)null) { continue; } string name = ((Object)item).name; if (!name.StartsWith("Katana3") || name.Contains("SpawnableItemInfo")) { continue; } string value = ""; try { Scene scene = item.scene; value = ((Scene)(ref scene)).name ?? ""; } catch { } SharpWeaponManager component = item.GetComponent(); if ((Object)(object)component == (Object)null) { continue; } Rigidbody component2 = item.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { if (string.IsNullOrEmpty(value)) { val2 = item; break; } if ((Object)(object)val3 == (Object)null && !IsChildOfShopStand(item.transform)) { val3 = item; } } } if ((Object)(object)val2 != (Object)null) { katanaPrefab = val2; } else if ((Object)(object)val3 != (Object)null) { katanaPrefab = val3; } } catch { } } private void FindChainsawPrefab() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) try { Il2CppArrayBase val = Resources.FindObjectsOfTypeAll(); if (val == null) { return; } GameObject val2 = null; GameObject val3 = null; foreach (GameObject item in val) { if ((Object)(object)item == (Object)null) { continue; } string name = ((Object)item).name; if (name != "Chainsaw" && name != "Chainsaw(Clone)") { continue; } string value = ""; try { Scene scene = item.scene; value = ((Scene)(ref scene)).name ?? ""; } catch { } string text = (((Object)(object)item.transform.parent != (Object)null) ? ((Object)item.transform.parent).name : "ROOT"); string text2 = (((Object)(object)item.transform.root != (Object)null) ? ((Object)item.transform.root).name : "?"); ChainsawManager component = item.GetComponent(); if (!((Object)(object)component == (Object)null) && !IsChildOfShopStand(item.transform) && !text.Contains("Variant") && !text.Contains("itemTab")) { if (string.IsNullOrEmpty(value) && text == "ROOT") { val2 = item; break; } if ((Object)(object)val3 == (Object)null && text == "ROOT" && text2 == name) { val3 = item; } } } if ((Object)(object)val2 != (Object)null) { chainsawPrefab = val2; } else if ((Object)(object)val3 != (Object)null) { chainsawPrefab = val3; } } catch { } } private void FindHammerPrefab() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) try { Il2CppArrayBase val = Resources.FindObjectsOfTypeAll(); if (val == null) { return; } foreach (GameObject item in val) { if ((Object)(object)item == (Object)null) { continue; } string name = ((Object)item).name; if (name != "Warhammer") { continue; } string value = ""; try { Scene scene = item.scene; value = ((Scene)(ref scene)).name ?? ""; } catch { } string text = (((Object)(object)item.transform.parent != (Object)null) ? ((Object)item.transform.parent).name : "ROOT"); BluntForceManager component = item.GetComponent(); if (!((Object)(object)component == (Object)null)) { Rigidbody component2 = item.GetComponent(); if (!((Object)(object)component2 == (Object)null) && string.IsNullOrEmpty(value) && text == "ROOT") { hammerPrefab = item; break; } } } } catch { } } private void FindZweihanderPrefab() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) try { Il2CppArrayBase val = Resources.FindObjectsOfTypeAll(); if (val == null) { return; } foreach (GameObject item in val) { if ((Object)(object)item == (Object)null) { continue; } string name = ((Object)item).name; if (name != "Zweihander") { continue; } string value = ""; try { Scene scene = item.scene; value = ((Scene)(ref scene)).name ?? ""; } catch { } string text = (((Object)(object)item.transform.parent != (Object)null) ? ((Object)item.transform.parent).name : "ROOT"); if (!IsChildOfShopStand(item.transform) && string.IsNullOrEmpty(value) && text == "ROOT") { Rigidbody component = item.GetComponent(); if ((Object)(object)component != (Object)null) { zweihanderPrefab = item; break; } } } } catch { } } private void FindCrowbarPrefab() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) try { Il2CppArrayBase val = Resources.FindObjectsOfTypeAll(); if (val == null) { return; } foreach (GameObject item in val) { if ((Object)(object)item == (Object)null) { continue; } string name = ((Object)item).name; if (name != "Crowbar") { continue; } string value = ""; try { Scene scene = item.scene; value = ((Scene)(ref scene)).name ?? ""; } catch { } string text = (((Object)(object)item.transform.parent != (Object)null) ? ((Object)item.transform.parent).name : "ROOT"); if (!IsChildOfShopStand(item.transform) && string.IsNullOrEmpty(value) && text == "ROOT") { Rigidbody component = item.GetComponent(); if ((Object)(object)component != (Object)null) { crowbarPrefab = item; break; } } } } catch { } } private bool IsChildOfShopStand(Transform t) { Transform val = t; int num = 0; while ((Object)(object)val != (Object)null && num < 20) { string name = ((Object)val).name; if (name.Contains("ShopStand") || name.Contains("WallSocket") || name.Contains("WeaponWall") || name.Contains("MeleeWall") || name.Contains("itemTab") || name.Contains("modItemTab")) { return true; } val = val.parent; num++; } return false; } private void SpawnBlade(HandState hs) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)katanaPrefab == (Object)null) { FindKatanaPrefab(); if ((Object)(object)katanaPrefab == (Object)null) { return; } } GameObject val = Object.Instantiate(katanaPrefab); ((Object)val).name = "MahitoBlade_" + (hs.isLeftHand ? "L" : "R"); val.transform.SetParent((Transform)null); val.transform.localScale = new Vector3(1f, 1f, 1f); DestroyComponentByName(val, "HVRTagSocketable"); DestroyComponentByName(val, "HVRStringSocketable"); DisableComponentByName(val, "HVRGrabbable"); DisableComponentByName(val, "HVRGrabbableImpactHaptics"); CutMeshAtThreshold(val, 0.4f); DisableHandleColliders(val); Rigidbody val2 = val.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = val.AddComponent(); } val2.isKinematic = true; val2.useGravity = false; val2.detectCollisions = true; val2.interpolation = (RigidbodyInterpolation)1; val2.mass = 1.5f; val2.collisionDetectionMode = (CollisionDetectionMode)3; hs.weaponRb = val2; hs.weaponColliders.Clear(); Collider[] array = Il2CppArrayBase.op_Implicit(val.GetComponentsInChildren(true)); if (array != null) { Collider[] array2 = array; foreach (Collider val3 in array2) { if ((Object)(object)val3 != (Object)null && val3.enabled) { hs.weaponColliders.Add(val3); } } } SharpWeaponManager component = val.GetComponent(); if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = true; } DisableCollisionWithPlayer(hs); hs.deployState = DeployState.Deploying; hs.deployProgress = 0f; Transform transform = ((Component)hs.hand).transform; Quaternion val4 = (hs.isLeftHand ? GRIP_ROT_LEFT : GRIP_ROT_RIGHT); Vector3 val5 = -transform.forward * 0.5f; Vector3 val6 = transform.position + transform.right * GRIP_OFFSET.x + transform.up * GRIP_OFFSET.y + transform.forward * GRIP_OFFSET.z + val5; Quaternion val7 = transform.rotation * val4; val.transform.position = val6; val.transform.rotation = val7; hs.currentPos = val6; hs.currentRot = val7; val.SetActive(true); hs.weaponInstance = val; hs.currentType = WeaponType.Blade; hs.wasTrigger = false; ((MelonBase)this).LoggerInstance.Msg("[Mahito] " + (hs.isLeftHand ? "Левая" : "Правая") + ": катана появляется."); } private void SpawnChainsaw(HandState hs) { //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_061b: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_0660: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)chainsawPrefab == (Object)null) { FindChainsawPrefab(); if ((Object)(object)chainsawPrefab == (Object)null) { return; } } GameObject val; try { val = Object.Instantiate(chainsawPrefab); } catch { return; } ((Object)val).name = "MahitoChainsaw_" + (hs.isLeftHand ? "L" : "R"); val.transform.SetParent((Transform)null); val.transform.localScale = new Vector3(1f, 1f, 1f); DestroyComponentByName(val, "HVRTagSocketable"); DestroyComponentByName(val, "HVRStringSocketable"); DisableComponentByName(val, "HVRGrabbable"); DisableComponentByName(val, "HVRGrabbableImpactHaptics"); DisableComponentByName(val, "StabilizerGrabbable"); DisableComponentByName(val, "ImpactObjectRigidbody"); DisableComponentByName(val, "ImpactCollisionTrigger3D"); DisableComponentByName(val, "ImpactSlideAndRollTrigger3D"); ChainsawManager component = val.GetComponent(); if ((Object)(object)component == (Object)null) { Object.Destroy((Object)(object)val); return; } try { ParticleSystem smokeParticleSystem = component.smokeParticleSystem; if ((Object)(object)smokeParticleSystem != (Object)null) { smokeParticleSystem.Stop(true, (ParticleSystemStopBehavior)0); ((Component)smokeParticleSystem).gameObject.SetActive(false); } } catch { } Il2CppArrayBase componentsInChildren = val.GetComponentsInChildren(true); if (componentsInChildren != null) { foreach (ParticleSystem item in componentsInChildren) { if ((Object)(object)item != (Object)null && ((Object)((Component)item).gameObject).name.ToLower().Contains("smoke")) { try { item.Stop(true, (ParticleSystemStopBehavior)0); ((Component)item).gameObject.SetActive(false); } catch { } } } } hs.chainsawManager = component; try { component.StartChainsaw(); } catch { try { component.isRunning = true; } catch { } } Rigidbody val2 = val.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = val.AddComponent(); } val2.isKinematic = true; val2.useGravity = false; val2.detectCollisions = true; val2.interpolation = (RigidbodyInterpolation)1; val2.mass = 1.5f; val2.collisionDetectionMode = (CollisionDetectionMode)3; hs.weaponRb = val2; hs.startSoundClip = component.chainsawStartSound; hs.stopSoundClip = component.chainsawStopSound; AudioClip chainsawIdle = component.chainsawIdle; AudioClip chainsawRevved = component.chainsawRevved; Il2CppArrayBase components = val.GetComponents(); if (components != null) { foreach (AudioSource item2 in components) { if ((Object)(object)item2 != (Object)null) { try { item2.Stop(); } catch { } try { ((Behaviour)item2).enabled = false; } catch { } } } } if ((Object)(object)chainsawIdle != (Object)null) { hs.idleAudio = val.AddComponent(); hs.idleAudio.clip = chainsawIdle; hs.idleAudio.loop = true; hs.idleAudio.playOnAwake = false; hs.idleAudio.spatialBlend = 0.8f; hs.idleAudio.minDistance = 0.3f; hs.idleAudio.maxDistance = 20f; hs.idleAudio.rolloffMode = (AudioRolloffMode)1; hs.idleAudio.volume = 1f; hs.idleAudio.pitch = 1f; try { hs.idleAudio.Play(); } catch { } } if ((Object)(object)chainsawRevved != (Object)null) { hs.revvedAudio = val.AddComponent(); hs.revvedAudio.clip = chainsawRevved; hs.revvedAudio.loop = true; hs.revvedAudio.playOnAwake = false; hs.revvedAudio.spatialBlend = 0.8f; hs.revvedAudio.minDistance = 0.3f; hs.revvedAudio.maxDistance = 20f; hs.revvedAudio.rolloffMode = (AudioRolloffMode)1; hs.revvedAudio.volume = 0f; hs.revvedAudio.pitch = 1f; } if ((Object)(object)hs.startSoundClip != (Object)null) { try { AudioSource.PlayClipAtPoint(hs.startSoundClip, val.transform.position, 1f); } catch { } } hs.weaponColliders.Clear(); Collider[] array = Il2CppArrayBase.op_Implicit(val.GetComponentsInChildren(true)); if (array != null) { Collider[] array2 = array; foreach (Collider val3 in array2) { if ((Object)(object)val3 == (Object)null) { continue; } if (IsCuttingPart(((Component)val3).transform)) { if (val3.enabled) { hs.weaponColliders.Add(val3); } } else { try { val3.enabled = false; } catch { } } } } Il2CppArrayBase componentsInChildren2 = val.GetComponentsInChildren(true); if (componentsInChildren2 != null) { foreach (MeshRenderer item3 in componentsInChildren2) { if ((Object)(object)item3 != (Object)null && !IsCuttingPart(((Component)item3).transform)) { try { ((Renderer)item3).enabled = false; } catch { } } } } DisableCollisionWithPlayer(hs); hs.deployState = DeployState.Deploying; hs.deployProgress = 0f; Transform transform = ((Component)hs.hand).transform; Quaternion val4 = (hs.isLeftHand ? CHAINSAW_ROT_LEFT : CHAINSAW_ROT_RIGHT); Vector3 val5 = (hs.isLeftHand ? CHAINSAW_OFFSET_LEFT : CHAINSAW_OFFSET_RIGHT); Vector3 val6 = -transform.forward * 0.4f; Vector3 val7 = transform.position + transform.right * val5.x + transform.up * val5.y + transform.forward * val5.z; Quaternion val8 = transform.rotation * val4; val.transform.position = val7 + val6; val.transform.rotation = val8; hs.currentPos = val.transform.position; hs.currentRot = val8; val.SetActive(true); hs.weaponInstance = val; hs.currentType = WeaponType.Chainsaw; hs.wasTrigger = false; ((MelonBase)this).LoggerInstance.Msg("[Mahito] " + (hs.isLeftHand ? "Левая" : "Правая") + ": бензопила появляется."); } private void SpawnHammer(HandState hs) { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hammerPrefab == (Object)null) { FindHammerPrefab(); if ((Object)(object)hammerPrefab == (Object)null) { return; } } GameObject val; try { val = Object.Instantiate(hammerPrefab); } catch { return; } ((Object)val).name = "MahitoHammer_" + (hs.isLeftHand ? "L" : "R"); val.transform.SetParent((Transform)null); val.transform.localScale = new Vector3(1f, 1f, 1f); DestroyComponentByName(val, "HVRTagSocketable"); DestroyComponentByName(val, "HVRStringSocketable"); DisableComponentByName(val, "HVRGrabbable"); DisableComponentByName(val, "HVRGrabbableImpactHaptics"); DisableComponentByName(val, "ImpactSlideAndRollTrigger3D"); CutHammerHandleMesh(val); Rigidbody val2 = val.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = val.AddComponent(); } val2.isKinematic = true; val2.useGravity = false; val2.detectCollisions = true; val2.interpolation = (RigidbodyInterpolation)1; val2.mass = 15f; val2.collisionDetectionMode = (CollisionDetectionMode)3; hs.weaponRb = val2; hs.weaponColliders.Clear(); Collider[] array = Il2CppArrayBase.op_Implicit(val.GetComponentsInChildren(true)); if (array != null) { Collider[] array2 = array; foreach (Collider val3 in array2) { if ((Object)(object)val3 == (Object)null) { continue; } if (((Object)((Component)val3).gameObject).name.ToLower().Contains("handle")) { try { val3.enabled = false; } catch { } } else if (val3.enabled) { hs.weaponColliders.Add(val3); } } } DisableCollisionWithPlayer(hs); hs.deployState = DeployState.Deploying; hs.deployProgress = 0f; Transform transform = ((Component)hs.hand).transform; Quaternion val4 = (hs.isLeftHand ? HAMMER_ROT_LEFT : HAMMER_ROT_RIGHT); Vector3 val5 = (hs.isLeftHand ? HAMMER_OFFSET_LEFT : HAMMER_OFFSET_RIGHT); Vector3 val6 = -transform.forward * 0.3f; Vector3 val7 = transform.position + transform.right * val5.x + transform.up * val5.y + transform.forward * val5.z; Quaternion val8 = transform.rotation * val4; val.transform.position = val7 + val6; val.transform.rotation = val8; hs.currentPos = val.transform.position; hs.currentRot = val8; val.SetActive(true); hs.weaponInstance = val; hs.currentType = WeaponType.Hammer; hs.wasTrigger = false; ((MelonBase)this).LoggerInstance.Msg("[Mahito] " + (hs.isLeftHand ? "Левая" : "Правая") + ": молот появляется."); } private void SpawnClaws(HandState hs) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)katanaPrefab == (Object)null) { FindKatanaPrefab(); if ((Object)(object)katanaPrefab == (Object)null) { return; } } Transform transform = ((Component)hs.hand).transform; Quaternion val = (hs.isLeftHand ? CLAW_ROT_LEFT : CLAW_ROT_RIGHT); Vector3[] array = (Vector3[])(object)new Vector3[3] { CLAW_OFFSET_LEFT, CLAW_OFFSET_CENTER, CLAW_OFFSET_RIGHT }; hs.clawInstances.Clear(); hs.clawRbs.Clear(); hs.weaponColliders.Clear(); for (int i = 0; i < 3; i++) { GameObject val2 = Object.Instantiate(katanaPrefab); ((Object)val2).name = $"MahitoClaw{i}_{(hs.isLeftHand ? "L" : "R")}"; val2.transform.SetParent((Transform)null); val2.transform.localScale = Vector3.one * 0.6f; DestroyComponentByName(val2, "HVRTagSocketable"); DestroyComponentByName(val2, "HVRStringSocketable"); DisableComponentByName(val2, "HVRGrabbable"); DisableComponentByName(val2, "HVRGrabbableImpactHaptics"); CutMeshAtThreshold(val2, 0.35f); DisableHandleColliders(val2); Rigidbody val3 = val2.GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = val2.AddComponent(); } val3.isKinematic = true; val3.useGravity = false; val3.detectCollisions = true; val3.interpolation = (RigidbodyInterpolation)1; val3.mass = 1.5f; val3.drag = 0f; val3.angularDrag = 0f; val3.collisionDetectionMode = (CollisionDetectionMode)3; Collider[] array2 = Il2CppArrayBase.op_Implicit(val2.GetComponentsInChildren(true)); if (array2 != null) { Collider[] array3 = array2; foreach (Collider val4 in array3) { if ((Object)(object)val4 != (Object)null && val4.enabled) { hs.weaponColliders.Add(val4); } } } SharpWeaponManager component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = true; } float num = (hs.isLeftHand ? (0f - CLAW_BASE_OFFSET.x) : CLAW_BASE_OFFSET.x); float y = CLAW_BASE_OFFSET.y; Vector3 val5 = transform.position + transform.right * num + transform.up * y + transform.forward * CLAW_BASE_OFFSET.z; Vector3 val6 = val5 + transform.right * array[i].x + transform.up * array[i].y + transform.forward * array[i].z; Vector3 val7 = -transform.forward * 0.35f; Vector3 val8 = val6 + val7; Quaternion val9 = transform.rotation * val; val2.transform.position = val8; val2.transform.rotation = val9; val2.SetActive(true); hs.clawInstances.Add(val2); hs.clawRbs.Add(val3); if (i == 0) { hs.weaponInstance = val2; hs.weaponRb = val3; hs.currentPos = val8; hs.currentRot = val9; } } DisableCollisionWithPlayer(hs); hs.deployState = DeployState.Deploying; hs.deployProgress = 0f; hs.currentType = WeaponType.Claws; hs.wasTrigger = false; ((MelonBase)this).LoggerInstance.Msg($"[Mahito] {(hs.isLeftHand ? "Левая" : "Правая")}: когти росомахи (3 лезвия, scale={0.6f})."); } private void SpawnAssassinBlade(HandState hs) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)zweihanderPrefab == (Object)null) { FindZweihanderPrefab(); if ((Object)(object)zweihanderPrefab == (Object)null) { return; } } Transform transform = ((Component)hs.hand).transform; Quaternion val = (hs.isLeftHand ? ASSASSIN_ROT_LEFT : ASSASSIN_ROT_RIGHT); float num = (hs.isLeftHand ? (0f - ASSASSIN_OFFSET.x) : ASSASSIN_OFFSET.x); float y = ASSASSIN_OFFSET.y; GameObject val2 = Object.Instantiate(zweihanderPrefab); ((Object)val2).name = "MahitoAssassinBlade_" + (hs.isLeftHand ? "L" : "R"); val2.transform.SetParent((Transform)null); val2.transform.localScale = Vector3.one * 1f; val2.transform.position = Vector3.zero; val2.transform.rotation = Quaternion.identity; DestroyComponentByName(val2, "HVRTagSocketable"); DestroyComponentByName(val2, "HVRStringSocketable"); DisableComponentByName(val2, "HVRGrabbable"); DisableComponentByName(val2, "HVRGrabbableImpactHaptics"); int cutAxis; float cutValue = CutAssassinBladeFromHandleToTip(val2, out cutAxis); DisableAssassinHiddenParts(val2, cutValue, cutAxis, removeBelow: true); Rigidbody val3 = val2.GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = val2.AddComponent(); } val3.isKinematic = true; val3.useGravity = false; val3.detectCollisions = true; val3.interpolation = (RigidbodyInterpolation)1; val3.mass = 3f; val3.collisionDetectionMode = (CollisionDetectionMode)3; hs.weaponRb = val3; hs.weaponColliders.Clear(); Collider[] array = Il2CppArrayBase.op_Implicit(val2.GetComponentsInChildren(true)); if (array != null) { Collider[] array2 = array; foreach (Collider val4 in array2) { if ((Object)(object)val4 != (Object)null && val4.enabled) { hs.weaponColliders.Add(val4); } } } SharpWeaponManager component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = true; } Vector3 val5 = transform.position + transform.right * num + transform.up * y + transform.forward * ASSASSIN_OFFSET.z; Vector3 val6 = -transform.forward * 0.35f; Vector3 val7 = val5 + val6; Quaternion val8 = transform.rotation * val; val2.transform.position = val7; val2.transform.rotation = val8; val2.SetActive(true); hs.weaponInstance = val2; hs.weaponRb = val3; hs.currentPos = val7; hs.currentRot = val8; hs.currentType = WeaponType.AssassinBlade; DisableCollisionWithPlayer(hs); hs.deployState = DeployState.Deploying; hs.deployProgress = 0f; hs.wasTrigger = false; ((MelonBase)this).LoggerInstance.Msg("[Mahito] " + (hs.isLeftHand ? "Левая" : "Правая") + ": клинок ассасина появляется."); } private void SpawnCrowbar(HandState hs) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)crowbarPrefab == (Object)null) { FindCrowbarPrefab(); if ((Object)(object)crowbarPrefab == (Object)null) { return; } } Transform transform = ((Component)hs.hand).transform; Quaternion val = (hs.isLeftHand ? CROWBAR_ROT_LEFT : CROWBAR_ROT_RIGHT); float num = (hs.isLeftHand ? (0f - CROWBAR_OFFSET.x) : CROWBAR_OFFSET.x); Vector3 val2 = transform.position + transform.right * num + transform.up * CROWBAR_OFFSET.y + transform.forward * CROWBAR_OFFSET.z; Quaternion val3 = transform.rotation * val; Vector3 val4 = -transform.forward * 0.55f; Vector3 val5 = val2 + val4; GameObject val6 = Object.Instantiate(crowbarPrefab, val5, val3); ((Object)val6).name = "MahitoCrowbar_" + (hs.isLeftHand ? "L" : "R"); val6.transform.SetParent((Transform)null); val6.transform.localScale = Vector3.one * 1f; DestroyComponentByName(val6, "HVRTagSocketable"); DestroyComponentByName(val6, "HVRStringSocketable"); DestroyComponentByName(val6, "HVRGrabbable"); DisableComponentByName(val6, "HVRGrabbableImpactHaptics"); DisableComponentByName(val6, "ImpactObjectRigidbody"); DisableComponentByName(val6, "ImpactCollisionTrigger3D"); DisableComponentByName(val6, "ImpactSlideAndRollTrigger3D"); Transform val7 = val6.transform.Find("GrabPoints"); if ((Object)(object)val7 != (Object)null) { try { Object.Destroy((Object)(object)((Component)val7).gameObject); } catch { } } DestroyComponentByNameRecursive(val6, "HVRGrabbableChild"); DestroyComponentByNameRecursive(val6, "HVRGrabPoints"); DestroyComponentByNameRecursive(val6, "HVRHandPoser"); DestroyComponentByNameRecursive(val6, "HVRPosableGrabPoint"); Transform val8 = val6.transform.Find("Plane"); if ((Object)(object)val8 != (Object)null) { Renderer component = ((Component)val8).GetComponent(); if ((Object)(object)component != (Object)null) { component.enabled = false; } } Rigidbody val9 = val6.GetComponent(); if ((Object)(object)val9 == (Object)null) { val9 = val6.AddComponent(); } val9.isKinematic = true; val9.useGravity = false; val9.mass = 1.75f; val9.detectCollisions = true; val9.interpolation = (RigidbodyInterpolation)1; val9.collisionDetectionMode = (CollisionDetectionMode)2; val9.velocity = Vector3.zero; val9.angularVelocity = Vector3.zero; hs.weaponRb = val9; hs.weaponColliders.Clear(); Collider[] array = Il2CppArrayBase.op_Implicit(val6.GetComponentsInChildren(true)); if (array != null) { Collider[] array2 = array; foreach (Collider val10 in array2) { if ((Object)(object)val10 != (Object)null && val10.enabled) { hs.weaponColliders.Add(val10); } } } SharpWeaponManager component2 = val6.GetComponent(); if ((Object)(object)component2 != (Object)null) { ((Behaviour)component2).enabled = true; } BluntForceManager component3 = val6.GetComponent(); if ((Object)(object)component3 != (Object)null) { ((Behaviour)component3).enabled = true; } hs.crowbarJoint = null; DisableCollisionWithPlayer(hs); hs.weaponInstance = val6; hs.currentPos = val5; hs.currentRot = val3; hs.currentType = WeaponType.Crowbar; hs.deployState = DeployState.Deploying; hs.deployProgress = 0f; hs.wasTrigger = false; ((MelonBase)this).LoggerInstance.Msg("[Mahito] " + (hs.isLeftHand ? "Левая" : "Правая") + ": Crowbar Hook выезжает из руки."); } private void CreateCrowbarJoint(HandState hs, Vector3 attachWorldPos) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)hs.weaponInstance == (Object)null) && !((Object)(object)hs.hand == (Object)null)) { Transform transform = ((Component)hs.hand).transform; Rigidbody component = ((Component)transform).GetComponent(); if ((Object)(object)component == (Object)null) { ((MelonBase)this).LoggerInstance.Msg("[Mahito] Crowbar: Rigidbody руки не найден!"); return; } ConfigurableJoint val = hs.weaponInstance.AddComponent(); ((Joint)val).connectedBody = component; ((Joint)val).anchor = new Vector3(0f, -0.25f, 0f); ((Joint)val).connectedAnchor = transform.InverseTransformPoint(attachWorldPos); val.xMotion = (ConfigurableJointMotion)1; val.yMotion = (ConfigurableJointMotion)1; val.zMotion = (ConfigurableJointMotion)1; SoftJointLimit linearLimit = default(SoftJointLimit); ((SoftJointLimit)(ref linearLimit)).limit = 0.06f; ((SoftJointLimit)(ref linearLimit)).bounciness = 0f; ((SoftJointLimit)(ref linearLimit)).contactDistance = 0.005f; val.linearLimit = linearLimit; SoftJointLimitSpring linearLimitSpring = default(SoftJointLimitSpring); ((SoftJointLimitSpring)(ref linearLimitSpring)).spring = 8000f; ((SoftJointLimitSpring)(ref linearLimitSpring)).damper = 120f; val.linearLimitSpring = linearLimitSpring; val.angularXMotion = (ConfigurableJointMotion)2; val.angularYMotion = (ConfigurableJointMotion)2; val.angularZMotion = (ConfigurableJointMotion)2; val.rotationDriveMode = (RotationDriveMode)1; JointDrive slerpDrive = default(JointDrive); ((JointDrive)(ref slerpDrive)).positionSpring = 5000f; ((JointDrive)(ref slerpDrive)).positionDamper = 80f; ((JointDrive)(ref slerpDrive)).maximumForce = 15000f; val.slerpDrive = slerpDrive; JointDrive val2 = default(JointDrive); ((JointDrive)(ref val2)).positionSpring = 8000f; ((JointDrive)(ref val2)).positionDamper = 120f; ((JointDrive)(ref val2)).maximumForce = 20000f; val.xDrive = val2; val.yDrive = val2; val.zDrive = val2; val.targetPosition = Vector3.zero; val.targetRotation = Quaternion.identity; ((Joint)val).breakForce = float.PositiveInfinity; ((Joint)val).breakTorque = float.PositiveInfinity; hs.crowbarJoint = val; } } private void UpdateWeaponPosition(HandState hs) { //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_08e7: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Unknown result type (might be due to invalid IL or missing references) //IL_0925: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_0931: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_0942: Unknown result type (might be due to invalid IL or missing references) //IL_0949: Unknown result type (might be due to invalid IL or missing references) //IL_094e: Unknown result type (might be due to invalid IL or missing references) //IL_0955: Unknown result type (might be due to invalid IL or missing references) //IL_095a: Unknown result type (might be due to invalid IL or missing references) //IL_095f: Unknown result type (might be due to invalid IL or missing references) //IL_0963: Unknown result type (might be due to invalid IL or missing references) //IL_0968: Unknown result type (might be due to invalid IL or missing references) //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_096f: Unknown result type (might be due to invalid IL or missing references) //IL_0973: Unknown result type (might be due to invalid IL or missing references) //IL_0978: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_0991: Unknown result type (might be due to invalid IL or missing references) //IL_0993: Unknown result type (might be due to invalid IL or missing references) //IL_0998: Unknown result type (might be due to invalid IL or missing references) //IL_099b: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Unknown result type (might be due to invalid IL or missing references) //IL_09a5: Unknown result type (might be due to invalid IL or missing references) //IL_09aa: Unknown result type (might be due to invalid IL or missing references) //IL_09ad: Unknown result type (might be due to invalid IL or missing references) //IL_09b2: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09ff: Unknown result type (might be due to invalid IL or missing references) //IL_0a04: Unknown result type (might be due to invalid IL or missing references) //IL_0a09: Unknown result type (might be due to invalid IL or missing references) //IL_0a0e: Unknown result type (might be due to invalid IL or missing references) //IL_0a11: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_09cd: Unknown result type (might be due to invalid IL or missing references) //IL_09d2: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_09da: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09e3: Unknown result type (might be due to invalid IL or missing references) //IL_09ea: Unknown result type (might be due to invalid IL or missing references) //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_0a42: Unknown result type (might be due to invalid IL or missing references) //IL_0a44: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Unknown result type (might be due to invalid IL or missing references) //IL_0a62: Unknown result type (might be due to invalid IL or missing references) //IL_0a31: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a3f: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06f8: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_0717: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_0755: Unknown result type (might be due to invalid IL or missing references) //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07af: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07b3: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07ce: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_0833: Unknown result type (might be due to invalid IL or missing references) //IL_0838: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081a: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_0895: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hs.hand == (Object)null) { DestroyWeapon(hs); return; } if (hs.currentType == WeaponType.Claws && hs.clawInstances.Count == 0) { DestroyWeapon(hs); return; } if (hs.currentType != WeaponType.Claws && hs.currentType != WeaponType.Crowbar && ((Object)(object)hs.weaponInstance == (Object)null || (Object)(object)hs.weaponRb == (Object)null)) { DestroyWeapon(hs); return; } if (hs.currentType == WeaponType.Crowbar && (Object)(object)hs.weaponInstance == (Object)null) { DestroyWeapon(hs); return; } Vector3 val7; if (hs.currentType == WeaponType.Crowbar) { if (hs.deployState == DeployState.Retracting) { DestroyWeapon(hs); } else { if (hs.deployState != DeployState.Deploying) { return; } float fixedDeltaTime = Time.fixedDeltaTime; Transform transform = ((Component)hs.hand).transform; Quaternion val = (hs.isLeftHand ? CROWBAR_ROT_LEFT : CROWBAR_ROT_RIGHT); float num = (hs.isLeftHand ? (0f - CROWBAR_OFFSET.x) : CROWBAR_OFFSET.x); Vector3 val2 = transform.position + transform.right * num + transform.up * CROWBAR_OFFSET.y + transform.forward * CROWBAR_OFFSET.z; Quaternion val3 = transform.rotation * val; hs.deployProgress += fixedDeltaTime / 0.1f; if (hs.deployProgress >= 1f) { hs.deployProgress = 1f; hs.deployState = DeployState.Deployed; hs.currentPos = val2; hs.currentRot = val3; hs.weaponRb.MovePosition(hs.currentPos); hs.weaponRb.MoveRotation(hs.currentRot); hs.weaponRb.isKinematic = false; hs.weaponRb.useGravity = true; hs.weaponRb.velocity = Vector3.zero; hs.weaponRb.angularVelocity = Vector3.zero; CreateCrowbarJoint(hs, val2); ((MelonBase)this).LoggerInstance.Msg("[Mahito] Crowbar зафиксирован."); return; } float deployProgress = hs.deployProgress; float num2 = deployProgress * deployProgress * (3f - 2f * deployProgress); Vector3 val4 = -transform.forward * (0.55f * (1f - num2)); Vector3 val5 = val2 + val4; Vector3 val6 = Vector3.Lerp(hs.currentPos, val5, 120f * fixedDeltaTime); float num3 = Vector3.Distance(hs.currentPos, val6); float num4 = 120f * fixedDeltaTime; if (num3 > num4) { Vector3 currentPos = hs.currentPos; val7 = val6 - hs.currentPos; val6 = currentPos + ((Vector3)(ref val7)).normalized * num4; } hs.currentPos = val6; Quaternion val8 = Quaternion.Slerp(hs.currentRot, val3, 120f * fixedDeltaTime); float num5 = Quaternion.Angle(hs.currentRot, val8); float num6 = 5000f * fixedDeltaTime; if (num5 > num6) { val8 = Quaternion.RotateTowards(hs.currentRot, val8, num6); } hs.currentRot = val8; hs.weaponRb.MovePosition(hs.currentPos); hs.weaponRb.MoveRotation(hs.currentRot); } return; } float fixedDeltaTime2 = Time.fixedDeltaTime; float num7; float num8; float num9; float num10; float num11; Vector3 val9; Quaternion val10; switch (hs.currentType) { default: return; case WeaponType.Blade: num7 = 50f; num8 = 50f; num9 = 3600f; num10 = 0.5f; num11 = 0.1f; val9 = GRIP_OFFSET; val10 = (hs.isLeftHand ? GRIP_ROT_LEFT : GRIP_ROT_RIGHT); break; case WeaponType.Chainsaw: num7 = 84f; num8 = 84f; num9 = 5400f; num10 = 0.4f; num11 = 0.15f; val9 = (hs.isLeftHand ? CHAINSAW_OFFSET_LEFT : CHAINSAW_OFFSET_RIGHT); val10 = (hs.isLeftHand ? CHAINSAW_ROT_LEFT : CHAINSAW_ROT_RIGHT); break; case WeaponType.Hammer: num7 = 250f; num8 = 250f; num9 = 7200f; num10 = 0.3f; num11 = 0.25f; val9 = (hs.isLeftHand ? HAMMER_OFFSET_LEFT : HAMMER_OFFSET_RIGHT); val10 = (hs.isLeftHand ? HAMMER_ROT_LEFT : HAMMER_ROT_RIGHT); break; case WeaponType.Claws: num7 = 200f; num8 = 200f; num9 = 10000f; num10 = 0.35f; num11 = 0.12f; val9 = CLAW_BASE_OFFSET; val10 = (hs.isLeftHand ? CLAW_ROT_LEFT : CLAW_ROT_RIGHT); break; case WeaponType.AssassinBlade: num7 = 400f; num8 = 400f; num9 = 10000f; num10 = 0.35f; num11 = 0.12f; val9 = ASSASSIN_OFFSET; val10 = (hs.isLeftHand ? ASSASSIN_ROT_LEFT : ASSASSIN_ROT_RIGHT); break; } Transform transform2 = ((Component)hs.hand).transform; if (hs.deployState == DeployState.Deploying) { hs.deployProgress += fixedDeltaTime2 / num11; if (hs.deployProgress >= 1f) { hs.deployProgress = 1f; hs.deployState = DeployState.Deployed; } } else if (hs.deployState == DeployState.Retracting) { hs.deployProgress -= fixedDeltaTime2 / num11; if (hs.deployProgress <= 0f) { hs.deployProgress = 0f; DestroyWeapon(hs); return; } } float deployProgress2 = hs.deployProgress; float num12 = deployProgress2 * deployProgress2 * (3f - 2f * deployProgress2); if (hs.currentType == WeaponType.Claws) { Vector3[] array = (Vector3[])(object)new Vector3[3] { CLAW_OFFSET_LEFT, CLAW_OFFSET_CENTER, CLAW_OFFSET_RIGHT }; Quaternion val11 = transform2.rotation * val10; float num13 = (hs.isLeftHand ? (0f - CLAW_BASE_OFFSET.x) : CLAW_BASE_OFFSET.x); float y = CLAW_BASE_OFFSET.y; for (int i = 0; i < hs.clawInstances.Count; i++) { if (i < hs.clawRbs.Count && !((Object)(object)hs.clawInstances[i] == (Object)null) && !((Object)(object)hs.clawRbs[i] == (Object)null)) { Vector3 val12 = transform2.position + transform2.right * num13 + transform2.up * y + transform2.forward * CLAW_BASE_OFFSET.z; Vector3 val13 = val12 + transform2.right * array[i].x + transform2.up * array[i].y + transform2.forward * array[i].z; Vector3 val14 = -transform2.forward * (num10 * (1f - num12)); Vector3 val15 = val13 + val14; Vector3 position = hs.clawInstances[i].transform.position; Vector3 val16 = Vector3.Lerp(position, val15, num7 * fixedDeltaTime2); float num14 = Vector3.Distance(position, val16); float num15 = num8 * fixedDeltaTime2; if (num14 > num15) { val7 = val16 - position; val16 = position + ((Vector3)(ref val7)).normalized * num15; } Quaternion val17 = Quaternion.Slerp(hs.clawInstances[i].transform.rotation, val11, num7 * fixedDeltaTime2); float num16 = Quaternion.Angle(hs.clawInstances[i].transform.rotation, val17); float num17 = num9 * fixedDeltaTime2; if (num16 > num17) { val17 = Quaternion.RotateTowards(hs.clawInstances[i].transform.rotation, val17, num17); } hs.clawRbs[i].MovePosition(val16); hs.clawRbs[i].MoveRotation(val17); } } } else { float num18 = val9.x; if (hs.currentType == WeaponType.AssassinBlade && hs.isLeftHand) { num18 = 0f - ASSASSIN_OFFSET.x; } Vector3 val18 = transform2.position + transform2.right * num18 + transform2.up * val9.y + transform2.forward * val9.z; Quaternion val19 = transform2.rotation * val10; Vector3 val20 = -transform2.forward * (num10 * (1f - num12)); Vector3 val21 = val18 + val20; Vector3 val22 = Vector3.Lerp(hs.currentPos, val21, num7 * fixedDeltaTime2); float num19 = Vector3.Distance(hs.currentPos, val22); float num20 = num8 * fixedDeltaTime2; if (num19 > num20) { Vector3 currentPos2 = hs.currentPos; val7 = val22 - hs.currentPos; val22 = currentPos2 + ((Vector3)(ref val7)).normalized * num20; } hs.currentPos = val22; Quaternion val23 = Quaternion.Slerp(hs.currentRot, val19, num7 * fixedDeltaTime2); float num21 = Quaternion.Angle(hs.currentRot, val23); float num22 = num9 * fixedDeltaTime2; if (num21 > num22) { val23 = Quaternion.RotateTowards(hs.currentRot, val23, num22); } hs.currentRot = val23; hs.weaponRb.MovePosition(hs.currentPos); hs.weaponRb.MoveRotation(hs.currentRot); } } private void DestroyWeapon(HandState hs) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (hs.currentType == WeaponType.Chainsaw) { if ((Object)(object)hs.stopSoundClip != (Object)null && (Object)(object)hs.weaponInstance != (Object)null) { try { AudioSource.PlayClipAtPoint(hs.stopSoundClip, hs.weaponInstance.transform.position, 1f); } catch { } } if ((Object)(object)hs.idleAudio != (Object)null) { try { hs.idleAudio.Stop(); } catch { } } if ((Object)(object)hs.revvedAudio != (Object)null) { try { hs.revvedAudio.Stop(); } catch { } } if ((Object)(object)hs.chainsawManager != (Object)null) { try { hs.chainsawManager.StopChainsaw(); hs.chainsawManager.isRevved = false; } catch { } } } if ((Object)(object)hs.crowbarJoint != (Object)null) { try { Object.Destroy((Object)(object)hs.crowbarJoint); } catch { } hs.crowbarJoint = null; } if ((Object)(object)hs.weaponRb != (Object)null && hs.currentType == WeaponType.Crowbar) { try { hs.weaponRb.isKinematic = true; } catch { } } if (hs.weaponColliders.Count > 0) { GameObject val = GameObject.Find("Hexa4Rig26.10.23"); if ((Object)(object)val != (Object)null) { Collider[] array = Il2CppArrayBase.op_Implicit(val.GetComponentsInChildren(true)); if (array != null) { foreach (Collider weaponCollider in hs.weaponColliders) { if ((Object)(object)weaponCollider == (Object)null) { continue; } Collider[] array2 = array; foreach (Collider val2 in array2) { if (!((Object)(object)val2 == (Object)null)) { try { Physics.IgnoreCollision(weaponCollider, val2, false); } catch { } } } } } } } if ((Object)(object)hs.weaponInstance != (Object)null && hs.currentType != WeaponType.Claws) { Object.Destroy((Object)(object)hs.weaponInstance); } if (hs.currentType == WeaponType.Claws) { for (int j = 0; j < hs.clawInstances.Count; j++) { if ((Object)(object)hs.clawInstances[j] != (Object)null) { Object.Destroy((Object)(object)hs.clawInstances[j]); } } } hs.ClearWeapon(); ((MelonBase)this).LoggerInstance.Msg("[Mahito] " + (hs.isLeftHand ? "Левая" : "Правая") + ": оружие убрано."); } private void DestroyComponentByName(GameObject obj, string componentName) { try { Il2CppArrayBase components = obj.GetComponents(); if (components == null) { return; } foreach (Component item in components) { if ((Object)(object)item == (Object)null) { continue; } string text = ""; try { Type il2CppType = ((Object)item).GetIl2CppType(); text = ((il2CppType != null) ? ((MemberInfo)il2CppType).Name : null) ?? ((object)item).GetType().Name; } catch { } if (text == componentName) { try { Object.Destroy((Object)(object)item); } catch { } } } } catch { } } private void DestroyComponentByNameRecursive(GameObject obj, string componentName) { try { Il2CppArrayBase components = obj.GetComponents(); if (components != null) { foreach (Component item in components) { if ((Object)(object)item == (Object)null) { continue; } string text = ""; try { Type il2CppType = ((Object)item).GetIl2CppType(); text = ((il2CppType != null) ? ((MemberInfo)il2CppType).Name : null) ?? ((object)item).GetType().Name; } catch { } if (text == componentName) { try { Object.Destroy((Object)(object)item); } catch { } } } } for (int i = 0; i < obj.transform.childCount; i++) { DestroyComponentByNameRecursive(((Component)obj.transform.GetChild(i)).gameObject, componentName); } } catch { } } private void DisableComponentByName(GameObject obj, string componentName) { try { Il2CppArrayBase components = obj.GetComponents(); if (components == null) { return; } foreach (Component item in components) { if ((Object)(object)item == (Object)null) { continue; } string text = ""; try { Type il2CppType = ((Object)item).GetIl2CppType(); text = ((il2CppType != null) ? ((MemberInfo)il2CppType).Name : null) ?? ((object)item).GetType().Name; } catch { } if (!(text == componentName)) { continue; } try { PropertyInfo property = ((object)item).GetType().GetProperty("enabled"); if (property != null && property.CanWrite) { property.SetValue(item, false); } } catch { } } } catch { } } private void DisableCollisionWithPlayer(HandState hs) { if (hs.weaponColliders.Count == 0) { return; } GameObject val = GameObject.Find("Hexa4Rig26.10.23"); if ((Object)(object)val == (Object)null) { return; } Collider[] array = Il2CppArrayBase.op_Implicit(val.GetComponentsInChildren(true)); if (array == null) { return; } foreach (Collider weaponCollider in hs.weaponColliders) { if ((Object)(object)weaponCollider == (Object)null) { continue; } Collider[] array2 = array; foreach (Collider val2 in array2) { if (!((Object)(object)val2 == (Object)null)) { try { Physics.IgnoreCollision(weaponCollider, val2, true); } catch { } } } } } private void DisableCollisionWithPlayerExceptHand(HandState hs) { if (hs.weaponColliders.Count == 0) { return; } GameObject val = GameObject.Find("Hexa4Rig26.10.23"); if ((Object)(object)val == (Object)null) { return; } Collider[] array = Il2CppArrayBase.op_Implicit(val.GetComponentsInChildren(true)); if (array == null) { return; } Transform val2 = (((Object)(object)hs.hand != (Object)null) ? ((Component)hs.hand).transform : null); foreach (Collider weaponCollider in hs.weaponColliders) { if ((Object)(object)weaponCollider == (Object)null) { continue; } Collider[] array2 = array; foreach (Collider val3 in array2) { if (!((Object)(object)val3 == (Object)null) && (!((Object)(object)val2 != (Object)null) || !((Component)val3).transform.IsChildOf(val2))) { try { Physics.IgnoreCollision(weaponCollider, val3, true); } catch { } } } } } private void CutHammerHandleMesh(GameObject hammerInstance) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) try { MeshFilter val = hammerInstance.GetComponent(); if ((Object)(object)val == (Object)null) { val = hammerInstance.GetComponentInChildren(); } if ((Object)(object)val == (Object)null) { return; } Mesh mesh = val.mesh; if ((Object)(object)mesh == (Object)null) { return; } Il2CppStructArray vertices = mesh.vertices; Vector3[] array = (Vector3[])(object)new Vector3[((Il2CppArrayBase)(object)vertices).Length]; for (int i = 0; i < ((Il2CppArrayBase)(object)vertices).Length; i++) { array[i] = ((Il2CppArrayBase)(object)vertices)[i]; } float num = float.MaxValue; float num2 = float.MinValue; Vector3[] array2 = array; foreach (Vector3 val2 in array2) { if (val2.y < num) { num = val2.y; } if (val2.y > num2) { num2 = val2.y; } } float num3 = num2 - num; float num4 = num + num3 * 0.87f; int subMeshCount = mesh.subMeshCount; for (int k = 0; k < subMeshCount; k++) { Il2CppStructArray triangles = mesh.GetTriangles(k); List list = new List(); for (int l = 0; l < ((Il2CppArrayBase)(object)triangles).Length; l++) { list.Add(((Il2CppArrayBase)(object)triangles)[l]); } List list2 = new List(); for (int m = 0; m < list.Count; m += 3) { int num5 = list[m]; int num6 = list[m + 1]; int num7 = list[m + 2]; if (!(array[num5].y < num4) || !(array[num6].y < num4) || !(array[num7].y < num4)) { list2.Add(num5); list2.Add(num6); list2.Add(num7); } } Il2CppStructArray val3 = new Il2CppStructArray((long)list2.Count); for (int n = 0; n < list2.Count; n++) { ((Il2CppArrayBase)(object)val3)[n] = list2[n]; } mesh.SetTriangles(val3, k); } mesh.RecalculateNormals(); mesh.RecalculateBounds(); } catch { } } private void CutMeshAtThreshold(GameObject instance, float threshold) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) try { MeshFilter val = instance.GetComponent(); if ((Object)(object)val == (Object)null) { val = instance.GetComponentInChildren(); } if ((Object)(object)val == (Object)null) { return; } Mesh mesh = val.mesh; if ((Object)(object)mesh == (Object)null) { return; } Il2CppStructArray vertices = mesh.vertices; Vector3[] array = (Vector3[])(object)new Vector3[((Il2CppArrayBase)(object)vertices).Length]; for (int i = 0; i < ((Il2CppArrayBase)(object)vertices).Length; i++) { array[i] = ((Il2CppArrayBase)(object)vertices)[i]; } int subMeshCount = mesh.subMeshCount; for (int j = 0; j < subMeshCount; j++) { Il2CppStructArray triangles = mesh.GetTriangles(j); List list = new List(); for (int k = 0; k < ((Il2CppArrayBase)(object)triangles).Length; k++) { list.Add(((Il2CppArrayBase)(object)triangles)[k]); } List list2 = new List(); for (int l = 0; l < list.Count; l += 3) { int num = list[l]; int num2 = list[l + 1]; int num3 = list[l + 2]; if (!(array[num].y < threshold) || !(array[num2].y < threshold) || !(array[num3].y < threshold)) { list2.Add(num); list2.Add(num2); list2.Add(num3); } } Il2CppStructArray val2 = new Il2CppStructArray((long)list2.Count); for (int m = 0; m < list2.Count; m++) { ((Il2CppArrayBase)(object)val2)[m] = list2[m]; } mesh.SetTriangles(val2, j); } mesh.RecalculateNormals(); mesh.RecalculateBounds(); } catch { } } private void DisableHandleColliders(GameObject instance) { Collider[] array = Il2CppArrayBase.op_Implicit(instance.GetComponentsInChildren(true)); if (array == null) { return; } Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)val == (Object)null) { continue; } string name = ((Object)((Component)val).gameObject).name; bool flag = false; if (name == "Grab" || name == "Guard") { flag = true; } switch (name) { default: if (!(name == "ParryHook")) { break; } goto case "Handle"; case "Handle": case "Pommel": case "HandGuard": flag = true; break; } if ((Object)(object)((Component)val).gameObject == (Object)(object)instance && val is CapsuleCollider) { flag = true; } if (flag) { val.enabled = false; } } } private float GetAxis(Vector3 v, int axis) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) return axis switch { 0 => v.x, 1 => v.y, _ => v.z, }; } private float CutAssassinBladeFromHandleToTip(GameObject instance, out int cutAxis) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) cutAxis = 1; float num = float.NaN; try { if ((Object)(object)instance == (Object)null) { return float.NaN; } MeshFilter[] array = Il2CppArrayBase.op_Implicit(instance.GetComponentsInChildren(true)); if (array == null || array.Length == 0) { return float.NaN; } List list = new List(); List list2 = new List(); bool flag = false; float num2 = 0f; float num3 = 0f; float num4 = 0f; float num5 = 0f; float num6 = 0f; float num7 = 0f; Matrix4x4 worldToLocalMatrix = instance.transform.worldToLocalMatrix; MeshFilter[] array2 = array; foreach (MeshFilter val in array2) { if ((Object)(object)val == (Object)null || IsAssassinIgnoredMeshObject(((Component)val).gameObject)) { continue; } Renderer component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && !component.enabled) { continue; } Mesh mesh = val.mesh; if ((Object)(object)mesh == (Object)null) { continue; } Il2CppStructArray vertices = mesh.vertices; if (vertices == null || ((Il2CppArrayBase)(object)vertices).Length == 0) { continue; } bool flag2 = false; float num8 = 0f; float num9 = 0f; float num10 = 0f; float num11 = 0f; float num12 = 0f; float num13 = 0f; Matrix4x4 localToWorldMatrix = ((Component)val).transform.localToWorldMatrix; for (int j = 0; j < ((Il2CppArrayBase)(object)vertices).Length; j++) { Vector3 val2 = ((Matrix4x4)(ref localToWorldMatrix)).MultiplyPoint3x4(((Il2CppArrayBase)(object)vertices)[j]); Vector3 val3 = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(val2); if (!flag2) { num8 = (num11 = val3.x); num9 = (num12 = val3.y); num10 = (num13 = val3.z); flag2 = true; continue; } if (val3.x < num8) { num8 = val3.x; } if (val3.x > num11) { num11 = val3.x; } if (val3.y < num9) { num9 = val3.y; } if (val3.y > num12) { num12 = val3.y; } if (val3.z < num10) { num10 = val3.z; } if (val3.z > num13) { num13 = val3.z; } } if (!flag2) { continue; } float num14 = num11 - num8; float num15 = num12 - num9; float num16 = num13 - num10; if (!(num14 > 5f) && !(num15 > 5f) && !(num16 > 5f)) { list.Add(val); list2.Add(mesh); if (!flag) { num2 = num8; num3 = num9; num4 = num10; num5 = num11; num6 = num12; num7 = num13; flag = true; } else { num2 = Mathf.Min(num2, num8); num3 = Mathf.Min(num3, num9); num4 = Mathf.Min(num4, num10); num5 = Mathf.Max(num5, num11); num6 = Mathf.Max(num6, num12); num7 = Mathf.Max(num7, num13); } } } if (list.Count == 0 || !flag) { return float.NaN; } Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(num2, num3, num4); Vector3 val5 = default(Vector3); ((Vector3)(ref val5))..ctor(num5, num6, num7); Vector3 v = val5 - val4; float axis = GetAxis(v, cutAxis); if (axis <= 0.0001f) { return float.NaN; } float axis2 = GetAxis(val4, cutAxis); float axis3 = GetAxis(val5, cutAxis); float num17 = Mathf.Clamp01(0.8f); bool flag3 = true; num = (flag3 ? ((num17 <= 0.001f) ? (axis2 - 0.001f) : ((!(num17 >= 0.999f)) ? (axis2 + axis * num17) : (axis3 + 0.001f))) : ((num17 <= 0.001f) ? (axis3 + 0.001f) : ((!(num17 >= 0.999f)) ? (axis3 - axis * num17) : (axis2 - 0.001f)))); Matrix4x4 localToWorldMatrix2 = instance.transform.localToWorldMatrix; int num18 = 0; int num19 = 0; for (int k = 0; k < list.Count; k++) { MeshFilter val6 = list[k]; Mesh val7 = list2[k]; if ((Object)(object)val6 == (Object)null || (Object)(object)val7 == (Object)null) { continue; } Il2CppStructArray vertices2 = val7.vertices; if (vertices2 == null || ((Il2CppArrayBase)(object)vertices2).Length == 0) { continue; } int length = ((Il2CppArrayBase)(object)vertices2).Length; Vector3[] array3 = (Vector3[])(object)new Vector3[length]; bool[] array4 = new bool[length]; Matrix4x4 localToWorldMatrix3 = ((Component)val6).transform.localToWorldMatrix; Matrix4x4 worldToLocalMatrix2 = ((Component)val6).transform.worldToLocalMatrix; for (int l = 0; l < length; l++) { Vector3 val8 = ((Matrix4x4)(ref localToWorldMatrix3)).MultiplyPoint3x4(array3[l] = ((Il2CppArrayBase)(object)vertices2)[l]); Vector3 v2 = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(val8); float axis4 = GetAxis(v2, cutAxis); if (array4[l] = (flag3 ? (axis4 < num) : (axis4 > num))) { Vector3 val9 = SetAssassinAxis(v2, cutAxis, num); Vector3 val10 = ((Matrix4x4)(ref localToWorldMatrix2)).MultiplyPoint3x4(val9); Vector3 val11 = ((Matrix4x4)(ref worldToLocalMatrix2)).MultiplyPoint3x4(val10); array3[l] = val11; } } try { val7.vertices = Il2CppStructArray.op_Implicit(array3); } catch { } int subMeshCount = val7.subMeshCount; bool flag4 = false; for (int m = 0; m < subMeshCount; m++) { Il2CppStructArray triangles = val7.GetTriangles(m); if (triangles == null) { continue; } List list3 = new List(); for (int n = 0; n < ((Il2CppArrayBase)(object)triangles).Length; n++) { list3.Add(((Il2CppArrayBase)(object)triangles)[n]); } List list4 = new List(); for (int num20 = 0; num20 < list3.Count; num20 += 3) { int num21 = list3[num20]; int num22 = list3[num20 + 1]; int num23 = list3[num20 + 2]; if (!array4[num21] || !array4[num22] || !array4[num23]) { list4.Add(num21); list4.Add(num22); list4.Add(num23); } } if (list4.Count > 0) { flag4 = true; } Il2CppStructArray val12 = new Il2CppStructArray((long)list4.Count); for (int num24 = 0; num24 < list4.Count; num24++) { ((Il2CppArrayBase)(object)val12)[num24] = list4[num24]; } val7.SetTriangles(val12, m); } val7.RecalculateNormals(); val7.RecalculateBounds(); if (!flag4) { num19++; Renderer component2 = ((Component)val6).GetComponent(); if ((Object)(object)component2 != (Object)null) { try { component2.enabled = false; } catch { } } Collider[] array5 = Il2CppArrayBase.op_Implicit(((Component)val6).GetComponentsInChildren(true)); if (array5 == null) { continue; } Collider[] array6 = array5; foreach (Collider val13 in array6) { if ((Object)(object)val13 != (Object)null) { try { val13.enabled = false; } catch { } } } } else { num18++; } } Il2CppArrayBase componentsInChildren = instance.GetComponentsInChildren(true); if (componentsInChildren != null) { foreach (MeshCollider item in componentsInChildren) { if (!((Object)(object)item == (Object)null) && ((Collider)item).enabled) { try { ((Collider)item).enabled = false; ((Collider)item).enabled = true; } catch { } } } } return num; } catch { return float.NaN; } } private void DisableAssassinHiddenParts(GameObject instance, float cutValue, int axis, bool removeBelow) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)instance == (Object)null) { return; } Matrix4x4 worldToLocalMatrix = instance.transform.worldToLocalMatrix; Collider[] array = Il2CppArrayBase.op_Implicit(instance.GetComponentsInChildren(true)); Bounds bounds; if (array != null) { Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)val == (Object)null || !val.enabled || IsAssassinIgnoredMeshObject(((Component)val).gameObject)) { continue; } if (IsAssassinHiddenName(((Object)((Component)val).gameObject).name) || IsAssassinHiddenName(((Object)(object)((Component)val).transform.parent != (Object)null) ? ((Object)((Component)val).transform.parent).name : null)) { try { val.enabled = false; } catch { } } else { if (float.IsNaN(cutValue)) { continue; } try { bounds = val.bounds; Vector3 v = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(((Bounds)(ref bounds)).min); bounds = val.bounds; Vector3 v2 = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(((Bounds)(ref bounds)).max); float num = Mathf.Min(GetAxis(v, axis), GetAxis(v2, axis)); float num2 = Mathf.Max(GetAxis(v, axis), GetAxis(v2, axis)); if (removeBelow ? (num2 < cutValue + 0.001f) : (num > cutValue - 0.001f)) { val.enabled = false; } } catch { } } } } Renderer[] array3 = Il2CppArrayBase.op_Implicit(instance.GetComponentsInChildren(true)); if (array3 == null) { return; } Renderer[] array4 = array3; foreach (Renderer val2 in array4) { if ((Object)(object)val2 == (Object)null || !val2.enabled || IsAssassinIgnoredMeshObject(((Component)val2).gameObject)) { continue; } if (IsAssassinHiddenName(((Object)((Component)val2).gameObject).name) || IsAssassinHiddenName(((Object)(object)((Component)val2).transform.parent != (Object)null) ? ((Object)((Component)val2).transform.parent).name : null)) { try { val2.enabled = false; } catch { } } else { if (float.IsNaN(cutValue)) { continue; } try { bounds = val2.bounds; Vector3 v3 = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(((Bounds)(ref bounds)).min); bounds = val2.bounds; Vector3 v4 = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(((Bounds)(ref bounds)).max); float num3 = Mathf.Min(GetAxis(v3, axis), GetAxis(v4, axis)); float num4 = Mathf.Max(GetAxis(v3, axis), GetAxis(v4, axis)); if (removeBelow ? (num4 < cutValue - 0.002f) : (num3 > cutValue + 0.002f)) { val2.enabled = false; } } catch { } } } } private bool IsAssassinIgnoredMeshObject(GameObject go) { if ((Object)(object)go == (Object)null) { return true; } string text = ((Object)go).name.ToLower(); return text.Contains("plane") || text.Contains("debug") || text.Contains("socket") || text.Contains("shop") || text.Contains("grabpoint") || text.Contains("slash") || text.Contains("stabby") || text.Contains("orient"); } private bool IsAssassinHiddenName(string goName) { if (string.IsNullOrEmpty(goName)) { return false; } string text = goName.ToLower(); return text.Contains("handle") || text.Contains("grip") || text.Contains("guard") || text.Contains("pommel") || text.Contains("hilt") || text.Contains("grab") || text.Contains("handguard") || text.Contains("parryhook") || text.Contains("wrap"); } private Vector3 SetAssassinAxis(Vector3 v, int axis, float value) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) switch (axis) { case 0: v.x = value; break; case 1: v.y = value; break; default: v.z = value; break; } return v; } private Vector3 AssassinAxisVector(int axis) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) return (Vector3)(axis switch { 0 => Vector3.right, 1 => Vector3.up, _ => Vector3.forward, }); } private int AssassinDominantAxis(Vector3 v) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Abs(v.x); float num2 = Mathf.Abs(v.y); float num3 = Mathf.Abs(v.z); if (num >= num2 && num >= num3) { return 0; } if (num2 >= num && num2 >= num3) { return 1; } return 2; } private int CalcAssassinTrimRange(float min, float max, float cutLocal, float sign, bool removeBelow, out float newMin, out float newMax) { newMin = min; newMax = max; if (float.IsNaN(cutLocal) || float.IsInfinity(cutLocal)) { return 0; } if (removeBelow ? (sign < 0f) : (sign > 0f)) { if (cutLocal >= max) { return 0; } if (cutLocal <= min) { return -1; } newMax = cutLocal; return 1; } if (cutLocal <= min) { return 0; } if (cutLocal >= max) { return -1; } newMin = cutLocal; return 1; } private bool TrimAssassinCollider(GameObject instance, Collider col, float cutValue, int axis, bool removeBelow) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)instance == (Object)null || (Object)(object)col == (Object)null) { return false; } Transform transform = instance.transform; Bounds bounds = col.bounds; Vector3 v = transform.InverseTransformPoint(((Bounds)(ref bounds)).center); v = SetAssassinAxis(v, axis, cutValue); Vector3 val = instance.transform.TransformPoint(v); Vector3 v2 = ((Component)col).transform.InverseTransformPoint(val); Vector3 val2 = instance.transform.TransformDirection(AssassinAxisVector(axis)); Vector3 v3 = ((Component)col).transform.InverseTransformDirection(val2); int axis2 = AssassinDominantAxis(v3); float axis3 = GetAxis(v3, axis2); if (Mathf.Abs(axis3) < 0.05f) { return false; } float sign = ((axis3 >= 0f) ? 1f : (-1f)); float axis4 = GetAxis(v2, axis2); BoxCollider val3 = (BoxCollider)(object)((col is BoxCollider) ? col : null); if ((Object)(object)val3 != (Object)null) { Vector3 center = val3.center; Vector3 size = val3.size; float axis5 = GetAxis(center, axis2); float axis6 = GetAxis(size, axis2); float min = axis5 - axis6 * 0.5f; float max = axis5 + axis6 * 0.5f; float newMin; float newMax; switch (CalcAssassinTrimRange(min, max, axis4, sign, removeBelow, out newMin, out newMax)) { case -1: ((Collider)val3).enabled = false; return true; case 1: { float num = newMax - newMin; if (num <= 0.001f) { ((Collider)val3).enabled = false; return true; } center = SetAssassinAxis(center, axis2, (newMin + newMax) * 0.5f); size = SetAssassinAxis(size, axis2, num); val3.center = center; val3.size = size; return true; } default: return false; } } CapsuleCollider val4 = (CapsuleCollider)(object)((col is CapsuleCollider) ? col : null); if ((Object)(object)val4 != (Object)null) { int direction = val4.direction; if (direction < 0 || direction > 2) { return false; } float axis7 = GetAxis(v3, direction); if (Mathf.Abs(axis7) < 0.05f) { return false; } float sign2 = ((axis7 >= 0f) ? 1f : (-1f)); float axis8 = GetAxis(v2, direction); Vector3 center2 = val4.center; float height = val4.height; float axis9 = GetAxis(center2, direction); float min2 = axis9 - height * 0.5f; float max2 = axis9 + height * 0.5f; float newMin2; float newMax2; switch (CalcAssassinTrimRange(min2, max2, axis8, sign2, removeBelow, out newMin2, out newMax2)) { case -1: ((Collider)val4).enabled = false; return true; case 1: { float num2 = newMax2 - newMin2; if (num2 <= 0.001f) { ((Collider)val4).enabled = false; return true; } center2 = SetAssassinAxis(center2, direction, (newMin2 + newMax2) * 0.5f); val4.center = center2; val4.height = num2; return true; } default: return false; } } SphereCollider val5 = (SphereCollider)(object)((col is SphereCollider) ? col : null); if ((Object)(object)val5 != (Object)null) { Vector3 val6 = ((Component)col).transform.TransformPoint(val5.center); Vector3 v4 = instance.transform.InverseTransformPoint(val6); float axis10 = GetAxis(v4, axis); if (removeBelow ? (axis10 < cutValue) : (axis10 > cutValue)) { ((Collider)val5).enabled = false; return true; } return false; } } catch { } return false; } }