Fix reactor sabotage cancel

This commit is contained in:
D1GQ committed 2025-01-30 16:19:10 -06:00
1 parent 2841974d22
commit d6bbb76f97
3 files changed
+12 -14

No files matched your search

@@ -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<ReactorTask>(sender))
{
return false;
}
/*
if (count.HasAnyBit(64))
{
foreach (var tuple in reactorSystem.UserConsolePairs)
@@ -230,7 +224,13 @@ public class UpdateSystemHandler : RPCHandler
}
}
}
*/
/*
if (!CheckConsoleDistance<ReactorTask>(sender))
{
return false;
}
*/
return true;
}
+2 -4
View File
@@ -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<string> UntrustedNamespaces = new(new List<string>
@@ -46,8 +45,7 @@ class FileChecker
public static void Initialize()
{
if (enabled || !check) return;
if (enabled) return;
enabled = true;
fileWatcher = new FileSystemWatcher(Environment.CurrentDirectory)
+2 -2
View File
@@ -30,8 +30,8 @@ enum HandleGameDataTags : byte
NetObjectSpawn = 4,
NetObjectDespawn = 5,
ClientDataReady = 7,
}
}
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.HandleRpc))]
internal class PlayerControlRPCHandlerPatch
{