From f71f44bb9f4a4eb4f1b31ba156d7c2587a7f8037 Mon Sep 17 00:00:00 2001 From: benine9 <134461550+benine9@users.noreply.github.com> Date: Wed, 20 Mar 2024 21:10:15 +0700 Subject: [PATCH] Update AutoBC.cs --- AutoBC/AutoBC.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutoBC/AutoBC.cs b/AutoBC/AutoBC.cs index 2585a35..acc357c 100644 --- a/AutoBC/AutoBC.cs +++ b/AutoBC/AutoBC.cs @@ -62,7 +62,7 @@ public override void Initialize() private void PlayerLeft(LeaveEventArgs args) { - if (TShock.Players.Count() == 0) + if (Main.player.Where(p=>p != null && p.active).Count() <= 1) { shouldBeBroadcasting = false; } @@ -70,7 +70,7 @@ private void PlayerLeft(LeaveEventArgs args) private void PlayerJoined(GreetPlayerEventArgs args) { - if(TShock.Players.Count() > 0 && shouldBeBroadcasting == false) + if(shouldBeBroadcasting == false) { shouldBeBroadcasting = true; ContinueBC();