diff --git a/Distance.NitronicHUD/Distance.NitronicHUD.csproj b/Distance.NitronicHUD/Distance.NitronicHUD.csproj index 03606f7..30b6004 100644 --- a/Distance.NitronicHUD/Distance.NitronicHUD.csproj +++ b/Distance.NitronicHUD/Distance.NitronicHUD.csproj @@ -94,13 +94,12 @@ + - - - + diff --git a/Distance.NitronicHUD/Harmony/Assembly-CSharp/StatsManager/OnEventPlayerAdded.cs b/Distance.NitronicHUD/Harmony/Assembly-CSharp/StatsManager/OnEventPlayerAdded.cs new file mode 100644 index 0000000..82717a9 --- /dev/null +++ b/Distance.NitronicHUD/Harmony/Assembly-CSharp/StatsManager/OnEventPlayerAdded.cs @@ -0,0 +1,16 @@ +using HarmonyLib; +using System.Collections.Generic; +using System.Linq; + +namespace Distance.NitronicHUD.Harmony +{ + [HarmonyPatch(typeof(StatsManager), "OnEventPlayerAdded")] + internal static class StatsManager__OnEventPlayerAdded + { + [HarmonyTranspiler] + public static IEnumerable Transpiler(IEnumerable instr) + { + return instr.Skip(5); // Skip the default check "if is in level editor, don't create player stats object" + } + } +}