mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-19 15:51:52 +00:00
clean up
This commit is contained in:
1 parent
fbe5d7cc36
commit
c06e2414ac
2 files changed
+6
-1
No files matched your search
@@ -40,7 +40,9 @@ internal static class PlayerControlHelper
|
||||
var snapshot = AmongUsClient.Instance.allClients.ToArray();
|
||||
foreach (var client in snapshot)
|
||||
{
|
||||
if (client?.Character == null) continue;
|
||||
if (client == null) continue;
|
||||
if (client.Character == null) continue;
|
||||
|
||||
if (client.Character.PlayerId == player.PlayerId)
|
||||
return client;
|
||||
}
|
||||
|
||||
@@ -123,6 +123,9 @@ internal static class PlayerJoinAndLeftPatch
|
||||
|
||||
internal static void BetterShowNotification(NetworkedPlayerInfo playerData, DisconnectReasons reason = DisconnectReasons.Unknown, string forceReasonText = "")
|
||||
{
|
||||
if (playerData == null)
|
||||
return;
|
||||
|
||||
// Prevent showing duplicate notifications
|
||||
if (playerData.ExtendedData().AntiCheatInfo.BannedByAntiCheat || playerData.ExtendedData().HasShowDcMsg)
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user