Skip to content

Commit

Permalink
Merge pull request #15 from whichtwix/tor-compatible
Browse files Browse the repository at this point in the history
tor campatibility
  • Loading branch information
MyDragonBreath authored Oct 15, 2023
2 parents d6a83db + 5426ff3 commit 5a6de8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions MCI/Patches/OnGameStart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static void Postfix(AmongUsClient __instance)
foreach (var p in __instance.allClients)
{
p.IsReady = true;
p.Character.gameObject.GetComponent<DummyBehaviour>().enabled = false;
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions MCI/Utils.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using Hazel;
using BepInEx.Unity.IL2CPP;
using InnerNet;
using System.Linq;
using UnityEngine;
using UnityEngine.Profiling;

namespace MCI
{
Expand Down Expand Up @@ -47,6 +46,10 @@ public static PlayerControl CreatePlayerInstance(string name = "", int id = -1)
{
SubmergedCompatibility.ImpartSub(sampleC.Character);
}
if (IL2CPPChainloader.Instance.Plugins.TryGetValue("me.eisbison.theotherroles", out _))
{
sampleC.Character.GetComponent<DummyBehaviour>().enabled = true;
}

return sampleC.Character;
}
Expand Down

0 comments on commit 5a6de8b

Please sign in to comment.