Ignore Starlight platform when checking for platform spoof

This commit is contained in:
D1GQ committed 2026-08-21 19:42:22 -05:00
1 parent 1aee8ba1cd
commit 0cfd47e7f6
2 files changed
+18

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
namespace BetterAmongUs.Enums;
/// <summary>
/// Represents custom platform identifiers.
/// </summary>
internal enum CustomPlatforms
{
/// <summary>
/// Starlight.
/// </summary>
Starlight = 112
}
@@ -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)
{