mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 14:59:23 +00:00
[ShareBubbles] no send shit if no people
This commit is contained in:
parent
da6520beb0
commit
d54ec06190
3 changed files with 29 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using ABI_RC.Core.Networking;
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue