using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("FloatSensitivityPatch")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FloatSensitivityPatch")]
[assembly: AssemblyTitle("FloatSensitivityPatch")]
[assembly: AssemblyVersion("1.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;
}
}
}
[BepInPlugin("com.repo.floatsens", "Float Sens Patch", "1.0.0")]
public class FloatSensPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(GameplayManager), "UpdateAimSensitivity")]
private static class UpdateAimSensitivityPatch
{
private static readonly FieldInfo AimField = typeof(GameplayManager).GetField("aimSensitivity", BindingFlags.Instance | BindingFlags.NonPublic);
private static bool Prefix(GameplayManager __instance)
{
AimField.SetValue(__instance, DesiredSens.Value);
return false;
}
}
internal static ConfigEntry<float> DesiredSens;
private void Awake()
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
DesiredSens = ((BaseUnityPlugin)this).Config.Bind<float>("General", "AimSensitivity", 35f, "Set a true‑float aim sensitivity.");
new Harmony("com.repo.floatsens").PatchAll();
}
}