This commit is contained in:
D1GQ committed 2026-03-17 14:56:31 -05:00
1 parent 792ccf72b2
commit 5359ba7f46
2 files changed
+8 -6

No files matched your search

+5 -3
View File
@@ -1,4 +1,6 @@
using BepInEx;
#pragma warning disable CS0162
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using BetterAmongUs.Attributes;
@@ -93,12 +95,12 @@ internal class BAUPlugin : BasePlugin
/// <summary>
/// Gets the list of all alive PlayerControl instances.
/// </summary>
internal static List<PlayerControl> AllAlivePlayerControls => AllPlayerControls.Where(pc => pc.IsAlive()).ToList();
internal static List<PlayerControl> AllAlivePlayerControls => [.. AllPlayerControls.Where(pc => pc.IsAlive())];
/// <summary>
/// Gets all DeadBody objects in the scene.
/// </summary>
internal static DeadBody[] AllDeadBodys => UnityEngine.Object.FindObjectsOfType<DeadBody>().ToArray();
internal static DeadBody[] AllDeadBodys => [.. UnityEngine.Object.FindObjectsOfType<DeadBody>()];
/// <summary>
/// Gets all Vent objects in the scene.
+3 -3
View File
@@ -154,11 +154,11 @@ internal sealed class HandshakeHandler
if (!_pendingVerificationData.HasValue) return;
if (SharedSecret.GetSharedSecret().Length == 0) return;
var data = _pendingVerificationData.Value;
var (tempKey, receivedHash) = _pendingVerificationData.Value;
// Logger.Log($"Received hash check: TempKey={data.tempKey} (ours={SharedSecret.GetTempKey()}), Hash={data.receivedHash} (ours={SharedSecret.GetSharedSecretHash()})");
if (data.tempKey != SharedSecret.GetTempKey())
if (tempKey != SharedSecret.GetTempKey())
{
// Logger.Warning($"Invalid tempKey from {extendedData._Data?.PlayerName}");
return;
@@ -166,7 +166,7 @@ internal sealed class HandshakeHandler
_extendedData.IsBetterUser = true;
if (data.receivedHash == SharedSecret.GetSharedSecretHash())
if (receivedHash == SharedSecret.GetSharedSecretHash())
{
_extendedData.IsVerifiedBetterUser = true;
// Logger.Log($"Verified player: {extendedData._Data?.PlayerName}");