Decompiled source of FreeScout v1.0.0

FreeScout.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using FreeScout;
using HarmonyLib;
using MelonLoader;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(FreeScoutMod), "FreeScout", "1.0.0", "Bowilla", null)]
[assembly: MelonGame("", "Beton Brutal")]
[assembly: AssemblyTitle("FreeScout")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FreeScout")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("544176bc-493a-48df-bf69-17f05ae025f6")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace FreeScout;

public class FreeScoutMod : MelonMod
{
}
[HarmonyPatch(typeof(PlayerController), "Flying")]
public class Patch
{
	private static bool Prefix(PlayerController __instance)
	{
		//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_0023: 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_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: 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_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: 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_006a: 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)
		//IL_007b: 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_0083: 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_00f1: Unknown result type (might be due to invalid IL or missing references)
		Vector3 forward = ((Component)__instance.cam).transform.forward;
		((Vector3)(ref forward)).Scale(new Vector3(1f, 0f, 1f));
		((Vector3)(ref forward)).Normalize();
		Vector3 val = Vector3.zero + forward * PlayerInput.SmoothInputVector.z + ((Component)__instance.cam).transform.right * PlayerInput.SmoothInputVector.x;
		Vector3 velocity = __instance.ct.velocity;
		velocity.x = val.x * 20f;
		velocity.z = val.z * 20f;
		if (__instance.spaceHeld)
		{
			velocity.y = 20f;
		}
		else if (__instance.isSneaking)
		{
			velocity.y = -20f;
		}
		else
		{
			velocity.y = 0f;
		}
		__instance.ct.velocity = velocity;
		return false;
	}
}