mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
No longer trust host BAU users
This commit is contained in:
1 parent
3900add575
commit
b2cae7378a
2 files changed
+2
-5
No files matched your search
@@ -124,7 +124,7 @@ internal static class BetterAntiCheat
|
||||
internal static void CheckRPC(PlayerControl player, byte callId, MessageReader oldReader)
|
||||
{
|
||||
if (player == null || player?.Data == null) return;
|
||||
if (!IsEnabled || !BAUPlugin.AntiCheat.Value || (GameState.IsBetterHostLobby && !GameState.IsHost) || !BetterGameSettings.DetectInvalidRPCs.GetBool()) return;
|
||||
if (!IsEnabled || !BAUPlugin.AntiCheat.Value || !BetterGameSettings.DetectInvalidRPCs.GetBool()) return;
|
||||
if (player.IsLocalPlayer() && player.IsHost()) return;
|
||||
|
||||
MessageReader reader = MessageReader.Get(oldReader);
|
||||
@@ -138,7 +138,7 @@ internal static class BetterAntiCheat
|
||||
try
|
||||
{
|
||||
if (player == null || player?.Data == null) return true;
|
||||
if (!IsEnabled || !BAUPlugin.AntiCheat.Value || (GameState.IsBetterHostLobby && !GameState.IsHost) || !BetterGameSettings.DetectInvalidRPCs.GetBool()) return true;
|
||||
if (!IsEnabled || !BAUPlugin.AntiCheat.Value || !BetterGameSettings.DetectInvalidRPCs.GetBool()) return true;
|
||||
if (player.IsLocalPlayer() && player.IsHost()) return true;
|
||||
|
||||
MessageReader reader = MessageReader.Get(oldReader);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using AmongUs.GameOptions;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Mono;
|
||||
|
||||
namespace BetterAmongUs.Modules;
|
||||
|
||||
@@ -105,7 +103,6 @@ internal static class GameState
|
||||
internal static bool IsShip => ShipStatus.Instance != null;
|
||||
internal static bool IsHost => AmongUsClient.Instance != null && AmongUsClient.Instance.AmHost;
|
||||
internal static bool IsPrivateOnlyLobby => (BAUPlugin.PrivateOnlyLobby.Value || AmongUsClient.Instance.AmLocalHost) && IsHost;
|
||||
internal static bool IsBetterHostLobby => PlayerControl.LocalPlayer?.IsHost() == true || BAUPlugin.AllPlayerControls.Any(pc => pc?.BetterData() != null && pc.IsHost() && pc.BetterData().IsBetterUser && pc.BetterData().IsVerifiedBetterUser);
|
||||
internal static bool IsCanMove => PlayerControl.LocalPlayer?.CanMove is true;
|
||||
internal static bool IsDead => PlayerControl.LocalPlayer?.Data?.IsDead is true;
|
||||
}
|
||||
Reference in new issue
Block a user