mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Clean up
This commit is contained in:
1 parent
792ccf72b2
commit
5359ba7f46
2 files changed
+8
-6
No files matched your search
+5
-3
@@ -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.
|
||||
|
||||
@@ -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}");
|
||||
|
||||
Reference in new issue
Block a user