Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SeparateMonitorPlayer2 TheShySage v1.0.0
SeparateMonitorPlayer2-TheShySage.dll
Decompiled 5 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using System.Runtime.CompilerServices; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Photon.Pun; using Strobotnik.Klattersynth; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Utilities; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyVersion("0.0.0.0")] namespace TheShySage.SeparateMonitorPlayer2; public enum PlayerTwoController { XboxController1, XboxController2 } [BepInPlugin("TheShySage.SeparateMonitorPlayer2", "Separate Monitor Player 2-TheShySage", "0.9.27")] public sealed class Plugin : BaseUnityPlugin { internal static ConfigEntry<bool> Enabled; internal static ConfigEntry<PlayerTwoController> Controller; internal static ConfigEntry<int> DisplayNumber; internal static ConfigEntry<float> CameraSensitivity; private void Awake() { //IL_0005: 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_007b: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown new Harmony("TheShySage.SeparateMonitorPlayer2").PatchAll(); Enabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Player 2", "Enabled", true, "Enables the controller-only local Player 2 proxy."); Controller = ((BaseUnityPlugin)this).Config.Bind<PlayerTwoController>("Player 2", "Controller", PlayerTwoController.XboxController2, "Selects Xbox Controller 1 or Xbox Controller 2 for Player 2."); DisplayNumber = ((BaseUnityPlugin)this).Config.Bind<int>("Player 2", "Monitor Number", 2, new ConfigDescription("Monitor used by Player 2.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(2, 8), Array.Empty<object>())); CameraSensitivity = ((BaseUnityPlugin)this).Config.Bind<float>("Player 2", "Camera Sensitivity", 1.5f, new ConfigDescription("Player 2 camera look-speed multiplier. 1.00 is the previous sensitivity.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.25f, 4f), Array.Empty<object>())); ((Component)this).gameObject.AddComponent<PlayerTwoManager>(); } } public sealed class PlayerTwoManager : MonoBehaviour { private sealed class BindingBackup { internal InputAction Action; internal int Index; internal string OverridePath; } internal static PlayerTwoManager ActiveManager; private const float MoveFriction = 5f; private const float GrabDistance = 4f; private const float PlayerTwoScale = 0.75f; private const float PlayerTwoCartForceMultiplier = 9f; private const float PlayerTwoStrengthMultiplier = 0.5f; private const float DeadHeadDummyStatMultiplierPerLevel = 1.5f; private const float PlayerTwoGravityMultiplier = 0.999f; private GameObject proxy; private Rigidbody proxyBody; private Camera playerCamera; private GameObject playerTwoHud; private TextMeshProUGUI playerTwoHealthText; private TextMeshProUGUI playerTwoSprintText; private TextMeshProUGUI playerTwoVoiceLineText; private TextMeshProUGUI playerTwoHeldValueText; private GameObject playerTwoTtsObject; private GameObject playerTwoMapDevice; private Transform playerTwoMapMarker; private Transform playerOneMapMarker; private float playerTwoMapScale = 0.1f; private readonly List<Transform> playerTwoMapLayers = new List<Transform>(); private readonly List<int> playerTwoMapLayerNumbers = new List<int>(); private readonly List<Transform> playerTwoMapSourceTransforms = new List<Transform>(); private readonly List<Transform> playerTwoMapCloneTransforms = new List<Transform>(); private bool playerTwoMapActive; private bool previousMapButton; private float mapDeviceCreateRetry; private TTSVoice playerTwoTtsVoice; private Speech playerTwoNaturalSpeech; private int playerTwoVoiceLineIndex; private bool previousVoiceSpeak; private float ttsCreateRetry; private static readonly string[] PlayerTwoVoiceLines = new string[10] { "Hi", "Run", "Come here", "Follow me", "Enemy nearby", "Loot over here", "Up ahead", "Behind", "To the left", "To the right" }; private GameObject ghostVisual; private GameObject playerOneVisualForPlayerTwo; private Transform[] playerOneVisualSourceTransforms; private Transform[] playerOneVisualCloneTransforms; private PhysGrabObject heldValuable; private Rigidbody heldBody; private PhysGrabCart heldCart; private StaticGrabObject heldStaticObject; private Transform heldStaticTransform; private Vector3 heldStaticLocalPoint; private bool heldPhysRegistered; private Vector3 heldLocalPoint; private float grabHoldDistance; private Vector3 playerTwoCurrentGrabForce; private float grabForceRamp; private GameObject grabVisualRoot; private LineRenderer grabBeamLine; private GameObject grabPointVisual; private float pitch; private bool previousGrab; private bool previousUse; private int dummyExpressionIndex; private List<ExpressionSettings> dummyExpressions; private GameObject dummyEyelidLeft; private GameObject dummyEyelidRight; private Transform dummyEyelidLeftScale; private Transform dummyEyelidRightScale; private Transform dummyLeftUpperLidX; private Transform dummyLeftUpperLidZ; private Transform dummyLeftLowerLidX; private Transform dummyLeftLowerLidZ; private Transform dummyRightUpperLidX; private Transform dummyRightUpperLidZ; private Transform dummyRightLowerLidX; private Transform dummyRightLowerLidZ; private Transform dummyPupilLeftScale; private Transform dummyPupilRightScale; private Transform dummyPupilLeftRotation; private Transform dummyPupilRightRotation; private bool playerOneWasAlive; private float spawnRetry; private float avatarCloneReadyTimer; private GameObject mainMenuInfoCanvas; private GameObject mainMenuInfoPanel; private Canvas mainMenuInfoCanvasComponent; private readonly List<TextMeshProUGUI> mainMenuInfoTexts = new List<TextMeshProUGUI>(); private bool mainMenuInfoStyled; private const string MainMenuInfoText = "hi welcome to my first ever mod, thank you for giving it a try.\n\ncurrently its still sort of buggy and has a few issues\nbut overtime i want to improve it.\n\n-why use this mod instead of just something else that creates a second window\n\nthis mod is mostly aimed to be simpler to do and easier to do co op,\nthis mod does not create a second instance of the game instead\nits doing what true co op games do.\nits running in the same instance and same render\ntherefore no lag behaviors\n, \nthe co op player is not entirely an actual player, its more like a drone or a object to the game,\nwhich meant i had to recreate the movement system and everything else.\nbut because its not a actual player it will still load up without the use of adding a player to the playerlist.\n\nCurrently this only works with two monitors, and i do want to create a better control scheme for the tts\n\ndrone players cannot hold weapons properly yet, im still unsure about how to go about doing that, or the direction i want to go with it, so it will be on pause.\n\nFeatures:\n-drone/dummy co op player\nare 50% weaker then a normal player,\nbut anything player 1 grabs like upgrades does scale alongside the drone player, dead head player upgrade also increases all stats of the drone player by 1.5x for all drone players.\n-drone players share the same health as player 1.\nif player 1 or player 2 is attacked Player 1 health will drop.\nif player 1 dies so does the drone but the drone takes 15% less damage\n\nthank you again for giving my mod a try. i do hope that this becomes an actual feature for the game.\n-TheShySage"; private int activeDisplay = -1; private float inputIsolationTimer; private bool crouched; private bool crawling; private bool grounded; private bool sprinting; private bool canSlide; private bool sliding; private float sprintLerp; private float sprintGrace; private float sprintDrainTimer; private float slideTimer; private float energy = 100f; private float jumpBuffer; private float groundedBuffer; private float groundedLatch; private float groundedDisableTimer; private float jumpCooldown; private float sprintRechargeTimer; private Vector3 relativeVelocity; private Vector3 relativeVelocityTarget; private bool velocityIdle = true; private Vector3 slideDirection; private Vector3 slideDirectionCurrent; private CapsuleCollider proxyCapsule; private float standingCapsuleHeight = 1.7f; private Vector3 standingCapsuleCenter = new Vector3(0f, 0.85f, 0f); private float crouchCollisionRatio = 0.56f; private float crawlCollisionRatio = 0.38f; private Vector3 groundProbeOffset = new Vector3(0f, 0.08f, 0f); private float groundProbeRadius = 0.3f; private int groundProbeMask = -1; private Vector3 cameraStandingOffset = new Vector3(0f, 0.85f, 0f); private float cameraPositionSmooth = 2f; private float tumbleCameraBlendTimer; private float cameraCrouchLerp; private float cameraCrouchPosition = -0.3f; private float cameraCrouchSpeed = 5f; private AnimationCurve cameraCrouchCurve; private Gamepad isolatedPad; private readonly List<Light> ghostLights = new List<Light>(); private Light playerTwoFlashlight; private float playerTwoFlashlightBaseIntensity = 1f; private float flashlightCreateRetry; private bool flashlightOn = true; private readonly List<BindingBackup> bindingBackups = new List<BindingBackup>(); private readonly List<InputActionMap> isolatedActionMaps = new List<InputActionMap>(); private GameObject tumbleRig; private Rigidbody tumbleBody; private PhysGrabObject tumblePhysGrabObject; private RigidbodyInterpolation tumbleInterpolation; private Collider[] tumbleColliders = (Collider[])(object)new Collider[0]; private Transform tumbleFollowPosition; private bool isTumbling; private float tumbleInputCooldown; private bool previousTumbleButton; private float tumbleNotMovingTimer; private Vector3 tumbleLastPosition; private float tumbleCustomGravity = 10f; private Animator dummyAnimator; private Transform dummyHeadTransform; private Transform dummyMouthTransform; private Quaternion dummyMouthNeutralRotation = Quaternion.identity; private float dummyMouthMaxAngle = 45f; private readonly float[] dummyMouthSamples = new float[64]; private Transform dummyHeadUpTransform; private Transform dummyHeadSideTransform; private Transform dummyHeadLookTransform; private Transform dummyEyeLeft; private Transform dummyEyeRight; private Vector3 cameraMotionPosition; private Vector3 cameraMotionRotation; private bool animatorJumping; private float animatorJumpTimer; private bool animatorSprinting; private bool animatorSliding; private float vanillaBobUpAmount; private float vanillaBobUpActive; private float vanillaBobUpStrength; private float vanillaBobSideAmount; private float vanillaBobSideActive; private float vanillaBobSideStrength; private bool vanillaBobSideReverse; private float vanillaBobMultiplier; private PlayerAvatar soundPlayer; private PlayerAvatar enemyTargetAvatar; private bool enemyTargetRegistered; private readonly HashSet<Enemy> enemyTargetRegistrations = new HashSet<Enemy>(); private float enemyVisionScanTimer; private PlayerVisionTarget enemyVisionTarget; private Transform enemyVisionTransform; private float footstepDistance; private Vector3 soundLastPosition; private bool soundWasGrounded; private bool soundWasSliding; private float tumbleImpactSoundCooldown; private Vector3 tumbleSoundVelocity; private float tumbleRollSoundTimer; private readonly Dictionary<HurtCollider, float> sharedHealthHitCooldowns = new Dictionary<HurtCollider, float>(); private float sharedHealthScanTimer; private void OnEnable() { ActiveManager = this; } internal Vector3 RouteAudioPosition(Vector3 sourcePosition) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) if (!Plugin.Enabled.Value || !Object.op_Implicit((Object)(object)proxy) || !Object.op_Implicit((Object)(object)playerCamera)) { return sourcePosition; } AudioListener[] array = Object.FindObjectsOfType<AudioListener>(); Transform val = null; AudioListener[] array2 = array; foreach (AudioListener val2 in array2) { if (Object.op_Implicit((Object)(object)val2) && ((Behaviour)val2).enabled && ((Component)val2).gameObject.activeInHierarchy && !((Component)val2).transform.IsChildOf(proxy.transform)) { val = ((Component)val2).transform; break; } } if (!Object.op_Implicit((Object)(object)val)) { return sourcePosition; } Vector3 val3 = sourcePosition - val.position; float sqrMagnitude = ((Vector3)(ref val3)).sqrMagnitude; Vector3 val4 = sourcePosition - ((Component)playerCamera).transform.position; float sqrMagnitude2 = ((Vector3)(ref val4)).sqrMagnitude; if (sqrMagnitude2 >= sqrMagnitude) { return sourcePosition; } return val.position + val.rotation * Quaternion.Inverse(((Component)playerCamera).transform.rotation) * (sourcePosition - ((Component)playerCamera).transform.position); } private void Update() { //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_034c: 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_02b6: Unknown result type (might be due to invalid IL or missing references) if (!Plugin.Enabled.Value) { RestorePlayerOneInputDevices(); DespawnProxy(); return; } UpdateMainMenuInfoPopup(); PlayerAvatar instance = PlayerAvatar.instance; inputIsolationTimer -= Time.unscaledDeltaTime; if (inputIsolationTimer <= 0f) { inputIsolationTimer = 1f; ApplyPlayerOneInputIsolation(); IgnoreActorCollisions(); } if (!IsPlayerOneAlive(instance)) { if (playerOneWasAlive) { DespawnProxy(); } playerOneWasAlive = false; return; } playerOneWasAlive = true; if (!Object.op_Implicit((Object)(object)proxy)) { if (!AvatarCloneSourceReady(instance)) { avatarCloneReadyTimer = 0f; return; } avatarCloneReadyTimer += Time.unscaledDeltaTime; if (!(avatarCloneReadyTimer < 1.25f)) { spawnRetry -= Time.unscaledDeltaTime; if (spawnRetry <= 0f) { spawnRetry = 2f; SpawnProxy(instance); } } return; } Gamepad val = SelectedGamepad(); if (val == null) { previousTumbleButton = false; previousVoiceSpeak = false; previousMapButton = false; SetPlayerTwoMapActive(active: false); return; } avatarCloneReadyTimer = 0f; ttsCreateRetry -= Time.unscaledDeltaTime; if (!Object.op_Implicit((Object)(object)playerTwoTtsVoice) && !Object.op_Implicit((Object)(object)playerTwoNaturalSpeech) && ttsCreateRetry <= 0f) { ttsCreateRetry = 0.5f; CreatePlayerTwoTts(instance); } bool isPressed = val.rightStickButton.isPressed; UpdateLook(val); UpdateAutomaticCrawl(val); tumbleInputCooldown = Mathf.Max(0f, tumbleInputCooldown - Time.deltaTime); if (isPressed && !previousTumbleButton && tumbleInputCooldown <= 0f) { SetTumbling(!isTumbling, instance, playerInput: true); } previousTumbleButton = isPressed; if (isTumbling) { UpdateTumbleRecovery(val, instance); } else { UpdateGrab(val); UpdateGrabDistance(val); UpdateUseInteraction(val); } UpdateExpressionInput(val); UpdateVoiceLineInput(val, instance); UpdatePlayerTwoMap(val); UpdateEnemyTargetState(); UpdateGrabVisuals(); if (val.buttonNorth.wasPressedThisFrame) { flashlightOn = !flashlightOn; PlayNestedSound((!Object.op_Implicit((Object)(object)soundPlayer)) ? null : soundPlayer.flashlightController, (!flashlightOn) ? "lightOffAudio" : "lightOnAudio", proxy.transform.position); foreach (Light ghostLight in ghostLights) { if (Object.op_Implicit((Object)(object)ghostLight)) { ((Behaviour)ghostLight).enabled = flashlightOn; } } } if (Object.op_Implicit((Object)(object)ghostVisual)) { if (isTumbling && Object.op_Implicit((Object)(object)tumbleFollowPosition)) { ghostVisual.transform.SetPositionAndRotation(tumbleFollowPosition.position, tumbleFollowPosition.rotation); } else { ghostVisual.transform.SetPositionAndRotation(proxy.transform.position, proxy.transform.rotation); } } flashlightCreateRetry -= Time.unscaledDeltaTime; if (!Object.op_Implicit((Object)(object)playerTwoFlashlight) && flashlightCreateRetry <= 0f) { flashlightCreateRetry = 0.5f; CreatePlayerTwoFlashlight(instance); } if (Object.op_Implicit((Object)(object)playerTwoFlashlight)) { ((Behaviour)playerTwoFlashlight).enabled = flashlightOn; if (flashlightOn && playerTwoFlashlight.intensity <= 0.001f) { playerTwoFlashlight.intensity = playerTwoFlashlightBaseIntensity; } if (val.buttonNorth.wasPressedThisFrame) { Debug.Log((object)("[Separate Monitor Player 2] Flashlight toggled " + ((!flashlightOn) ? "OFF" : "ON") + "; enabled=" + ((Behaviour)playerTwoFlashlight).enabled + "; intensity=" + playerTwoFlashlight.intensity)); } } UpdateDummyAnimation(); ApplyDummyExpression(); UpdatePlayerTwoMouth(); UpdateDummyLook(); UpdatePlayerTwoSounds(); SyncPlayerOneVisualClone(); UpdateSharedHealth(instance); UpdatePlayerTwoHudValues(instance); UpdatePlayerTwoHeldValue(); } private void UpdateMainMenuInfoPopup() { if (!SemiFunc.MenuLevel()) { if (Object.op_Implicit((Object)(object)mainMenuInfoCanvas)) { mainMenuInfoCanvas.SetActive(false); } return; } if (!Object.op_Implicit((Object)(object)mainMenuInfoCanvas)) { CreateMainMenuInfoPopup(); } if (Object.op_Implicit((Object)(object)mainMenuInfoCanvas) && !mainMenuInfoCanvas.activeSelf) { mainMenuInfoCanvas.SetActive(true); } if (Object.op_Implicit((Object)(object)CursorManager.instance)) { CursorManager.instance.Unlock(0.1f); } if (Object.op_Implicit((Object)(object)MenuCursor.instance)) { MenuCursor.instance.Show(); Canvas componentInParent = ((Component)MenuCursor.instance).GetComponentInParent<Canvas>(); if (Object.op_Implicit((Object)(object)componentInParent) && Object.op_Implicit((Object)(object)mainMenuInfoCanvasComponent)) { mainMenuInfoCanvasComponent.sortingOrder = componentInParent.sortingOrder - 1; } } ApplyMainMenuInfoStyle(); } private void CreateMainMenuInfoPopup() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: 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_0219: Unknown result type (might be due to invalid IL or missing references) //IL_024c: 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_0291: 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_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: 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_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0353: 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_0389: 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_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_044d: 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_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Expected O, but got Unknown //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Expected O, but got Unknown mainMenuInfoCanvas = new GameObject("Separate Monitor Player 2 - Main Menu Info"); mainMenuInfoCanvas.transform.SetParent(((Component)this).transform, false); Canvas val = (mainMenuInfoCanvasComponent = mainMenuInfoCanvas.AddComponent<Canvas>()); val.renderMode = (RenderMode)0; val.targetDisplay = 0; val.overrideSorting = true; val.sortingOrder = 100; CanvasScaler val2 = mainMenuInfoCanvas.AddComponent<CanvasScaler>(); val2.uiScaleMode = (ScaleMode)1; val2.referenceResolution = new Vector2(1920f, 1080f); val2.matchWidthOrHeight = 0.5f; mainMenuInfoCanvas.AddComponent<GraphicRaycaster>(); GameObject val3 = CreatePopupRect("MOD INFO Button", mainMenuInfoCanvas.transform, new Vector2(1f, 0f), new Vector2(1f, 0f), new Vector2(-24f, 24f), new Vector2(220f, 64f)); Image val4 = val3.AddComponent<Image>(); ((Graphic)val4).color = new Color(0.04f, 0.12f, 0.2f, 0.96f); Button val5 = val3.AddComponent<Button>(); TextMeshProUGUI val6 = CreatePopupText("MOD INFO", val3.transform, 30f, (TextAlignmentOptions)514, Color.white); mainMenuInfoTexts.Add(val6); ((TMP_Text)val6).rectTransform.offsetMin = Vector2.zero; ((TMP_Text)val6).rectTransform.offsetMax = Vector2.zero; mainMenuInfoPanel = CreatePopupRect("Mod Information Window", mainMenuInfoCanvas.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), Vector2.zero, new Vector2(1080f, 940f)); Image val7 = mainMenuInfoPanel.AddComponent<Image>(); ((Graphic)val7).color = new Color(0.015f, 0.025f, 0.04f, 0.97f); Outline val8 = mainMenuInfoPanel.AddComponent<Outline>(); ((Shadow)val8).effectColor = new Color(0f, 0.55f, 1f, 1f); ((Shadow)val8).effectDistance = new Vector2(4f, -4f); TextMeshProUGUI val9 = CreatePopupText("SEPARATE MONITOR PLAYER 2", mainMenuInfoPanel.transform, 34f, (TextAlignmentOptions)514, new Color(1f, 0.55f, 0.05f)); mainMenuInfoTexts.Add(val9); ((TMP_Text)val9).rectTransform.anchorMin = new Vector2(0f, 1f); ((TMP_Text)val9).rectTransform.anchorMax = new Vector2(1f, 1f); ((TMP_Text)val9).rectTransform.pivot = new Vector2(0.5f, 1f); ((TMP_Text)val9).rectTransform.anchoredPosition = new Vector2(0f, -24f); ((TMP_Text)val9).rectTransform.sizeDelta = new Vector2(0f, 56f); TextMeshProUGUI val10 = CreatePopupText("hi welcome to my first ever mod, thank you for giving it a try.\n\ncurrently its still sort of buggy and has a few issues\nbut overtime i want to improve it.\n\n-why use this mod instead of just something else that creates a second window\n\nthis mod is mostly aimed to be simpler to do and easier to do co op,\nthis mod does not create a second instance of the game instead\nits doing what true co op games do.\nits running in the same instance and same render\ntherefore no lag behaviors\n, \nthe co op player is not entirely an actual player, its more like a drone or a object to the game,\nwhich meant i had to recreate the movement system and everything else.\nbut because its not a actual player it will still load up without the use of adding a player to the playerlist.\n\nCurrently this only works with two monitors, and i do want to create a better control scheme for the tts\n\ndrone players cannot hold weapons properly yet, im still unsure about how to go about doing that, or the direction i want to go with it, so it will be on pause.\n\nFeatures:\n-drone/dummy co op player\nare 50% weaker then a normal player,\nbut anything player 1 grabs like upgrades does scale alongside the drone player, dead head player upgrade also increases all stats of the drone player by 1.5x for all drone players.\n-drone players share the same health as player 1.\nif player 1 or player 2 is attacked Player 1 health will drop.\nif player 1 dies so does the drone but the drone takes 15% less damage\n\nthank you again for giving my mod a try. i do hope that this becomes an actual feature for the game.\n-TheShySage", mainMenuInfoPanel.transform, 18f, (TextAlignmentOptions)257, Color.white); mainMenuInfoTexts.Add(val10); ((TMP_Text)val10).enableWordWrapping = true; ((TMP_Text)val10).rectTransform.anchorMin = new Vector2(0f, 0f); ((TMP_Text)val10).rectTransform.anchorMax = new Vector2(1f, 1f); ((TMP_Text)val10).rectTransform.offsetMin = new Vector2(44f, 34f); ((TMP_Text)val10).rectTransform.offsetMax = new Vector2(-44f, -94f); GameObject val11 = CreatePopupRect("Close", mainMenuInfoPanel.transform, new Vector2(1f, 1f), new Vector2(1f, 1f), new Vector2(-20f, -20f), new Vector2(54f, 54f)); RectTransform component = val11.GetComponent<RectTransform>(); component.pivot = new Vector2(1f, 1f); Image val12 = val11.AddComponent<Image>(); ((Graphic)val12).color = new Color(0.85f, 0.03f, 0.03f, 1f); Button val13 = val11.AddComponent<Button>(); TextMeshProUGUI val14 = CreatePopupText("X", val11.transform, 32f, (TextAlignmentOptions)514, Color.white); mainMenuInfoTexts.Add(val14); ((TMP_Text)val14).rectTransform.offsetMin = Vector2.zero; ((TMP_Text)val14).rectTransform.offsetMax = Vector2.zero; ((UnityEvent)val5.onClick).AddListener((UnityAction)delegate { if (Object.op_Implicit((Object)(object)mainMenuInfoPanel)) { mainMenuInfoPanel.SetActive(true); } }); ((UnityEvent)val13.onClick).AddListener((UnityAction)delegate { if (Object.op_Implicit((Object)(object)mainMenuInfoPanel)) { mainMenuInfoPanel.SetActive(false); } }); mainMenuInfoPanel.SetActive(false); mainMenuInfoStyled = false; } private void ApplyMainMenuInfoStyle() { //IL_0138: Unknown result type (might be due to invalid IL or missing references) if (mainMenuInfoStyled || !Object.op_Implicit((Object)(object)MenuManager.instance)) { return; } FieldInfo field = typeof(MenuManager).GetField("currentMenuPage", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); MenuPage val = (MenuPage)((!(field != null)) ? null : /*isinst with value type is only supported in some contexts*/); if (!Object.op_Implicit((Object)(object)val)) { return; } TextMeshProUGUI val2 = val.menuHeader; if (!Object.op_Implicit((Object)(object)val2) || !Object.op_Implicit((Object)(object)((TMP_Text)val2).font)) { TextMeshProUGUI[] componentsInChildren = ((Component)val).GetComponentsInChildren<TextMeshProUGUI>(true); TextMeshProUGUI[] array = componentsInChildren; foreach (TextMeshProUGUI val3 in array) { if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)((TMP_Text)val3).font)) { val2 = val3; break; } } } if (!Object.op_Implicit((Object)(object)val2) || !Object.op_Implicit((Object)(object)((TMP_Text)val2).font)) { return; } foreach (TextMeshProUGUI mainMenuInfoText in mainMenuInfoTexts) { if (Object.op_Implicit((Object)(object)mainMenuInfoText)) { ((TMP_Text)mainMenuInfoText).font = ((TMP_Text)val2).font; ((TMP_Text)mainMenuInfoText).fontSharedMaterial = ((TMP_Text)val2).fontSharedMaterial; ((TMP_Text)mainMenuInfoText).fontStyle = ((TMP_Text)val2).fontStyle; ((TMP_Text)mainMenuInfoText).characterSpacing = ((TMP_Text)val2).characterSpacing; ((TMP_Text)mainMenuInfoText).wordSpacing = ((TMP_Text)val2).wordSpacing; ((TMP_Text)mainMenuInfoText).lineSpacing = ((TMP_Text)val2).lineSpacing; } } mainMenuInfoStyled = true; } private static GameObject CreatePopupRect(string name, Transform parent, Vector2 anchorMin, Vector2 anchorMax, Vector2 position, Vector2 size) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001c: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0059: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); RectTransform val2 = val.AddComponent<RectTransform>(); val2.anchorMin = anchorMin; val2.anchorMax = anchorMax; val2.pivot = (Vector2)((!(anchorMin == anchorMax)) ? new Vector2(0.5f, 0.5f) : anchorMin); val2.anchoredPosition = position; val2.sizeDelta = size; return val; } private static TextMeshProUGUI CreatePopupText(string text, Transform parent, float size, TextAlignmentOptions alignment, Color color) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Text"); val.transform.SetParent(parent, false); RectTransform val2 = val.AddComponent<RectTransform>(); val2.anchorMin = Vector2.zero; val2.anchorMax = Vector2.one; TextMeshProUGUI val3 = val.AddComponent<TextMeshProUGUI>(); ((TMP_Text)val3).text = text; ((TMP_Text)val3).fontSize = size; ((TMP_Text)val3).alignment = alignment; ((Graphic)val3).color = color; ((Graphic)val3).raycastTarget = false; return val3; } private static bool AvatarCloneSourceReady(PlayerAvatar playerOne) { if (!Object.op_Implicit((Object)(object)playerOne) || !Object.op_Implicit((Object)(object)LevelGenerator.Instance) || !LevelGenerator.Instance.Generated) { return false; } PlayerAvatarVisuals value = Traverse.Create((object)playerOne).Field("playerAvatarVisuals").GetValue<PlayerAvatarVisuals>(); PlayerTumble value2 = Traverse.Create((object)playerOne).Field("tumble").GetValue<PlayerTumble>(); if (!Object.op_Implicit((Object)(object)value) || !((Component)value).gameObject.activeInHierarchy || !Object.op_Implicit((Object)(object)((Component)value).GetComponentInChildren<Animator>(true)) || !Object.op_Implicit((Object)(object)value.playerEyes) || !Object.op_Implicit((Object)(object)value2) || !Object.op_Implicit((Object)(object)((Component)value2).GetComponent<Rigidbody>()) || !Object.op_Implicit((Object)(object)((Component)value2).GetComponent<PhysGrabObject>())) { return false; } Renderer[] componentsInChildren = ((Component)value).GetComponentsInChildren<Renderer>(true); if (componentsInChildren.Length == 0) { return false; } Renderer[] array = componentsInChildren; foreach (Renderer val in array) { if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.sharedMaterial)) { return true; } } return false; } private void UpdatePlayerTwoHudValues(PlayerAvatar playerOne) { if (Object.op_Implicit((Object)(object)playerOne) && Object.op_Implicit((Object)(object)playerOne.playerHealth)) { int value = Traverse.Create((object)playerOne.playerHealth).Field("health").GetValue<int>(); int value2 = Traverse.Create((object)playerOne.playerHealth).Field("maxHealth").GetValue<int>(); float num = ((!Object.op_Implicit((Object)(object)PlayerController.instance)) ? 100f : PlayerController.instance.EnergyStart) * GetDeadHeadDummyStatMultiplier(); if (Object.op_Implicit((Object)(object)playerTwoHealthText)) { ((TMP_Text)playerTwoHealthText).text = "P1 HEALTH " + value + " <color=#008b20>/</color> " + value2; } if (Object.op_Implicit((Object)(object)playerTwoSprintText)) { ((TMP_Text)playerTwoSprintText).text = "P2 SPRINT " + Mathf.CeilToInt(energy) + " <color=orange>/</color> " + Mathf.CeilToInt(num); } } } private float GetDeadHeadDummyStatMultiplier() { if (!Object.op_Implicit((Object)(object)StatsManager.instance) || StatsManager.instance.playerUpgradeDeathHeadBattery == null) { return 1f; } int num = 0; foreach (KeyValuePair<string, int> item in StatsManager.instance.playerUpgradeDeathHeadBattery) { num += Mathf.Max(0, item.Value); } return Mathf.Pow(1.5f, (float)num); } private void UpdateSharedHealth(PlayerAvatar playerOne) { //IL_0181: 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_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_0290: 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_0299: 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_02ac: 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) if (!Object.op_Implicit((Object)(object)playerOne) || !Object.op_Implicit((Object)(object)playerOne.playerHealth)) { return; } List<HurtCollider> list = null; List<HurtCollider> list2 = new List<HurtCollider>(sharedHealthHitCooldowns.Keys); foreach (HurtCollider item in list2) { if (!Object.op_Implicit((Object)(object)item)) { if (list == null) { list = new List<HurtCollider>(); } list.Add(item); continue; } sharedHealthHitCooldowns[item] -= Time.deltaTime; if (sharedHealthHitCooldowns[item] <= 0f) { if (list == null) { list = new List<HurtCollider>(); } list.Add(item); } } if (list != null) { foreach (HurtCollider item2 in list) { sharedHealthHitCooldowns.Remove(item2); } } sharedHealthScanTimer -= Time.deltaTime; if (sharedHealthScanTimer > 0f) { return; } sharedHealthScanTimer = 0.03f; Collider val = (Collider)((!isTumbling) ? ((object)proxyCapsule) : ((object)FirstEnabledCollider(tumbleColliders))); if (!Object.op_Implicit((Object)(object)val) || !val.enabled) { return; } Bounds bounds = val.bounds; Collider value = Traverse.Create((object)playerOne).Field("collider").GetValue<Collider>(); Bounds val2 = (Bounds)((!Object.op_Implicit((Object)(object)value)) ? new Bounds(((Component)playerOne).transform.position, Vector3.zero) : value.bounds); HurtCollider[] array = Object.FindObjectsOfType<HurtCollider>(); foreach (HurtCollider val3 in array) { Collider val4 = ((!Object.op_Implicit((Object)(object)val3)) ? null : Traverse.Create((object)val3).Field("Collider").GetValue<Collider>()); bool flag = Object.op_Implicit((Object)(object)val3) && Traverse.Create((object)val3).Field("ignoreLocalPlayer").GetValue<bool>(); if (!Object.op_Implicit((Object)(object)val3) || !((Behaviour)val3).enabled || !((Component)val3).gameObject.activeInHierarchy || !val3.playerLogic || flag || !Object.op_Implicit((Object)(object)val4) || !val4.enabled) { continue; } Bounds bounds2 = val4.bounds; if (!((Bounds)(ref bounds2)).Intersects(bounds)) { continue; } Bounds bounds3 = val4.bounds; if (!((Bounds)(ref bounds3)).Intersects(val2) && !sharedHealthHitCooldowns.ContainsKey(val3)) { int value2 = Traverse.Create((object)playerOne.playerHealth).Field("health").GetValue<int>(); int num = ((!val3.playerKill) ? val3.playerDamage : Mathf.Max(value2, 1)); if (num > 0) { playerOne.playerHealth.Hurt(num, true, -1, false); sharedHealthHitCooldowns[val3] = Mathf.Max(val3.playerDamageCooldown, 0.1f); } } } } private static Collider FirstEnabledCollider(Collider[] colliders) { if (colliders != null) { foreach (Collider val in colliders) { if (Object.op_Implicit((Object)(object)val) && val.enabled) { return val; } } } return null; } private void FixedUpdate() { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_00be: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_0622: 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_0628: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0635: 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_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f5: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_0687: 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_0694: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0723: Unknown result type (might be due to invalid IL or missing references) //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Unknown result type (might be due to invalid IL or missing references) //IL_0748: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Unknown result type (might be due to invalid IL or missing references) //IL_083c: 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_0847: Unknown result type (might be due to invalid IL or missing references) //IL_07a7: Unknown result type (might be due to invalid IL or missing references) //IL_07ad: Unknown result type (might be due to invalid IL or missing references) //IL_07b6: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Unknown result type (might be due to invalid IL or missing references) //IL_07e0: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_0872: Unknown result type (might be due to invalid IL or missing references) //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_08ba: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_090f: Unknown result type (might be due to invalid IL or missing references) //IL_0914: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Unknown result type (might be due to invalid IL or missing references) //IL_0934: Unknown result type (might be due to invalid IL or missing references) //IL_0939: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_09b0: Unknown result type (might be due to invalid IL or missing references) //IL_0dae: Unknown result type (might be due to invalid IL or missing references) //IL_0db3: Unknown result type (might be due to invalid IL or missing references) //IL_0db8: Unknown result type (might be due to invalid IL or missing references) //IL_0dc5: Unknown result type (might be due to invalid IL or missing references) //IL_0dd5: Unknown result type (might be due to invalid IL or missing references) //IL_0de0: Unknown result type (might be due to invalid IL or missing references) //IL_0de5: Unknown result type (might be due to invalid IL or missing references) //IL_0dea: Unknown result type (might be due to invalid IL or missing references) //IL_0e0c: Unknown result type (might be due to invalid IL or missing references) //IL_0e15: Unknown result type (might be due to invalid IL or missing references) //IL_0e17: Unknown result type (might be due to invalid IL or missing references) //IL_0e1f: Unknown result type (might be due to invalid IL or missing references) //IL_0e24: Unknown result type (might be due to invalid IL or missing references) //IL_0b39: Unknown result type (might be due to invalid IL or missing references) //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b54: Unknown result type (might be due to invalid IL or missing references) //IL_0b59: Unknown result type (might be due to invalid IL or missing references) //IL_0b5e: Unknown result type (might be due to invalid IL or missing references) //IL_0b6c: Unknown result type (might be due to invalid IL or missing references) //IL_0b71: Unknown result type (might be due to invalid IL or missing references) //IL_0b76: Unknown result type (might be due to invalid IL or missing references) //IL_0b7e: Unknown result type (might be due to invalid IL or missing references) //IL_0b80: Unknown result type (might be due to invalid IL or missing references) //IL_0b85: Unknown result type (might be due to invalid IL or missing references) //IL_0b87: Unknown result type (might be due to invalid IL or missing references) //IL_0b89: Unknown result type (might be due to invalid IL or missing references) //IL_0b8b: Unknown result type (might be due to invalid IL or missing references) //IL_0b92: Unknown result type (might be due to invalid IL or missing references) //IL_0b9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ba1: Unknown result type (might be due to invalid IL or missing references) //IL_0ba3: Unknown result type (might be due to invalid IL or missing references) //IL_0ba7: Unknown result type (might be due to invalid IL or missing references) //IL_0bac: Unknown result type (might be due to invalid IL or missing references) //IL_0bae: Unknown result type (might be due to invalid IL or missing references) //IL_0bb2: Unknown result type (might be due to invalid IL or missing references) //IL_0bb7: Unknown result type (might be due to invalid IL or missing references) //IL_0bbb: Unknown result type (might be due to invalid IL or missing references) //IL_0bc0: Unknown result type (might be due to invalid IL or missing references) //IL_0bc7: Unknown result type (might be due to invalid IL or missing references) //IL_0bcc: Unknown result type (might be due to invalid IL or missing references) //IL_0bce: Unknown result type (might be due to invalid IL or missing references) //IL_0bd5: Unknown result type (might be due to invalid IL or missing references) //IL_0bef: Unknown result type (might be due to invalid IL or missing references) //IL_0bf4: Unknown result type (might be due to invalid IL or missing references) //IL_0c5b: Unknown result type (might be due to invalid IL or missing references) //IL_0c5f: Unknown result type (might be due to invalid IL or missing references) //IL_0c66: Unknown result type (might be due to invalid IL or missing references) //IL_0c6b: Unknown result type (might be due to invalid IL or missing references) //IL_0c6d: Unknown result type (might be due to invalid IL or missing references) //IL_0c6f: Unknown result type (might be due to invalid IL or missing references) //IL_0c71: Unknown result type (might be due to invalid IL or missing references) //IL_0c88: Unknown result type (might be due to invalid IL or missing references) //IL_0c8d: Unknown result type (might be due to invalid IL or missing references) //IL_0c8f: Unknown result type (might be due to invalid IL or missing references) //IL_0c99: Unknown result type (might be due to invalid IL or missing references) //IL_0c9e: Unknown result type (might be due to invalid IL or missing references) //IL_0cd7: Unknown result type (might be due to invalid IL or missing references) //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce4: Unknown result type (might be due to invalid IL or missing references) //IL_0cb0: Unknown result type (might be due to invalid IL or missing references) //IL_0cb7: Unknown result type (might be due to invalid IL or missing references) //IL_0cbc: Unknown result type (might be due to invalid IL or missing references) //IL_0d00: Unknown result type (might be due to invalid IL or missing references) //IL_0d05: Unknown result type (might be due to invalid IL or missing references) //IL_0d09: Unknown result type (might be due to invalid IL or missing references) //IL_0d0e: Unknown result type (might be due to invalid IL or missing references) //IL_0d1a: Unknown result type (might be due to invalid IL or missing references) //IL_0d1f: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)proxyBody) || !Plugin.Enabled.Value) { return; } Gamepad val = SelectedGamepad(); if (val == null) { return; } if (isTumbling) { bool flag = Object.op_Implicit((Object)(object)tumblePhysGrabObject) && tumblePhysGrabObject.playerGrabbing.Count > 0; if (Object.op_Implicit((Object)(object)tumbleBody) && tumbleBody.useGravity && !flag) { tumbleBody.AddForce(Vector3.down * (tumbleCustomGravity * 0.999f), (ForceMode)0); } UpdateCarriedTumblePhysics(); proxy.transform.position = tumbleBody.position + Vector3.down * 0.22500001f; return; } float fixedDeltaTime = Time.fixedDeltaTime; Vector3 val2 = proxy.transform.TransformPoint(groundProbeOffset); if (groundedDisableTimer > 0f) { groundedDisableTimer -= fixedDeltaTime; } if (jumpCooldown > 0f) { jumpCooldown -= fixedDeltaTime; } Collider[] array = (Collider[])((groundedDisableTimer <= 0f) ? ((Array)Physics.OverlapSphere(val2, groundProbeRadius, groundProbeMask, (QueryTriggerInteraction)1)) : ((Array)new Collider[0])); bool flag2 = false; Collider[] array2 = array; Collider[] array3 = array2; foreach (Collider val3 in array3) { if (Object.op_Implicit((Object)(object)val3) && !((Component)val3).transform.IsChildOf(proxy.transform)) { flag2 = true; break; } } if (flag2) { groundedLatch = 0.1f; } else { groundedLatch -= fixedDeltaTime; } grounded = groundedLatch >= 0f; if (grounded) { groundedBuffer = 0.25f; } else { groundedBuffer = Mathf.Max(0f, groundedBuffer - fixedDeltaTime); } jumpBuffer = Mathf.Max(0f, jumpBuffer - fixedDeltaTime); PlayerController instance = PlayerController.instance; float deadHeadDummyStatMultiplier = GetDeadHeadDummyStatMultiplier(); float num = (Object.op_Implicit((Object)(object)instance) ? instance.MoveSpeed : 0.5f) * deadHeadDummyStatMultiplier; float num2 = (Object.op_Implicit((Object)(object)instance) ? instance.SprintSpeed : 1f) * deadHeadDummyStatMultiplier; float num3 = (Object.op_Implicit((Object)(object)instance) ? instance.SprintAcceleration : 1f) * deadHeadDummyStatMultiplier; float num4 = (Object.op_Implicit((Object)(object)instance) ? instance.CrouchSpeed : 1f) * deadHeadDummyStatMultiplier; float num5 = (Object.op_Implicit((Object)(object)instance) ? instance.SlideTime : 1f); float num6 = (Object.op_Implicit((Object)(object)instance) ? instance.SlideDecay : 0.1f); float num7 = (Object.op_Implicit((Object)(object)instance) ? instance.JumpForce : 20f); float num8 = (Object.op_Implicit((Object)(object)instance) ? instance.CustomGravity : 20f) * 0.999f; float num9 = (Object.op_Implicit((Object)(object)instance) ? instance.EnergyStart : 100f) * deadHeadDummyStatMultiplier; float num10 = (Object.op_Implicit((Object)(object)instance) ? instance.EnergySprintDrain : 1f) / deadHeadDummyStatMultiplier; float num11 = (Object.op_Implicit((Object)(object)instance) ? instance.MoveFriction : 5f); energy = Mathf.Min(energy, num9); Vector2 val4 = ((InputControl<Vector2>)(object)val.leftStick).ReadValue(); if (((Vector2)(ref val4)).sqrMagnitude < 0.01f) { val4 = Vector2.zero; } Vector3 val5 = default(Vector3); ((Vector3)(ref val5))..ctor(val4.x, 0f, val4.y); if (((Vector3)(ref val5)).sqrMagnitude > 1f) { ((Vector3)(ref val5)).Normalize(); } if (val.leftStickButton.isPressed && ((Vector3)(ref val5)).sqrMagnitude > 0.01f && !crouched && energy > 0f) { sprinting = true; canSlide = true; sprintGrace = 0.5f; sprintDrainTimer = 0.2f; sprintRechargeTimer = 1f; } else { sprinting = false; sprintLerp = 0f; sprintGrace = Mathf.Max(0f, sprintGrace - fixedDeltaTime); if (sprintGrace <= 0f) { canSlide = false; } } if (sprintDrainTimer > 0f) { float num12 = (num10 * deadHeadDummyStatMultiplier + (Object.op_Implicit((Object)(object)instance) ? instance.SprintSpeedUpgrades : 0f)) / deadHeadDummyStatMultiplier; energy = Mathf.Max(0f, energy - num12 * Mathf.Lerp(0f, 1f, sprintLerp) * fixedDeltaTime); sprintDrainTimer -= fixedDeltaTime; } if (!sprinting) { if (sprintRechargeTimer > 0f) { sprintRechargeTimer -= fixedDeltaTime; } else { energy = Mathf.Min(num9, energy + 2f * deadHeadDummyStatMultiplier * fixedDeltaTime); } } if (crouched && canSlide) { energy = Mathf.Max(0f, energy - 5f); canSlide = false; sliding = true; slideTimer = num5; } Vector3 val6 = Vector3.zero; if (sprinting) { float num13 = Mathf.Lerp(num, num2, sprintLerp); sprintLerp = Mathf.Clamp01(sprintLerp + num3 * fixedDeltaTime); val6 += val5 * num13; slideDirection = val5 * num13; slideDirectionCurrent = slideDirection; sliding = false; } else if (crouched) { if (slideTimer > 0f) { val6 += slideDirectionCurrent; slideDirectionCurrent -= slideDirection * num6 * fixedDeltaTime; slideTimer -= fixedDeltaTime; if (slideTimer <= 0f) { sliding = false; } } val6 += val5 * num4; } else { val6 += val5 * num; sliding = false; } if (velocityIdle) { relativeVelocityTarget = val6; } else { relativeVelocityTarget = Vector3.Lerp(relativeVelocityTarget, val6, num11 * fixedDeltaTime); } Vector3 val7 = proxy.transform.InverseTransformDirection(proxyBody.velocity); if (((Vector3)(ref relativeVelocityTarget)).magnitude > 0.1f) { velocityIdle = false; if (Object.op_Implicit((Object)(object)proxyCapsule) && Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.PhysicMaterialMove)) { ((Collider)proxyCapsule).material = instance.PhysicMaterialMove; } relativeVelocity = Vector3.Lerp(relativeVelocity, relativeVelocityTarget, num11 * fixedDeltaTime); relativeVelocity.y = val7.y; proxyBody.AddRelativeForce(relativeVelocity - val7, (ForceMode)1); } else { velocityIdle = true; if (Object.op_Implicit((Object)(object)proxyCapsule) && Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.PhysicMaterialIdle)) { ((Collider)proxyCapsule).material = instance.PhysicMaterialIdle; } relativeVelocity = Vector3.zero; relativeVelocityTarget = Vector3.zero; if (grounded) { Vector3 val8 = proxy.transform.InverseTransformDirection(proxyBody.velocity); val8.x = 0f; val8.z = 0f; proxyBody.velocity = proxy.transform.TransformDirection(val8); } } if (!grounded) { proxyBody.AddForce(Vector3.down * num8 * fixedDeltaTime, (ForceMode)1); } if (jumpBuffer > 0f && groundedBuffer > 0f && jumpCooldown <= 0f) { Vector3 val9 = default(Vector3); ((Vector3)(ref val9))..ctor(0f, proxyBody.velocity.y, 0f); proxyBody.AddForce(Vector3.up * num7 - val9, (ForceMode)1); jumpBuffer = 0f; groundedBuffer = 0f; groundedLatch = -1f; grounded = false; groundedDisableTimer = 0.1f; jumpCooldown = 0.1f; PlaySound((!Object.op_Implicit((Object)(object)soundPlayer)) ? null : soundPlayer.jumpSound, proxy.transform.position); } if (Object.op_Implicit((Object)(object)heldValuable)) { heldValuable.OverrideIndestructible(0.2f); heldValuable.OverrideBreakEffects(0.2f); if (Object.op_Implicit((Object)(object)heldCart)) { Traverse.Create((object)heldCart).Field("cartActive").SetValue((object)true); } if (Object.op_Implicit((Object)(object)heldBody) && Object.op_Implicit((Object)(object)playerCamera)) { PhysGrabber val10 = ((!Object.op_Implicit((Object)(object)soundPlayer)) ? null : soundPlayer.physGrabber); float num14 = ((!Object.op_Implicit((Object)(object)val10)) ? 0.9f : val10.springConstant); float num15 = ((!Object.op_Implicit((Object)(object)val10)) ? 0.5f : val10.dampingConstant); float num16 = ((!Object.op_Implicit((Object)(object)val10)) ? 4f : val10.forceConstant); float num17 = ((!Object.op_Implicit((Object)(object)val10)) ? 4f : val10.forceMax); float num18 = ((!Object.op_Implicit((Object)(object)val10)) ? 1f : val10.grabStrength); bool flag3 = !Object.op_Implicit((Object)(object)heldCart); if (flag3) { num14 *= 0.7f; num15 *= 1.2f; num16 *= 0.85f; } Vector3 val11 = ((Component)playerCamera).transform.position + ((Component)playerCamera).transform.forward * grabHoldDistance; Vector3 val12 = ((Component)heldBody).transform.TransformPoint(heldLocalPoint); Vector3 pointVelocity = heldBody.GetPointVelocity(val12); Vector3 val13 = Vector3.ClampMagnitude(val11 - val12, num17) * 10f; val13 = Vector3.ClampMagnitude(val13, num17); Vector3 val14 = Vector3.ClampMagnitude(val13 * num14 - pointVelocity * num15, num17); Vector3 val15 = val14 * 2f / Mathf.Max(heldBody.mass, 0.001f); float num19 = Mathf.Min(num18, 30f); float num20 = num18 / (1f + num19); float num21 = ((!(heldBody.mass < 2f)) ? 20f : 7f); float num22 = Mathf.Min((num18 - 1f) / num21, 0.9f); float num23 = Mathf.Lerp(num18, num20, num22); Vector3 val16 = val15 * num23 * num16; val16 *= Mathf.Min(Vector3.Distance(val11, val12) * 10f, 1f); val16 *= 0.5f * deadHeadDummyStatMultiplier; if (Object.op_Implicit((Object)(object)heldCart)) { val16 *= 9f; } grabForceRamp = Mathf.Clamp01(grabForceRamp + fixedDeltaTime / 0.15f); val16 *= grabForceRamp; float num24 = ((!flag3) ? 0.8f : 0.35f); playerTwoCurrentGrabForce = Vector3.Lerp(playerTwoCurrentGrabForce, val16, num24); heldBody.AddForceAtPosition(playerTwoCurrentGrabForce, val12, (ForceMode)5); heldValuable.OverrideKnockOutOfGrabDisable(0.2f); } } if (Object.op_Implicit((Object)(object)heldStaticObject) && Object.op_Implicit((Object)(object)heldStaticTransform) && Object.op_Implicit((Object)(object)playerCamera)) { PhysGrabber val17 = ((!Object.op_Implicit((Object)(object)soundPlayer)) ? null : soundPlayer.physGrabber); if (Object.op_Implicit((Object)(object)val17) && Object.op_Implicit((Object)(object)val17.physGrabPoint)) { Vector3 val18 = heldStaticTransform.TransformPoint(heldStaticLocalPoint); Vector3 val19 = ((Component)playerCamera).transform.position + ((Component)playerCamera).transform.forward * grabHoldDistance; grabForceRamp = Mathf.Clamp01(grabForceRamp + fixedDeltaTime / 0.15f); val17.physGrabPoint.position = val18; val17.physGrabPointPullerPosition = Vector3.Lerp(val18, val19, grabForceRamp); } } } private void UpdateCarriedTumblePhysics() { //IL_00c5: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_012c: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0176: 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_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: 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_01ba: 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_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0252: 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_025c: 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_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: 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_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0290: 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_0297: 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_02a1: 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_02b1: 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_02c6: 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_02d8: 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.op_Implicit((Object)(object)tumbleBody) || !Object.op_Implicit((Object)(object)tumblePhysGrabObject) || tumblePhysGrabObject.playerGrabbing.Count == 0 || !GameManager.Multiplayer() || Traverse.Create((object)tumblePhysGrabObject).Field("isMaster").GetValue<bool>()) { return; } foreach (PhysGrabber item in tumblePhysGrabObject.playerGrabbing) { if (Object.op_Implicit((Object)(object)item)) { Transform value = Traverse.Create((object)item).Field("physGrabPoint").GetValue<Transform>(); Vector3 val = ((!Object.op_Implicit((Object)(object)value)) ? tumbleBody.worldCenterOfMass : value.position); Vector3 physGrabPointPullerPosition = item.physGrabPointPullerPosition; float forceMax = item.forceMax; Vector3 val2 = Vector3.ClampMagnitude(physGrabPointPullerPosition - val, forceMax) * 10f; val2 = Vector3.ClampMagnitude(val2, forceMax); Vector3 pointVelocity = tumbleBody.GetPointVelocity(val); Vector3 val3 = Vector3.ClampMagnitude(val2 * item.springConstant - pointVelocity * item.dampingConstant, forceMax); Vector3 val4 = val3 * 2f / Mathf.Max(tumbleBody.mass, 0.001f) * item.grabStrength * item.forceConstant; val4 *= Mathf.Min(Vector3.Distance(physGrabPointPullerPosition, val) * 10f, 1f); tumbleBody.AddForceAtPosition(val4, val, (ForceMode)5); Vector3 value2 = Traverse.Create((object)item).Field("cameraRelativeGrabbedForward").GetValue<Vector3>(); Vector3 value3 = Traverse.Create((object)item).Field("cameraRelativeGrabbedUp").GetValue<Vector3>(); PlayerAvatar value4 = Traverse.Create((object)item).Field("playerAvatar").GetValue<PlayerAvatar>(); Transform val5 = ((!Object.op_Implicit((Object)(object)value4) || !Object.op_Implicit((Object)(object)value4.localCamera)) ? null : value4.localCamera.GetOverrideTransform()); if (Object.op_Implicit((Object)(object)val5) && ((Vector3)(ref value2)).sqrMagnitude > 0.001f && ((Vector3)(ref value3)).sqrMagnitude > 0.001f) { Vector3 val6 = val5.TransformDirection(((Vector3)(ref value2)).normalized); Vector3 val7 = val5.TransformDirection(((Vector3)(ref value3)).normalized); Vector3 val8 = Vector3.Cross(tumbleRig.transform.forward, val6) + Vector3.Cross(tumbleRig.transform.up, val7); val8 = val8 * (12f * item.grabStrength) - tumbleBody.angularVelocity * 2f; tumbleBody.AddTorque(Vector3.ClampMagnitude(val8, 18f), (ForceMode)5); } } } } private void SpawnProxy(PlayerAvatar playerOne) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: 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_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: 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_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_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: 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_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)playerOne).transform.position + ((Component)playerOne).transform.right * 1.5f; soundPlayer = playerOne; proxy = new GameObject(PlayerTwoName() + " Ghost Physics"); proxy.transform.position = position; proxyCapsule = proxy.AddComponent<CapsuleCollider>(); proxyCapsule.radius = 0.32f; proxyCapsule.height = 1.7f; proxyCapsule.center = new Vector3(0f, 0.85f, 0f); proxyBody = proxy.GetComponent<Rigidbody>(); if (!Object.op_Implicit((Object)(object)proxyBody)) { proxyBody = proxy.AddComponent<Rigidbody>(); } proxyBody.constraints = (RigidbodyConstraints)80; proxyBody.collisionDetectionMode = (CollisionDetectionMode)2; proxyBody.interpolation = (RigidbodyInterpolation)1; proxyBody.useGravity = true; PlayerController instance = PlayerController.instance; if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.rb)) { proxyBody.mass = instance.rb.mass; proxyBody.drag = instance.rb.drag; proxyBody.angularDrag = instance.rb.angularDrag; proxyBody.maxAngularVelocity = instance.rb.maxAngularVelocity; proxyBody.useGravity = instance.rb.useGravity; proxyBody.constraints = instance.rb.constraints; proxyBody.collisionDetectionMode = instance.rb.collisionDetectionMode; proxyBody.interpolation = instance.rb.interpolation; } if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.col)) { ((Collider)proxyCapsule).material = instance.col.material; Collider col = instance.col; CapsuleCollider val = (CapsuleCollider)(object)((col is CapsuleCollider) ? col : null); if (Object.op_Implicit((Object)(object)val)) { proxyCapsule.radius = val.radius; proxyCapsule.height = val.height; proxyCapsule.center = val.center; proxyCapsule.direction = val.direction; standingCapsuleHeight = val.height; standingCapsuleCenter = val.center; } } if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.PlayerCollision) && Object.op_Implicit((Object)(object)instance.PlayerCollision.StandCollision) && Object.op_Implicit((Object)(object)instance.PlayerCollision.CrouchCollision)) { float y = instance.PlayerCollision.StandCollision.localScale.y; if (Mathf.Abs(y) > 0.001f) { crouchCollisionRatio = instance.PlayerCollision.CrouchCollision.localScale.y / y; } } if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.CollisionGrounded)) { groundProbeOffset = ((Component)instance).transform.InverseTransformPoint(((Component)instance.CollisionGrounded).transform.position); SphereCollider component = ((Component)instance.CollisionGrounded).GetComponent<SphereCollider>(); if (Object.op_Implicit((Object)(object)component)) { groundProbeRadius = component.radius; } groundProbeMask = ((LayerMask)(ref instance.CollisionGrounded.LayerMask)).value; } standingCapsuleHeight *= 0.75f; standingCapsuleCenter *= 0.75f; CapsuleCollider obj = proxyCapsule; obj.radius *= 0.75f; proxyCapsule.height = standingCapsuleHeight; proxyCapsule.center = standingCapsuleCenter; groundProbeOffset *= 0.75f; groundProbeRadius *= 0.75f; energy = (Object.op_Implicit((Object)(object)instance) ? instance.EnergyStart : 100f) * GetDeadHeadDummyStatMultiplier(); PhysGrabObject component2 = proxy.GetComponent<PhysGrabObject>(); if (Object.op_Implicit((Object)(object)component2)) { component2.OverrideGrabDisable(999999f); } CreateCamera(); CreateGhostVisual(playerOne); CreatePlayerTwoFlashlight(playerOne); CreatePlayerTwoTts(playerOne); CreatePlayerTwoMapDevice(); CreateEnemyTarget(playerOne); CreateGrabberVisuals(playerOne); CreateTumbleRig(playerOne); CreatePlayerOneVisualForPlayerTwo(playerOne); CreatePlayerTwoHud(); IgnoreActorCollisions(); soundLastPosition = proxy.transform.position; soundWasGrounded = true; } private void CreateEnemyTarget(PlayerAvatar playerOne) { //IL_0103: 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_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)proxy) && Object.op_Implicit((Object)(object)playerOne) && Object.op_Implicit((Object)(object)GameDirector.instance)) { proxy.tag = "Player"; Collider componentInChildren = ((Component)playerOne).GetComponentInChildren<Collider>(true); if (Object.op_Implicit((Object)(object)componentInChildren)) { proxy.layer = ((Component)componentInChildren).gameObject.layer; } PhotonView val = proxy.GetComponent<PhotonView>(); if (!Object.op_Implicit((Object)(object)val)) { val = proxy.AddComponent<PhotonView>(); } int num = (Object.op_Implicit((Object)(object)playerOne.photonView) ? (playerOne.photonView.ViewID / PhotonNetwork.MAX_VIEW_IDS * PhotonNetwork.MAX_VIEW_IDS) : 0); int num2 = num + PhotonNetwork.MAX_VIEW_IDS - 1; while (num2 > num && Object.op_Implicit((Object)(object)PhotonView.Find(num2))) { num2--; } if (num2 <= num) { num2 = 999999; } val.ViewID = num2; enemyVisionTransform = new GameObject(PlayerTwoName() + " Vision Point").transform; enemyVisionTransform.SetParent(proxy.transform, false); enemyVisionTransform.localPosition = Vector3.up * standingCapsuleHeight * 0.82f; enemyVisionTarget = proxy.AddComponent<PlayerVisionTarget>(); enemyVisionTarget.VisionTransform = enemyVisionTransform; ((Behaviour)enemyVisionTarget).enabled = false; enemyTargetAvatar = proxy.AddComponent<PlayerAvatar>(); ((Behaviour)enemyTargetAvatar).enabled = false; enemyTargetAvatar.PlayerVisionTarget = enemyVisionTarget; enemyTargetAvatar.physGrabber = CreateEnemyTargetGrabberStub(enemyTargetAvatar); Traverse.Create((object)enemyTargetAvatar).Field("steamID").SetValue((object)"DUMMYPlayer"); Traverse.Create((object)enemyTargetAvatar).Field("isDisabled").SetValue((object)false); Traverse.Create((object)enemyTargetAvatar).Field("isLocal").SetValue((object)false); } } private PhysGrabber CreateEnemyTargetGrabberStub(PlayerAvatar targetAvatar) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown GameObject val = new GameObject(PlayerTwoName() + " Enemy Target Grabber Stub"); val.transform.SetParent(proxy.transform, false); val.SetActive(false); LineRenderer val2 = val.AddComponent<LineRenderer>(); ((Renderer)val2).enabled = false; val2.positionCount = 0; PhysGrabBeam val3 = val.AddComponent<PhysGrabBeam>(); val3.playerAvatar = targetAvatar; val3.lineRenderer = val2; ((Behaviour)val3).enabled = false; PhysGrabber val4 = val.AddComponent<PhysGrabber>(); val4.physGrabBeamComponent = val3; ((Behaviour)val4).enabled = false; val.SetActive(true); return val4; } private static Enemy EnemyFromParent(EnemyParent enemyParent) { return (!Object.op_Implicit((Object)(object)enemyParent)) ? null : Traverse.Create((object)enemyParent).Field("Enemy").GetValue<Enemy>(); } private void UpdateEnemyTargetState() { //IL_00f9: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)enemyTargetAvatar) && Object.op_Implicit((Object)(object)enemyVisionTransform) && Object.op_Implicit((Object)(object)proxy)) { SyncEnemyTargetRegistration(); UpdateIsolatedEnemyVision(); UpdatePlayerTwoEnemyViewResponses(); bool flag = ((Vector3)(ref relativeVelocityTarget)).magnitude > 0.1f; enemyTargetAvatar.SetState(crouched, sprinting, crawling, sliding, flag); Traverse.Create((object)enemyTargetAvatar).Field("isTumbling").SetValue((object)isTumbling); Traverse.Create((object)enemyTargetAvatar).Field("isDisabled").SetValue((object)false); float num = (crawling ? crawlCollisionRatio : ((!crouched) ? 1f : crouchCollisionRatio)); enemyVisionTransform.localPosition = Vector3.up * standingCapsuleHeight * num * 0.82f; enemyVisionTransform.rotation = ((!Object.op_Implicit((Object)(object)playerCamera)) ? proxy.transform.rotation : ((Component)playerCamera).transform.rotation); } } private void UpdatePlayerTwoEnemyViewResponses() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)playerCamera) || !Object.op_Implicit((Object)(object)enemyTargetAvatar)) { return; } EnemyCeilingEye[] array = Object.FindObjectsOfType<EnemyCeilingEye>(); EnemyCeilingEye[] array2 = array; foreach (EnemyCeilingEye val in array2) { if (Object.op_Implicit((Object)(object)val) && (int)val.currentState == 3) { PlayerAvatar value = Traverse.Create((object)val).Field("targetPlayer").GetValue<PlayerAvatar>(); Enemy value2 = Traverse.Create((object)val).Field("enemy").GetValue<Enemy>(); if ((Object)(object)value == (Object)(object)enemyTargetAvatar && Object.op_Implicit((Object)(object)value2) && Object.op_Implicit((Object)(object)value2.CenterTransform)) { ForcePlayerTwoLookAt(value2.CenterTransform.position, 5f); break; } } } } private void ForcePlayerTwoLookAt(Vector3 worldPosition, float strength) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) Vector3 val = worldPosition - ((Component)playerCamera).transform.position; if (!(((Vector3)(ref val)).sqrMagnitude <= 0.001f)) { Quaternion val2 = Quaternion.LookRotation(((Vector3)(ref val)).normalized, Vector3.up); float y = ((Quaternion)(ref val2)).eulerAngles.y; float num = ((Quaternion)(ref val2)).eulerAngles.x; if (num > 180f) { num -= 360f; } Quaternion val3 = Quaternion.Euler(0f, y, 0f); ApplyPlayerTwoLookYaw(Quaternion.Slerp(proxy.transform.rotation, val3, Mathf.Clamp01(strength * Time.deltaTime))); pitch = Mathf.LerpAngle(pitch, Mathf.Clamp(num, -80f, 80f), Mathf.Clamp01(strength * Time.deltaTime)); ((Component)playerCamera).transform.localRotation = Quaternion.Euler(new Vector3(pitch, 0f, 0f) + cameraMotionRotation); } } private void ApplyPlayerTwoLookYaw(Quaternion rotation) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_002a: 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) Quaternion rotation2 = Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f); proxy.transform.rotation = rotation2; if (Object.op_Implicit((Object)(object)proxyBody) && !isTumbling) { proxyBody.rotation = rotation2; } } internal bool IsDummyEnemyTarget(PlayerAvatar player) { return Object.op_Implicit((Object)(object)player) && (Object)(object)player == (Object)(object)enemyTargetAvatar; } internal bool IsOnPlayerTwoScreen(EnemyOnScreen onScreen) { //IL_0080: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_019e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)onScreen) || !Object.op_Implicit((Object)(object)playerCamera) || !Object.op_Implicit((Object)(object)proxy)) { return false; } Transform[] points = onScreen.points; if (points == null || points.Length == 0) { return false; } Enemy value = Traverse.Create((object)onScreen).Field("Enemy").GetValue<Enemy>(); LayerMask val = ((!Object.op_Implicit((Object)(object)value)) ? LayerMask.op_Implicit(-1) : Traverse.Create((object)value).Field("VisionMask").GetValue<LayerMask>()); int value2 = ((LayerMask)(ref val)).value; Transform[] array = points; RaycastHit val5 = default(RaycastHit); foreach (Transform val2 in array) { if (!Object.op_Implicit((Object)(object)val2) || Vector3.Distance(val2.position, ((Component)playerCamera).transform.position) > onScreen.maxDistance) { continue; } Vector3 val3 = playerCamera.WorldToViewportPoint(val2.position); if (val3.z > 0f && val3.x >= 0f - onScreen.paddingWidth && val3.x <= 1f + onScreen.paddingWidth && val3.y >= 0f - onScreen.paddingHeight && val3.y <= 1f + onScreen.paddingHeight) { Vector3 val4 = ((Component)playerCamera).transform.position - val2.position; float num = Mathf.Min(((Vector3)(ref val4)).magnitude, 12f); if (!Physics.Raycast(val2.position, ((Vector3)(ref val4)).normalized, ref val5, num, value2, (QueryTriggerInteraction)1) || ((RaycastHit)(ref val5)).transform.IsChildOf(proxy.transform)) { return true; } } } return false; } private void SyncEnemyTargetRegistration() { if (!Object.op_Implicit((Object)(object)LevelGenerator.Instance) || !LevelGenerator.Instance.Generated || (!SemiFunc.RunIsLevel() && !SemiFunc.RunIsTutorial())) { UnregisterEnemyTarget(); } else { if (!Object.op_Implicit((Object)(object)enemyTargetAvatar)) { return; } int num = (Object.op_Implicit((Object)(object)enemyTargetAvatar.photonView) ? enemyTargetAvatar.photonView.ViewID : 0); if (Object.op_Implicit((Object)(object)EnemyDirector.instance)) { foreach (EnemyParent item in EnemyDirector.instance.enemiesSpawned) { Enemy val = EnemyFromParent(item); if ((Object)(object)val != (Object)null && enemyTargetRegistrations.Add(val)) { val.PlayerAdded(num); } } } enemyTargetRegistered = enemyTargetRegistrations.Count > 0; } } private void UnregisterEnemyTarget() { if (!Object.op_Implicit((Object)(object)enemyTargetAvatar)) { return; } int num = (Object.op_Implicit((Object)(object)enemyTargetAvatar.photonView) ? enemyTargetAvatar.photonView.ViewID : 0); foreach (Enemy enemyTargetRegistration in enemyTargetRegistrations) { if ((Object)(object)enemyTargetRegistration != (Object)null) { enemyTargetRegistration.PlayerRemoved(num); } } enemyTargetRegistrations.Clear(); enemyTargetRegistered = false; } private void UpdateIsolatedEnemyVision() { //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: 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_0211: 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_02ae: Unknown result type (might be due to invalid IL or missing references) if (!enemyTargetRegistered || !Object.op_Implicit((Object)(object)enemyTargetAvatar) || !Object.op_Implicit((Object)(object)enemyVisionTransform)) { return; } enemyVisionScanTimer -= Time.deltaTime; if (enemyVisionScanTimer > 0f) { return; } enemyVisionScanTimer = 0.25f; int num = (Object.op_Implicit((Object)(object)enemyTargetAvatar.photonView) ? enemyTargetAvatar.photonView.ViewID : 0); foreach (Enemy enemyTargetRegistration in enemyTargetRegistrations) { EnemyVision val = ((!((Object)(object)enemyTargetRegistration != (Object)null)) ? null : Traverse.Create((object)enemyTargetRegistration).Field("Vision").GetValue<EnemyVision>()); if (!Object.op_Implicit((Object)(object)val) || !((Behaviour)val).isActiveAndEnabled || !Object.op_Implicit((Object)(object)val.VisionTransform)) { continue; } if (!val.VisionsTriggered.ContainsKey(num)) { val.VisionsTriggered[num] = 0; } if (!val.VisionTriggered.ContainsKey(num)) { val.VisionTriggered[num] = false; } Vector3 val2 = enemyVisionTransform.position - val.VisionTransform.position; float magnitude = ((Vector3)(ref val2)).magnitude; if (magnitude <= 0.001f || magnitude > val.VisionDistance) { val.VisionsTriggered[num] = 0; val.VisionTriggered[num] = false; continue; } bool flag = false; int num2 = LayerMask.op_Implicit(SemiFunc.LayerMaskGetVisionObstruct()) | LayerMask.GetMask(new string[1] { "Player" }); RaycastHit[] array = Physics.RaycastAll(val.VisionTransform.position, ((Vector3)(ref val2)).normalized, magnitude + 0.1f, num2, (QueryTriggerInteraction)1); Array.Sort(array, (RaycastHit a, RaycastHit b) => ((RaycastHit)(ref a)).distance.CompareTo(((RaycastHit)(ref b)).distance)); RaycastHit[] array2 = array; for (int num3 = 0; num3 < array2.Length; num3++) { RaycastHit val3 = array2[num3]; if (!Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider) || !Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val3)).collider).GetComponentInParent<EnemyRigidbody>())) { flag = Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider) && ((Object)(object)((RaycastHit)(ref val3)).collider == (Object)(object)proxyCapsule || ((Component)((RaycastHit)(ref val3)).collider).transform.IsChildOf(proxy.transform)); break; } } float num4 = Vector3.Dot(val.VisionTransform.forward, ((Vector3)(ref val2)).normalized); bool flag2 = ((!crouched) ? (magnitude <= val.VisionDistanceClose) : (magnitude <= val.VisionDistanceCloseCrouch)); float num5 = (crawling ? val.VisionDotCrawl : ((!crouched) ? val.VisionDotStanding : val.VisionDotCrouch)); int num6 = (crawling ? val.VisionsToTriggerCrawl : ((!crouched) ? val.VisionsToTrigger : val.VisionsToTriggerCrouch)); if (flag && (flag2 || num4 >= num5)) { val.VisionsTriggered[num] = ((!flag2) ? (val.VisionsTriggered[num] + 1) : num6); if (!val.VisionTriggered[num] && val.VisionsTriggered[num] >= num6) { val.VisionTrigger(num, enemyTargetAvatar, false, flag2); } } else { val.VisionsTriggered[num] = 0; val.VisionTriggered[num] = false; } } } private void CreateTumbleRig(PlayerAvatar playerOne) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: 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_0400: 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_03b5: Unknown result type (might be due to invalid IL or missing references) PlayerTumble val = Traverse.Create((object)playerOne).Field("tumble").GetValue<PlayerTumble>(); if (!Object.op_Implicit((Object)(object)val)) { val = ((Component)playerOne).GetComponentInChildren<PlayerTumble>(true); } if (!Object.op_Implicit((Object)(object)val)) { return; } bool activeSelf = ((Component)val).gameObject.activeSelf; ((Component)val).gameObject.SetActive(false); tumbleRig = Object.Instantiate<GameObject>(((Component)val).gameObject); ((Component)val).gameObject.SetActive(activeSelf); ((Object)tumbleRig).name = PlayerTwoName() + " Vanilla Tumble Physics"; Transform transform = tumbleRig.transform; transform.localScale *= 0.75f; tumbleRig.SetActive(false); tumbleCustomGravity = Traverse.Create((object)val).Field("customGravity").GetValue<float>(); if (tumbleCustomGravity <= 0f) { tumbleCustomGravity = 10f; } MonoBehaviour[] componentsInChildren = tumbleRig.GetComponentsInChildren<MonoBehaviour>(true); MonoBehaviour[] array = componentsInChildren; foreach (MonoBehaviour val2 in array) { if (Object.op_Implicit((Object)(object)val2)) { string name = ((object)val2).GetType().Name; if (!(val2 is PhysGrabObject) && !name.StartsWith("PhysGrabObject", StringComparison.Ordinal) && !(name == "PhotonView") && !(name == "PhotonTransformView")) { Object.DestroyImmediate((Object)(object)val2); } } } tumblePhysGrabObject = tumbleRig.GetComponent<PhysGrabObject>(); Renderer[] componentsInChildren2 = tumbleRig.GetComponentsInChildren<Renderer>(true); Renderer[] array2 = componentsInChildren2; foreach (Renderer val3 in array2) { if (Object.op_Implicit((Object)(object)val3)) { val3.enabled = false; } } tumbleFollowPosition = FindMatchingVisualTransform(((Component)val).transform, tumbleRig.transform, val.followPosition); tumbleBody = tumbleRig.GetComponent<Rigidbody>(); if (!Object.op_Implicit((Object)(object)tumbleBody)) { tumbleBody = tumbleRig.GetComponentInChildren<Rigidbody>(true); } Collider[] componentsInChildren3 = tumbleRig.GetComponentsInChildren<Collider>(true); Collider[] array3 = componentsInChildren3; foreach (Collider val4 in array3) { if (Object.op_Implicit((Object)(object)val4)) { val4.enabled = false; } } List<Collider> list = new List<Collider>(); Collider[] value = Traverse.Create((object)val).Field("colliders").GetValue<Collider[]>(); if (value != null) { Collider[] array4 = value; foreach (Collider val5 in array4) { if (!Object.op_Implicit((Object)(object)val5)) { continue; } Transform val6 = FindMatchingVisualTransform(((Component)val).transform, tumbleRig.transform, ((Component)val5).transform); if (Object.op_Implicit((Object)(object)val6)) { Component component = ((Component)val6).GetComponent(((object)val5).GetType()); Collider val7 = (Collider)(object)((component is Collider) ? component : null); if (Object.op_Implicit((Object)(object)val7) && !list.Contains(val7)) { list.Add(val7); } } } } tumbleColliders = list.ToArray(); if (tumbleColliders.Length == 0) { Collider[] array5 = componentsInChildren3; foreach (Collider val8 in array5) { if (val8 is SphereCollider || val8 is CapsuleCollider) { list.Add(val8); } } tumbleColliders = list.ToArray(); } if (Object.op_Implicit((Object)(object)tumbleBody)) { tumbleInterpolation = tumbleBody.interpolation; tumbleBody.isKinematic = true; } tumbleRig.transform.SetPositionAndRotation(proxy.transform.position + Vector3.up * 0.22500001f, proxy.transform.rotation); tumbleRig.SetActive(true); } private void SetTumbling(bool active, PlayerAvatar playerOne, bool playerInput) { //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: 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_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_0101: 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_010b: 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_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to in