Decompiled source of HTMultiBind v1.1.6

plugins/MultiBind.dll

Decompiled 10 months ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("MultiBind")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MultiBind")]
[assembly: AssemblyTitle("MultiBind")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MultiBind
{
	[BepInPlugin("GeeEm.HardTime.MultiBind", "MultiBind", "1.1.6")]
	[HarmonyPatch]
	public class Plugin : BaseUnityPlugin
	{
		public class ControlScheme
		{
			public ConfigEntry<string> ConfigUp { get; set; }

			public ConfigEntry<string> ConfigDown { get; set; }

			public ConfigEntry<string> ConfigRight { get; set; }

			public ConfigEntry<string> ConfigLeft { get; set; }

			public ConfigEntry<string> ConfigS { get; set; }

			public ConfigEntry<string> ConfigX { get; set; }

			public ConfigEntry<string> ConfigZ { get; set; }

			public ConfigEntry<string> ConfigA { get; set; }

			public ConfigEntry<string> ConfigSpace { get; set; }

			public ConfigEntry<string> ConfigShift { get; set; }

			public ConfigEntry<string> ConfigControl { get; set; }

			public ConfigEntry<string> ConfigTab { get; set; }

			public ConfigEntry<string> ConfigLeftTrigger { get; set; }

			public ConfigEntry<string> ConfigJoin { get; set; }
		}

		public static class Ulil
		{
			public static KeyCode GetKeyCode(string name)
			{
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				return (KeyCode)Enum.Parse(typeof(KeyCode), name, ignoreCase: true);
			}
		}

		[HarmonyPatch(typeof(BJMGCKGNCHO))]
		public static class BJMGCKGNCHO_Patch
		{
			[HarmonyPrefix]
			[HarmonyPatch("NCOEPCFFBJA")]
			public static bool NCOEPCFFBJA_Patch(BJMGCKGNCHO __instance)
			{
				for (int i = 0; i < 4; i++)
				{
					if (__instance.PLFGKLGCOMD == KeyboardInstance[i] && __instance.BPJFLJPKKJK == ControllerModeInt && __instance.AHBNKMMMGFI > 0)
					{
						HandleControls(__instance, Player[i]);
						return false;
					}
				}
				return true;
			}
		}

		public const string PluginGuid = "GeeEm.HardTime.MultiBind";

		public const string PluginName = "MultiBind";

		public const string PluginVer = "1.1.6";

		internal static ManualLogSource Log;

		internal static readonly Harmony Harmony = new Harmony("GeeEm.HardTime.MultiBind");

		internal static string PluginPath;

		public static int[] KeyboardInstance = new int[4] { 0, -1, -1, -1 };

		public static bool ControllerMode = false;

		public static int ControllerModeInt = 1;

		public static ConfigEntry<string> ConfigAdd;

		public static ConfigEntry<string> ConfigRemove;

		public static ConfigEntry<string> ConfigControllerMode;

		public static ControlScheme[] Player = new ControlScheme[4]
		{
			new ControlScheme(),
			new ControlScheme(),
			new ControlScheme(),
			new ControlScheme()
		};

		public AcceptableValueList<string> KeyboardButtons = new AcceptableValueList<string>(new string[121]
		{
			"None", "Backspace", "Delete", "Tab", "Clear", "Return", "Pause", "Escape", "Space", "Quote",
			"Comma", "Minus", "Period", "Slash", "Alpha0", "Alpha1", "Alpha2", "Alpha3", "Alpha4", "Alpha5",
			"Alpha6", "Alpha7", "Alpha8", "Alpha9", "Semicolon", "Equals", "LeftBracket", "Backslash", "RightBracket", "BackQuote",
			"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
			"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
			"U", "V", "W", "X", "Y", "Z", "Keypad0", "Keypad1", "Keypad2", "Keypad3",
			"Keypad4", "Keypad5", "Keypad6", "Keypad7", "Keypad8", "Keypad9", "KeypadPeriod", "KeypadDivide", "KeypadMultiply", "KeypadMinus",
			"KeypadPlus", "KeypadEnter", "KeypadEquals", "UpArrow", "DownArrow", "RightArrow", "LeftArrow", "Insert", "Home", "End",
			"PageUp", "PageDown", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
			"F9", "F10", "F11", "F12", "F13", "F14", "F15", "Numlock", "CapsLock", "ScrollLock",
			"RightShift", "LeftShift", "RightControl", "LeftControl", "RightAlt", "LeftAlt", "RightCommand", "RightApple", "LeftCommand", "LeftApple",
			"LeftWindows", "RightWindows", "Print", "Menu", "Mouse0", "Mouse1", "Mouse2", "Mouse3", "Mouse4", "Mouse5",
			"Mouse6"
		});

		private void SetupControls(ControlScheme controlScheme, string player)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Expected O, but got Unknown
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Expected O, but got Unknown
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Expected O, but got Unknown
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Expected O, but got Unknown
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_0283: Expected O, but got Unknown
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Expected O, but got Unknown
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Expected O, but got Unknown
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Expected O, but got Unknown
			//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ae: Expected O, but got Unknown
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f6: Expected O, but got Unknown
			controlScheme.ConfigUp = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Up Button (" + player + ")", "UpArrow", new ConfigDescription("Move up button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigDown = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Down Button (" + player + ")", "DownArrow", new ConfigDescription("Move down button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigLeft = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Left Button (" + player + ")", "LeftArrow", new ConfigDescription("Move left button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigRight = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Right Button (" + player + ")", "RightArrow", new ConfigDescription("Move right button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigA = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Attack Button (" + player + ")", "A", new ConfigDescription("Attack button / West Button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigS = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Grapple Button (" + player + ")", "S", new ConfigDescription("Grapple button / North Button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigZ = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Run Button (" + player + ")", "Z", new ConfigDescription("Run button / South Button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigX = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Pick Up Button (" + player + ")", "X", new ConfigDescription("Pick up button / East Button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigSpace = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Taunt Button (" + player + ")", "Space", new ConfigDescription("Taunt button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigShift = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Focus (Shift) Button (" + player + ")", "LeftShift (" + player + ")", new ConfigDescription("Change focus (shift) button / Left Shoulder Button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigControl = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Focus (Control) Button (" + player + ")", "LeftControl", new ConfigDescription("Change focus (control) button / Right Shoulder Button (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigTab = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Change Control (TAB) Button (" + player + ")", "Tab", new ConfigDescription("Left Trigger Button / Right Trigger (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigLeftTrigger = ((BaseUnityPlugin)this).Config.Bind<string>(player, "LeftTrigger (" + player + ")", "None", new ConfigDescription("Change the left trigger button / Left Trigger (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			controlScheme.ConfigJoin = ((BaseUnityPlugin)this).Config.Bind<string>(player, "Join Button (" + player + ")", "None", new ConfigDescription("\"Join\" button that let's you join a game in progress (" + player + ")", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
		}

		private void Awake()
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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
			Log = ((BaseUnityPlugin)this).Logger;
			PluginPath = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location);
			ConfigAdd = ((BaseUnityPlugin)this).Config.Bind<string>("General", "AddPlayer Button", "KeypadPlus", new ConfigDescription("Button to add a new \"fake\" keyboard", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			ConfigRemove = ((BaseUnityPlugin)this).Config.Bind<string>("General", "RemovePlayer Button", "KeypadMinus", new ConfigDescription("Button to remove a new \"fake\" keyboard", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			ConfigControllerMode = ((BaseUnityPlugin)this).Config.Bind<string>("General", "ControllerMode", "KeypadEnter", new ConfigDescription("Will toggle a controller mode so you can use the keyboard in the main ", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>()));
			SetupControls(Player[0], "Main Keyboard Player");
			SetupControls(Player[1], "Additional Player 1");
			SetupControls(Player[2], "Additional Player 2");
			SetupControls(Player[3], "Additional Player 3");
			AddHTCCLButtons();
		}

		private void AddHTCCLButtons()
		{
			if (IsHTCCLLoaded())
			{
				AddButtons();
			}
			else
			{
				Log.LogInfo((object)"HTCCL not found");
			}
		}

		private bool IsHTCCLLoaded()
		{
			try
			{
				Assembly.Load("HTCCL");
				return true;
			}
			catch (Exception)
			{
				return false;
			}
		}

		private void AddButtons()
		{
			try
			{
				Type type = Type.GetType("HTCCL.API.Buttons, HTCCL");
				if (type != null)
				{
					MethodInfo method = type.GetMethod("RegisterCustomButton", BindingFlags.Static | BindingFlags.Public);
					Func<string> func = () => AddNewPlayer() ? "New keyboard player added" : "Failed to add new keyboard player";
					Func<string> func2 = () => RemovePlayer() ? "New keyboard player removed" : "Failed to remove new keyboard player";
					Func<string> func3 = delegate
					{
						ToggleController();
						return "Controller mode toggled";
					};
					object[] parameters = new object[4] { this, "Add new keyboard player", func, false };
					method.Invoke(null, parameters);
					object[] parameters2 = new object[4] { this, "Remove new keyboard player", func2, false };
					method.Invoke(null, parameters2);
					object[] parameters3 = new object[4] { this, "Toggle Controller Mode", func3, false };
					method.Invoke(null, parameters3);
				}
				else
				{
					Log.LogError((object)"HTCCL.API.Buttons not found in HTCCL");
				}
			}
			catch (Exception ex)
			{
				Log.LogError((object)("Error calling method from HTCCL: " + ex.Message));
			}
		}

		private void OnEnable()
		{
			Harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded MultiBind!");
		}

		private void OnDisable()
		{
			Harmony.UnpatchSelf();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Unloaded MultiBind!");
		}

		private bool AddNewPlayer()
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Expected O, but got Unknown
			for (int i = 1; i <= 3; i++)
			{
				if (KeyboardInstance[i] > HKJOAJOKOIJ.NGCNKGDDKGF)
				{
					KeyboardInstance[i] = -1;
				}
			}
			for (int i = 1; i <= 3; i++)
			{
				if (KeyboardInstance[i] == -1)
				{
					int num = HKJOAJOKOIJ.NGCNKGDDKGF + 1;
					HKJOAJOKOIJ.NAADDLFFIHG[num] = new BJMGCKGNCHO();
					HKJOAJOKOIJ.NAADDLFFIHG[num].PLFGKLGCOMD = i;
					KeyboardInstance[i] = num;
					HKJOAJOKOIJ.NAADDLFFIHG[num].AHBNKMMMGFI = 1;
					HKJOAJOKOIJ.NAADDLFFIHG[num].BPJFLJPKKJK = 0;
					HKJOAJOKOIJ.NAADDLFFIHG[num].CMECDGMCMLC = "Virtual";
					if (NAEEIFNFBBO.GAABAPFHBPM <= 1)
					{
						HKJOAJOKOIJ.NAADDLFFIHG[num].BPJFLJPKKJK = ControllerModeInt;
						HKJOAJOKOIJ.NAADDLFFIHG[num].CMECDGMCMLC = "FakeKeyboard";
					}
					HKJOAJOKOIJ.NGCNKGDDKGF++;
					CHLPMKEGJBJ.DNNPEAOCDOG(CHLPMKEGJBJ.IKONDJPBOGP[5], 1f, 1f);
					return true;
				}
			}
			return false;
		}

		private bool RemovePlayer()
		{
			for (int i = 1; i <= 3; i++)
			{
				if (KeyboardInstance[i] > HKJOAJOKOIJ.NGCNKGDDKGF)
				{
					KeyboardInstance[i] = -1;
				}
			}
			for (int i = 3; i > 0; i--)
			{
				if (KeyboardInstance[i] != -1)
				{
					HKJOAJOKOIJ.NGCNKGDDKGF--;
					KeyboardInstance[i] = -1;
					CHLPMKEGJBJ.DNNPEAOCDOG(CHLPMKEGJBJ.IKONDJPBOGP[5], 1f, 1f);
					return true;
				}
			}
			return false;
		}

		private void ToggleController()
		{
			ControllerMode = !ControllerMode;
			if (ControllerMode)
			{
				ControllerModeInt = 3;
				MOIHOCAMOOE.BPJFLJPKKJK = 0;
			}
			else
			{
				ControllerModeInt = 1;
				MOIHOCAMOOE.BPJFLJPKKJK = 1;
			}
			HKJOAJOKOIJ.NAADDLFFIHG[0].BPJFLJPKKJK = ControllerModeInt;
			HKJOAJOKOIJ.NAADDLFFIHG[0].CMECDGMCMLC = "Keyboard";
			HKJOAJOKOIJ.NAADDLFFIHG[0].AHBNKMMMGFI = 1;
			for (int i = 0; i < 4; i++)
			{
				if (KeyboardInstance[i] != -1)
				{
					HKJOAJOKOIJ.NAADDLFFIHG[KeyboardInstance[i]].BPJFLJPKKJK = ControllerModeInt;
				}
			}
			CHLPMKEGJBJ.DNNPEAOCDOG(CHLPMKEGJBJ.IKONDJPBOGP[5], 1f, 1f);
		}

		private void Update()
		{
			//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)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "Titles")
			{
				if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigRemove.Value)))
				{
					RemovePlayer();
				}
				if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigAdd.Value)))
				{
					AddNewPlayer();
				}
				if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigControllerMode.Value)))
				{
					ToggleController();
				}
			}
		}

		public static void HandleControls(BJMGCKGNCHO __instance, ControlScheme scheme)
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: 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_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			__instance.LMADDGDMBGB = Mathf.MoveTowards(__instance.LMADDGDMBGB, 0f, 1f * MBLIOKEDHHB.MCJHGEHEPMD);
			if (LIPNHOMGGHF.FAKHAFKOBPB == 50 && __instance.AHBNKMMMGFI > 0 && __instance.FOAPDJMIFGP > 0)
			{
				__instance.NAIJAHOFCLC++;
			}
			else
			{
				__instance.NAIJAHOFCLC = 0;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigJoin.Value)))
			{
				__instance.JIIMLBLGKAL(0);
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigUp.Value)))
			{
				__instance.JLBOEDNDIPI = 1f;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigDown.Value)))
			{
				__instance.JLBOEDNDIPI = -1f;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigRight.Value)))
			{
				__instance.MGJCMCPCPDN = 1f;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigLeft.Value)))
			{
				__instance.MGJCMCPCPDN = -1f;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigS.Value)))
			{
				__instance.IOIJFFLMBCH[1] = 1;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigX.Value)))
			{
				__instance.IOIJFFLMBCH[2] = 1;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigZ.Value)))
			{
				__instance.IOIJFFLMBCH[3] = 1;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigA.Value)))
			{
				__instance.IOIJFFLMBCH[4] = 1;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigSpace.Value)))
			{
				__instance.IOIJFFLMBCH[5] = 1;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigShift.Value)))
			{
				__instance.IOIJFFLMBCH[6] = -1;
				if (ControllerMode)
				{
					__instance.FHBEOIPFFDA = 1;
				}
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigControl.Value)))
			{
				__instance.IOIJFFLMBCH[6] = 1;
				if (ControllerMode)
				{
					__instance.OHEIJEDGKLJ = 1;
				}
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigTab.Value)))
			{
				__instance.EMJMDDNMFFA = 1f;
			}
			if (Input.GetKey(Ulil.GetKeyCode(scheme.ConfigLeftTrigger.Value)))
			{
				__instance.PNGFDALFGLE = 1f;
			}
			__instance.IMBKMMOCBBF = __instance.MGJCMCPCPDN;
			__instance.PNLIFOBMMGG = __instance.JLBOEDNDIPI;
			if (__instance.PNGFDALFGLE < 0.5f)
			{
				__instance.PNGFDALFGLE = 0f;
			}
			if (__instance.EMJMDDNMFFA < 0.5f)
			{
				__instance.EMJMDDNMFFA = 0f;
			}
			if (__instance.PNGFDALFGLE >= 1f && __instance.EMJMDDNMFFA < 1f)
			{
				__instance.FCLGPMFNEPE = -1f;
			}
			if (__instance.EMJMDDNMFFA >= 1f && __instance.PNGFDALFGLE < 1f)
			{
				__instance.FCLGPMFNEPE = 1f;
			}
			if (__instance.PNGFDALFGLE >= 1f && __instance.EMJMDDNMFFA >= 1f)
			{
				if (__instance.FCLGPMFNEPE == 1f)
				{
					__instance.FCLGPMFNEPE = -2f;
				}
				if (__instance.FCLGPMFNEPE == -1f)
				{
					__instance.FCLGPMFNEPE = 2f;
				}
			}
			if (__instance.PNGFDALFGLE < 1f && __instance.EMJMDDNMFFA < 1f)
			{
				__instance.FCLGPMFNEPE = 0f;
			}
			if (NAEEIFNFBBO.GAABAPFHBPM == 1 && __instance.HPOKFBBGEBG(5) != 0f)
			{
				Cursor.visible = false;
			}
			if (__instance.PLFGKLGCOMD > 0 && __instance.AHBNKMMMGFI > 0 && HKJOAJOKOIJ.EMLDNFEIKCK != __instance.PLFGKLGCOMD)
			{
				__instance.BDCKBOLGDNB();
			}
			if (LIPNHOMGGHF.FAKHAFKOBPB == 50 && __instance.BPJFLJPKKJK >= 2 && __instance.AHBNKMMMGFI > 0 && __instance.FOAPDJMIFGP == 0 && __instance.DHBFOHLEFOD[2] > 0)
			{
				__instance.JIIMLBLGKAL(0);
			}
			if (NAEEIFNFBBO.JPNIIADMEIE == 0 && LIPNHOMGGHF.FAKHAFKOBPB == 50 && LIPNHOMGGHF.GCJKOBOBIGA == 0 && __instance.BPJFLJPKKJK >= 2 && __instance.PLFGKLGCOMD == HKJOAJOKOIJ.EMLDNFEIKCK && (__instance.MGJCMCPCPDN != 0f || __instance.JLBOEDNDIPI != 0f))
			{
				__instance.IMBKMMOCBBF = __instance.LFGHFKBKHOJ;
				__instance.PNLIFOBMMGG = __instance.APEDCJMNPFK;
				BLNKDHIGFAN.IFPJBJLEEDB = __instance.MGJCMCPCPDN;
				BLNKDHIGFAN.LHBKHGBDPLH = (0f - __instance.JLBOEDNDIPI) * 0.2f;
				BLNKDHIGFAN.KHKIEPDJELK = __instance.JLBOEDNDIPI * 0.75f;
				BLNKDHIGFAN.GIBHLNFEPKE = 2f;
			}
		}
	}
}