Files
AmongUsRevamped/Patches/VentPatches.cs
T
2026-08-03 20:02:59 +02:00

27 lines
749 B
C#

using AmongUs.GameOptions;
namespace AmongUsRevamped;
[HarmonyPatch(typeof(Vent), nameof(Vent.EnterVent))]
class EnterVentPatch
{
public static void Postfix(Vent __instance, [HarmonyArgument(0)] PlayerControl pc)
{
if (!AmongUsClient.Instance.AmHost) return;
if (pc.Data.RoleType != RoleTypes.Impostor &&
pc.Data.RoleType != RoleTypes.Shapeshifter &&
pc.Data.RoleType != RoleTypes.Phantom &&
pc.Data.RoleType != RoleTypes.Viper &&
pc.Data.RoleType != RoleTypes.Engineer &&
!pc.Data.IsDead)
{
EACR.VentCheat(pc, __instance);
}
if (__instance.Id > 15)
{
EACR.VentCheat(pc, __instance);
}
}
}