NetworkServer.SetClientReady: use if+else instead of if + early return

This commit is contained in:
vis2k 2019-03-22 12:00:16 +01:00
parent 0e8b442cad
commit c176da7bc3

View File

@ -789,9 +789,9 @@ public static void SetClientReady(NetworkConnection conn)
} }
} }
} }
return;
} }
else
{
// Spawn/update all current server objects // Spawn/update all current server objects
if (LogFilter.Debug) Debug.Log("Spawning " + NetworkIdentity.spawned.Count + " objects for conn " + conn.connectionId); if (LogFilter.Debug) Debug.Log("Spawning " + NetworkIdentity.spawned.Count + " objects for conn " + conn.connectionId);
@ -820,6 +820,7 @@ public static void SetClientReady(NetworkConnection conn)
conn.Send(new ObjectSpawnFinishedMessage()); conn.Send(new ObjectSpawnFinishedMessage());
} }
}
internal static void ShowForConnection(NetworkIdentity identity, NetworkConnection conn) internal static void ShowForConnection(NetworkIdentity identity, NetworkConnection conn)
{ {