mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
35 lines
906 B
C#
35 lines
906 B
C#
using HarmonyLib;
|
|
|
|
namespace BetterAmongUs.Patches;
|
|
|
|
class GamePlayManager
|
|
{
|
|
[HarmonyPatch(typeof(GameStartManager))]
|
|
public class GameStartManagerPatch
|
|
{
|
|
[HarmonyPatch(nameof(GameStartManager.BeginGame))]
|
|
[HarmonyPostfix]
|
|
public static void Postfix(/*GameStartManager __instance*/)
|
|
{
|
|
AntiCheat.PauseAntiCheat();
|
|
}
|
|
}
|
|
|
|
[HarmonyPatch(typeof(GameManager))]
|
|
public class GameManagerPatch
|
|
{
|
|
[HarmonyPatch(nameof(GameManager.EndGame))]
|
|
[HarmonyPostfix]
|
|
public static void Postfix(/*GameManager __instance*/)
|
|
{
|
|
if (GameStates.IsHost)
|
|
{
|
|
foreach (PlayerControl player in Main.AllPlayerControls)
|
|
{
|
|
player.RpcSetName(player.Data.PlayerName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|