Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NetProviders/FishNet/FishNetNetProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class FishNetNetProvider : NetworkBehaviour, INetProvider
public static IReadOnlyList<FishNetNetProvider> Instances => instances;
#endregion

bool INetProvider.IsLocalPlayerDeafened => LocalPlayerInstance.MetaVc.isDeafened;
bool INetProvider.IsLocalPlayerDeafened => LocalPlayerInstance != null && LocalPlayerInstance.MetaVc.isDeafened;

public MetaVc MetaVc { get; private set; }

Expand Down
2 changes: 1 addition & 1 deletion NetProviders/Mirror/MirrorNetProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class MirrorNetProvider : NetworkBehaviour, INetProvider
public static IReadOnlyList<MirrorNetProvider> Instances => instances;
#endregion

bool INetProvider.IsLocalPlayerDeafened => LocalPlayerInstance.MetaVc.isDeafened;
bool INetProvider.IsLocalPlayerDeafened => LocalPlayerInstance != null && LocalPlayerInstance.MetaVc.isDeafened;

public MetaVc MetaVc { get; private set; }

Expand Down
8 changes: 7 additions & 1 deletion NetProviders/Netick/NetickNetProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class NetickNetProvider : NetworkBehaviour, INetProvider
public static IReadOnlyList<NetickNetProvider> Instances => instances;
#endregion

bool INetProvider.IsLocalPlayerDeafened => LocalPlayerInstance.MetaVc.isDeafened;
bool INetProvider.IsLocalPlayerDeafened => LocalPlayerInstance != null && LocalPlayerInstance.MetaVc.isDeafened;

public MetaVc MetaVc { get; private set; }

Expand Down Expand Up @@ -78,6 +78,12 @@ public override void NetworkDestroy()

void INetProvider.RelayFrame(int index, double timestamp, ReadOnlySpan<byte> data)
{
if (VoiceDataTransmitter == null)
{
Debug.LogError("[MetaVoiceChat] MetaVoiceChatNetick component is missing from the Sandbox prefab.");
return;
}

float additionalLatency = GetAdditionalLatency();

if (Sandbox.IsServer)
Expand Down