more Platform checks

This commit is contained in:
D1GQ committed 2024-09-08 23:20:32 -05:00
1 parent 65ba51d10a
commit 12f790d1da
2 files changed
+13 -2

No files matched your search

+6
View File
@@ -3,6 +3,7 @@ using BetterAmongUs.Patches;
using HarmonyLib;
using Hazel;
using InnerNet;
using Sentry.Internal.Extensions;
namespace BetterAmongUs;
@@ -89,6 +90,11 @@ class AntiCheat
Logger.LogCheat($"{player.BetterData().RealName} Platform Spoofer: {__instance.PsnPlatformId}");
}
}
if (__instance.Platform is Platforms.Unknown || !Enum.IsDefined(__instance.Platform))
{
BetterNotificationManager.NotifyCheat(player, $"Platform Spoofer", newText: "Has been detected with a cheat");
}
}
}, 3.5f, shoudLog: false);
}
+7 -2
View File
@@ -1,5 +1,6 @@
using AmongUs.GameOptions;
using InnerNet;
using Sentry.Internal.Extensions;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
@@ -298,11 +299,15 @@ public static class Utils
PlatformName = "IPhone";
Tag = "Mobile";
break;
case Platforms p when !Enum.IsDefined(p):
case Platforms.Unknown:
PlatformName = "None";
PlatformName = "Unknown";
useTag = false;
break;
default:
return string.Empty;
PlatformName = "None";
useTag = false;
break;
}
if (useTag == false)