Skip to content

Commit

Permalink
Rename NetworkServer.localClientActive
Browse files Browse the repository at this point in the history
use NetworkServer.localClient.active

BREAKING CHANGE: rename localClientActive to LocalClientActive
  • Loading branch information
paulpach committed Jan 25, 2020
1 parent c87a38a commit 7cd0894
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Assets/Mirror/Runtime/NetworkServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ public class NetworkServer : MonoBehaviour
// The host client for this server
public NetworkClient localClient;

/// <summary>
/// <para>True is a local client is currently active on the server.</para>
/// <para>This will be true for "Hosts" on hosted server games.</para>
/// </summary>
public bool localClientActive => localClient.active;

/// <summary>
/// A list of local connections on the server.
/// </summary>
Expand Down Expand Up @@ -1091,7 +1085,7 @@ void DestroyObject(NetworkIdentity identity, bool destroyServerObject)
SendToObservers(identity, msg);

identity.ClearObservers();
if (identity.client.active && localClientActive)
if (localClient != null && localClient.active)
{
identity.OnNetworkDestroy();
}
Expand Down

0 comments on commit 7cd0894

Please sign in to comment.