mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 19:10:32 +00:00
NetworkServer.SetClientReady: remove unnecessary null check because we don't have one in the above foreach either, and we don't have them anywhere else for NetworkIdentity.spawned because OnDestroy removes objects from it before they become null. The only way to cause this would be by calling Destroy(GetComponent<NetworkIdentity>()) - which no one does, and if someone does it then it's fine to get an exception here.
This commit is contained in:
parent
9567daedba
commit
400bb91821
@ -801,11 +801,6 @@ public static void SetClientReady(NetworkConnection conn)
|
|||||||
|
|
||||||
foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values)
|
foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values)
|
||||||
{
|
{
|
||||||
if (identity == null)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("Invalid object found in server local object list (null NetworkIdentity).");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!identity.gameObject.activeSelf)
|
if (!identity.gameObject.activeSelf)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user