using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameplayEntities; using HarmonyLib; using LLBML; using LLBML.Utils; using LLHandlers; using LLModdingTools; using LLScreen; using Rewired; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("CorpseJuggler (uk.daioutzu.plugins.llb.CorpseJuggler)")] [assembly: AssemblyProduct("CorpseJuggler")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.1.0")] [module: UnverifiableCode] namespace LLModdingTools { public class GUITools { public static Rect ClampWindowToScreen(Rect rect) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) ((Rect)(ref rect)).x = ((((Rect)(ref rect)).x < 0f) ? 0f : ((((Rect)(ref rect)).x + ((Rect)(ref rect)).width > (float)Screen.width) ? ((float)Screen.width - ((Rect)(ref rect)).width) : ((Rect)(ref rect)).x)); ((Rect)(ref rect)).y = ((((Rect)(ref rect)).y < 0f) ? 0f : ((((Rect)(ref rect)).y + ((Rect)(ref rect)).height > (float)Screen.height) ? ((float)Screen.height - ((Rect)(ref rect)).height) : ((Rect)(ref rect)).y)); return rect; } public static Rect ClampWindowTo1080p(Rect rect) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) ((Rect)(ref rect)).x = ((((Rect)(ref rect)).x < 0f) ? 0f : ((((Rect)(ref rect)).x + ((Rect)(ref rect)).width > 1920f) ? (1920f - ((Rect)(ref rect)).width) : ((Rect)(ref rect)).x)); ((Rect)(ref rect)).y = ((((Rect)(ref rect)).y < 0f) ? 0f : ((((Rect)(ref rect)).y + ((Rect)(ref rect)).height > 1080f) ? (1080f - ((Rect)(ref rect)).height) : ((Rect)(ref rect)).y)); return rect; } public static void ScaleGUIToViewPort() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor((float)Screen.width, (float)Screen.height); float num = 1f; float num2 = ((val.x / val.y < num) ? (val.x / 1920f) : (val.y / 1080f)); GUI.matrix = Matrix4x4.TRS(KeepTo16by9(Vector3.zero), Quaternion.identity, new Vector3(num2, num2, 1f)); } private static Vector3 KeepTo16by9(Vector3 pos) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) float num = 1.7777778f; float num2 = Screen.width; float num3 = Screen.height; float num4 = num2 / num3; Vector3 zero = Vector3.zero; if (num4 < num) { zero.y = (num3 - num2 / num) / 2f; zero.y *= ((pos.y < num2 * 0.5f) ? 1 : (-1)); } else { zero.x = (num2 - num3 * num) / 2f; zero.x *= ((pos.x < num2 * 0.5f) ? 1 : (-1)); } return pos + zero; } } } namespace CorpseJuggler { [BepInPlugin("uk.daioutzu.plugins.llb.CorpseJuggler", "CorpseJuggler", "1.1.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class CorpseJuggler : BaseUnityPlugin { internal delegate void DirectionPressed(float f, bool isGamePad); internal delegate void StandardEvent(); internal static ManualLogSource Log; public const string modVersion = "1.0.1"; public const string repositoryOwner = "Daioutzu"; public const string repositoryName = "LLBMM-CorpseJuggler"; private IGamepadTemplate gamePad; private ConfigEntry enableCorpseSpawner; private ConfigEntry spawnCorpseKey; private ConfigEntry moveBallKey; private static ConfigEntry gamePadSpawnCorpse; private static ConfigEntry gamePadenableCorpseSpawner; private static ConfigEntry gamePadMoveBall; public ConfigEntry joyStickBallMoveSpeed; public readonly int mouseBallMoveSpeed = 18; private const float DEAD_ZONE = 0.2f; private bool trainingModeStart; private static bool ReInitDone; private Controller Controller => ReInput.controllers.GetLastActiveController(); public static ConfigEntry CreditsEnabled { get; private set; } internal static JOFJHDJHJGI CurrentGameState => DNPFJHMAIBP.HHMOGKIMBNM(); internal static GameMode CurrentGameMode => JOMBNFKIHIC.GIGAKBJGFDI.PNJOKAICMNN; internal static bool InGame { get { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 if ((Object)(object)World.instance != (Object)null && ((int)DNPFJHMAIBP.HHMOGKIMBNM() == 19 || (int)DNPFJHMAIBP.HHMOGKIMBNM() == 20)) { return !UIScreen.loadingScreenActive; } return false; } } internal static bool IsOffline => !JOMBNFKIHIC.DGGHBHPEGNK(); internal static Spawner CorpseSpawner { get; private set; } internal static CorpseJuggler Instance { get; private set; } internal event DirectionPressed OnCursorMoveVert; internal event DirectionPressed OnCursorMoveHori; internal event StandardEvent OnTrainingModeStart; internal event StandardEvent OnTrainingModeEnd; internal event StandardEvent OnSpawnCorpseKeyDown; internal event StandardEvent OnEnableCorpseSpawner; internal event StandardEvent OnMoveBallKeyDown; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; ReInput.InitializedEvent += delegate { ReInitDone = true; }; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Hello from corpse juggler"); InitConfig(); } private void Start() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) Instance = this; ModDependenciesUtils.RegisterToModMenu(((BaseUnityPlugin)this).Info, (List)null); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Corpse juggler started"); new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID).PatchAll(typeof(UpdateHUDSpeedForItems)); } private void InitConfig() { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown enableCorpseSpawner = ((BaseUnityPlugin)this).Config.Bind("Toggles", "enableCorpseJuggleKey", (KeyCode)98, "Key to toggle corpse juggler"); spawnCorpseKey = ((BaseUnityPlugin)this).Config.Bind("Toggles", "spawnCorpseKey", (KeyCode)113, "Key to spawn corpse"); moveBallKey = ((BaseUnityPlugin)this).Config.Bind("Toggles", "enableBallPositioningKey", (KeyCode)324, "Key to enable ball positioning"); ((BaseUnityPlugin)this).Config.Bind("Toggles", "toggles_header_controller", "Controller", new ConfigDescription("", (AcceptableValueBase)null, new object[1] { "modmenu_header" })); gamePadenableCorpseSpawner = ((BaseUnityPlugin)this).Config.Bind("Toggles", "enableCorpseSpawnerWithSelect", true, "Enable corpse spawner with select"); gamePadSpawnCorpse = ((BaseUnityPlugin)this).Config.Bind("Toggles", "SpawnCorpseWithRightStickDown", true, "Spawn corpse with right stick down"); gamePadMoveBall = ((BaseUnityPlugin)this).Config.Bind("Toggles", "enableBallPositioningWithRightStickPressed", true, "Enable ball positioning with right stick pressed"); ((BaseUnityPlugin)this).Config.Bind("Toggles", "toggles_gap", "gap", new ConfigDescription("", (AcceptableValueBase)null, new object[1] { "modmenu_gap" })); joyStickBallMoveSpeed = ((BaseUnityPlugin)this).Config.Bind("Tuning", "ballSpeedSlider", 25, new ConfigDescription("Speed for the joystick to move ball", (AcceptableValueBase)(object)new AcceptableValueRange(21, 33), new object[0])); CreditsEnabled = ((BaseUnityPlugin)this).Config.Bind("Toggles", "In-GameCredit", true, "Toggle in game credit"); } private void GetGamePad() { if (!ReInitDone) { return; } Controller controller = Controller; if (controller != null) { controller.ImplementsTemplate(); if (true) { gamePad = Controller.GetTemplate(); } } } private void Update() { //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Invalid comparison between Unknown and I4 //IL_007e: 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_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: 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) GetGamePad(); IGamepadTemplate obj = gamePad; bool flag = obj != null && obj.center1.justPressed && gamePadenableCorpseSpawner.Value; IGamepadTemplate obj2 = gamePad; bool flag2 = obj2 != null && obj2.rightStick.press.justPressed && gamePadMoveBall.Value; int num; if (!Input.anyKey) { IGamepadTemplate obj3 = gamePad; if ((double?)((obj3 != null) ? new float?(obj3.rightStick.value.y) : ((float?)null)) < -0.35) { IGamepadTemplate obj4 = gamePad; if (!((double?)((obj4 != null) ? new float?(obj4.rightStick.valuePrev.y) : ((float?)null)) < -0.35)) { num = (gamePadSpawnCorpse.Value ? 1 : 0); goto IL_014e; } } } num = 0; goto IL_014e; IL_014e: bool flag3 = (byte)num != 0; if ((int)CurrentGameMode == 100 && InGame && IsOffline) { if (!trainingModeStart) { trainingModeStart = true; TrainingModStart(); } } else if (trainingModeStart) { trainingModeStart = false; TrainingModeEnd(); } if (Input.GetKeyDown(enableCorpseSpawner.Value) || flag) { this.OnEnableCorpseSpawner?.Invoke(); } else if (Input.GetKeyDown(spawnCorpseKey.Value) || flag3) { this.OnSpawnCorpseKeyDown?.Invoke(); } else if (Input.GetKeyDown(moveBallKey.Value) || flag2) { this.OnMoveBallKeyDown?.Invoke(); } if (Mathf.Abs(Input.GetAxis("Mouse X")) > 0.025f) { this.OnCursorMoveHori?.Invoke(Input.GetAxis("Mouse X"), isGamePad: false); } else { IGamepadTemplate obj5 = gamePad; if (Mathf.Abs((obj5 != null) ? obj5.rightStick.value.x : 0f) > 0.2f) { this.OnCursorMoveHori?.Invoke(gamePad.rightStick.value.x, isGamePad: true); } } if (Mathf.Abs(Input.GetAxis("Mouse Y")) > 0.025f) { this.OnCursorMoveVert?.Invoke(Input.GetAxis("Mouse Y"), isGamePad: false); return; } IGamepadTemplate obj6 = gamePad; if (Mathf.Abs((obj6 != null) ? obj6.rightStick.value.y : 0f) > 0.2f) { this.OnCursorMoveVert?.Invoke(gamePad.rightStick.value.y, isGamePad: true); } } protected virtual void TrainingModStart() { CorpseSpawner = ((Component)World.instance).gameObject.AddComponent(); this.OnTrainingModeStart?.Invoke(); } protected virtual void TrainingModeEnd() { this.OnTrainingModeEnd?.Invoke(); CorpseSpawner = null; } } internal static class PluginInfos { public const string PLUGIN_NAME = "CorpseJuggler"; public const string PLUGIN_ID = "uk.daioutzu.plugins.llb.CorpseJuggler"; public const string PLUGIN_VERSION = "1.1.1"; } internal class Spawner : MonoBehaviour { private static int previousControllerMapID; private BallEntity ball; private PlayerEntity player; private OEMHHMCDHGK dummy; private HHBCPNCDNDH prevBallSpeed; private IBGCBLLKIHA ballPos; private Vector2 ballMoveDirection; private float ballMoveSpeed; private bool expressCancelled; private bool ballMoveToggle; private bool corpseMode; private bool mouseCursorLocked; private const int GUI_HEIGHT = 1080; private const int GUI_WIDTH = 1920; private static bool UsingController => InputHandler.GetLastActiveController(false) != Controller.mouseKeyboard; private static int CurrentControllerMapID { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Controller lastActiveController = InputHandler.GetLastActiveController(false); return ((Controller)(ref lastActiveController)).GetMap().id; } } private void TrainingModeStart() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) CorpseJuggler.Log.LogDebug((object)"\"Spawner\" Invoked TrainingModeStart"); dummy = PlayerHandler.instance.CreateDummyPlayerEntity(6); ((MovableEntity)dummy).SetPlayerState((PlayerState)9, "", (HitPauseState)4, (HitstunState)51); ((Entity)dummy).SetPosition(World.OFF_SCREEN_POSITION); ball = BallHandler.instance.GetBall(0); player = PlayerHandler.instance.GetPlayerEntity(0); } private void TrainingModeEnded() { CorpseJuggler.Log.LogDebug((object)"\"Spawner\" Invoked TrainingModeEnded"); Cursor.lockState = (CursorLockMode)0; RestoreControllerExpress(previousControllerMapID); RestoreControllerExpress(CurrentControllerMapID); ((AbilityEntity)dummy).player.OKDEILOGKFB(); ball = null; Object.Destroy((Object)(object)dummy); Object.Destroy((Object)(object)this); } private void OnDestroy() { CorpseJuggler.Instance.OnTrainingModeStart -= TrainingModeStart; CorpseJuggler.Instance.OnTrainingModeEnd -= TrainingModeEnded; CorpseJuggler.Instance.OnEnableCorpseSpawner -= EnableCorpseSpawner; CorpseJuggler.Instance.OnSpawnCorpseKeyDown -= SpawnCorpseKeyDown; CorpseJuggler.Instance.OnMoveBallKeyDown -= MoveBallKeyDown; CorpseJuggler.Instance.OnCursorMoveHori -= MouseMoveHori; CorpseJuggler.Instance.OnCursorMoveVert -= MouseMoveVert; } private void Awake() { CorpseJuggler.Instance.OnTrainingModeStart += TrainingModeStart; CorpseJuggler.Instance.OnTrainingModeEnd += TrainingModeEnded; CorpseJuggler.Instance.OnEnableCorpseSpawner += EnableCorpseSpawner; } private void MoveBallKeyDown() { if (!ballMoveToggle) { CorpseJuggler.Instance.OnCursorMoveHori += MouseMoveHori; CorpseJuggler.Instance.OnCursorMoveVert += MouseMoveVert; ballMoveToggle = true; } else { ballMoveToggle = false; CorpseJuggler.Instance.OnCursorMoveHori -= MouseMoveHori; CorpseJuggler.Instance.OnCursorMoveVert -= MouseMoveVert; } } private void EnableCorpseSpawner() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 if ((int)((BouncingData)((GetHitBallEntity)ball).ballData).ballState != 26 && (int)((BouncingData)((GetHitBallEntity)ball).ballData).ballState != 1 && !((HitableEntity)ball).InHitstunByAPlayer()) { if (!corpseMode) { CorpseJuggler.Instance.OnMoveBallKeyDown += MoveBallKeyDown; CorpseJuggler.Instance.OnSpawnCorpseKeyDown += SpawnCorpseKeyDown; MoveBallKeyDown(); CorpseModeEnabled(); } else { CorpseModeDisabled(); CorpseJuggler.Instance.OnSpawnCorpseKeyDown -= SpawnCorpseKeyDown; CorpseJuggler.Instance.OnMoveBallKeyDown -= MoveBallKeyDown; } } } private void StickBallToPlayer() { ((HitableData)((GetHitBallEntity)ball).ballData).lastHitterIndex = 0; ((BouncableEntity)ball).SetToTeam((BGHNEHPFHGC)0); ((BouncableEntity)ball).SetBallState((BallState)21, (HitstunState)51); } private void MouseMoveVert(float f, bool isGamePad) { ballMoveSpeed = (isGamePad ? CorpseJuggler.Instance.joyStickBallMoveSpeed.Value : CorpseJuggler.Instance.mouseBallMoveSpeed); ballMoveDirection.y = f; } private void MouseMoveHori(float f, bool isGamePad) { ballMoveSpeed = (isGamePad ? CorpseJuggler.Instance.joyStickBallMoveSpeed.Value : CorpseJuggler.Instance.mouseBallMoveSpeed); ballMoveDirection.x = f; } private void SpawnCorpseKeyDown() { SpawnCorpse(); } private void CorpseModeEnabled() { //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_001e: 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_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) ballPos = ((Entity)ball).GetPosition(); ((HitableData)((GetHitBallEntity)ball).ballData).flyDirection = new IBGCBLLKIHA(0, 0); prevBallSpeed = ((HitableEntity)ball).GetFlySpeed(true); ((HitableEntity)ball).hitableData.canHitPlayer = false; ((BouncableEntity)ball).SetToTeam((BGHNEHPFHGC)4); AudioHandler.PlaySfx((Sfx)6); corpseMode = true; } private void CorpseModeDisabled() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (expressCancelled) { RestoreControllerExpress(previousControllerMapID); } UnlockCursor(); ballMoveToggle = false; expressCancelled = false; ((HitableEntity)ball).SetFlySpeed(prevBallSpeed, true); ((HitableEntity)ball).hitableData.canHitPlayer = true; ((HitableEntity)ball).EndHitstun(); ((BouncableEntity)ball).SetToTeam((BGHNEHPFHGC)0); ((HitableData)((GetHitBallEntity)ball).ballData).flyDirection = new IBGCBLLKIHA(0, 0); corpseMode = false; StickBallToPlayer(); AudioHandler.PlaySfx((Sfx)8); } private void UpdateExpress() { if (UsingController && !expressCancelled) { previousControllerMapID = CurrentControllerMapID; DisableControllerExpress(previousControllerMapID); expressCancelled = true; } if (CurrentControllerMapID != previousControllerMapID && expressCancelled) { RestoreControllerExpress(previousControllerMapID); expressCancelled = false; } } private void DisableControllerExpress(int mapID) { if (!UsingController) { return; } foreach (ActionElementMap allMap in ReInput.mapping.GetControllerMap(mapID).AllMaps) { if (allMap.actionDescriptiveName.Contains("Express")) { allMap.enabled = false; } } } private void RestoreControllerExpress(int mapID) { foreach (ActionElementMap allMap in ReInput.mapping.GetControllerMap(mapID).AllMaps) { if (allMap.actionDescriptiveName.Contains("Express")) { allMap.enabled = true; } } } private void SpawnCorpse() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (!ballMoveToggle) { bool flag = GreaterThanAndEqual(((Entity)ball).GetPosition().GCPKPHMKLBN, ((Entity)player).GetPosition().GCPKPHMKLBN); ItemHandler.instance.SpawnCorpse(((AbilityEntity)dummy).playerIndex, ((Entity)ball).GetPosition(), (Side)(!flag)); } } private void CantHitBall() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Invalid comparison between Unknown and I4 //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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) if (!((HitableEntity)ball).InHitstunByAPlayer()) { ((HitableEntity)ball).StartHitstun(new HHBCPNCDNDH(10), (HitstunState)51); ((Entity)ball).SetPosition(ballPos); if ((int)CorpseJuggler.CurrentGameState == 20 && ballMoveToggle) { ((VisualEntity)ball).SetColorOutlinesColor(new Color(1f, 1f, 0.4f)); return; } ((VisualEntity)ball).SetColorOutlinesColor(new Color(1f, 0.4f, 0.4f)); ((VisualEntity)ball).SetScale(new Vector3(2f, 2f, 2f), "main"); } } private void MoveBall() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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) ((HitableEntity)ball).EndHitstun(); ((HitableEntity)ball).hitableData.canBeHitByPlayer = false; ((HitableEntity)ball).hitableData.canHitPlayer = false; ((VisualEntity)ball).SetColorOutlinesColor(new Color(0.4f, 1f, 0.4f)); ((HitableData)((GetHitBallEntity)ball).ballData).flyDirection = new IBGCBLLKIHA(Floatf(ballMoveDirection.x), Floatf(ballMoveDirection.y)); ((HitableData)((BouncableEntity)ball).bouncingData).flySpeed = Floatf(ballMoveSpeed * 0.6f); ballMoveDirection = Vector2.zero; ballPos = ((Entity)ball).GetPosition(); } private void LockCursor() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) if ((int)Cursor.lockState == 0 && !mouseCursorLocked) { Cursor.lockState = (CursorLockMode)1; mouseCursorLocked = true; } } private void UnlockCursor() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 if ((int)Cursor.lockState >= 1 && mouseCursorLocked) { Cursor.lockState = (CursorLockMode)0; mouseCursorLocked = false; } } private void Update() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 if (corpseMode) { UpdateExpress(); if (!ballMoveToggle || (int)CorpseJuggler.CurrentGameState == 20) { UnlockCursor(); CantHitBall(); } else { LockCursor(); MoveBall(); } } } public static bool GreaterThanAndEqual(HHBCPNCDNDH a, HHBCPNCDNDH b) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) return HHBCPNCDNDH.OCDKNPDIPOB(a, b); } public static HHBCPNCDNDH Floatf(float a) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return HHBCPNCDNDH.NKKIFJJEPOL((decimal)a); } private void OnGUI() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0038: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (CorpseJuggler.CreditsEnabled.Value && corpseMode) { GUITools.ScaleGUIToViewPort(); GUIStyle val = new GUIStyle(GUI.skin.box) { fontSize = 14, alignment = (TextAnchor)4 }; int num = 30; GUI.Label(new Rect(0f, (float)(1080 - num), 390f, (float)num), "CorpseJuggler v1.0.1 by Daioutzu", val); } } } public static class UpdateHUDSpeedForItems { [HarmonyPatch(typeof(ItemEntity), "SetFlySpeed")] [HarmonyPostfix] public static void SetFlySpeed_Postfix(HHBCPNCDNDH speed, bool updateHud) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_000d: Unknown result type (might be due to invalid IL or missing references) if ((int)StateApi.CurrentGameMode == 100 && updateHud) { ScreenGameHud.UpdateSpeed(speed); } } } }