diff --git a/Modules/AntiCheat/RPCHandlers/UpdateSystemHandler.cs b/Modules/AntiCheat/RPCHandlers/UpdateSystemHandler.cs index 5db6ec0..c34cadc 100644 --- a/Modules/AntiCheat/RPCHandlers/UpdateSystemHandler.cs +++ b/Modules/AntiCheat/RPCHandlers/UpdateSystemHandler.cs @@ -204,7 +204,7 @@ public class UpdateSystemHandler : RPCHandler private static bool HandleReactorSystem(PlayerControl? sender, ReactorSystemType reactorSystem, byte count) { - if (count == 128) // Direct sabotage call from client, which is not possible, only the host should have this count when HandleSabotageSystem it's called + if (count == 128 || count == 16) // Direct sabotage call from client, which is not possible, only the host should have this count when HandleSabotageSystem it's called { return false; } @@ -214,12 +214,6 @@ public class UpdateSystemHandler : RPCHandler return false; } - if (!CheckConsoleDistance(sender)) - { - return false; - } - - /* if (count.HasAnyBit(64)) { foreach (var tuple in reactorSystem.UserConsolePairs) @@ -230,7 +224,13 @@ public class UpdateSystemHandler : RPCHandler } } } - */ + + /* + if (!CheckConsoleDistance(sender)) + { + return false; + } + */ return true; } diff --git a/Modules/FileChecker.cs b/Modules/FileChecker.cs index f48a1b8..6949282 100644 --- a/Modules/FileChecker.cs +++ b/Modules/FileChecker.cs @@ -5,7 +5,6 @@ namespace BetterAmongUs.Modules; class FileChecker { - private static bool check = false; private static bool enabled = false; private static FileSystemWatcher? fileWatcher; private static bool hasUnauthorizedFileOrMod = false; @@ -19,7 +18,7 @@ class FileChecker "MonoMod", "netstandard", "mscorlib", "AssetRipper", "Cpp2IL", "AsmResolver", "Iced", "SemanticVersioning", "Mono.Cecil", "Assembly-CSharp", "StableNameDotNet", "Disarm", "Gee.External.Capstone", "Rewired_Core", "AddressablesPlayAssetDelivery", - "Assembly-CSharp-firstpass", "BetterAmongUs", "MCI", "CrowdedMod", "Mini.RegionInstall", "Unlock", "Skin" + "Assembly-CSharp-firstpass", "Sentry", "BetterAmongUs", "MCI", "CrowdedMod", "Mini.RegionInstall", "Unlock", "Skin" }); private static readonly ReadOnlyCollection UntrustedNamespaces = new(new List @@ -46,8 +45,7 @@ class FileChecker public static void Initialize() { - if (enabled || !check) return; - + if (enabled) return; enabled = true; fileWatcher = new FileSystemWatcher(Environment.CurrentDirectory) diff --git a/Modules/RPC.cs b/Modules/RPC.cs index 114e9e3..ea3d09d 100644 --- a/Modules/RPC.cs +++ b/Modules/RPC.cs @@ -30,8 +30,8 @@ enum HandleGameDataTags : byte NetObjectSpawn = 4, NetObjectDespawn = 5, ClientDataReady = 7, -} - +} + [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.HandleRpc))] internal class PlayerControlRPCHandlerPatch {