Decompiled source of Altitude v1.0.0

BepInEx/plugins/Altitude/Altitude.dll

Decompiled a week ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("Altitude")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+76366e186d964a3e1431b303d33f816a5db42120")]
[assembly: AssemblyProduct("Altitude")]
[assembly: AssemblyTitle("Altitude")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Altitude;

[BepInPlugin("chib31.Altitude", "Altitude", "1.0.0")]
public class BepInExPlugin : BaseUnityPlugin
{
	private void OnGUI()
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Expected O, but got Unknown
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)Player.m_localPlayer == (Object)null))
		{
			int num = Mathf.RoundToInt(((Component)Player.m_localPlayer).transform.position.y) - 30;
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				fontSize = 20,
				alignment = (TextAnchor)0
			};
			val.normal.textColor = Color.white;
			GUI.Label(new Rect((float)Screen.width * 0.2f, 10f, 240f, 28f), $"Altitude: {num}m", val);
		}
	}
}