using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("FPS_Fix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FPS_Fix")]
[assembly: AssemblyTitle("FPS_Fix")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace FPS_Fix
{
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "FPS_Fix";
public const string PLUGIN_NAME = "FPS_Fix";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace FinalAscentReconnectFix
{
[BepInPlugin("com.fixes.peak.reconnectheight", "Peak Reconnect Height Fix", "1.0.0")]
public class ReconnectFixPlugin : BaseUnityPlugin
{
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.fixes.peak.reconnectheight").PatchAll(typeof(ReconnectFixPlugin));
((BaseUnityPlugin)this).Logger.LogInfo((object)"Reconnect height ceiling raised to 10,000m. Log spam silenced.");
}
[HarmonyPatch(typeof(ReconnectData), "CreateFromCharacter")]
[HarmonyTranspiler]
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
foreach (CodeInstruction instruction in instructions)
{
if (instruction.opcode == OpCodes.Ldc_R4 && instruction.operand is float val && Mathf.Approximately(val, 1300f))
{
yield return new CodeInstruction(OpCodes.Ldc_R4, (object)10000f);
}
else
{
yield return instruction;
}
}
}
}
}