Skip to content

Commit 05bee43

Browse files
committed
Fixed NetworkedBehaviour properties
1 parent 061d4a3 commit 05bee43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ public abstract partial class NetworkedBehaviour : MonoBehaviour
3737
/// <summary>
3838
/// Gets if we are executing as server
3939
/// </summary>
40-
protected bool IsServer => IsRunning && NetworkingManager.Singleton != null && NetworkingManager.Singleton.IsServer;
40+
protected bool IsServer => IsRunning && NetworkingManager.Singleton.IsServer;
4141
[Obsolete("Use IsClient instead")]
4242
protected bool isClient => IsClient;
4343
/// <summary>
4444
/// Gets if we are executing as client
4545
/// </summary>
46-
protected bool IsClient => IsRunning && NetworkingManager.Singleton != null && NetworkingManager.Singleton.IsClient;
46+
protected bool IsClient => IsRunning && NetworkingManager.Singleton.IsClient;
4747
[Obsolete("Use IsHost instead", false)]
4848
protected bool isHost => IsHost;
4949
/// <summary>
5050
/// Gets if we are executing as Host, I.E Server and Client
5151
/// </summary>
52-
protected bool IsHost => IsRunning && NetworkingManager.Singleton != null && NetworkingManager.Singleton.IsHost;
53-
private bool IsRunning => NetworkingManager.Singleton != null && (NetworkingManager.Singleton == null || NetworkingManager.Singleton.IsListening);
52+
protected bool IsHost => IsRunning && NetworkingManager.Singleton.IsHost;
53+
private bool IsRunning => NetworkingManager.Singleton != null && NetworkingManager.Singleton.IsListening;
5454
[Obsolete("Use IsOwnedByServer instead", false)]
5555
public bool isOwnedByServer => IsOwnedByServer;
5656
/// <summary>

0 commit comments

Comments
 (0)