fix debug bypass

This commit is contained in:
D1GQ committed 2024-08-09 10:25:10 -05:00
1 parent 032b276df7
commit 330cf8cd94
5 files changed
+6 -5

No files matched your search

+1 -1
View File
@@ -228,7 +228,7 @@ public class DebugMenu : MonoBehaviour
public void Toggle()
{
if (!GameStates.IsDev) return;
if (!GameStates.IsDev || Main.ReleaseBuildType != ReleaseTypes.Dev) return;
WindowEnabled = !WindowEnabled;
}
+1 -1
View File
@@ -142,7 +142,7 @@ static class ExtendedPlayerControl
public static Vector2 GetCustomPosition(this PlayerControl player) => new(player.transform.position.x, player.transform.position.y);
// Check if player is a dev
public static bool IsDev(this PlayerControl player) => player != null && Main.DevUser.Contains(Utils.GetHashPuid(player));
public static bool IsDev(this PlayerControl player) => player != null && Main.DevUser.Contains($"{Utils.GetHashPuid(player)}+{player.Data.FriendCode}");
// Check if player is alive
public static bool IsAlive(this PlayerControl player) => player?.Data != null && !player.Data.IsDead;
// Check if player is in a vent
+1 -1
View File
@@ -8,7 +8,7 @@ namespace BetterAmongUs;
public static class GameStates
{
/**********Check Game Status***********/
public static bool IsDev => EOSManager.Instance?.userId != null && Main.DevUser.Contains(Utils.GetHashPuid(EOSManager.Instance.userId.ToString()));
public static bool IsDev => EOSManager.Instance?.userId != null && Main.DevUser.Contains($"{Utils.GetHashPuid(EOSManager.Instance.userId.ToString())}+{EOSManager.Instance.friendCode}");
public static bool InGame => Main.AllPlayerControls.Any();
public static bool IsNormalGame => GameOptionsManager.Instance.CurrentGameOptions.GameMode is GameModes.Normal or GameModes.NormalFools;
public static bool IsHideNSeek => GameOptionsManager.Instance.CurrentGameOptions.GameMode is GameModes.HideNSeek or GameModes.SeekFools;