[ShareBubbles] no send shit if no people

This commit is contained in:
NotAKidoS 2025-04-29 00:33:43 -05:00
parent da6520beb0
commit d54ec06190
3 changed files with 29 additions and 1 deletions

View file

@ -1,4 +1,5 @@
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web;
using ABI_RC.Core.Networking;

View file

@ -1,4 +1,5 @@
using ABI_RC.Core.Networking;
using ABI_RC.Core.Player;
using DarkRift;
using UnityEngine;
@ -9,7 +10,9 @@ public static partial class ModNetwork
#region Private Methods
private static bool CanSendModNetworkMessage()
=> _isSubscribedToModNetwork && IsConnectedToGameNetwork();
=> _isSubscribedToModNetwork
&& IsConnectedToGameNetwork()
&& CVRPlayerManager.Instance.NetworkPlayers.Count > 0; // No need to send if there are no players
private static bool IsConnectedToGameNetwork()
{