Skip to content

Commit

Permalink
fix: Lobby comp should not reference NetworkConnection.IsReady (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Oct 6, 2020
1 parent 737d77a commit 6a1a190
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Assets/Mirror/Components/LobbyReady.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public void SendToReady<T>(NetworkIdentity identity, T msg, bool includeOwner =

connectionsCache.Clear();

foreach (INetworkConnection connection in identity.observers)
foreach (ObjectReady objectReady in ObjectReadyList)
{
bool isOwner = connection == identity.ConnectionToClient;
if ((!isOwner || includeOwner) && connection.IsReady)
bool isOwner = objectReady.NetIdentity == identity;
if ((!isOwner || includeOwner) && objectReady.IsReady)
{
connectionsCache.Add(connection);
connectionsCache.Add(objectReady.NetIdentity.ConnectionToClient);
}
}

Expand Down

0 comments on commit 6a1a190

Please sign in to comment.