Skip to content

Commit

Permalink
Fix MaxImpostors patch on 2022.12.8+
Browse files Browse the repository at this point in the history
  • Loading branch information
js6pak committed Jan 6, 2023
1 parent 2407a99 commit 4deb5f8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Reactor.Debugger/DebuggerPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ public override void Load()
{
Component = this.AddComponent<DebuggerComponent>();

GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = Enumerable.Repeat((int) byte.MaxValue, byte.MaxValue).ToArray();
GameOptionsData.MinPlayers = Enumerable.Repeat(1, 4).ToArray();
var maxImpostors = (Il2CppStructArray<int>) Enumerable.Repeat((int) byte.MaxValue, byte.MaxValue).ToArray();
GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = maxImpostors;
NormalGameOptionsV07.MaxImpostors = NormalGameOptionsV07.RecommendedImpostors = maxImpostors;
HideNSeekGameOptionsV07.MaxImpostors = maxImpostors;

var minPlayers = (Il2CppStructArray<int>) Enumerable.Repeat(1, byte.MaxValue).ToArray();
GameOptionsData.MinPlayers = minPlayers;
NormalGameOptionsV07.MinPlayers = minPlayers;
HideNSeekGameOptionsV07.MinPlayers = minPlayers;

Harmony.PatchAll();
}
Expand Down

0 comments on commit 4deb5f8

Please sign in to comment.