diff --git a/Fika.Core/Coop/GameMode/CoopGame.cs b/Fika.Core/Coop/GameMode/CoopGame.cs index c0401b15..4b256f7e 100644 --- a/Fika.Core/Coop/GameMode/CoopGame.cs +++ b/Fika.Core/Coop/GameMode/CoopGame.cs @@ -574,7 +574,8 @@ private async Task WaitForPlayersToLoadBotProfile(int netId) { botQueue.Add(netId, 0); DateTime start = DateTime.Now; - int connectedPeers = Singleton.Instance.NetServer.ConnectedPeersCount; + FikaServer server = Singleton.Instance; + int connectedPeers = server.NetServer.ConnectedPeersCount; while (botQueue[netId] < connectedPeers) { @@ -586,6 +587,7 @@ private async Task WaitForPlayersToLoadBotProfile(int netId) } await Task.Delay(250); + connectedPeers = server.NetServer.ConnectedPeersCount; } botQueue.Remove(netId);