Decompiled source of SpeedCapRemover v1.0.0

BepInEx/plugins/SpeedCapRemover.dll

Decompiled 2 days ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyVersion("0.0.0.0")]
[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 UncappedSpeedMod
{
	[BepInPlugin("com.renshei.uncapped", "Uncapped Speed", "1.1.3")]
	public class UncappedSpeedPlugin : BaseUnityPlugin
	{
		private ManualLogSource speedLogs;

		public void Awake()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			speedLogs = new ManualLogSource("speedLogs");
			Logger.Sources.Add((ILogSource)(object)speedLogs);
			Harmony.CreateAndPatchAll(typeof(SpeedCapPatch), (string)null);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"speed cap successfully removed from ultrakill");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"visit BlueDevGH on GitHub for the source code!");
		}

		public void Update()
		{
			try
			{
				if (Input.GetKeyDown((KeyCode)117))
				{
					speedLogs.LogInfo((object)"U key pressed");
				}
			}
			catch (Exception arg)
			{
				speedLogs.LogError((object)$"err with {arg}");
			}
		}
	}
	[HarmonyPatch(typeof(NewMovement))]
	public class SpeedCapPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPrefix]
		public static void RaiseSpeedLimit(NewMovement __instance)
		{
			__instance.walkSpeed = 1000f;
			if ((Object)(object)__instance.rb != (Object)null)
			{
				__instance.rb.drag = 0f;
			}
		}
	}
}