diff --git a/src/Enums/CustomPlatforms.cs b/src/Enums/CustomPlatforms.cs new file mode 100644 index 0000000..10a58e6 --- /dev/null +++ b/src/Enums/CustomPlatforms.cs @@ -0,0 +1,12 @@ +namespace BetterAmongUs.Enums; + +/// +/// Represents custom platform identifiers. +/// +internal enum CustomPlatforms +{ + /// + /// Starlight. + /// + Starlight = 112 +} \ No newline at end of file diff --git a/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs b/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs index de8d22a..f11a435 100644 --- a/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs +++ b/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs @@ -1,5 +1,6 @@ using BepInEx.Unity.IL2CPP.Utils; using BetterAmongUs.Data.Config; +using BetterAmongUs.Enums; using BetterAmongUs.Generated; using BetterAmongUs.Managers; using BetterAmongUs.Modules; @@ -40,6 +41,11 @@ internal static class PlatformSpoofPatch if (player != null && __instance != null) { + if (__instance.Platform == (Platforms)CustomPlatforms.Starlight) + { + yield break; + } + // Check Xbox/Windows store players for invalid platform ID length if (__instance.Platform is Platforms.StandaloneWin10 or Platforms.Xbox) {