using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using On.RoR2;
using RoR2;
using UnityEngine.Networking;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DedicatedServerCrossplayFix")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DedicatedServerCrossplayFix")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e17bd048-3b2e-45a7-872f-e371f5730a29")]
[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 R2API.Utils
{
[AttributeUsage(AttributeTargets.Assembly)]
public class ManualNetworkRegistrationAttribute : Attribute
{
}
}
namespace DedicatedServerCrossplayFix
{
[BepInPlugin("com.Moffein.DedicatedServerCrossplayFix", "DedicatedServerCrossplayFix", "1.0.0")]
public class DedicatedServerCrossplayFix : BaseUnityPlugin
{
private void Awake()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
NetworkPlayerName.Serialize += new hook_Serialize(NetworkPlayerName_Serialize);
}
private void NetworkPlayerName_Serialize(orig_Serialize orig, ref NetworkPlayerName self, NetworkWriter writer)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
if (self.steamId == CSteamID.nil && self.nameOverride == null)
{
string text = ((NetworkPlayerName)(ref self)).GetResolvedName();
if (text.Length <= 0)
{
text = "???";
}
self.nameOverride = text;
}
orig.Invoke(ref self, writer);
}
}
}