From 4deb5f88b904a9bd964938ee2ed0a4925f52d830 Mon Sep 17 00:00:00 2001 From: js6pak Date: Fri, 6 Jan 2023 19:18:38 +0100 Subject: [PATCH] Fix MaxImpostors patch on 2022.12.8+ --- Reactor.Debugger/DebuggerPlugin.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Reactor.Debugger/DebuggerPlugin.cs b/Reactor.Debugger/DebuggerPlugin.cs index f1f4691..ff6e0ae 100644 --- a/Reactor.Debugger/DebuggerPlugin.cs +++ b/Reactor.Debugger/DebuggerPlugin.cs @@ -26,8 +26,15 @@ public partial class DebuggerPlugin : BasePlugin { Component = this.AddComponent(); - GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = Enumerable.Repeat((int) byte.MaxValue, byte.MaxValue).ToArray(); - GameOptionsData.MinPlayers = Enumerable.Repeat(1, 4).ToArray(); + var maxImpostors = (Il2CppStructArray) Enumerable.Repeat((int) byte.MaxValue, byte.MaxValue).ToArray(); + GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = maxImpostors; + NormalGameOptionsV07.MaxImpostors = NormalGameOptionsV07.RecommendedImpostors = maxImpostors; + HideNSeekGameOptionsV07.MaxImpostors = maxImpostors; + + var minPlayers = (Il2CppStructArray) Enumerable.Repeat(1, byte.MaxValue).ToArray(); + GameOptionsData.MinPlayers = minPlayers; + NormalGameOptionsV07.MinPlayers = minPlayers; + HideNSeekGameOptionsV07.MinPlayers = minPlayers; Harmony.PatchAll(); }